From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 07 Nov 2025 09:53:44 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vHIE4-00GF4e-2D for lore@lore.pengutronix.de; Fri, 07 Nov 2025 09:53:44 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vHIE4-0004SM-Bw; Fri, 07 Nov 2025 09:53:44 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vHIDj-0003zR-Cw; Fri, 07 Nov 2025 09:53:23 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vHIDj-007V63-0h; Fri, 07 Nov 2025 09:53:23 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1vHIDj-00000009GY0-0gWL; Fri, 07 Nov 2025 09:53:23 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 7 Nov 2025 09:53:23 +0100 Message-ID: <20251107085323.2208553-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251028114621.2420792-1-s.pueschel@pengutronix.de> References: <20251028114621.2420792-1-s.pueschel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] libbsd: patch sanitize disable flag X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: =?UTF-8?q?Sven=20P=C3=BCschel?= Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 0bbbf26ae7db43349003ecfd367620542cfb0d16. Michael [sent from post-receive hook] On Fri, 07 Nov 2025 09:53:23 +0100, Sven Püschel wrote: > libbsd incorrectly checked the sanitize argument and therefore enabled > sanitize also when --disable-sanitize was present in the configure > call. > > Created an upstream patch [1] and added it to the patch dir. The first > patch was just regenerated as a result of 'git ptx-patches'. > > [1] https://gitlab.freedesktop.org/libbsd/libbsd/-/merge_requests/31 > > Fixes: 0d8d99a84218 ("libbsd: version bump 0.11.7 -> 0.12.2") > > Signed-off-by: Sven Püschel > Message-Id: <20251028114621.2420792-1-s.pueschel@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/patches/libbsd-0.12.2/0001-use-I-instead-of-isystem-for-local-path.patch b/patches/libbsd-0.12.2/0001-use-I-instead-of-isystem-for-local-path.patch > index 6dbf20c2aea1..ddcf049c0034 100644 > --- a/patches/libbsd-0.12.2/0001-use-I-instead-of-isystem-for-local-path.patch > +++ b/patches/libbsd-0.12.2/0001-use-I-instead-of-isystem-for-local-path.patch > @@ -12,7 +12,7 @@ Signed-off-by: Michael Olbrich > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > -index 7ef2013a5ff9..167ad58ce747 100644 > +index 00181bd9607b..9caf57d6a4a8 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -2,7 +2,7 @@ > @@ -23,17 +23,17 @@ index 7ef2013a5ff9..167ad58ce747 100644 > + -I$(top_srcdir)/include/bsd/ \ > -include $(top_builddir)/config.h \ > -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED \ > - -D__REENTRANT > + -D__REENTRANT \ > diff --git a/test/Makefile.am b/test/Makefile.am > -index 90fe38430bbd..eb54cf39d60d 100644 > +index 13c3309c4bb4..a5d5f70449bc 100644 > --- a/test/Makefile.am > +++ b/test/Makefile.am > -@@ -7,7 +7,7 @@ HEADERS_CPPFLAGS = \ > - -D__REENTRANT > +@@ -8,7 +8,7 @@ HEADERS_CPPFLAGS = \ > + # EOL > > AM_CPPFLAGS = \ > - -isystem $(top_srcdir)/include/bsd/ \ > + -I$(top_srcdir)/include/bsd/ \ > $(HEADERS_CPPFLAGS) \ > - -DLIBBSD_OVERLAY > - > + -DLIBBSD_OVERLAY \ > + # EOL > diff --git a/patches/libbsd-0.12.2/0002-build-check-sanitize-argument-value.patch b/patches/libbsd-0.12.2/0002-build-check-sanitize-argument-value.patch > new file mode 100644 > index 000000000000..27cdd4032e49 > --- /dev/null > +++ b/patches/libbsd-0.12.2/0002-build-check-sanitize-argument-value.patch > @@ -0,0 +1,42 @@ > +From: =?UTF-8?q?Sven=20P=C3=BCschel?= > +Date: Tue, 28 Oct 2025 12:11:36 +0100 > +Subject: [PATCH] build: check sanitize argument value > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=UTF-8 > +Content-Transfer-Encoding: 8bit > + > +Check the value of the sanitize argument to determine if sanitize > +should be enabled. This fixes that sanitize is enabled when > +--disable-sanitize is passed to the configure script. > + > +The third AC_ARG_ENABLE parameter defines an action, if the parameter is > +present, but doesn't check it's value. Therefore it is also invoked if > +the parameter is disabled or --enable-foo=no is set. Therefore don't > +define these actions and instead check the value with an AS_IF statement > +afterwards, as shown in [1]. > + > +[1] https://autotools.info/autoconf/arguments.html > + > +Fixes: 257800a03c6b ("build: Add support for sanitizer compiler flags") > + > +Upstream-Status: Submitted [https://gitlab.freedesktop.org/libbsd/libbsd/-/merge_requests/31] > + > +Signed-off-by: Sven Püschel > +--- > + configure.ac | 3 ++- > + 1 file changed, 2 insertions(+), 1 deletion(-) > + > +diff --git a/configure.ac b/configure.ac > +index 2a15d720f9db..c3fed26939a4 100644 > +--- a/configure.ac > ++++ b/configure.ac > +@@ -425,7 +425,8 @@ AS_IF([test "$user_CFLAGS" = unset], [ > + CFLAGS="$CFLAGS $LIBBSD_COMPILER_FLAGS" > + > + AC_ARG_ENABLE([sanitize], > +- [AS_HELP_STRING([--enable-sanitize], [enable compiler sanitizer support])], > ++ [AS_HELP_STRING([--enable-sanitize], [enable compiler sanitizer support])]) > ++ AS_IF([test "x$enable_sanitize" = "xyes"], > + [ > + LIBBSD_COMPILER_FLAGS='' > + LIBBSD_CHECK_COMPILER_FLAG([-fsanitize=address]) > diff --git a/patches/libbsd-0.12.2/series b/patches/libbsd-0.12.2/series > index 4e941d98e636..c47d9d254ebd 100644 > --- a/patches/libbsd-0.12.2/series > +++ b/patches/libbsd-0.12.2/series > @@ -1,4 +1,5 @@ > # generated by git-ptx-patches > #tag:base --start-number 1 > 0001-use-I-instead-of-isystem-for-local-path.patch > -# 11cd8d3f722f73a2447389987314e113 - git-ptx-patches magic > +0002-build-check-sanitize-argument-value.patch > +# 3d6c768f28075aeb90ae7547b97f6810 - git-ptx-patches magic