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: <27488afa-1d53-43eb-bc68-8e950d804000@lucifer.local>
Date: Fri, 1 Aug 2025 09:50:58 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: WangYuli <wangyuli@...ontech.com>, 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 Fri, Aug 01, 2025 at 10:04:11AM +0200, Vlastimil Babka wrote:
> On 8/1/25 07:57, WangYuli wrote:
> > Hi all,
> >
> > On 2025/8/1 13:14, Lorenzo Stoakes wrote:
> >> WangYuli - could you check? If it's as simple as this, feel free to send a patch
> >> making this change.
> >>
> >> Thanks, Lorenzo
> >>
> > It's not that simple, of course... That didn't work.
>
> Yeah seems I can reproduce it with gcc-7.5 and it doesn't work.

I think we should still add this though to make it consistent with the rest
of the kernel.

>
> I think there is a difference with the other instances of omitted names
> found by grep as Lorenzo suggested earlier - those seem to all be
> declarations. But here in vma_internal.h they are (empty) static inline
> definitions.

Yep this seems to be the difference.

>
> Seems like newer gcc versions got more lenient. Haven't found why, but seems
> they want it to stay like this:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113825
>
> But I don't know if there's a way to make older gcc's lenient too.
>
> > I'll take another look.
> >
> > Thanks,
> >
>

WangYuli - apologies - this is my fault entirely, I misunderstood things
here.

I was wrong to dismiss this out of hand, I guess not many headers are doing
stubs like this, and I mistook this as being a general thing.

Could you please do a v2 where you add back in parameter names (and add
this compiler flag - I think we still should), but could you do me a favour
and also fixup some horrid stuff here?

I have functions like:

static inline void vma_adjust_trans_huge(struct vm_area_struct *vma,
					 unsigned long start,
					 unsigned long end,
					 struct vm_area_struct *next)
{
	(void)vma;
	(void)start;
	(void)end;
	(void)next;
}

Where I am trying to avoid 'unused param' warnings which... won't actually
arise.

So could you eliminate all these horrid (void) things as well ass adding
parameter names?

That'd be really helpful, thanks!

Cheers, Lorenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ