diff options
author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2023-06-06 14:39:55 +0200 |
---|---|---|
committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2023-06-06 14:39:55 +0200 |
commit | cb16330d12741f6dae56aad5acf62f5be3a06c4e (patch) | |
tree | 989f603fa2a1d02a0e12fc411435337102f45e8b /kernel/kprobes.c | |
parent | Linux 6.4-rc5 (diff) | |
download | linux-cb16330d12741f6dae56aad5acf62f5be3a06c4e.tar.xz linux-cb16330d12741f6dae56aad5acf62f5be3a06c4e.zip |
fprobe: Pass return address to the handlers
Pass return address as 'ret_ip' to the fprobe entry and return handlers
so that the fprobe user handler can get the reutrn address without
analyzing arch-dependent pt_regs.
Link: https://lore.kernel.org/all/168507467664.913472.11642316698862778600.stgit@mhiramat.roam.corp.google.com/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r-- | kernel/kprobes.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 00e177de91cc..ce13f1a35251 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2127,6 +2127,7 @@ static int pre_handler_kretprobe(struct kprobe *p, struct pt_regs *regs) NOKPROBE_SYMBOL(pre_handler_kretprobe); static void kretprobe_rethook_handler(struct rethook_node *rh, void *data, + unsigned long ret_addr, struct pt_regs *regs) { struct kretprobe *rp = (struct kretprobe *)data; |