]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: kprobes: Prohibit probing on notrace function
authorMasami Hiramatsu <mhiramat@kernel.org>
Mon, 30 Jul 2018 10:20:14 +0000 (19:20 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 30 Jul 2018 22:28:52 +0000 (18:28 -0400)
commit88a73c82c538f7e3b04363d19a120e91ea989e08
tree0deca678bf0954a7224acd62f4a805d8d6eb1788
parent3c8ef8c894e400d1622a1cb6d11f2a7a71a2555d
tracing: kprobes: Prohibit probing on notrace function

Prohibit kprobe-events probing on notrace functions.  Since probing on a
notrace function can cause a recursive event call. In most cases those are just
skipped, but in some cases it falls into an infinite recursive call.

This protection can be disabled by the kconfig
CONFIG_KPROBE_EVENTS_ON_NOTRACE=y, but it is highly recommended to keep it
"n" for normal kernel builds.  Note that this is only available if "kprobes on
ftrace" has been implemented on the target arch and CONFIG_KPROBES_ON_FTRACE=y.

Link: http://lkml.kernel.org/r/153294601436.32740.10557881188933661239.stgit@devbox
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Francis Deslauriers <francis.deslauriers@efficios.com>
[ Slight grammar and spelling fixes ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/Kconfig
kernel/trace/trace_kprobe.c