]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
kprobes/x86: Show x86-64 specific blacklisted symbols correctly
authorMasami Hiramatsu <mhiramat@kernel.org>
Mon, 17 Dec 2018 08:21:24 +0000 (17:21 +0900)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:53 +0000 (14:21 -0300)
BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit fe6e65615415987629a2dda583b4495677d8c388 ]

Show x86-64 specific blacklisted symbols in debugfs.

Since x86-64 prohibits probing on symbols which are in
entry text, those should be shown.

Tested-by: Andrea Righi <righi.andrea@gmail.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yonghong Song <yhs@fb.com>
Link: http://lkml.kernel.org/r/154503488425.26176.17136784384033608516.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/kernel/kprobes/core.c

index e6ce0fb160cc0352324b73cf32d5da8da62fe771..5a586d8c07c5ae6536d96e96dadfe1b744466cef 100644 (file)
@@ -1244,6 +1244,12 @@ bool arch_within_kprobe_blacklist(unsigned long addr)
                is_in_entry_trampoline_section;
 }
 
+int __init arch_populate_kprobe_blacklist(void)
+{
+       return kprobe_add_area_blacklist((unsigned long)__entry_text_start,
+                                        (unsigned long)__entry_text_end);
+}
+
 int __init arch_init_kprobes(void)
 {
        return 0;