aboutsummaryrefslogtreecommitdiff
path: root/kernel/trace/rethook.c
diff options
context:
space:
mode:
authorGravatar Masami Hiramatsu (Google) <mhiramat@kernel.org> 2023-06-06 21:39:55 +0900
committerGravatar Masami Hiramatsu (Google) <mhiramat@kernel.org> 2023-06-06 21:39:55 +0900
commitcb16330d12741f6dae56aad5acf62f5be3a06c4e (patch)
tree989f603fa2a1d02a0e12fc411435337102f45e8b /kernel/trace/rethook.c
parentLinux 6.4-rc5 (diff)
downloadlinux-cb16330d12741f6dae56aad5acf62f5be3a06c4e.tar.gz
linux-cb16330d12741f6dae56aad5acf62f5be3a06c4e.tar.bz2
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/trace/rethook.c')
-rw-r--r--kernel/trace/rethook.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/rethook.c b/kernel/trace/rethook.c
index 60f6cb2b486b..f32ee484391a 100644
--- a/kernel/trace/rethook.c
+++ b/kernel/trace/rethook.c
@@ -301,7 +301,8 @@ unsigned long rethook_trampoline_handler(struct pt_regs *regs,
break;
handler = READ_ONCE(rhn->rethook->handler);
if (handler)
- handler(rhn, rhn->rethook->data, regs);
+ handler(rhn, rhn->rethook->data,
+ correct_ret_addr, regs);
if (first == node)
break;