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, 14 May 2012 16:16:05 +0000
From:	"Luck, Tony" <tony.luck@...el.com>
To:	Borislav Petkov <bp@...64.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>,
	Chen Gong <gong.chen@...ux.intel.com>,
	"Huang, Ying" <ying.huang@...el.com>,
	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
Subject: RE: [PATCH 1/2] x86/mce: Only restart instruction after machine
 check recovery if it is safe

>> +	int			restartable;
>
> Is it me or does this look like a flag, or a bitfield? Instead of
> wasting a whole integer for a single bit of information.

I could make it "int flags;" and "#define MCE_INFO_RESTARTABLE 1"
to make it clear that we have lots more bits available for special
cases?

> It will probably end up the same size though due to compiler padding
> since this struct is currently 4 + 2*8 byte without the ->restartable
> thing.

Yup - we can't save any memory (unless we introduce more complexity to
the code ... low PAGE_SHIFT bits of the "paddr" field are simply thrown
away ... so we could allocate a bit there ... but I don't think that
the resulting ugliness is worth the memory savings).

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ