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: <f1b0c3ab-a377-d998-34d3-67c5e951f4e1@redhat.com>
Date:   Fri, 8 Mar 2019 12:32:04 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Yang Weijiang <weijiang.yang@...el.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>
Cc:     rkrcmar@...hat.com, jmattson@...gle.com,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org, mst@...hat.com,
        yu-cheng.yu@...el.com, Zhang Yi Z <yi.z.zhang@...ux.intel.com>
Subject: Re: [PATCH v3 7/8] KVM:X86: Add XSS bit 11 and 12 support for CET
 xsaves/xrstors.

On 28/02/19 09:44, Yang Weijiang wrote:
>>>  		if (!vmx_xsaves_supported())
>>>  			return 1;
>>> +
>>>  		/*
>>> -		 * The only supported bit as of Skylake is bit 8, but
>>> -		 * it is not supported on KVM.
>>> +		 * Check bits being set are supported in KVM.
>> I'd drop the comment altogether, it's pretty obvious from the code that
>> were checking which bits are supported.
> you won't see these redundancies in next version ;)
>>>  		 */
>>> -		if (data != 0)
>>> +		if (data & ~kvm_supported_xss())
>>>  			return 1;

You should instead check this against CPUID[0xD, 1].EDX:ECX.  If CET is
disabled in CPUID, the guest should not be able to set it in MSR_IA32_CSS.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ