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-next>] [day] [month] [year] [list]
Message-ID: <20240923154112.26985-1-john.allen@amd.com>
Date: Mon, 23 Sep 2024 15:41:12 +0000
From: John Allen <john.allen@....com>
To: <bp@...en8.de>, <x86@...nel.org>
CC: <linux-kernel@...r.kernel.org>, John Allen <john.allen@....com>
Subject: [PATCH] x86/CPU/AMD: Only apply Zenbleed fix for Zen2 during late microcode load

A problem was introduced with f69759b ("x86/CPU/AMD: Move Zenbleed check to
the Zen2 init function") where a bit in the DE_CFG MSR is getting set after
a microcode late load.

The problem is that the microcode late load path calls into
amd_check_microcode and subsequently zen2_zenbleed_check. Since the patch
removes the cpu_has_amd_erratum check from zen2_zenbleed_check, this will
cause all non-Zen2 cpus to go through the function and set the bit in the
DE_CFG MSR.

Call into the zenbleed fix path on Zen2 cpus only.

Fixes: f69759be251d ("x86/CPU/AMD: Move Zenbleed check to the Zen2 init function")
Signed-off-by: John Allen <john.allen@....com>
---
 arch/x86/kernel/cpu/amd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 015971adadfc..368344e1394b 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -1202,5 +1202,6 @@ void amd_check_microcode(void)
 	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
 		return;
 
-	on_each_cpu(zenbleed_check_cpu, NULL, 1);
+	if (boot_cpu_has(X86_FEATURE_ZEN2))
+		on_each_cpu(zenbleed_check_cpu, NULL, 1);
 }
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ