lkml.org 
[lkml]   [2017]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH V11 3/5] printk: hash addresses printed with %p
    Date
    From: David Miller
    > Sent: 05 December 2017 20:31
    ...
    > > Would it make sense to keep the 3 lowest bits of the address?
    > >
    > > Currently printed pointers no longer have any correlation with the actual
    > > alignment in memory of the object, which is a typical cause of a class of bugs.
    >
    > Yeah, this is driving people nuts who wonder why pointers are aligned
    > all weird now.

    I can also image issues where you want to know whether 2 pointers point
    into the same structure (like an skb).
    Useful if you suspect that code is using a stale pointer because the
    skb got reallocated by some internal function.
    I'm not sure such pointers are printed by default though.

    I know I have debugged things that required hexdumps of memory areas
    referenced by traced pointers.
    I won't have done that for anything written with the kernel printf because
    getting any more info for a linux kernel oops is actually quite hard.

    David

    \
     
     \ /
      Last update: 2017-12-06 11:31    [W:4.362 / U:0.572 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site