Commit 81365a94 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Ingo Molnar

kprobes: Show address of kprobes if kallsyms does

Show probed address in debugfs kprobe list file as same
as kallsyms does. This information is used for checking
kprobes are placed in the expected address. So it should
be able to compared with address in kallsyms.
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Howells <dhowells@redhat.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jon Medhurst <tixy@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Tobin C . Harding <me@tobin.cc>
Cc: Will Deacon <will.deacon@arm.com>
Cc: acme@kernel.org
Cc: akpm@linux-foundation.org
Cc: brueckner@linux.vnet.ibm.com
Cc: linux-arch@vger.kernel.org
Cc: rostedt@goodmis.org
Cc: schwidefsky@de.ibm.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/lkml/152491896256.9916.1583733714492565296.stgit@devboxSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ffb9bd68
...@@ -2226,19 +2226,23 @@ static void report_probe(struct seq_file *pi, struct kprobe *p, ...@@ -2226,19 +2226,23 @@ static void report_probe(struct seq_file *pi, struct kprobe *p,
const char *sym, int offset, char *modname, struct kprobe *pp) const char *sym, int offset, char *modname, struct kprobe *pp)
{ {
char *kprobe_type; char *kprobe_type;
void *addr = p->addr;
if (p->pre_handler == pre_handler_kretprobe) if (p->pre_handler == pre_handler_kretprobe)
kprobe_type = "r"; kprobe_type = "r";
else else
kprobe_type = "k"; kprobe_type = "k";
if (!kallsyms_show_value())
addr = NULL;
if (sym) if (sym)
seq_printf(pi, "%p %s %s+0x%x %s ", seq_printf(pi, "%px %s %s+0x%x %s ",
p->addr, kprobe_type, sym, offset, addr, kprobe_type, sym, offset,
(modname ? modname : " ")); (modname ? modname : " "));
else else /* try to use %pS */
seq_printf(pi, "%p %s %p ", seq_printf(pi, "%px %s %pS ",
p->addr, kprobe_type, p->addr); addr, kprobe_type, p->addr);
if (!pp) if (!pp)
pp = p; pp = p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment