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:   Fri, 17 Jan 2020 13:36:55 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Andrii Nakryiko <andriin@...com>,
        Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        John Fastabend <john.fastabend@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Shuah Khan <shuah@...nel.org>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        linux-rdma@...r.kernel.org,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        clang-built-linux@...glegroups.com
Subject: Re: [PATCH bpf-next v4 03/10] selftests: Pass VMLINUX_BTF to
 runqslower Makefile

On Fri, Jan 17, 2020 at 5:37 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> From: Toke Høiland-Jørgensen <toke@...hat.com>
>
> Add a VMLINUX_BTF variable with the locally-built path when calling the
> runqslower Makefile from selftests. This makes sure a simple 'make'
> invocation in the selftests dir works even when there is no BTF information
> for the running kernel. Do a wildcard expansion and include the same paths
> for BTF for the running kernel as in the runqslower Makefile, to make it
> possible to build selftests without having a vmlinux in the local tree.
>
> Also fix the make invocation to use $(OUTPUT)/tools as the destination
> directory instead of $(CURDIR)/tools.
>
> Fixes: 3a0d3092a4ed ("selftests/bpf: Build runqslower from selftests")
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> ---

With formatting fixes:

Acked-by: Andrii Nakryiko <andriin@...com>

>  tools/testing/selftests/bpf/Makefile |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 246d09ffb296..dcc8dbb1510b 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -124,10 +124,14 @@ $(OUTPUT)/test_stub.o: test_stub.c
>         $(call msg,CC,,$@)
>         $(CC) -c $(CFLAGS) -o $@ $<
>
> +VMLINUX_BTF_PATHS := $(abspath ../../../../vmlinux)                    \
> +                       /sys/kernel/btf/vmlinux                 \
> +                       /boot/vmlinux-$(shell uname -r)

it's not 100% consistent in this Makefile, unfortunately, but usually
(and similarly to function arguments) we align items for such
multi-line statements

> +VMLINUX_BTF:= $(firstword $(wildcard $(VMLINUX_BTF_PATHS)))
>  .PHONY: $(OUTPUT)/runqslower
>  $(OUTPUT)/runqslower: force
> -       $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower           \
> -                   OUTPUT=$(CURDIR)/tools/
> +       $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower     \
> +                   OUTPUT=$(OUTPUT)/tools/ VMLINUX_BTF=$(VMLINUX_BTF)
>

please, keep \ alignment, it's all over the place

>  BPFOBJ := $(OUTPUT)/libbpf.a
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ