aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavi Bangoria <[email protected]>2018-03-15 13:57:55 +0530
committerSteven Rostedt (VMware) <[email protected]>2018-04-11 11:31:07 -0400
commit18d45b11d96e6f9b3814960a1394083a3d6b7f74 (patch)
tree0dc9e212157a49e6f72bf03e42ed643c71572113
parentf0a2aa5a2a406d0a57aa9b320ffaa5538672b6c5 (diff)
trace_uprobe: Use %lx to display offset
tu->offset is unsigned long, not a pointer, thus %lx should be used to print it, not the %px. Link: http://lkml.kernel.org/r/[email protected] Cc: [email protected] Acked-by: Masami Hiramatsu <[email protected]> Fixes: 0e4d819d0893 ("trace_uprobe: Display correct offset in uprobe_events") Suggested-by: Kees Cook <[email protected]> Signed-off-by: Ravi Bangoria <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
-rw-r--r--kernel/trace/trace_uprobe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 8b86d76c55ee..d7d3c9237f64 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -608,7 +608,7 @@ static int probes_seq_show(struct seq_file *m, void *v)
/* Don't print "0x (null)" when offset is 0 */
if (tu->offset) {
- seq_printf(m, "0x%px", (void *)tu->offset);
+ seq_printf(m, "0x%0*lx", (int)(sizeof(void *) * 2), tu->offset);
} else {
switch (sizeof(void *)) {
case 4: