]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:59:33 +0000 (19:59 -0600)
commit7782046eff39fe4fd8604a2f71d617ed6c09a46c
tree14df838c3cc337a88af99f7f442fc2f770cb9cda
parent1e228db7aa699c549a1ba4c87def9fd65b99c743
tracing/kprobes: Check the probe on unloaded module correctly

BugLink: https://bugs.launchpad.net/bugs/1836802
[ Upstream commit 59158ec4aef7d44be51a6f3e7e17fc64c32604eb ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
kernel/trace/trace_kprobe.c