]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
7.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jul 2026 05:19:04 +0000 (07:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jul 2026 05:19:04 +0000 (07:19 +0200)
added patches:
seqlock-allow-ubsan_alignment-to-fail-optimizing.patch

queue-7.1/seqlock-allow-ubsan_alignment-to-fail-optimizing.patch [new file with mode: 0644]
queue-7.1/series

diff --git a/queue-7.1/seqlock-allow-ubsan_alignment-to-fail-optimizing.patch b/queue-7.1/seqlock-allow-ubsan_alignment-to-fail-optimizing.patch
new file mode 100644 (file)
index 0000000..8e040f4
--- /dev/null
@@ -0,0 +1,49 @@
+From 88331c4ec23a28c1006ec532fa64763d4c695e90 Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <hca@linux.ibm.com>
+Date: Tue, 19 May 2026 13:03:15 +0200
+Subject: seqlock: Allow UBSAN_ALIGNMENT to fail optimizing
+
+From: Heiko Carstens <hca@linux.ibm.com>
+
+commit 88331c4ec23a28c1006ec532fa64763d4c695e90 upstream.
+
+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
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/seqlock.h |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/include/linux/seqlock.h
++++ b/include/linux/seqlock.h
+@@ -1259,14 +1259,15 @@ static __always_inline void __scoped_seq
+ 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
index b81e4ac3cc4d3c81cfec9f31b25cd8e9048b9262..24f64364a45833020c1305d708f8bdf7c3ca3785 100644 (file)
@@ -1,3 +1,4 @@
 platform-x86-intel-uncore-freq-fix-current_freq_khz-.patch
 sched_ext-skip-ops.set_weight-for-disabled-tasks.patch
 drm-virtio-fix-deadlock-in-display_info_cb-by-removi.patch
+seqlock-allow-ubsan_alignment-to-fail-optimizing.patch