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:   Tue, 21 Dec 2021 09:00:40 +0000
From:   "Liu, Jing2" <jing2.liu@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
CC:     "Christopherson,, Sean" <seanjc@...gle.com>,
        "Nakajima, Jun" <jun.nakajima@...el.com>,
        "Tian, Kevin" <kevin.tian@...el.com>,
        "jing2.liu@...ux.intel.com" <jing2.liu@...ux.intel.com>,
        "Zeng, Guang" <guang.zeng@...el.com>,
        "Wang, Wei W" <wei.w.wang@...el.com>,
        "Zhong, Yang" <yang.zhong@...el.com>
Subject: RE: [PATCH v2 23/23] kvm: x86: Disable RDMSR interception of
 IA32_XFD_ERR


On 12/21/2021 4:48 PM, Paolo Bonzini wrote:
> 
> On 12/21/21 07:29, Liu, Jing2 wrote:
> >>
> > Thanks for reviewing the patches.
> >
> > If disable unconditionally in vmx_create_vcpu, it means even guest has
> > no cpuid, the msr read is passthrough to guest and it can read a
> > value, which seems strange, though spec doesn't mention the read
> behaviour w/o cpuid.
> >
> > How about disabling read interception at vmx_vcpu_after_set_cpuid?
> >
> > if (boot_cpu_has(X86_FEATURE_XFD) && guest_cpuid_has(vcpu,
> X86_FEATURE_XFD))
> >          vmx_set_intercept_for_msr(vcpu, MSR_IA32_XFD_ERR, MSR_TYPE_R,
> > false);
> 
> Even better:
> 
> 	if (boot_cpu_has(X86_FEATURE_XFD))
> 		vmx_set_intercept_for_msr(vcpu, MSR_IA32_XFD_ERR,
> MSR_TYPE_R,
> 					  !guest_cpuid_has(vcpu,
> X86_FEATURE_XFD));

Thanks Paolo.

BTW do we want to put this together into patch 13 or 14, I guess you were saying patch 14 😊
[PATCH v2 13/23] kvm: x86: Intercept #NM for saving IA32_XFD_ERR
[PATCH v2 14/23] kvm: x86: Emulate IA32_XFD_ERR for guest

Thanks,
Jing

> 
> Thanks,
> 
> Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ