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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zz9VjVKbzMehRTjA@google.com>
Date: Thu, 21 Nov 2024 07:45:17 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, tglx@...utronix.de, 
	bp@...en8.de, rafael@...nel.org, lenb@...nel.org, dave.jiang@...el.com, 
	irenic.rajneesh@...il.com, david.e.box@...el.com
Subject: Re: [PATCH 10/11] x86/fpu: Remove unnecessary CPUID level check

On Wed, Nov 20, 2024, Dave Hansen wrote:
> 
> From: Dave Hansen <dave.hansen@...ux.intel.com>
> 
> The CPUID level dependency table will entirely zap X86_FEATURE_XSAVE

What table is that?  XSAVE depends on FXSR, but I can't find anything that clears
X86_FEATURE_XSAVE if cpuid_level < XSTATE_CPUID.  Even if it did, dropping a
sanity check in a one-time path adds risk for almost no reward.

> if the CPUID level is too low.  This code is unreachable.  Kill it.
> 
> Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
> ---
> 
>  b/arch/x86/kernel/fpu/xstate.c |    5 -----
>  1 file changed, 5 deletions(-)
> 
> diff -puN arch/x86/kernel/fpu/xstate.c~xsave-leaf-checks-2 arch/x86/kernel/fpu/xstate.c
> --- a/arch/x86/kernel/fpu/xstate.c~xsave-leaf-checks-2	2024-11-20 11:44:20.369771244 -0800
> +++ b/arch/x86/kernel/fpu/xstate.c	2024-11-20 11:44:20.373771397 -0800
> @@ -764,11 +764,6 @@ void __init fpu__init_system_xstate(unsi
>  		return;
>  	}
>  
> -	if (boot_cpu_data.cpuid_level < XSTATE_CPUID) {
> -		WARN_ON_FPU(1);
> -		return;
> -	}
> -
>  	/*
>  	 * Find user xstates supported by the processor.
>  	 */
> _

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ