From: Kees Cook <keescook@chromium.org>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: luto@amacapital.net, wad@chromium.org, shuah@kernel.org,
mpe@ellerman.id.au, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] selftests: Fix seccomp to support relocatable build (O=objdir)
Date: Wed, 25 Mar 2020 16:26:25 -0700 [thread overview]
Message-ID: <202003251626.D47C4B3@keescook> (raw)
In-Reply-To: <20200325231602.12964-1-skhan@linuxfoundation.org>
On Wed, Mar 25, 2020 at 05:16:02PM -0600, Shuah Khan wrote:
> Fix seccomp relocatable builds. This is a simple fix to use the
> right lib.mk variable TEST_GEN_PROGS. Local header dependency
> is addressed in a change to lib.mk as a framework change that
> enforces the dependency without requiring changes to individual
> tests.
>
> The following use-cases work with this change:
>
> In seccomp directory:
> make all and make clean
>
> From top level from main Makefile:
> make kselftest-install O=objdir ARCH=arm64 HOSTCC=gcc \
> CROSS_COMPILE=aarch64-linux-gnu- TARGETS=seccomp
>
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Thanks for getting this fixed. :)
Acked-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> Changes since v3:
> Simplified logic based on comments from Kees and Michael
>
> tools/testing/selftests/seccomp/Makefile | 17 +++--------------
> 1 file changed, 3 insertions(+), 14 deletions(-)
>
> diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
> index 1760b3e39730..0ebfe8b0e147 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -1,17 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> -all:
> -
> -include ../lib.mk
> -
> -.PHONY: all clean
> -
> -BINARIES := seccomp_bpf seccomp_benchmark
> CFLAGS += -Wl,-no-as-needed -Wall
> +LDFLAGS += -lpthread
>
> -seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
> - $(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
> -
> -TEST_PROGS += $(BINARIES)
> -EXTRA_CLEAN := $(BINARIES)
> -
> -all: $(BINARIES)
> +TEST_GEN_PROGS := seccomp_bpf seccomp_benchmark
> +include ../lib.mk
> --
> 2.20.1
>
--
Kees Cook
prev parent reply other threads:[~2020-03-25 23:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 23:16 [PATCH v4] selftests: Fix seccomp to support relocatable build (O=objdir) Shuah Khan
2020-03-25 23:26 ` Kees Cook [this message]
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=202003251626.D47C4B3@keescook \
--to=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mpe@ellerman.id.au \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=wad@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.