aboutsummaryrefslogtreecommitdiff
path: root/kernel/trace/trace_output.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-09-14 23:42:12 +0900
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-09-30 21:24:07 -0400
commitdf91c5bccb0c2cb868b54bd68a6ddf1fcbede6b1 (patch)
treea59ebf2643820e0c4a7928e667f9b86fc77a7a7c /kernel/trace/trace_output.c
parent7391dd19027cec4e0edf81b7c27079ae0ecd2d6b (diff)
downloadlinux-df91c5bccb0c2cb868b54bd68a6ddf1fcbede6b1.tar.gz
linux-df91c5bccb0c2cb868b54bd68a6ddf1fcbede6b1.tar.bz2
linux-df91c5bccb0c2cb868b54bd68a6ddf1fcbede6b1.zip
kprobes: Enable stacktrace from pt_regs in kretprobe handler
Since the ORC unwinder from pt_regs requires setting up regs->ip correctly, set the correct return address to the regs->ip before calling user kretprobe handler. This allows the kretrprobe handler to trace stack from the kretprobe's pt_regs by stack_trace_save_regs() (eBPF will do this), instead of stack tracing from the handler context by stack_trace_save() (ftrace will do this). Link: https://lkml.kernel.org/r/163163053237.489837.4272653874525136832.stgit@devnote2 Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Tested-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_output.c')
0 files changed, 0 insertions, 0 deletions