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: <20251126100205.1729391-3-xiaoyao.li@intel.com>
Date: Wed, 26 Nov 2025 18:02:04 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Dave Hansen <dave.hansen@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	Kiryl Shutsemau <kas@...nel.org>
Cc: x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>,
	Rick Edgecombe <rick.p.edgecombe@...el.com>,
	linux-kernel@...r.kernel.org,
	linux-coco@...ts.linux.dev,
	kvm@...r.kernel.org,
	Reinette Chatre <reinette.chatre@...el.com>,
	Chenyi Qiang <chenyi.qiang@...el.com>,
	chao.p.peng@...el.com,
	xiaoyao.li@...el.com
Subject: [PATCH 2/2] x86/split_lock: Describe #AC handling in TDX guest kernel log

X86_FEATURE_HYPERVISOR and X86_FEATURE_BUS_LOCK_DETECT are always
enumerated in a TDX guest because the corresponding CPUID values are
fixed to 1 by the TDX module. Similar to a normal guest, a TDX guest
never enumerates X86_FEATURE_SPLIT_LOCK_DETECT.

When "split_lock_detect=off", the TDX guest kernel log shows:

  x86/split lock detection: disabled

and with other settings, it shows:

  x86/split lock detection: #DB: ...

However, if the host enables split lock detection, a TDX guest receives
 #AC regardless of its own "split_lock_detect" configuration. The actual
behavior does not match what the kernel log claims.

Call out the possible #AC behavior on TDX and highlight that this behavior
depends on the host's enabling of split lock detection.

Signed-off-by: Xiaoyao Li <xiaoyao.li@...el.com>
---
 arch/x86/kernel/cpu/bus_lock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/cpu/bus_lock.c b/arch/x86/kernel/cpu/bus_lock.c
index f278e4ea3dd4..18695214d214 100644
--- a/arch/x86/kernel/cpu/bus_lock.c
+++ b/arch/x86/kernel/cpu/bus_lock.c
@@ -437,6 +437,9 @@ static void sld_state_show(void)
 			pr_info("#DB: setting system wide bus lock rate limit to %u/sec\n", bld_ratelimit.burst);
 		break;
 	}
+
+	if (cpu_feature_enabled(X86_FEATURE_TDX_GUEST))
+		pr_info("tdx: #AC depends on host configuration: crashing the kernel on kernel split_locks and sending SIGBUS on user-space split_locks\n");
 }
 
 void __init sld_setup(struct cpuinfo_x86 *c)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ