arm: kprobes: Make space for instruction pointer on stack
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 14 Sep 2021 14:42:02 +0000 (23:42 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 1 Oct 2021 01:24:07 +0000 (21:24 -0400)
commit7391dd19027cec4e0edf81b7c27079ae0ecd2d6b
tree5dbbd94c3d3a40026bcfe25d7687ed7e48db0808
parentc1f76fe58f6983205ad14045dbc303416d5e990a
arm: kprobes: Make space for instruction pointer on stack

Since arm's __kretprobe_trampoline() saves partial 'pt_regs' on the
stack, 'regs->ARM_pc' (instruction pointer) is not accessible from
the kretprobe handler. This means if instruction_pointer_set() is
used from kretprobe handler, it will break the data on the stack.

Make space for instruction pointer (ARM_pc) on the stack in the
__kretprobe_trampoline() for fixing this problem.

Link: https://lkml.kernel.org/r/163163052262.489837.10327621053231461255.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/arm/probes/kprobes/core.c