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:	Wed, 31 Jul 2013 12:00:13 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Cc:	Joe Perches <joe@...ches.com>, Borislav Petkov <bp@...en8.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Borislav Petkov <bp@...e.de>,
	Anton Vorontsov <anton@...msg.org>,
	Colin Cross <ccross@...roid.com>,
	Kees Cook <keescook@...omium.org>,
	Tony Luck <tony.luck@...el.com>, Len Brown <lenb@...nel.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"Huang, Ying" <ying.huang@...el.com>
Subject: Re: [PATCH] APEI/ERST: Fix error message formatting

On Wed, Jul 31, 2013 at 3:46 AM, Naveen N. Rao
<naveen.n.rao@...ux.vnet.ibm.com> wrote:

> My key question was about why we are using a field width of 10 implying a
> 32-bit value, rather than a field width of 18 as suggested by the data type?
> This shouldn't truncate the value, but if we are specifying the field width
> for alignment, seems to me it is better to match the data type.

%pR uses a field width of 10 (two for "0x", eight for the value)
simply because the majority of resource values fit in 32 bits.  Larger
values extend the width, so it's not a question of truncating any
data.  But it's no fun to read memory addresses when most of them have
eight extra leading zeros (the high 32-bits of a 64-bit value).  I
think the same applies here; most ACPI table addresses still fit in 32
bits.

We *do* use a field width of 18 for the e820 table, even though many
of those regions fit in 32 bits.  But that's sort of an exception
because it's a table where addresses above 4GB are pretty common.

But at the end of the day, I guess I'm just stating my personal
preferences and yours might be different.

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