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: <d31803bb-fb32-4a94-aa89-83b02757d650@suse.cz>
Date: Thu, 31 Jul 2025 20:13:55 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 WangYuli <wangyuli@...ontech.com>
Cc: akpm@...ux-foundation.org, Liam.Howlett@...cle.com, 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

On 7/31/25 12:24, Lorenzo Stoakes wrote:
> On Thu, Jul 31, 2025 at 10:55:32AM +0800, WangYuli wrote:
>> >
>> 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...
> 
> OK thanks please do check, am happy to have a patch to add a flag if
> appropriate! :)
> 
>>
>> 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...
> 
> Kernel always uses the GNU C standard by convention, so we should be good,
> but indeed I think this is the case!

I think it's not "by convention" but quite explicitly by:

Makefile:KBUILD_CFLAGS += -std=gnu11

I think this is not automatically used by tools/ build?

If you git grep gnu11, you'll find various Makefile's under tools/ adding
that to CFLAGS. Maybe we can simply do that also with
tools/testing/shared/shared.mk
that's included for the vma tests.

I don't have this gcc version so can't try myself if it helps.

> The irony here is that I actually intend to change stubs in this header to
> remove parameter names (previously had review on this :).
> 
>>
>> [ Cc the kbuild list. ]
> 
> Thanks
> 
>>
>> Thanks,
>>
>> --
>> WangYuli
> 
> Cheers, Lorenzo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ