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]
Message-ID: <c022261e-bff4-8aea-0d71-f8683b6ad449@iogearbox.net>
Date:   Mon, 23 Jan 2023 21:37:14 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Ian Rogers <irogers@...gle.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        Connor OBrien <connoro@...gle.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Kumar Kartikeya Dwivedi <memxor@...il.com>,
        bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] tools/resolve_btfids: Install subcmd headers

On 1/19/23 7:31 PM, Ian Rogers wrote:
> Previously tools/lib/subcmd was added to the include path, switch to
> installing the headers and then including from that directory. This
> avoids dependencies on headers internal to tools/lib/subcmd. Add the
> missing subcmd directory to the affected #include.
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>   tools/bpf/resolve_btfids/Makefile | 19 ++++++++++++++-----
>   tools/bpf/resolve_btfids/main.c   |  2 +-
>   2 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile
> index 19a3112e271a..76b737b2560d 100644
> --- a/tools/bpf/resolve_btfids/Makefile
> +++ b/tools/bpf/resolve_btfids/Makefile
> @@ -35,21 +35,29 @@ SUBCMD_SRC := $(srctree)/tools/lib/subcmd/
>   BPFOBJ     := $(OUTPUT)/libbpf/libbpf.a
>   LIBBPF_OUT := $(abspath $(dir $(BPFOBJ)))/
>   SUBCMDOBJ  := $(OUTPUT)/libsubcmd/libsubcmd.a
> +SUBCMD_OUT := $(abspath $(dir $(SUBCMDOBJ)))/
>   
>   LIBBPF_DESTDIR := $(LIBBPF_OUT)
>   LIBBPF_INCLUDE := $(LIBBPF_DESTDIR)include
>   
> +SUBCMD_DESTDIR := $(SUBCMD_OUT)
> +SUBCMD_INCLUDE := $(SUBCMD_DESTDIR)include
> +
>   BINARY     := $(OUTPUT)/resolve_btfids
>   BINARY_IN  := $(BINARY)-in.o
>   
>   all: $(BINARY)
>   
> +prepare: $(BPFOBJ) $(SUBCMDOBJ)
> +
>   $(OUTPUT) $(OUTPUT)/libsubcmd $(LIBBPF_OUT):
>   	$(call msg,MKDIR,,$@)
>   	$(Q)mkdir -p $(@)
>   
>   $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/libsubcmd
> -	$(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(abspath $(dir $@))/ $(abspath $@)
> +	$(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(SUBCMD_OUT) \
> +		    DESTDIR=$(SUBCMD_DESTDIR) prefix= \
> +		    $(abspath $@) install_headers
>   
>   $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OUT)
>   	$(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC) OUTPUT=$(LIBBPF_OUT)    \
> @@ -60,14 +68,14 @@ CFLAGS += -g \
>             -I$(srctree)/tools/include \
>             -I$(srctree)/tools/include/uapi \
>             -I$(LIBBPF_INCLUDE) \
> -          -I$(SUBCMD_SRC)
> +          -I$(SUBCMD_INCLUDE)
>   
>   LIBS = -lelf -lz
>   

This series needs a rebase against bpf-next, given it results in merge conflict
e.g. see commit 0e43662e61f2 ("tools/resolve_btfids: Use pkg-config to locate
libelf") from Dec 15th.

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ