From: Shuah Khan <skhan@linuxfoundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>, Kees Cook <keescook@chromium.org>
Cc: Eric Biederman <ebiederm@xmission.com>,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org,
Ariadne Conill <ariadne@dereferenced.org>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
Christian Brauner <brauner@kernel.org>,
Rich Felker <dalias@libc.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/exec: Avoid future NULL argv execve warning
Date: Wed, 2 Feb 2022 10:38:57 -0700 [thread overview]
Message-ID: <7af32164-dbdf-26f1-1aaa-b720365f9743@linuxfoundation.org> (raw)
In-Reply-To: <Yfqfo0rbq/B/l6IP@localhost.localdomain>
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/
thanks,
-- Shuah
next prev parent reply other threads:[~2022-02-02 17:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 0:08 [PATCH] selftests/exec: Avoid future NULL argv execve warning Kees Cook
2022-02-02 15:13 ` Alexey Dobriyan
2022-02-02 17:38 ` Shuah Khan [this message]
2022-02-02 21:00 ` Alexey Dobriyan
2022-02-04 16:11 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7af32164-dbdf-26f1-1aaa-b720365f9743@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=adobriyan@gmail.com \
--cc=ariadne@dereferenced.org \
--cc=brauner@kernel.org \
--cc=dalias@libc.org \
--cc=ebiederm@xmission.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=shuah@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).