From: Masami Hiramatsu Date: Mon, 17 Dec 2018 08:21:24 +0000 (+0900) Subject: kprobes/x86: Show x86-64 specific blacklisted symbols correctly X-Git-Tag: android-x86-9.0-r1~4^2~67^2~192 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=962b1f6b0307c205467fe868b7c68f85f44c6c7d;p=android-x86%2Fkernel.git kprobes/x86: Show x86-64 specific blacklisted symbols correctly [ 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 Signed-off-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: David S. Miller Cc: Linus Torvalds Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Link: http://lkml.kernel.org/r/154503488425.26176.17136784384033608516.stgit@devbox Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index e83a057564d1..173e915e11d5 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c @@ -1140,6 +1140,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;