]> 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)
commit9a43de67064a91725ac4193d7168da9154571510
treed0c76f97fdbde14a6a8a755c50c50111a03bd335
parente3dea883c2d3d4ae35a5746a0da1d6fa8c751caf
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