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: <50A69664.6070009@zytor.com>
Date:	Fri, 16 Nov 2012 11:39:16 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org, Matt Fleming <matt.fleming@...el.com>
Subject: Re: [PATCH 8/9] x86: ramdisk info print with high bits.

On 11/16/2012 11:21 AM, Yinghai Lu wrote:
>>
>> NAK, this is expected to match the resource print format (%pR), which
>> prints 10 digits by default and then expands.  Furthermore, printing
>> *18* digits is downright silly since we still don't have 72-bit addressing.
> 
> that is the same as in e820_print_map::
> 
>                 printk(KERN_INFO "%s: [mem %#018Lx-%#018Lx] ", who,
>                        (unsigned long long) e820.map[i].addr,
>                        (unsigned long long)
>                        (e820.map[i].addr + e820.map[i].size - 1));
> 
> 
> that is for 64bit address.
> that extra 2 is for "0x"
> 

Oh, right.  It's the use of %#... I usually use 0x%... so I didn't think
of it.

> or you prefer to cast them to pointer and use %pR for them all?
> 
> or fix printk to add extra 2 for "0x" when # is found?

We should normally use %pR or the equivalent format.  The only reason we
do it different for e820_print_map is because it prints a whole bunch of
lines in which we want the columns to line up.

	-hpa

--
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