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]
Date:   Fri, 12 Jul 2019 09:28:15 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Nathan Chancellor <natechancellor@...il.com>,
        Ingo Molnar <mingo@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] waitqueue: fix clang -Wuninitialized warnings

On Tue, Jul 09, 2019 at 09:27:17PM +0200, Arnd Bergmann wrote:
> On Wed, Jul 3, 2019 at 7:58 PM Nathan Chancellor
> <natechancellor@...il.com> wrote:
> > On Wed, Jul 03, 2019 at 10:10:55AM +0200, Arnd Bergmann wrote:
> > > When CONFIG_LOCKDEP is set, every use of DECLARE_WAIT_QUEUE_HEAD_ONSTACK()
> > > produces an annoying warning from clang, which is particularly annoying
> > > for allmodconfig builds:
> > >
> > > fs/namei.c:1646:34: error: variable 'wq' is uninitialized when used within its own initialization [-Werror,-Wuninitialized]
> > >         DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
> > >                                         ^~
> > > include/linux/wait.h:74:63: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
> > >         struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> > >                                ~~~~                                  ^~~~
> > > include/linux/wait.h:72:33: note: expanded from macro '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
> > >         ({ init_waitqueue_head(&name); name; })
> > >                                        ^~~~
> > >
> > > After playing with it for a while, I have found a way to rephrase the
> > > macro in a way that should work well with both gcc and clang and not
> > > produce this warning. The open-coded __WAIT_QUEUE_HEAD_INIT_ONSTACK
> > > is a little more verbose than the original version by Peter Zijlstra,
> > > but avoids the gcc-ism that suppresses warnings when assigning a
> > > variable to itself.
> > >
> > > Cc: Peter Zijlstra <peterz@...radead.org>
> > > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> >
> > Reviewed-by: Nathan Chancellor <natechancellor@...il.com>
> > Tested-by: Nathan Chancellor <natechancellor@...il.com>
> 
> Who would be the right person to pick this patch up for mainline?

That would be me; but like Andrew, I'm not a fan of this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ