diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2022-03-15 15:00:50 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-03-18 04:16:29 +0100 |
commit | 54ecbe6f1ed5138c895bdff55608cf502755b20e (patch) | |
tree | 409360f3d1dd0bafbbbf390c201dced76a64e063 /kernel/trace/Kconfig | |
parent | fprobe: Add ftrace based probe APIs (diff) | |
download | linux-54ecbe6f1ed5138c895bdff55608cf502755b20e.tar.xz linux-54ecbe6f1ed5138c895bdff55608cf502755b20e.zip |
rethook: Add a generic return hook
Add a return hook framework which hooks the function return. Most of the
logic came from the kretprobe, but this is independent from kretprobe.
Note that this is expected to be used with other function entry hooking
feature, like ftrace, fprobe, adn kprobes. Eventually this will replace
the kretprobe (e.g. kprobe + rethook = kretprobe), but at this moment,
this is just an additional hook.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Tested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/164735285066.1084943.9259661137330166643.stgit@devnote2
Diffstat (limited to 'kernel/trace/Kconfig')
-rw-r--r-- | kernel/trace/Kconfig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 7ce31abc542b..e75504e42ab8 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -10,6 +10,17 @@ config USER_STACKTRACE_SUPPORT config NOP_TRACER bool +config HAVE_RETHOOK + bool + +config RETHOOK + bool + depends on HAVE_RETHOOK + help + Enable generic return hooking feature. This is an internal + API, which will be used by other function-entry hooking + features like fprobe and kprobes. + config HAVE_FUNCTION_TRACER bool help |