diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-03-26 23:50:11 +0900 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-05-12 17:15:33 +0200 |
commit | d85eaa9411472a99de4b5732cb59c8bae629d5f1 (patch) | |
tree | 4d35f76035c78c48da9b96cd298d462643342fdc /samples/kprobes/kretprobe_example.c | |
parent | 16db6264c93d2d7df9eb8be5d9eb717ab30105fe (diff) | |
download | linux-stable-d85eaa9411472a99de4b5732cb59c8bae629d5f1.tar.gz linux-stable-d85eaa9411472a99de4b5732cb59c8bae629d5f1.tar.bz2 linux-stable-d85eaa9411472a99de4b5732cb59c8bae629d5f1.zip |
samples/kprobes: Add __kprobes and NOKPROBE_SYMBOL() for handlers.
Add __kprobes and NOKPROBE_SYMBOL() for sample kprobe handlers.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200505134059.878578033@linutronix.de
Diffstat (limited to 'samples/kprobes/kretprobe_example.c')
-rw-r--r-- | samples/kprobes/kretprobe_example.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/samples/kprobes/kretprobe_example.c b/samples/kprobes/kretprobe_example.c index 186315ca88b3..013e8e6ebae9 100644 --- a/samples/kprobes/kretprobe_example.c +++ b/samples/kprobes/kretprobe_example.c @@ -48,6 +48,7 @@ static int entry_handler(struct kretprobe_instance *ri, struct pt_regs *regs) data->entry_stamp = ktime_get(); return 0; } +NOKPROBE_SYMBOL(entry_handler); /* * Return-probe handler: Log the return value and duration. Duration may turn @@ -67,6 +68,7 @@ static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs) func_name, retval, (long long)delta); return 0; } +NOKPROBE_SYMBOL(ret_handler); static struct kretprobe my_kretprobe = { .handler = ret_handler, |