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 Jan 2024 13:31:14 +0800
From: Yuan Yao <yuan.yao@...ux.intel.com>
To: "Yang, Weijiang" <weijiang.yang@...el.com>
Cc: "seanjc@...gle.com" <seanjc@...gle.com>,
	"pbonzini@...hat.com" <pbonzini@...hat.com>,
	"Hansen, Dave" <dave.hansen@...el.com>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"Gao, Chao" <chao.gao@...el.com>,
	"Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
	"mlevitsk@...hat.com" <mlevitsk@...hat.com>,
	"john.allen@....com" <john.allen@....com>
Subject: Re: [PATCH v8 22/26] KVM: VMX: Set up interception for CET MSRs

On Wed, Jan 17, 2024 at 09:58:40AM +0800, Yang, Weijiang wrote:
> On 1/17/2024 9:41 AM, Yang, Weijiang wrote:
> > On 1/15/2024 5:58 PM, Yuan Yao wrote:
> > > On Thu, Dec 21, 2023 at 09:02:35AM -0500, Yang Weijiang wrote:
> [...]
> > > Looks this leading to MSR_IA32_INT_SSP_TAB not intercepted
> > > after below steps:
> > >
> > > Step 1. User space set cpuid w/  X86_FEATURE_LM, w/  SHSTK.
> > > Step 2. User space set cpuid w/o X86_FEATURE_LM, w/o SHSTK.
> > >
> > > Then MSR_IA32_INT_SSP_TAB won't be intercepted even w/o SHSTK
> > > on guest cpuid, will this lead to inconsistency when do
> > > rdmsr(MSR_IA32_INT_SSP_TAB) from guest in this scenario ?
> > Yes, theoretically it's possible, how about changing it as below?
> >
> > vmx_set_intercept_for_msr(vcpu, MSR_IA32_INT_SSP_TAB,
> > 			  MSR_TYPE_RW,
> > 			  incpt | !guest_cpuid_has(vcpu, X86_FEATURE_LM));
> >
> Oops, should be : incpt || !guest_cpuid_has(vcpu, X86_FEATURE_LM)

It means guest cpuid:

"has X86_FEATURE_SHSTK" + "doesn't have X86_FEATURE_LM"

not sure this is valid combination or not.
If yes it's ok, else just relies on incpt is enough ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ