]> git.baikalelectronics.ru Git - kernel.git/commit
x86/kprobes: Push a fake return address at kretprobe_trampoline
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 14 Sep 2021 14:42:22 +0000 (23:42 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 1 Oct 2021 01:24:07 +0000 (21:24 -0400)
commitd0b0d5fd60febee0f331b6d51e0cc5619f0b5df2
treef28e70d7617147faaad89155589872b72d0f7bbe
parentb61adf69d63c097e5eca04b642cc58f9dc43ad68
x86/kprobes: Push a fake return address at kretprobe_trampoline

Change __kretprobe_trampoline() to push the address of the
__kretprobe_trampoline() as a fake return address at the bottom
of the stack frame. This fake return address will be replaced
with the correct return address in the trampoline_handler().

With this change, the ORC unwinder can check whether the return
address is modified by kretprobes or not.

Link: https://lkml.kernel.org/r/163163054185.489837.14338744048957727386.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/x86/kernel/kprobes/core.c