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: <aNLR8WUn8mUtiAEi@google.com>
Date: Tue, 23 Sep 2025 09:59:29 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Chao Gao <chao.gao@...el.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Tom Lendacky <thomas.lendacky@....com>, Mathias Krause <minipli@...ecurity.net>, 
	John Allen <john.allen@....com>, Rick Edgecombe <rick.p.edgecombe@...el.com>, 
	Binbin Wu <binbin.wu@...ux.intel.com>, Xiaoyao Li <xiaoyao.li@...el.com>, 
	Maxim Levitsky <mlevitsk@...hat.com>, Zhang Yi Z <yi.z.zhang@...ux.intel.com>, Xin Li <xin@...or.com>
Subject: Re: [PATCH v16 49/51] KVM: selftests: Add coverate for KVM-defined
 registers in MSRs test

On Tue, Sep 23, 2025, Chao Gao wrote:
> On Fri, Sep 19, 2025 at 03:32:56PM -0700, Sean Christopherson wrote:
> >Add test coverage for the KVM-defined GUEST_SSP "register" in the MSRs
> >test.  While _KVM's_ goal is to not tie the uAPI of KVM-defined registers
> >to any particular internal implementation, i.e. to not commit in uAPI to
> >handling GUEST_SSP as an MSR, treating GUEST_SSP as an MSR for testing
> >purposes is a-ok and is a naturally fit given the semantics of SSP.
> >
> >Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> 
> Reviewed-by: Chao Gao <chao.gao@...el.com>
> 
> <snip>
> 
> >+static bool vcpu_has_reg(struct kvm_vcpu *vcpu, u64 reg)
> >+{
> >+	struct {
> >+		struct kvm_reg_list list;
> >+		u64 regs[KVM_X86_MAX_NR_REGS];
> >+	} regs = {};
> >+	int r, i;
> >+
> >+	/*
> >+	 * If KVM_GET_REG_LIST succeeds with n=0, i.e. there are no supported
> >+	 * regs, then the vCPU obviously doesn't support the reg.
> >+	 */
> >+	r = __vcpu_ioctl(vcpu, KVM_GET_REG_LIST, &regs.list.n);
> 						 ^^^^^^^^^^^^
> it would be more clear to use &reg.list here.

Fixed both.  No idea why I wrote it that way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ