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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251119132840.ddw43kvhtybnihni@skbuf>
Date: Wed, 19 Nov 2025 15:28:40 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: kernel test robot <lkp@...el.com>, netdev@...r.kernel.org,
	oe-kbuild-all@...ts.linux.dev, Andrew Lunn <andrew@...n.ch>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	linux-kernel@...r.kernel.org, Serge Semin <fancer.lancer@...il.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Herve Codina <herve.codina@...tlin.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 14/15] net: dsa: sja1105: replace mdiobus-pcs
 with xpcs-plat driver

On Wed, Nov 19, 2025 at 12:05:43PM +0000, Russell King (Oracle) wrote:
> On Wed, Nov 19, 2025 at 12:03:29PM +0000, Russell King (Oracle) wrote:
> > On Wed, Nov 19, 2025 at 02:01:11PM +0200, Vladimir Oltean wrote:
> > > I do wonder how to print resource_size_t (typedef to phys_addr_t, which
> > > is typedeffed to u64 or u32 depending on CONFIG_PHYS_ADDR_T_64BIT).
> > 
> > From the now hard to find Documentation/core-api/printk-formats.rst:

I really wasn't aware of this, and I was reading the inline docs from
lib/vsprintf.c all this time... Thanks!

> > Physical address types phys_addr_t
> > ----------------------------------
> > 
> > ::
> > 
> >         %pa[p]  0x01234567 or 0x0123456789abcdef
> > 
> > For printing a phys_addr_t type (and its derivatives, such as
> > resource_size_t) which can vary based on build options, regardless of the
> > width of the CPU data path.
> > 
> > Passed by reference.
> 
> Hmm, but I guess you don't want the 0x prefix. Maybe print it to a
> separate buffer and then lop off the first two characters?
> 
> Another solution would be to always cast it to a u64 and use %llx as
> suggested in the "Integer types" section.

Yeah, although I see the ePAPR section on node names doesn't disallow
the 0x prefix for the unit-address, it is just that the established
convention is without it.

By far the most unassuming option seems to be to do explicit type
casting to unsigned long long. I've started a new test build with the
changes made so far.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ