From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH V11 3/5] printk: hash addresses printed with %p Date: Wed, 6 Dec 2017 10:31:15 +0000 Message-ID: References: <1511921105-3647-1-git-send-email-me@tobin.cc> <1511921105-3647-4-git-send-email-me@tobin.cc> <20171205.153120.151025775956658954.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "me@tobin.cc" , "kernel-hardening@lists.openwall.com" , "torvalds@linux-foundation.org" , "Jason@zx2c4.com" , "tytso@mit.edu" , "keescook@chromium.org" , "pbonzini@redhat.com" , "tycho@tycho.ws" , "william.c.roberts@intel.com" , "tj@kernel.org" , "Golden_Miller83@protonmail.ch" , "gregkh@linuxfoundation.org" , "pmladek@suse.com" , "joe@perches.com" , "ijc@hellion.org.uk" , "sergey.senozhatsky@gmail.com" , "catalin.marinas@arm.com" , "wilal.deacon@arm.com" , "rostedt@good To: 'David Miller' , "geert@linux-m68k.org" Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: In-Reply-To: <20171205.153120.151025775956658954.davem@davemloft.net> Content-Language: en-US List-Id: netdev.vger.kernel.org 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 actu= al > > alignment in memory of the object, which is a typical cause of a class = of bugs. >=20 > 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