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: <a7604a0d844abf97fc534d72c65a4bf5dd45c1a0.camel@intel.com>
Date: Thu, 8 May 2025 20:02:09 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Gao, Chao" <chao.gao@...el.com>, "Hansen, Dave" <dave.hansen@...el.com>,
	"seanjc@...gle.com" <seanjc@...gle.com>, "x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "pbonzini@...hat.com" <pbonzini@...hat.com>
CC: "ebiggers@...gle.com" <ebiggers@...gle.com>, "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>, "Spassov, Stanislav" <stanspas@...zon.de>,
	"levymitchell0@...il.com" <levymitchell0@...il.com>,
	"samuel.holland@...ive.com" <samuel.holland@...ive.com>, "Li, Xin3"
	<xin3.li@...el.com>, "Yang, Weijiang" <weijiang.yang@...el.com>,
	"mingo@...hat.com" <mingo@...hat.com>, "mlevitsk@...hat.com"
	<mlevitsk@...hat.com>, "john.allen@....com" <john.allen@....com>, "Bae, Chang
 Seok" <chang.seok.bae@...el.com>, "oleg@...hat.com" <oleg@...hat.com>,
	"nik.borisov@...e.com" <nik.borisov@...e.com>, "kees@...nel.org"
	<kees@...nel.org>, "hpa@...or.com" <hpa@...or.com>, "peterz@...radead.org"
	<peterz@...radead.org>, "Mehta, Sohil" <sohil.mehta@...el.com>,
	"bp@...en8.de" <bp@...en8.de>, "vigbalas@....com" <vigbalas@....com>
Subject: Re: [PATCH v6 3/7] x86/fpu/xstate: Differentiate default features for
 host and guest FPUs

On Tue, 2025-05-06 at 17:36 +0800, Chao Gao wrote:
> Currently, guest and host FPUs share the same default features. However,
> the CET supervisor xstate is the first feature that needs to be enabled
> exclusively for guest FPUs. Enabling it for host FPUs leads to a waste of
> 24 bytes in the XSAVE buffer.
> 
> To support "guest-only" features, add a new structure to hold the
> default features and sizes for guest FPUs to clearly differentiate them
> from those for host FPUs.
> 
> Note that,
> 1) for now, the default features for guest and host FPUs remain the
> same. This will change in a follow-up patch once guest permissions, default
> xfeatures, and fpstate size are all converted to use the guest defaults.
> 
> 2) only supervisor features will diverge between guest FPUs and host
> FPUs, while user features will remain the same [1][2]. So, the new
> vcpu_fpu_config struct does not include default user features and size
> for the UABI buffer.
> 
> An alternative approach is adding a guest_only_xfeatures member to
> fpu_kernel_cfg and adding two helper functions to calculate the guest
> default xfeatures and size. However, calculating these defaults at runtime
> would introduce unnecessary overhead.
> 
> Suggested-by: Chang S. Bae <chang.seok.bae@...el.com>
> Signed-off-by: Chao Gao <chao.gao@...el.com>

Reviewed-by: Rick Edgecombe <rick.p.edgecombe@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ