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: <20251218080044.2615106-1-xiaoyao.li@intel.com>
Date: Thu, 18 Dec 2025 16:00:42 +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 0/2] x86/split_lock: Fix and cleanup of cpu_model_supports_sld

While considering Kiryl's suggestion[1], I'm wondering why we have
cpu_model_supports_sld defined, which seems like it could be replaced by
X86_FEATURE_SPLIT_LOCK_DETECT.

Tracing through the history, I find that X86_FEATURE_SPLIT_LOCK_DETECT
originally indicated whether the kernel enabled the split lock detection
feature, rather than enumerating hardware support for the feature, at the
time when cpu_model_supports_sld was introduced.

Now, the semantics of X86_FEATURE_SPLIT_LOCK_DETECT have changed and
it enuemrates the hardware support for the feature. Therefore, patch 2
replaces cpu_model_supports_sld with X86_FEATURE_SPLIT_LOCK_DETECT.

Patch 1 fixes a potential issue where MSR_TEST_CTRL can be written when
the split lock detection feature is not available, which can cause bizarre
behavior.

[1] https://lore.kernel.org/all/lvobu4gpfsjg63syubgy2jwcja72folflrst7bu2eqv6rhaqre@ttbkykphu32f/

Xiaoyao Li (2):
  x86/split_lock: Fix handling in split_lock_init()
  x86/split_lock: Drop cpu_model_supports_sld

 arch/x86/kernel/cpu/bus_lock.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ