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] [day] [month] [year] [list]
Message-ID: <aVSZhhl3GEjj15Kk@intel.com>
Date: Wed, 31 Dec 2025 11:33:26 +0800
From: Chao Gao <chao.gao@...el.com>
To: Sean Christopherson <seanjc@...gle.com>
CC: Paolo Bonzini <pbonzini@...hat.com>, <kvm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, Xin Li <xin@...or.com>, Yosry Ahmed
	<yosry.ahmed@...ux.dev>
Subject: Re: [PATCH v2 1/2] KVM: nVMX: Disallow access to vmcs12 fields that
 aren't supported by "hardware"

On Tue, Dec 30, 2025 at 02:02:19PM -0800, Sean Christopherson wrote:
>Disallow access (VMREAD/VMWRITE) to fields that the loaded incarnation of
>KVM doesn't support, e.g. due to lack of hardware support, as a middle
>ground between allowing access to any vmcs12 field defined by KVM (current
>behavior) and gating access based on the userspace-defined vCPU model (the
>most correct, but costly, implementation).
>
>Disallowing access to unsupported fields helps a tiny bit in terms of
>closing the virtualization hole (see below), but the main motivation is to
>avoid having to weed out unsupported fields when synchronizing between
>vmcs12 and a shadow VMCS.  Because shadow VMCS accesses are done via
>VMREAD and VMWRITE, KVM _must_ filter out unsupported fields (or eat
>VMREAD/VMWRITE failures), and filtering out just shadow VMCS fields is
>about the same amount of effort, and arguably much more confusing.
>
>As a bonus, this also fixes a KVM-Unit-Test failure bug when running on
>_hardware_ without support for TSC Scaling, which fails with the same
>signature as the bug fixed by commit ba1f82456ba8 ("KVM: nVMX: Dynamically
>compute max VMCS index for vmcs12"):
>
>  FAIL: VMX_VMCS_ENUM.MAX_INDEX expected: 19, actual: 17
>
>Dynamically computing the max VMCS index only resolved the issue where KVM
>was hardcoding max index, but for CPUs with TSC Scaling, that was "good
>enough".
>
>Cc: Xin Li <xin@...or.com>
>Cc: Chao Gao <chao.gao@...el.com>
>Cc: Yosry Ahmed <yosry.ahmed@...ux.dev>
>Link: https://lore.kernel.org/all/20251026201911.505204-22-xin@zytor.com
>Link: https://lore.kernel.org/all/YR2Tf9WPNEzrE7Xg@google.com
>Signed-off-by: Sean Christopherson <seanjc@...gle.com>

Reviewed-by: Chao Gao <chao.gao@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ