lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f58ae2ae-49f8-46cd-bd24-2d358cb36f15@roeck-us.net>
Date: Thu, 4 Dec 2025 09:58:37 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Shuah Khan <shuah@...nel.org>, Christian Brauner <brauner@...nel.org>,
	Elizabeth Figura <zfigura@...eweavers.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Eric Dumazet <edumazet@...gle.com>, Kees Cook <kees@...nel.org>,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
	wine-devel@...ehq.org, netdev@...r.kernel.org, bpf@...r.kernel.org,
	Kuniyuki Iwashima <kuniyu@...gle.com>
Subject: Re: [PATCH 06/13] selftest: af_unix: Support compilers without
 flex-array-member-not-at-end support

On Thu, Dec 04, 2025 at 09:40:54AM -0800, Jakub Kicinski wrote:
> On Thu,  4 Dec 2025 08:17:20 -0800 Guenter Roeck wrote:
> > -CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end
> > +CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end)
> 
> Hm, the Claude code review we have hooked up to patchwork says:
> 
>   Is cc-option available in the selftest build environment? Looking at
>   tools/testing/selftests/lib.mk (included at line 14), it doesn't include
>   scripts/Makefile.compiler where cc-option is defined. When cc-option is
>   undefined, $(call cc-option,...) expands to an empty string, which means
>   the -Wflex-array-member-not-at-end flag won't be added even on compilers
>   that support it.
> 
>   This defeats the purpose of commit 1838731f1072c which added the warning
>   flag to catch flexible array issues.
> 
>   For comparison, tools/testing/selftests/nolibc/Makefile explicitly
>   includes scripts/Makefile.compiler before using cc-option.
> 
> Testing it:
> 
> $ make -C tools/testing/selftests/ TARGETS=net/af_unix Q= V=1
> make: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests'
> make[1]: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests/net/af_unix'
> gcc -isystem /home/kicinski/devel/linux/usr/include -Wall  -D_GNU_SOURCE=     diag_uid.c  -o /home/kicinski/devel/linux/tools/testing/selftests/net/af_unix/diag_uid
> 
> looks like the flag just disappears. Even tho:
> 
> gcc version 15.2.1 

Oops :). I didn't expect that, sorry. Thanks for finding!

... and I guess it's time to set up AI in my environment.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ