]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/kprobes: Check the probe on unloaded module correctly
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 28 Aug 2018 16:18:15 +0000 (01:18 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 11 Oct 2018 02:19:12 +0000 (22:19 -0400)
commitfc6494ffa9180bc57b724b7da9254205388f2702
treec1fd1181cda8d4b5b7a5856922ea7f54ed14bd13
parent6884eb437d6ff908d21cda5fa1f798d99b3d7ad0
tracing/kprobes: Check the probe on unloaded module correctly

Current kprobe event doesn't checks correctly whether the
given event is on unloaded module or not. It just checks
the event has ":" in the name.

That is not enough because if we define a probe on non-exist
symbol on loaded module, it allows to define that (with
warning message)

To ensure it correctly, this searches the module name on
loaded module list and only if there is not, it allows to
define it. (this event will be available when the target
module is loaded)

Link: http://lkml.kernel.org/r/153547309528.26502.8300278470528281328.stgit@devbox
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_kprobe.c