From: "tip-bot2 for Heiko Carstens" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Heiko Carstens <hca@linux.ibm.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: locking/core] seqlock: Allow UBSAN_ALIGNMENT to fail optimizing
Date: Thu, 28 May 2026 10:30:47 -0000 [thread overview]
Message-ID: <177996424772.1039918.9900251243741276489.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260519110315.1385307-1-hca@linux.ibm.com>
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 88331c4ec23a28c1006ec532fa64763d4c695e90
Gitweb: https://git.kernel.org/tip/88331c4ec23a28c1006ec532fa64763d4c695e90
Author: Heiko Carstens <hca@linux.ibm.com>
AuthorDate: Tue, 19 May 2026 13:03:15 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 28 May 2026 12:23:22 +02:00
seqlock: Allow UBSAN_ALIGNMENT to fail optimizing
With gcc-15 and gcc-16 with UBSAN_ALIGNMENT enabled the compiler fails to
inline and optimize __scoped_seqlock_bug() away on s390:
s390x-16.1.0-ld: kernel/sched/build_policy.o: in function `__scoped_seqlock_next':
/.../seqlock.h:1286:(.text+0x22030): undefined reference to `__scoped_seqlock_bug'
Fix this by adding UBSAN_ALIGNMENT to the list of config options where a
not inlined empty __scoped_seqlock_bug() is allowed.
Closes: https://lore.kernel.org/r/20260515092057.810542-1-arnd@kernel.org/
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260519110315.1385307-1-hca@linux.ibm.com
---
include/linux/seqlock.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 5a40252..f865491 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -1259,14 +1259,15 @@ static __always_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) || defined(CONFIG_KASAN)
+#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 90000) || \
+ defined(CONFIG_KASAN) || defined(CONFIG_UBSAN_ALIGNMENT)
/*
* 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.
+ * Similarly KASAN and UBSAN_ALIGNMENT are known to confuse compilers enough
+ * to break this. But we don't care about code quality for such builds anyway.
*/
static inline void __scoped_seqlock_bug(void) { }
#else
prev parent reply other threads:[~2026-05-28 10:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 11:03 [PATCH] " Heiko Carstens
2026-05-19 11:30 ` Arnd Bergmann
2026-05-20 8:28 ` [tip: locking/core] " tip-bot2 for Heiko Carstens
2026-05-28 10:30 ` tip-bot2 for Heiko Carstens [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=177996424772.1039918.9900251243741276489.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=arnd@arndb.de \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®