kprobes.c (29e8077ae2beea6a85ad2d0bae9c550bd5d05ed9) kprobes.c (f2ec8d9a3b8c0f22cd6a2b4f5a2d9aee5206e3b7)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Kernel Probes (KProbes)
4 *
5 * Copyright (C) IBM Corporation, 2002, 2004
6 *
7 * 2002-Oct Created by Vamsi Krishna S <vamsi_krishna@in.ibm.com> Kernel
8 * Probes initial implementation (includes suggestions from

--- 1847 unchanged lines hidden (view full) ---

1856}
1857NOKPROBE_SYMBOL(kprobe_exceptions_notify);
1858
1859static struct notifier_block kprobe_exceptions_nb = {
1860 .notifier_call = kprobe_exceptions_notify,
1861 .priority = 0x7fffffff /* we need to be notified first */
1862};
1863
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Kernel Probes (KProbes)
4 *
5 * Copyright (C) IBM Corporation, 2002, 2004
6 *
7 * 2002-Oct Created by Vamsi Krishna S <vamsi_krishna@in.ibm.com> Kernel
8 * Probes initial implementation (includes suggestions from

--- 1847 unchanged lines hidden (view full) ---

1856}
1857NOKPROBE_SYMBOL(kprobe_exceptions_notify);
1858
1859static struct notifier_block kprobe_exceptions_nb = {
1860 .notifier_call = kprobe_exceptions_notify,
1861 .priority = 0x7fffffff /* we need to be notified first */
1862};
1863
1864unsigned long __weak arch_deref_entry_point(void *entry)
1865{
1866 return (unsigned long)entry;
1867}
1868
1869#ifdef CONFIG_KRETPROBES
1870
1871unsigned long __kretprobe_trampoline_handler(struct pt_regs *regs,
1872 void *trampoline_address,
1873 void *frame_pointer)
1874{
1875 kprobe_opcode_t *correct_ret_addr = NULL;
1876 struct kretprobe_instance *ri = NULL;

--- 445 unchanged lines hidden (view full) ---

2322static int __init populate_kprobe_blacklist(unsigned long *start,
2323 unsigned long *end)
2324{
2325 unsigned long entry;
2326 unsigned long *iter;
2327 int ret;
2328
2329 for (iter = start; iter < end; iter++) {
1864#ifdef CONFIG_KRETPROBES
1865
1866unsigned long __kretprobe_trampoline_handler(struct pt_regs *regs,
1867 void *trampoline_address,
1868 void *frame_pointer)
1869{
1870 kprobe_opcode_t *correct_ret_addr = NULL;
1871 struct kretprobe_instance *ri = NULL;

--- 445 unchanged lines hidden (view full) ---

2317static int __init populate_kprobe_blacklist(unsigned long *start,
2318 unsigned long *end)
2319{
2320 unsigned long entry;
2321 unsigned long *iter;
2322 int ret;
2323
2324 for (iter = start; iter < end; iter++) {
2330 entry = arch_deref_entry_point((void *)*iter);
2325 entry = (unsigned long)dereference_symbol_descriptor((void *)*iter);
2331 ret = kprobe_add_ksym_blacklist(entry);
2332 if (ret == -EINVAL)
2333 continue;
2334 if (ret < 0)
2335 return ret;
2336 }
2337
2338 /* Symbols in '__kprobes_text' are blacklisted */

--- 476 unchanged lines hidden ---
2326 ret = kprobe_add_ksym_blacklist(entry);
2327 if (ret == -EINVAL)
2328 continue;
2329 if (ret < 0)
2330 return ret;
2331 }
2332
2333 /* Symbols in '__kprobes_text' are blacklisted */

--- 476 unchanged lines hidden ---