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: <281354d3-1f04-483d-a6d0-baf6fdcec376@intel.com>
Date: Wed, 30 Apr 2025 08:01:44 -0700
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
CC: "ebiggers@...gle.com" <ebiggers@...gle.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "Hansen, Dave" <dave.hansen@...el.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>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>, "vigbalas@....com" <vigbalas@....com>,
	"pbonzini@...hat.com" <pbonzini@...hat.com>, "mlevitsk@...hat.com"
	<mlevitsk@...hat.com>, "john.allen@....com" <john.allen@....com>, "Yang,
 Weijiang" <weijiang.yang@...el.com>, "tglx@...utronix.de"
	<tglx@...utronix.de>, "hpa@...or.com" <hpa@...or.com>, "peterz@...radead.org"
	<peterz@...radead.org>, "aruna.ramakrishna@...cle.com"
	<aruna.ramakrishna@...cle.com>, "Gao, Chao" <chao.gao@...el.com>,
	"bp@...en8.de" <bp@...en8.de>, "seanjc@...gle.com" <seanjc@...gle.com>,
	"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v5 3/7] x86/fpu/xstate: Differentiate default features for
 host and guest FPUs

On 4/28/2025 8:36 PM, Edgecombe, Rick P wrote:
> 
> KVM_GET_XSAVE is part of KVM's API. It uses fields configured in struct
> fpu_guest. If fpu_user_cfg.default_features changes value (in the current code)
> it would change KVM's uABI. 

Not quite. The ABI reflects the XSAVE format directly. The XSAVE header 
indicates which feature states are present, so while the _contents_ of 
the buffer may vary depending on the feature set, the _format_ itself 
remains unchanged. That doesn't constitute a uABI change.

> It should be simple. Two new configuration fields are added in this patch that
> match the existing concept and values of existing configurations fields. Per
> Sean, there are no plans to have them diverge. So why add them. 

I'm fine with dropping them -- as long as the resulting code remains 
clear and avoids unnecessary complexity around VCPU allocation.

Here are some of the considerations that led me to suggest them in the 
first place:

  * The guest-only feature model should be established in a clean and
    structured way.
  * The initialization logic should stay explicit -- especially to make
    it clear what constitutes guest features, even when they match host
    features. That naturally led to introducing a dedicated data
    structure.
  * Since the VCPU FPU container includes struct fpstate, it felt
    appropriate to mirror relevant fields where useful.
  * Including user_size and user_xfeatures made the VCPU allocation logic
    more straightforward and self-contained.

And to clarify -- this addition doesn’t necessarily imply divergence 
from fpu_guest_cfg. Its usage is local to setting up the guest fpstate, 
and nothing more.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ