lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6912084076ddc2a06d7b5cd14c53c61f309d56c.camel@kernel.org>
Date: Wed, 23 Apr 2025 19:56:02 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, "David S. Miller"	
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni	
 <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Kuniyuki Iwashima	
 <kuniyu@...zon.com>, Qasim Ijaz <qasdev00@...il.com>, Nathan Chancellor	
 <nathan@...nel.org>, Andrew Lunn <andrew@...n.ch>,
 linux-kernel@...r.kernel.org, 	netdev@...r.kernel.org, Thomas
 Weißschuh	 <thomas.weissschuh@...utronix.de>
Subject: Re: [PATCH v4 1/7] ref_tracker: don't use %pK in pr_ostream() output

On Wed, 2025-04-23 at 16:46 -0700, Jakub Kicinski wrote:
> On Fri, 18 Apr 2025 10:24:25 -0400 Jeff Layton wrote:
> > -		pr_ostream(s, "%s@%pK: couldn't get stats, error %pe\n",
> > +		pr_ostream(s, "%s@%p: couldn't get stats, error %pe\n",
> 
> FTR I think this is counter productive. 
> 
> Reference tracking is a debug feature and you may want to find that
> object with a debugger and inspect it. That's not the same as random
> drivers printing kernel addresses into logs for not apparent reason.
>
> Does kmemleak use the hashed address representation? It's a very
> similar situation.

Looking at mm/kmemleak.c, I think it doesn't. It looks like it casts
the pointers to unsigned long and prints them with %08lx:

        warn_or_seq_printf(seq, "unreferenced object%s 0x%08lx (size %zu):\n",
                           __object_type_str(object),
                           object->pointer, object->size);

I'm not sure if that's any different from %px though. I can make either
change in the name formats if that's preferred.
-- 
Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ