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:	Mon, 27 Aug 2012 15:58:59 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Cc:	tony.luck@...el.com, andi@...stfloor.org, bp@...64.org,
	gong.chen@...ux.intel.com, ananth@...ibm.com,
	masbock@...ux.vnet.ibm.com, x86@...nel.org,
	linux-kernel@...r.kernel.org, lcm@...ibm.com, mingo@...hat.com,
	tglx@...utronix.de, linux-edac@...r.kernel.org
Subject: Re: [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure

On Mon, Aug 27, 2012 at 04:55:03PM +0530, Naveen N. Rao wrote:
> Many MCE boot flags are boolean in nature, but are declared as integers
> currently. We can pack these into a bitfield to save some space.

Note that this doesn't necessarily save anything because it needs more
code to access, and accesses are more common than the flag

	cmpl  $0,foo(%rip)            7 bytes
        testl $1,foo(%rip)           10 bytes
        bt    $0,foo(%rip)            8 bytes

Even worse for writes. The best you can usually do is to use chars on
x86.

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