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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0HgsKzez13cSWZ-HVGM86UXB5a58MozY+BupfpMuB2gw@mail.gmail.com>
Date:   Mon, 22 Mar 2021 14:02:54 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Christian Brauner <christian.brauner@...ntu.com>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        James Morris <jamorris@...ux.microsoft.com>,
        Serge Hallyn <serge@...lyn.com>,
        Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] posix-acl: avoid -Wempty-body warning

On Mon, Mar 22, 2021 at 1:15 PM Christian Brauner
<christian.brauner@...ntu.com> wrote:
> On Mon, Mar 22, 2021 at 12:38:24PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > The fallthrough comment for an ignored cmpxchg() return value
> > produces a harmless warning with 'make W=1':
> >
> > fs/posix_acl.c: In function 'get_acl':
> > fs/posix_acl.c:127:36: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> >   127 |                 /* fall through */ ;
> >       |                                    ^
> >
> > Rewrite it as gcc suggests as a step towards a clean W=1 build.
> > On most architectures, we could just drop the if() entirely, but
> > in some cases this causes a different warning.
>
> And you don't see the warning for the second unconditional
> cmpxchg(p, sentinel, ACL_NOT_CACHED);
> below?

I would have expected both to show that warning, didn't notice the other
one.  I now see that all architectures use statement expressions for cmpxchg()
and xchg() these days, after we fixed m68k, alpha and ia64, so the
changelog text here no longer makes sense.

Should I just remove the if() then?

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ