Skip to content

Commit 18d45b1

Browse files
Ravi Bangoriarostedt
authored andcommitted
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: 0e4d819 ("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]>
1 parent f0a2aa5 commit 18d45b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace_uprobe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ static int probes_seq_show(struct seq_file *m, void *v)
608608

609609
/* Don't print "0x (null)" when offset is 0 */
610610
if (tu->offset) {
611-
seq_printf(m, "0x%px", (void *)tu->offset);
611+
seq_printf(m, "0x%0*lx", (int)(sizeof(void *) * 2), tu->offset);
612612
} else {
613613
switch (sizeof(void *)) {
614614
case 4:

0 commit comments

Comments
 (0)