]> git.baikalelectronics.ru Git - kernel.git/commit
kprobes: Add kretprobe_find_ret_addr() for searching return address
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 14 Sep 2021 14:41:04 +0000 (23:41 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 1 Oct 2021 01:24:06 +0000 (21:24 -0400)
commita4a59017549a0be2dcaed8b7b3f9f9a8626a30f5
treed0c76f97fdbde14a6a8a755c50c50111a03bd335
parent49723ee10f317f25a8445873e4b1ebedd0e8f663
kprobes: Add kretprobe_find_ret_addr() for searching return address

Introduce kretprobe_find_ret_addr() and is_kretprobe_trampoline().
These APIs will be used by the ORC stack unwinder and ftrace, so that
they can check whether the given address points kretprobe trampoline
code and query the correct return address in that case.

Link: https://lkml.kernel.org/r/163163046461.489837.1044778356430293962.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/kprobes.h
kernel/kprobes.c