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:   Thu, 3 Feb 2022 00:00:32 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Shuah Khan <skhan@...uxfoundation.org>
Cc:     Kees Cook <keescook@...omium.org>,
        Eric Biederman <ebiederm@...ssion.com>,
        Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
        Ariadne Conill <ariadne@...eferenced.org>,
        Michael Kerrisk <mtk.manpages@...il.com>,
        Matthew Wilcox <willy@...radead.org>,
        Christian Brauner <brauner@...nel.org>,
        Rich Felker <dalias@...c.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] selftests/exec: Avoid future NULL argv execve warning

On Wed, Feb 02, 2022 at 10:38:57AM -0700, Shuah Khan wrote:
> On 2/2/22 8:13 AM, Alexey Dobriyan wrote:
> > On Mon, Jan 31, 2022 at 04:08:07PM -0800, Kees Cook wrote:
> > > Build actual argv for launching recursion test to avoid future warning
> > > about using an empty argv in execve().
> > 
> > > --- a/tools/testing/selftests/exec/recursion-depth.c
> > > +++ b/tools/testing/selftests/exec/recursion-depth.c
> > > @@ -24,8 +24,14 @@
> > >   #include <sys/mount.h>
> > >   #include <unistd.h>
> > > +#define FILENAME "/tmp/1"
> > > +#define HASHBANG "#!" FILENAME "\n"
> > > +
> > >   int main(void)
> > >   {
> > > +	char * const argv[] = { FILENAME, NULL };
> > > +	int rv;
> > 
> > Can we move out of -Wdeclaration-after-statement mentality in tests at least?
> 
> selftest like the rest of the kernel follows the same coding guidelines.
> It will follow the moving "-Wdeclaration-after-statement mentality" when
> the rest of the kernel does.
> 
> Looks like this topic was discussed in the following:
> https://patchwork.kernel.org/project/linux-kbuild/patch/c6fda26e8d134264b04fadc3386d6c32@gmail.com/

The only real argument is "gcc miscompiles /proc" to which adding -Wdeclaration-after-statement
looks like a too big hammer.

Why can't we have nice things?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ