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)
committerIngo Molnar <mingo@kernel.org>
Mon, 17 Dec 2018 16:48:39 +0000 (17:48 +0100)
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>
arch/x86/kernel/kprobes/core.c

index c33b06f5faa4079bb87392d42dd232ad6a2fe5a1..6011a4a90f0ae29aca1fd6dc60e34ac219e1f358 100644 (file)
@@ -1034,6 +1034,12 @@ bool arch_within_kprobe_blacklist(unsigned long addr)
                 addr < (unsigned long)__entry_text_end);
 }
 
+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;