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)
commit03bac0df2886882c43e6d0bfff9dee84a184fc7e
treed0c76f97fdbde14a6a8a755c50c50111a03bd335
parentadf8a61a940c49fea6fab9c3865f2b69b8ceef28
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