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: <3908561D78D1C84285E8C5FCA982C28F19D4ABDA@ORSMSX108.amr.corp.intel.com>
Date:	Fri, 12 Oct 2012 17:46:16 +0000
From:	"Luck, Tony" <tony.luck@...el.com>
To:	Borislav Petkov <bp@...64.org>,
	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Borislav Petkov <borislav.petkov@....com>
Subject: RE: [RFC PATCH 3/3] Convert mce_disabled

> Or, you can modify the mca_config I have there and use bools and pass a
> pointer to each actual bool member in each DEVICE_BIT_ATTR invocation
> (and rename it to DEVICE_BOOL_ATTR). Yeah, that could work, unless I'm
> missing something else, of course.

This looks like the best solution to me. Sure we use a little more memory for
a "bool" for each option instead of just a single bit. But there are only a
handful of them, not thousands. So I think we can cope with a few extra
bytes of memory consumption.  I was still not completely convinced by the

       if (val)
               *bvec |= le64_to_cpu(BIT_64(bit));

solution - it assumes that big endian machines also assign their bit numbers
in a big->little way - but that isn't required by the C standard. bitfields are
assigned at the whim of the compiler writer (the only restrictions seem to
be on alignments of fields w.r.t. to the underlying data types).

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