]> 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)
commit3d1c0e03b287e07e56f53af7453af1d051035d6c
tree0deca678bf0954a7224acd62f4a805d8d6eb1788
parent0c8b1e2ca0aba7bb158efa01bb4d628e7085b95b
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