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]
Date:	Tue, 24 Jun 2008 19:58:36 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"H. Peter Anvin" <hpa@...or.com>
cc:	Paul Jackson <pj@....com>, yhlu.kernel@...il.com,
	akpm@...ux-foundation.org, mingo@...e.hu, tglx@...utronix.de,
	steiner@....com, travis@....com, linux-kernel@...r.kernel.org,
	ying.huang@...el.com, andi@...stfloor.org
Subject: Re: [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal
 in some kernel info printks



On Tue, 24 Jun 2008, H. Peter Anvin wrote:
> 
> What we really should have is %p produce this format.  For some odd reason,
> right now %p produces numbers without the 0x prefix.

Actually, I'd like to make %p produce the format that you right now have 
to jump through insane hoops for: symbolic addresses.

Right now you have to do something insane like

	print_symbol(KERN_WARNING "address: %s\n", ptr);

to print a symbolic version, and it sucks because it's actually just able 
to print symbols, you cannot mix any other types in there.

I think it would be much easier to use if "%p" just did the symbolic 
version (if it's relevant) automatically. If you _just_ want the hex 
representation, you can already always just use %#lx and a cast.

(Of course, then for things that we can't make into symbolic names, we'd 
have to fall back to just the hex representation, and whether that one 
then includes the 0x or not I don't have strong opinions on.)

And yes, to avoid messing with current users, maybe we should only do that 
with %#p (which I don't think anybody uses right now, although I suspect 
it actually adds the '0x' you'd like). The '#' thing is, of course, all 
about 'alternate forms'. But I worry that gcc warns about undefined 
formatting behavior.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ