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: <20251218080044.2615106-2-xiaoyao.li@intel.com>
Date: Thu, 18 Dec 2025 16:00:43 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	x86@...nel.org
Cc: "H. Peter Anvin" <hpa@...or.com>,
	Tony Luck <tony.luck@...el.com>,
	linux-kernel@...r.kernel.org,
	xiaoyao.li@...el.com
Subject: [PATCH 1/2] x86/split_lock: Fix handling in split_lock_init()

Per commit 009bce1df0bb ("x86/split_lock: Don't write MSR_TEST_CTRL on
CPUs that aren't whitelisted"), cpu_model_supports_sld was introduced to
guard writes on MSR_TEST_CTRL in split_lock_init(). However, the
sld_ratelimit case handling added later was not covered by the
cpu_model_supports_sld check.

Fix this by checking cpu_model_supports_sld at the beginning of
split_lock_init().

Fixes: ef4ae6e44131 ("x86/bus_lock: Set rate limit for bus lock")
Signed-off-by: Xiaoyao Li <xiaoyao.li@...el.com>
---
 arch/x86/kernel/cpu/bus_lock.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/bus_lock.c b/arch/x86/kernel/cpu/bus_lock.c
index dbc99a47be45..28bf208b92cb 100644
--- a/arch/x86/kernel/cpu/bus_lock.c
+++ b/arch/x86/kernel/cpu/bus_lock.c
@@ -169,6 +169,9 @@ static void sld_update_msr(bool on)
 
 void split_lock_init(void)
 {
+	if (!cpu_model_supports_sld)
+		return;
+
 	/*
 	 * #DB for bus lock handles ratelimit and #AC for split lock is
 	 * disabled.
@@ -178,8 +181,7 @@ void split_lock_init(void)
 		return;
 	}
 
-	if (cpu_model_supports_sld)
-		split_lock_verify_msr(sld_state != sld_off);
+	split_lock_verify_msr(sld_state != sld_off);
 }
 
 static void __split_lock_reenable_unlock(struct work_struct *work)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ