summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/kprobes.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 898ee56d4f48..ab1bfa3d1d9c 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -2326,8 +2326,16 @@ static int kprobe_blacklist_seq_show(struct seq_file *m, void *v)
struct kprobe_blacklist_entry *ent =
list_entry(v, struct kprobe_blacklist_entry, list);
- seq_printf(m, "0x%px-0x%px\t%ps\n", (void *)ent->start_addr,
- (void *)ent->end_addr, (void *)ent->start_addr);
+ /*
+ * If /proc/kallsyms is not showing kernel address, we won't
+ * show them here either.
+ */
+ if (!kallsyms_show_value())
+ seq_printf(m, "0x%px-0x%px\t%ps\n", NULL, NULL,
+ (void *)ent->start_addr);
+ else
+ seq_printf(m, "0x%px-0x%px\t%ps\n", (void *)ent->start_addr,
+ (void *)ent->end_addr, (void *)ent->start_addr);
return 0;
}