From nobody Sun Feb 8 17:13:28 2026 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14A72325712 for ; Mon, 15 Dec 2025 18:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765823407; cv=pass; b=pEzzvQdvtmZgdQ9QOtcE6w2CqHICSHUL+SQSe3DPMZx74SZT7MgkIuckDB9aCf7yL+dM9udzxarP5O+rWx7mrFMVSbpcrk+WhkePqEEXgLZGJgzmBZCk32cul5hr8n6S3VDp8mHZjJisvnsIjpeSvp2iM9L0vMcFojZ1pcVnsgg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765823407; c=relaxed/simple; bh=nCUYnV8EyMLJ5stOIwe/FCJ27ys5OFPp+PvYF/O+/a0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ie8pzjLqB+TsLrqhDpaxlHpVqds+vnRJgkcvh9S8GMSeTNKm9oFLTZjahnx9DgCTE/0LnLnWZXo9SSNavwCqmn9m2k0TPKfC0Gp2yMLwRCGkHXUn3cFqE7IGmEpw7nkeK1DeBoNpD6bD9pkt6xc2y1EuIflJ9mJJnQpTxXKxD8E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rong.moe; spf=pass smtp.mailfrom=rong.moe; dkim=pass (1024-bit key) header.d=rong.moe header.i=i@rong.moe header.b=CWeELToB; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rong.moe Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rong.moe Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rong.moe header.i=i@rong.moe header.b="CWeELToB" ARC-Seal: i=1; a=rsa-sha256; t=1765823362; cv=none; d=zohomail.com; s=zohoarc; b=HNDkZmiWE/qdyadPSqmmA0HPJP89nVVfar/KlIAUgF0krIjREgD0bZU8AOsT3uZVF/IxcjsG2imvWUhBE6GNvMvVkXtf78XTQWS2cRQ1B0G+ztzB8ABHPziKlGCFhgV3RTLQaPq5O04EFzKvu7iE1vi+zLjcEfUqPKYLEDaGyjE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765823362; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=BE45W0ByToQYvzIHivGxdzNqc4FyO85mnBS2lVlIBZw=; b=DHKd9KFLJ3IVQLedVhHWO176ta/IQpd7KjQ0oKb+ATa0UN8rwjhBKO8uz6pJvHKMkVv1UR+y8jmwuPs4Li+aA0oeoUUmryMzjEiOyltTSF3fTnel1BkAdxw94kpsJsGGp4FjEqe0sA+WYUQlJRSs5QNJdupUHIFycj4tQy4WJN0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=rong.moe; spf=pass smtp.mailfrom=i@rong.moe; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1765823362; s=zmail; d=rong.moe; i=i@rong.moe; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=BE45W0ByToQYvzIHivGxdzNqc4FyO85mnBS2lVlIBZw=; b=CWeELToByQWnDyPEcSZgMuezXcwwFr14OsmhBbeqMl8pXZf/9h/uR109ZL/G1flp ZDL7BJyx513VqxJPM1uXjnrGcty5TtN3Pi4lKJsFS7E+/KbspEovqbB3UOLyrWU0ykI nprCMwfAmLky8ZzrTpEx59PtRh1fZGvBIZ2EbCvo= Received: by mx.zohomail.com with SMTPS id 1765823355681776.2983161866129; Mon, 15 Dec 2025 10:29:15 -0800 (PST) From: Rong Zhang To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: Rong Zhang , Fenghua Yu , linux-kernel@vger.kernel.org Subject: [PATCH] x86/split_lock: Remove dead kmsg formatting when split_lock_detect=fatal Date: Tue, 16 Dec 2025 02:11:51 +0800 Message-ID: <20251215182907.152881-1-i@rong.moe> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" sld_state_show() has a dead kmsg formatting: if (A) { ... } else if (B) { pr_info(... A ? str1 : str2 ...); } where A is always false in the second block, implied by the "if (A) else" pattern. Hence, str2 is always used. This seems to be some mysterious legacy inherited from the earlier patch revisions of commit ebb1064e7c2e ("x86/traps: Handle #DB for bus lock"). Earlier revisions [1] did enable both sld and bld at the same time to detect non-WB bus_locks when split_lock_detect=3Dfatal, but that's no longer true in the merged revision. Remove it and translate the pr_info() into its equivalent form. [1]: https://lore.kernel.org/r/20201121023624.3604415-3-fenghua.yu@intel.co= m/ Signed-off-by: Rong Zhang --- arch/x86/kernel/cpu/bus_lock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/bus_lock.c b/arch/x86/kernel/cpu/bus_lock.c index dbc99a47be45..77eadf3b7040 100644 --- a/arch/x86/kernel/cpu/bus_lock.c +++ b/arch/x86/kernel/cpu/bus_lock.c @@ -413,9 +413,7 @@ static void sld_state_show(void) if (boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT)) { pr_info("#AC: crashing the kernel on kernel split_locks and sending SIG= BUS on user-space split_locks\n"); } else if (boot_cpu_has(X86_FEATURE_BUS_LOCK_DETECT)) { - pr_info("#DB: sending SIGBUS on user-space bus_locks%s\n", - boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT) ? - " from non-WB" : ""); + pr_info("#DB: sending SIGBUS on user-space bus_locks\n"); } break; case sld_ratelimit: base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8 --=20 2.51.0