[<prev] [next>] [day] [month] [year] [list]
Message-ID: <176164233999.2601451.2569060185720432569.tip-bot2@tip-bot2>
Date: Tue, 28 Oct 2025 09:05:39 -0000
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: kernel test robot <lkp@...el.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: locking/core] seqlock: Allow KASAN to fail optimizing
The following commit has been merged into the locking/core branch of tip:
Commit-ID: b94d45b6bbb42571ec225d3be0e7457c8765a5b4
Gitweb: https://git.kernel.org/tip/b94d45b6bbb42571ec225d3be0e7457c8765a5b4
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Tue, 28 Oct 2025 09:56:38 +01:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 28 Oct 2025 09:58:57 +01:00
seqlock: Allow KASAN to fail optimizing
Some KASAN builds are failing to properly optimize this code --
luckily we don't care about core quality for KASAN builds, so just
exclude it.
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Closes: https://lore.kernel.org/oe-kbuild-all/202510251641.idrNXhv5-lkp@intel.com/
---
include/linux/seqlock.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index b7bcc41..a8a8661 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -1234,11 +1234,14 @@ static inline void __scoped_seqlock_cleanup(struct ss_tmp *sst)
extern void __scoped_seqlock_invalid_target(void);
-#if defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 90000
+#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 90000) || defined(CONFIG_KASAN)
/*
* For some reason some GCC-8 architectures (nios2, alpha) have trouble
* determining that the ss_done state is impossible in __scoped_seqlock_next()
* below.
+ *
+ * Similarly KASAN is known to confuse compilers enough to break this. But we
+ * don't care about code quality for KASAN builds anyway.
*/
static inline void __scoped_seqlock_bug(void) { }
#else
Powered by blists - more mailing lists