]> git.baikalelectronics.ru Git - kernel.git/commit
kprobes: Use rethook for kretprobe if possible
authorMasami Hiramatsu <mhiramat@kernel.org>
Sat, 26 Mar 2022 02:27:05 +0000 (11:27 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Mar 2022 02:38:09 +0000 (19:38 -0700)
commit7df43f83baa803d6c269fa4f308731932830e2de
treedb31d9a59c0ac9b21a7aa243bb8a2d02f0525c4f
parentf893a20c7a9c90d8db9f61e0d64a94a491487069
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
arch/Kconfig
include/linux/kprobes.h
kernel/Makefile
kernel/kprobes.c
kernel/trace/trace_kprobe.c