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]
Message-ID: <bb937b3f-e595-4aa8-a6e5-08bdbd4702bf@intel.com>
Date: Fri, 22 Nov 2024 09:46:41 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Sean Christopherson <seanjc@...gle.com>,
 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 11/21/24 07:45, Sean Christopherson wrote:
> On Wed, Nov 20, 2024, Dave Hansen wrote:
>> 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.

arch/x86/kernel/cpu/common.c::cpuid_dependent_features[]

It's hard to find because it hard-codes the leaf number:

        { X86_FEATURE_XSAVE,            0x0000000d },

Fixing that was my initial motivation for this series.

As for removing the checks, I'd much rather have a super generic check
in the CPUID helpers that have all the callers code something.
Something like the attached patch?
View attachment "cpuid_count-warn.patch" of type "text/x-patch" (2247 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ