]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
kprobes: tracing/kprobes: Fix to kill kprobes on initmem after boot
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 10 Sep 2020 08:55:05 +0000 (17:55 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 18 Sep 2020 18:27:24 +0000 (14:27 -0400)
commit82d083ab60c3693201c6f5c7a5f23a6ed422098d
tree7f06f17d223c18e2687cf2da136590e85a1502fc
parent46bbe5c671e06f070428b9be142cc4ee5cedebac
kprobes: tracing/kprobes: Fix to kill kprobes on initmem after boot

Since kprobe_event= cmdline option allows user to put kprobes on the
functions in initmem, kprobe has to make such probes gone after boot.
Currently the probes on the init functions in modules will be handled
by module callback, but the kernel init text isn't handled.
Without this, kprobes may access non-exist text area to disable or
remove it.

Link: https://lkml.kernel.org/r/159972810544.428528.1839307531600646955.stgit@devnote2
Fixes: 970988e19eb0 ("tracing/kprobe: Add kprobe_event= boot parameter")
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/kprobes.h
init/main.c
kernel/kprobes.c