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: <3f4bf34f-fdc2-37f7-c789-249f19b0653f@redhat.com>
Date:   Thu, 4 Nov 2021 11:00:15 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Herbert Xu <herbert@...dor.apana.org.au>,
        Dave Hansen <dave.hansen@...el.com>
Cc:     Maxim Levitsky <mlevitsk@...hat.com>, linux-kernel@...r.kernel.org,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        "open list:CRYPTO API" <linux-crypto@...r.kernel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        "H. Peter Anvin" <hpa@...or.com>,
        Tim Chen <tim.c.chen@...ux.intel.com>
Subject: Re: [PATCH] crypto: x86/aes-ni: fix AVX detection

On 11/3/21 15:52, Herbert Xu wrote:
> On Wed, Nov 03, 2021 at 07:43:43AM -0700, Dave Hansen wrote:
>> The kernel shouldn't crash in this case.  We've got a software
>> dependency which should disable AVX2 if AVX is off:
> It's qemu, I thought it was a qemu bug but Paulo disagrees.

I don't disagree that QEMU could do better in preventing nonsensical 
combinations; however, independent of that you shouldn't use AVX2 
without factoring XCR0 in the decision.  This is true no matter if 
userspace/kernel or even bare metal/virt.

That does not have to be done directly with cpu_has_xfeatures as in 
Maxim's patch: if boot_cpu_has(AVX) returns false after 
xsave_cpuid_features has filtered it out, or if boot_cpu_has(AVX2) 
returns false after cpuid_deps has filtered it out, that's fine.  I 
guess Maxim can look at the pointers that Dave provided and check if 
there's another bug somewhere in arch/x86/kernel.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ