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: <20240605224527.2907272-3-seanjc@google.com>
Date: Wed,  5 Jun 2024 15:45:27 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: linux-kernel@...r.kernel.org, Xiangfei Ma <xiangfeix.ma@...el.com>, 
	Yan Zhao <yan.y.zhao@...el.com>, Sean Christopherson <seanjc@...gle.com>
Subject: [PATCH 2/2] nVMX: Verify KVM actually loads the value in HOST_PAT
 into the PAT MSR

Check that the PAT MSR is actually loaded with vmcs.HOST_PAT on VM-Exit
in the testcase that shoves all legal PAT values into HOST_PAT.

Signed-off-by: Sean Christopherson <seanjc@...gle.com>
---
 x86/vmx_tests.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 8a17dd90..ef7e0ea9 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -7275,6 +7275,11 @@ static void test_pat(u32 field, const char * field_name, u32 ctrl_field,
 					error = 0;
 
 				test_vmx_vmlaunch(error);
+
+				if (!error)
+					report(rdmsr(MSR_IA32_CR_PAT) == val,
+					       "Expected PAT = 0x%lx, got 0x%lx",
+						val, rdmsr(MSR_IA32_CR_PAT));
 				wrmsr(MSR_IA32_CR_PAT, pat_msr_saved);
 
 				report_prefix_pop();
-- 
2.45.1.467.gbab1589fc0-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ