]> Git Repo - linux.git/commitdiff
trace_uprobe: Use %lx to display offset
authorRavi Bangoria <[email protected]>
Thu, 15 Mar 2018 08:27:55 +0000 (13:57 +0530)
committerSteven Rostedt (VMware) <[email protected]>
Wed, 11 Apr 2018 15:31:07 +0000 (11:31 -0400)
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]>
kernel/trace/trace_uprobe.c

index 8b86d76c55eed1fe99f375f4a451844ee092c7fe..d7d3c9237f6429cf08a8cd10c35bd02cb471d9a0 100644 (file)
@@ -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:
This page took 0.054063 seconds and 4 git commands to generate.