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: <CB890ABC56C2FA67+56b95783-ed70-4744-9fc5-f2d93ddf2c12@uniontech.com>
Date: Thu, 31 Jul 2025 10:55:32 +0800
From: WangYuli <wangyuli@...ontech.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: akpm@...ux-foundation.org, Liam.Howlett@...cle.com, vbabka@...e.cz,
 jannh@...gle.com, pfalcato@...e.de, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, niecheng1@...ontech.com,
 guanwentao@...ontech.com, Jun Zhan <zhanjun@...ontech.com>,
 linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] tools/testing/vma: Fix function parameter declarations
 for GCC 8.3 compatibility

Hi Lorenzo Stoakes,

On 2025/7/29 17:06, Lorenzo Stoakes wrote:
> On Tue, Jul 29, 2025 at 04:47:00PM +0800, WangYuli wrote:
>> The Linux kernel's minimum GCC version requirement has been bumped
>> from 4.3 to 8.3, but this tool still fails to compile with GCC 8.3.
> Why people keep reporting this for my VMA test series but _not_ the kernel
> as a whole I don't know.
>
> $ grep "\*);" include/linux/mm.h | wc -l
> 9
>
> ^--- If you use such a compiler, the kernel won't build.
>
> So the bug is whoever is saying a version of gcc that does the below (I'll
> take your word for it that this is in a normal configuraiton) is OK for the
> kernel.
>
> It's clearly not.
>
> Oh just to underline things:
>
> $ find include/linux -name '*.h' | xargs grep "\*);" | wc -l
> 1899
>
> So y'know.
>
>> Older compilers would fail if did not include parameter names in
>> function declarations that contained parameter types; newer compilers
>> are more lenient about this.
> You're using a compiler that won't build linux. Stop it?
>
>> Fix many errors like this:
>>    In file included from vma.c:10:
>>    vma_internal.h: In function ‘arch_validate_flags’:
>>    vma_internal.h:1218:40: error: parameter name omitted
>>     static inline bool arch_validate_flags(unsigned long)
>>                                          ^~~~~~~~~~~~~
>>    vma.c: In function ‘dummy_close’:
>>    vma.c:281:25: error: parameter name omitted
>>     static void dummy_close(struct vm_area_struct *)
>>                           ^~~~~~~~~~~~~~~~~~~~~~~
>>
>> Reported-by: Jun Zhan <zhanjun@...ontech.com>
>> Signed-off-by: WangYuli <wangyuli@...ontech.com>
> NAK.
>
Thanks for the heads-up! I noticed that coding style in the kernel code 
as well.

However, GCC 8.3 (which does meet the kernel's compiler version 
requirements) can compile the kernel code normally, but it can't compile 
vma's test correctly.

Could the issue be related to differences in compilation parameters? 
I'll need to spend some time looking into this more closely...

By the way, this coding style has been a GNU C extension until the ISO 
C23 standard. So, until the kernel's C language standard is upgraded to 
C23 (which seems unlikely to happen anytime soon, perhaps years down the 
line), it actually makes sense to modify this style for a practical 
purpose...

[ Cc the kbuild list. ]

Thanks,

-- 
WangYuli

Download attachment "OpenPGP_0xC5DA1F3046F40BEE.asc" of type "application/pgp-keys" (633 bytes)

Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ