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, 17 Aug 2022 10:45:14 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Leonardo Brás <leobras@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        "Dr. David Alan Gilbert (git)" <dgilbert@...hat.com>
Cc:     kvm@...r.kernel.org, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org
Subject: Re: [PATCH] KVM: x86: Always enable legacy fp/sse

On 8/17/22 05:29, Leonardo Brás wrote:
>>> QEMU always calls kvm_put_xsave, even on this combination because
>>> KVM_CAP_CHECK_EXTENSION_VM always returns true for KVM_CAP_XSAVE.
> Any particular reason why it always returns true for KVM_CAP_XSAVE, even when
> the CPU does not support it?
> 
> IIUC, if it returns false to this capability, kvm_put_xsave() should never be
> called, and thus it can avoid bug reproduction.

Because it allows userspace to have a single path for saving/restoring 
FPU state.  See for example the "migration" code in 
tools/testing/selftests/kvm/lib/x86_64/processor.c (the vcpu_save_state 
and vcpu_load_state functions).

In fact, the QEMU code that uses KVM_GET_FPU/KVM_SET_FPU in x86 is 
obsolete, because it's not been used since Linux 2.6.36.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ