From nobody Sat Feb 7 22:21:31 2026 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 830C42620DE for ; Thu, 29 Jan 2026 11:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769684860; cv=none; b=LNArSC5ufEoXAbccDOB9wAl+BZiuud22X534+dp95DrzmfsY1YvEprj7oRYrEtn3VTaxUyK069wshoVlM3RM1IO0JhgqeWwPRfuvwmllcZsAGJz44K+69hF7jbI6BVz/qQPaAHdh/zHi6hVRYH1UQ3YI7j5B0vYDsr8sYfSaT3s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769684860; c=relaxed/simple; bh=p3Fz70IP9QldlNCPMbb8wIe4DFnPHdSDSy11MfEgbGo=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=kvLMkPlT6RYLhZylbXXEkdnRUyzyuNBDkHcuHzLfseS5PMB/JwI5yzxceSBIoE5ykk4lYIzHu+blkcqCB4FtvKaRdmyE5hZ/IUBXRe9++RjbJDlta8i4c2wPSBlap4U0xej+qDnqiOODRG/GMm3cVqRHWtkEgylqCSZXSrZiVOY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=EL2NcEj+; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EL2NcEj+" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=barBMTfmukJ1GzCIbXTCUyzobQQprC/ExBf4VnCIQWA=; b=EL2NcEj+6o6d7dT2fcHMMkQTdJ wT3Ssq3S0yVoTr/mi34d6gU401s3rsG3Mvpt0cYOlt7SVabdLfrJKIDE3+RlEbiwvEALe02XWOsoP VepBHelV4ofbHwF1DTLxUDHOhG1K0n650wH2vmB9MUecVB8pl2XeyB9vwcNwh6XC7/rejZsbl5Mq3 S+07p1Bu6kpZhsBHU+wyp1WLrpr9pgRSONZsj8IY5B08BSVVhqQRpMeMrxzNiFQaaTwkEus4VUlNo cPY7oDcgeU7Sp8ADsWLUzaQp8xtpsNBc64NqR/qyIa8vEtoNCgYAFKJwVZzZTTNOBkQZnZcclzfsv GTTv9XfA==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vlPs6-0000000AIGq-0czu; Thu, 29 Jan 2026 11:07:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 1C221300E8B; Thu, 29 Jan 2026 12:07:33 +0100 (CET) Date: Thu, 29 Jan 2026 12:07:33 +0100 From: Peter Zijlstra To: mingo@kernel.org, oleg@redhat.com Cc: linux-kernel@vger.kernel.org, debian-kernel@lists.debian.org Subject: [PATCH] seqlock: Allow UBSAN to fail optimizing Message-ID: <20260129110733.GA166857@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Very similar to commit: b94d45b6bbb4 ("seqlock: Allow KASAN to fail optimizing") mark UBSAN as failing to optimize and not suitable for release builds. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202601290910.uwScjRjc-lkp@int= el.com/ Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D123873 Signed-off-by: Peter Zijlstra (Intel) --- Debian folks, can you please remove CONFIG_UBSAN=3Dy from your builds, this is, per GCC devs, not a feature suitable for production! diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index c00063dffba3..436f05bf5dd7 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -1259,14 +1259,14 @@ static __always_inline void __scoped_seqlock_cleanu= p(struct ss_tmp *sst) =20 extern void __scoped_seqlock_invalid_target(void); =20 -#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 90000) || defined(C= ONFIG_KASAN) +#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 90000) || defined(C= ONFIG_KASAN) || defined(CONFIG_UBSAN) /* * For some reason some GCC-8 architectures (nios2, alpha) have trouble * determining that the ss_done state is impossible in __scoped_seqlock_ne= xt() * 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 *SAN is known to confuse compilers enough to break this. But = we + * don't care about code quality for *SAN builds anyway. */ static inline void __scoped_seqlock_bug(void) { } #else