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] [day] [month] [year] [list]
Message-ID: <02f6f676-c6a9-9bac-19f1-a8fb0d236059@huawei.com>
Date:   Thu, 14 Jul 2022 10:02:01 +0800
From:   Pu Lehui <pulehui@...wei.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
CC:     bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        "Daniel Borkmann" <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        "Quentin Monnet" <quentin@...valent.com>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        "Jean-Philippe Brucker" <jean-philippe@...aro.org>
Subject: Re: [PATCH bpf-next 2/3] tools: runqslower: build and use lightweight
 bootstrap version of bpftool



On 2022/7/14 2:52, Andrii Nakryiko wrote:
> On Mon, Jul 11, 2022 at 7:37 PM Pu Lehui <pulehui@...wei.com> wrote:
>>
>> tools/runqslower use bpftool for vmlinux.h, skeleton, and static linking
>> only. So we can use lightweight bootstrap version of bpftool to handle
>> these, and it will be faster.
>>
>> Signed-off-by: Pu Lehui <pulehui@...wei.com>
>> Suggested-by: Andrii Nakryiko <andrii@...nel.org>
>> ---
>>   tools/bpf/runqslower/Makefile | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
>> index da6de16a3dfb..8900c74f29e2 100644
>> --- a/tools/bpf/runqslower/Makefile
>> +++ b/tools/bpf/runqslower/Makefile
>> @@ -4,7 +4,7 @@ include ../../scripts/Makefile.include
>>   OUTPUT ?= $(abspath .output)/
>>
>>   BPFTOOL_OUTPUT := $(OUTPUT)bpftool/
>> -DEFAULT_BPFTOOL := $(BPFTOOL_OUTPUT)bpftool
>> +DEFAULT_BPFTOOL := $(BPFTOOL_OUTPUT)bootstrap/bpftool
>>   BPFTOOL ?= $(DEFAULT_BPFTOOL)
>>   LIBBPF_SRC := $(abspath ../../lib/bpf)
>>   BPFOBJ_OUTPUT := $(OUTPUT)libbpf/
>> @@ -86,6 +86,12 @@ $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(BPFOBJ_OU
>>          $(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC) OUTPUT=$(BPFOBJ_OUTPUT) \
>>                      DESTDIR=$(BPFOBJ_OUTPUT) prefix= $(abspath $@) install_headers
>>
>> +ifeq ($(CROSS_COMPILE),)
>>   $(DEFAULT_BPFTOOL): $(BPFOBJ) | $(BPFTOOL_OUTPUT)
>>          $(Q)$(MAKE) $(submake_extras) -C ../bpftool OUTPUT=$(BPFTOOL_OUTPUT)   \
>> -                   ARCH= CROSS_COMPILE= CC=$(HOSTCC) LD=$(HOSTLD)
>> +                   LIBBPF_BOOTSTRAP_OUTPUT=$(BPFOBJ_OUTPUT)                   \
>> +                   LIBBPF_BOOTSTRAP_DESTDIR=$(BPF_DESTDIR) bootstrap
>> +else
>> +$(DEFAULT_BPFTOOL): | $(BPFTOOL_OUTPUT)
>> +       $(Q)$(MAKE) $(submake_extras) -C ../bpftool OUTPUT=$(BPFTOOL_OUTPUT) bootstrap
>> +endif
> 
> Same comment as on the other patch, this CROSS_COMPILE if/else seems a
> bit fragile, let's keep only the second cleaner part, maybe?
> 

I will make it simple.

> 
>> --
>> 2.25.1
>>
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ