OSDN Git Service

arm64: kprobes: Make a frame pointer on __kretprobe_trampoline
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 21 Oct 2021 00:55:00 +0000 (09:55 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 22 Oct 2021 16:16:53 +0000 (12:16 -0400)
commitfc6d647638a8412800dfd10ad687709cb4aee373
tree0da06b9037ca670a5a513cbe50bb47676b381022
parentf8717410621571b182d3f2c45ffc52796c418787
arm64: kprobes: Make a frame pointer on __kretprobe_trampoline

Make a frame pointer (make the x29 register points the
address of pt_regs->regs[29]) on __kretprobe_trampoline.

This frame pointer will be used by the stacktracer when it is
called from the kretprobe handlers. In this case, the stack
tracer will unwind stack to trampoline_probe_handler() and
find the next frame pointer in the stack frame of the
__kretprobe_trampoline().

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/arm64/kernel/probes/kprobes_trampoline.S