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: <CACdoK4JHs+BRv_0WYqa+RO_XXsSg4J-xCpEErLD7XLhhMwVq5Q@mail.gmail.com>
Date:   Sat, 2 Oct 2021 21:30:38 +0100
From:   Quentin Monnet <quentin@...valent.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next v2 7/9] samples/bpf: install libbpf headers when building

On Sat, 2 Oct 2021 at 00:22, Andrii Nakryiko <andrii.nakryiko@...il.com> wrote:
>
> On Fri, Oct 1, 2021 at 4:09 AM Quentin Monnet <quentin@...valent.com> wrote:
> >
> > API headers from libbpf should not be accessed directly from the source
> > directory. Instead, they should be exported with "make install_headers".
> > Make sure that samples/bpf/Makefile installs the headers properly when
> > building.
> >
> > The object compiled from and exported by libbpf are now placed into a
> > subdirectory of sample/bpf/ instead of remaining in tools/lib/bpf/. We
> > attempt to remove this directory on "make clean". However, the "clean"
> > target re-enters the samples/bpf/ directory from the root of the
> > repository ("$(MAKE) -C ../../ M=$(CURDIR) clean"), in such a way that
> > $(srctree) and $(src) are not defined, making it impossible to use
> > $(LIBBPF_OUTPUT) and $(LIBBPF_DESTDIR) in the recipe. So we only attempt
> > to clean $(CURDIR)/libbpf, which is the default value.
> >
> > We also change the output directory for bpftool, to place the generated
> > objects under samples/bpf/bpftool/ instead of building in bpftool's
> > directory directly. Doing so, we make sure bpftool reuses the libbpf
> > library previously compiled and installed.

> > @@ -268,16 +272,28 @@ all:
> >  clean:
> >         $(MAKE) -C ../../ M=$(CURDIR) clean
> >         @find $(CURDIR) -type f -name '*~' -delete
> > +       @/bin/rm -rf $(CURDIR)/libbpf $(CURDIR)/bpftool
>
> should this be $(RM) -rf ? I've seen other makefiles don't hardcode
> /bin/rm. And also below we are passing RM='rm -rf', not /bin/rm.
> Inconsistent :)

Inconsistent?! But I took it just a few lines above, from
BTF_LLVM_PROBE! :) But I also prefer "$(RM) -r" (the -f is included in
"$(RM)"), so sure, I'll address.
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ