summaryrefslogtreecommitdiffstats
path: root/arch/Kconfig
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2022-03-26 03:27:05 +0100
committerAlexei Starovoitov <ast@kernel.org>2022-03-29 04:38:09 +0200
commit73f9b911faa74ac5107879de05c9489c419f41bb (patch)
treedb31d9a59c0ac9b21a7aa243bb8a2d02f0525c4f /arch/Kconfig
parentbpftool: Fix generated code in codegen_asserts (diff)
downloadlinux-73f9b911faa74ac5107879de05c9489c419f41bb.tar.xz
linux-73f9b911faa74ac5107879de05c9489c419f41bb.zip
kprobes: Use rethook for kretprobe if possible
Use rethook for kretprobe function return hooking if the arch sets CONFIG_HAVE_RETHOOK=y. In this case, CONFIG_KRETPROBE_ON_RETHOOK is set to 'y' automatically, and the kretprobe internal data fields switches to use rethook. If not, it continues to use kretprobe specific function return hooks. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/164826162556.2455864.12255833167233452047.stgit@devnote2
Diffstat (limited to 'arch/Kconfig')
-rw-r--r--arch/Kconfig8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 84bc1de02720..33e06966f248 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -164,7 +164,13 @@ config ARCH_USE_BUILTIN_BSWAP
config KRETPROBES
def_bool y
- depends on KPROBES && HAVE_KRETPROBES
+ depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK)
+
+config KRETPROBE_ON_RETHOOK
+ def_bool y
+ depends on HAVE_RETHOOK
+ depends on KRETPROBES
+ select RETHOOK
config USER_RETURN_NOTIFIER
bool