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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6B656D5F-6895-4EDC-8ED1-C210B76A2FF4@zytor.com>
Date:	Thu, 21 Jan 2016 13:52:05 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Borislav Petkov <bp@...en8.de>
CC:	Huaitong Han <huaitong.han@...el.com>, tglx@...utronix.de,
	mingo@...hat.com, david.vrabel@...rix.com, rusty@...tcorp.com.au,
	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers

On January 21, 2016 1:47:32 PM PST, Borislav Petkov <bp@...en8.de> wrote:
>On Thu, Jan 21, 2016 at 01:37:36PM -0800, H. Peter Anvin wrote:
>> No, you still need to be able to find the beginning of the capability
>> array, but the point is that right now it is implicit in that code
>that
>> CPUID_1_EDX == 0.
>
>Ah, you wanna be able to do:
>
>---
>diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
>index af1112980dd4..143646f0add1 100644
>--- a/arch/x86/kernel/head_32.S
>+++ b/arch/x86/kernel/head_32.S
>@@ -441,7 +443,7 @@ enable_paging:
> 	movb %al,X86_MODEL
> 	andb $0x0f,%cl		# mask mask revision
> 	movb %cl,X86_MASK
>-	movl %edx,X86_CAPABILITY
>+	movl %edx,X86_CAPABILITY + CPUID_1_EDX*4
> 
> is486:
> 	movl $0x50022,%ecx	# set AM, WP, NE and MP

Basically, yes.
-- 
Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ