From nobody Mon Jun 15 07:38:16 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 2A2243783AA for ; Wed, 8 Apr 2026 21:04:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775682249; cv=none; b=jMmhL7g48nybdbRTqf14f1P9Pj1tekqvJW5GfO/kbzSnzR0adMkXMyG3FjkLXUTu305jjAo0rxjojVboXldldLJ+kzlvrxPgZrR3AiseVI3UJ0/85npyv4GpsqhUxeVaCDOTbXD7FsZq/EzPfYDjur+6fGS0y0M4ojkqyCXVn9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775682249; c=relaxed/simple; bh=2QQIZ16bUXDztv43vFlog9LLGWtk2RxbmKDGUAFdC4g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KV+UKHlR9ba1mVSBqBWhHRuI9ITIMUjGm1Gu3fpSJsFXyev1/laAAJfPLNPpIR7PBTQbN6d2EsIedsSGSiUKnWVtJzN3PaLDREw7I9g1A2Z4rBQoJ4msBrVSgq1d1Tc08ClYJJqWopWHv4YtkPxLmiesu+Xi5NQLqnMreoQv3Ac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=PsF4N8LJ; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="PsF4N8LJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775682246; bh=2QQIZ16bUXDztv43vFlog9LLGWtk2RxbmKDGUAFdC4g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PsF4N8LJKtmJXShNOLnsg2uvJC8Wb8kTGt1OMI1e6FLkE40nwpVpQ+uxCHn/hcPbf MnehhU9s45U4KlRtLo/eq3ghbOngoo5afYd24LRSCWsvPZNTQniXYtNjot1VGc0avX PlNidW4hzrCF+yI6x7gI+IHyk2z1sKJmqK2ep8d8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 08 Apr 2026 23:03:56 +0200 Subject: [PATCH 1/3] tools/nolibc: create __nolibc_no_sanitize_ubsan Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260408-nolibc-gcc-15-v1-1-330d0c40f894@weissschuh.net> References: <20260408-nolibc-gcc-15-v1-0-330d0c40f894@weissschuh.net> In-Reply-To: <20260408-nolibc-gcc-15-v1-0-330d0c40f894@weissschuh.net> To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775682245; l=1517; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=2QQIZ16bUXDztv43vFlog9LLGWtk2RxbmKDGUAFdC4g=; b=0uRlBpLHHar/Uezs2eNpHMUqCHtDRHmWT8swQx3OBQt+SrlL8nYzuLKp06rmqNNsekiW3ekt+ HZnGG3osLwtC0jenHgJOO+JtCXeXViE/YEf1iDQVTzUVmCbrTt/k2hA X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The logic to disable UBSAN will become a bit more complicated. Move it out into compiler.h, so crt.h stays readable. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Willy Tarreau --- tools/include/nolibc/compiler.h | 6 ++++++ tools/include/nolibc/crt.h | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compile= r.h index 1c410a62c528..b1239344d894 100644 --- a/tools/include/nolibc/compiler.h +++ b/tools/include/nolibc/compiler.h @@ -80,4 +80,10 @@ /* Make the optimizer believe the variable can be manipulated arbitrarily.= */ #define _NOLIBC_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "+r" (var)) =20 +#if __nolibc_has_feature(undefined_behavior_sanitizer) +# define __nolibc_no_sanitize_undefined __attribute__((no_sanitize("funct= ion"))) +#else +# define __nolibc_no_sanitize_undefined +#endif + #endif /* _NOLIBC_COMPILER_H */ diff --git a/tools/include/nolibc/crt.h b/tools/include/nolibc/crt.h index 5bb492555f13..d8ce91fd2e3b 100644 --- a/tools/include/nolibc/crt.h +++ b/tools/include/nolibc/crt.h @@ -47,10 +47,7 @@ char *__nolibc_program_invocation_short_name(char *long_= name) #endif /* NOLIBC_IGNORE_ERRNO */ =20 void _start_c(long *sp); -__attribute__((weak,used)) -#if __nolibc_has_feature(undefined_behavior_sanitizer) - __attribute__((no_sanitize("function"))) -#endif +__attribute__((weak,used)) __nolibc_no_sanitize_undefined void _start_c(long *sp) { long argc; --=20 2.53.0 From nobody Mon Jun 15 07:38:16 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 C01D737996C for ; Wed, 8 Apr 2026 21:04:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775682251; cv=none; b=BMLDLo1tFIfH56mm5/GKxdKEYolPVcL88phY/p/ndtRRy3hxBJwoWvZS/Ln1ZcLOll/V+YG5sczAaoX4iJpYDER45TIXkMi96ecwhH2il3pVeuXTLo7ZjpXbDlkwErLhjyzJ+mzydP6IrMJsBFJSg+q/yPCgGRarIT0OfQapPcA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775682251; c=relaxed/simple; bh=WdQnaHRpsJDFN1P7mX/QFHEMTrpCBwNDoCMZlb2BWvQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HYXaeQDEGNKaFv3u/4npZURT/vCtdjzSccXSUoTPgubbZxUoW8O/AePQZj8Vgd9G3INvQJekBY6ALJUsPWgOnoGP9ojETIVfsIDd0qCrVxmxoob9iU+jGXg9wCgNxJ7VwxtcgiNKPUbMEKMkYThh2J8itqPUfyDioBtHkdilJzo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=iE7we+sb; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="iE7we+sb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775682246; bh=WdQnaHRpsJDFN1P7mX/QFHEMTrpCBwNDoCMZlb2BWvQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iE7we+sbht9VRfJPZG9YHDq0usC87dPKeTC961aFfA2DwH6A+XbtQz3IYxVfUGo6v Np0NxsXq7HrOp4/IuiEI5bHaUyBxzqHaIeZCex9q03cNzmc+zOTTE4SsGyEiGD2X06 BL68w4C6g/OXZ0XtlRud2URv2oH1G1HqgZhSGFRA= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 08 Apr 2026 23:03:57 +0200 Subject: [PATCH 2/3] tools/nolibc: support UBSAN on gcc Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260408-nolibc-gcc-15-v1-2-330d0c40f894@weissschuh.net> References: <20260408-nolibc-gcc-15-v1-0-330d0c40f894@weissschuh.net> In-Reply-To: <20260408-nolibc-gcc-15-v1-0-330d0c40f894@weissschuh.net> To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775682245; l=1053; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=WdQnaHRpsJDFN1P7mX/QFHEMTrpCBwNDoCMZlb2BWvQ=; b=frkvftx17386ZsSc4m9kGSKfxG68ygyIW7ntkakKIub0UB4p3op65w+23hZfTqNCnY+u96HVz Lqbc4NBEEwGCfIjNoSwjgDSq2SKZfqM0W/rY+8/xGBTErTA81TjET2W X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The UBSAN implementation in gcc requires a slightly different function attribute to skip instrumentation. Extend __nolibc_no_sanitize_undefined to also handle gcc. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Willy Tarreau --- tools/include/nolibc/compiler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compile= r.h index b1239344d894..b56570bf9f69 100644 --- a/tools/include/nolibc/compiler.h +++ b/tools/include/nolibc/compiler.h @@ -81,7 +81,11 @@ #define _NOLIBC_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "+r" (var)) =20 #if __nolibc_has_feature(undefined_behavior_sanitizer) -# define __nolibc_no_sanitize_undefined __attribute__((no_sanitize("funct= ion"))) +# if defined(__clang__) +# define __nolibc_no_sanitize_undefined __attribute__((no_sanitize("fun= ction"))) +# else +# define __nolibc_no_sanitize_undefined __attribute__((no_sanitize_unde= fined)) +# endif #else # define __nolibc_no_sanitize_undefined #endif --=20 2.53.0 From nobody Mon Jun 15 07:38:16 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 2A19634A794 for ; Wed, 8 Apr 2026 21:04:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775682249; cv=none; b=b2i3Tn/EgdgjG+9nmA9cXJdYXGoQFRQsLT9Sj5SIzYbsTy47euXUAHqOVGptyNzPGf23yPekY6RW6i3eFTAar4uZs4TbNC87PBOo8Y2PhhYjJ5PD2K+/89D6kUP/WuYq+BqFWOjBLq+wgNMaDVwl70HdsZLRtQ7be6pnV0qp8Ww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775682249; c=relaxed/simple; bh=wMXPL0ZDz9E+YdubvXbglXIx1o1QCFI+mRch3oLx3VE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rmHs7jvS3ESpjsQyLfxgqQhiegcXGMXY2h18WGcj/1uwryFIZWuGwxWHwzRsif8A4cdUskjhgaTrMhKFS85eWsk7u6WYinK7p1DpDA9CfNvqz4zTSSdfdYy8sK1tG/dLx+JaB1TLwRdmtMNAsy7xqzKeK2xFBvyW8ZARog57Iys= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=pkk1lf8K; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="pkk1lf8K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775682246; bh=wMXPL0ZDz9E+YdubvXbglXIx1o1QCFI+mRch3oLx3VE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pkk1lf8Kd2kg0tH/6BojK+3wFhqwQRXInuCxSvkuZ/0lehE5fUDhY/9onSsdJjXVc 8cp0dfIAa2JZyOE98dI104mAiqGL+5w9Xc0weaiarrnGp7AQsQ5xQP3wjgoiw+LsKq r7cnRjXgtFNwkRR9l6/mGB48Ui0NIgXGj2LCdAJA= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 08 Apr 2026 23:03:58 +0200 Subject: [PATCH 3/3] selftests/nolibc: use gcc 15 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260408-nolibc-gcc-15-v1-3-330d0c40f894@weissschuh.net> References: <20260408-nolibc-gcc-15-v1-0-330d0c40f894@weissschuh.net> In-Reply-To: <20260408-nolibc-gcc-15-v1-0-330d0c40f894@weissschuh.net> To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775682245; l=747; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=wMXPL0ZDz9E+YdubvXbglXIx1o1QCFI+mRch3oLx3VE=; b=kaQWtZ06gGG25hsSrDoKFl/dDan9Dw7I1S/t3FK8ZhFHJu4TyjoFWrsnbn+6pZFU5iiEH+Vzn 4/bQp7UzNF0CW54fbb+lAoOSVHYArVkRAjsHhLp/xVfAxbykODE44ex X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Newer compilers tend to detect more problematic code. Update the testsuite to use gcc 15.2.0 by default. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Willy Tarreau --- tools/testing/selftests/nolibc/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/se= lftests/nolibc/run-tests.sh index 3917cfb8fdc4..cd439096fdf3 100755 --- a/tools/testing/selftests/nolibc/run-tests.sh +++ b/tools/testing/selftests/nolibc/run-tests.sh @@ -7,7 +7,7 @@ set -e =20 trap 'echo Aborting...' 'ERR' =20 -crosstool_version=3D13.2.0 +crosstool_version=3D15.2.0 hostarch=3Dx86_64 nproc=3D$(( $(nproc) + 2)) cache_dir=3D"${XDG_CACHE_HOME:-"$HOME"/.cache}" --=20 2.53.0