linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Tommi Rantala <tommi.t.rantala@nokia.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH 01/13] selftests: filter kselftest headers from command in lib.mk
Date: Thu, 8 Oct 2020 13:05:15 -0700	[thread overview]
Message-ID: <202010081305.32C244AB5@keescook> (raw)
In-Reply-To: <20201008122633.687877-2-tommi.t.rantala@nokia.com>

On Thu, Oct 08, 2020 at 03:26:21PM +0300, Tommi Rantala wrote:
> Commit 1056d3d2c97e ("selftests: enforce local header dependency in
> lib.mk") added header dependency to the rule, but as the rule uses $^,
> the headers are added to the compiler command line.
> 
> This can cause unexpected precompiled header files being generated when
> compilation fails:
> 
>   $ echo { >> openat2_test.c
> 
>   $ make
>   gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined  openat2_test.c
>     tools/testing/selftests/kselftest_harness.h tools/testing/selftests/kselftest.h helpers.c
>     -o tools/testing/selftests/openat2/openat2_test
>   openat2_test.c:313:1: error: expected identifier or ‘(’ before ‘{’ token
>     313 | {
>         | ^
>   make: *** [../lib.mk:140: tools/testing/selftests/openat2/openat2_test] Error 1
> 
>   $ file openat2_test*
>   openat2_test:   GCC precompiled header (version 014) for C
>   openat2_test.c: C source, ASCII text
> 
> Fix it by filtering out the headers, so that we'll only pass the actual
> *.c files in the compiler command line.
> 
> Fixes: 1056d3d2c97e ("selftests: enforce local header dependency in lib.mk")
> Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>

Ah yes, thanks!

Acked-by: Kees Cook <keescook@chromium.org>


-- 
Kees Cook

  reply	other threads:[~2020-10-08 20:05 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 12:26 [PATCH 00/13] selftests fixes Tommi Rantala
2020-10-08 12:26 ` [PATCH 01/13] selftests: filter kselftest headers from command in lib.mk Tommi Rantala
2020-10-08 20:05   ` Kees Cook [this message]
2020-10-09 12:06   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 02/13] selftests: pidfd: fix compilation errors due to wait.h Tommi Rantala
2020-10-08 20:12   ` Kees Cook
2020-10-09  9:43   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 03/13] selftests: add vmaccess to .gitignore Tommi Rantala
2020-10-08 20:05   ` Kees Cook
2020-10-09 12:02   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 04/13] selftests/harness: prettify SKIP message whitespace again Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09 12:02   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 05/13] selftests: pidfd: use ksft_test_result_skip() when skipping test Tommi Rantala
2020-10-09 12:03   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 06/13] selftests: pidfd: skip test on kcmp() ENOSYS Tommi Rantala
2020-10-09 12:04   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 07/13] selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config Tommi Rantala
2020-10-09 12:04   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 08/13] selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c Tommi Rantala
2020-10-09 12:04   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 09/13] selftests: android: fix multiple definition of sock_name Tommi Rantala
2020-10-09 12:05   ` Christian Brauner
2020-11-05 17:14     ` Shuah Khan
2020-10-08 12:26 ` [PATCH 10/13] selftests: proc: fix warning: _GNU_SOURCE redefined Tommi Rantala
2020-10-08 12:26 ` [PATCH 11/13] selftests: core: use SKIP instead of XFAIL in close_range_test.c Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09  9:44   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 12/13] selftests: clone3: use SKIP instead of XFAIL Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09  9:44   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 13/13] selftests: binderfs: " Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09  9:43   ` Christian Brauner
2020-10-09 12:07 ` [PATCH 00/13] selftests fixes Christian Brauner
2020-10-27 23:12 ` Shuah Khan
2020-10-28  1:37 ` Michael Ellerman
2020-10-28 14:31   ` Shuah Khan
2020-10-30  6:15     ` Michael Ellerman

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=202010081305.32C244AB5@keescook \
    --to=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=tommi.t.rantala@nokia.com \
    /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).