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:	Wed, 20 Jan 2016 08:16:38 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Borislav Petkov <bp@...e.de>
Cc:	Brian Gerst <brgerst@...il.com>,
	the arch/x86 maintainers <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Andy Lutomirski <luto@...capital.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after
 init

On 01/20/16 08:04, Borislav Petkov wrote:
> On Wed, Jan 20, 2016 at 07:09:39AM -0800, H. Peter Anvin wrote:
>> But then you're using testl and get long immediates.
>>
>> (And the parentheses around boot_cpu_data->x86_capability are redundant.)
> 
> Right.
> 
> Ok, below is what builds here. So no SOBs etc.
> 
> All this include hell wankery is so that we can use boot_cpu_data in
> cpufeature.h. And that's not simple because boot/mkcpustr.c includes it
> too so if I carve out struct cpuinfo_x86 to a separate asm/cpuinfo.h
> header, it complains because it doesn't see it.
> 
> Thus this _ASM_BOOT_MKCPUSTR_ yucky marker to stop arch/x86/boot from
> including it.
> 
> I'm very open to better ideas. :-)
> 

I think the right answer is to split the macros that define specific CPU
features into a separate file.  It would also make it assembly-safe
which would be useful in some other places.

However, I do also want to observe that we already do have this specific
marker... it is called __KERNEL__.

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ