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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Jun 2014 11:02:54 -0700
From:	"H. Peter Anvin" <>
To:	Dave Hansen <>,
	Borislav Petkov <>,
	Qiaowei Ren <>
CC:	Thomas Gleixner <>,
	Ingo Molnar <>,,
Subject: Re: [PATCH v6 03/10] x86, mpx: add macro cpu_has_mpx

On 06/18/2014 09:25 AM, Dave Hansen wrote:
> On 06/18/2014 07:59 AM, H. Peter Anvin wrote:
>> On 06/18/2014 07:35 AM, Dave Hansen wrote:
>>> It looks like static_cpu_has() is the right thing to use instead of
>>> boot_cpu_has().  But, this doesn't just obfuscate things.
>>> We actually _want_ the compiler to cull code out when the config option
>>> is off.  Things like do_bounds() will see code savings with _some_ kind
>>> of #ifdef rather than using static_cpu_has().
>>> So, we can either use the well worn, consistent with other features in
>>> x86, cpu_has_$foo approach.  Or, we can roll our own macros.
>> We could do something like:
>> static_cpu_has(X86_FEATURE_MPX))
> How about something like the attached patch?
> This lets us use static_cpu_has() for the checks, and allows us to
> easily add new checks for other features that might be compile-time
> disabled.

Hmm... I would like something similar to required-features.h which
reflect features which *cannot* be enabled or will always be ignored; we
actually already have a handful of those.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists