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:	Fri, 04 Jan 2013 16:15:28 +0000
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Tim Gardner <rtg.canonical@...il.com>
Cc:	Steve Langasek <steve.langasek@...onical.com>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
	"H. Peter Anvin" <hpa@...or.com>, Olof Johansson <olof@...om.net>,
	Tony Luck <tony.luck@...el.com>,
	David Airlie <airlied@...ux.ie>,
	Corentin Chary <corentincj@...aif.net>,
	Dave Jiang <dave.jiang@...el.com>,
	Peter Jones <pjones@...hat.com>,
	Konrad Rzeszutek Wilk <konrad@...nel.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>, tim.gardner@...onical.com
Subject: Re: [RFC PATCH 1/2] efi: Make 'efi_enabled' a function to query EFI
 facilities

On Fri, 2013-01-04 at 08:08 -0700, Tim Gardner wrote:
> On 01/03/2013 06:18 AM, Matt Fleming wrote:
> > From: Matt Fleming <matt.fleming@...el.com>
> > 
> 
> snip
> 
> >  /*
> > - * We play games with efi_enabled so that the compiler will, if possible, remove
> > - * EFI-related code altogether.
> > + * We play games with efi_enabled so that the compiler will, if
> > + * possible, remove EFI-related code altogether.
> >   */
> > +#define EFI_BOOT		0x00000001 /* Were we booted from EFI? */
> > +#define EFI_SYSTEM_TABLES	0x00000002 /* Can we use EFI system tables? */
> > +#define EFI_CONFIG_TABLES	0x00000004 /* Can we use EFI config tables? */
> > +#define EFI_RUNTIME_SERVICES	0x00000004 /* Can we use runtime services? */
> > +#define EFI_MEMMAP		0x00000008 /* Can we use EFI memory map? */
> > +#define EFI_64BIT		0x00000010 /* Is the firmware 64-bit? */
> > +
> 
> Your use of test_bit() and set_bit() imply that these macros should be
> bit numbers, not bit masks. It'll work until you define a mask with an
> integer value greater then 31.

They're not intended to be bitmasks in the sense that no two bits are
set in each constant (and I am aware of the upper limit).

I have no problem changing the above values to bit numbers if that would
be less confusing.

-- 
Matt Fleming, Intel Open Source Technology Center

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