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:   Mon, 20 Jan 2020 16:43:33 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Toke Høiland-Jørgensen <toke@...hat.com>,
        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 ML <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH bpf-next v5 00/11] tools: Use consistent libbpf include
 paths everywhere

On Mon, Jan 20, 2020 at 2:21 PM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Mon, Jan 20, 2020 at 5:08 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
> >
> > We are currently being somewhat inconsistent with the libbpf include paths,
> > which makes it difficult to move files from the kernel into an external
> > libbpf-using project without adjusting include paths.
> >
> > Having the bpf/ subdir of $INCLUDEDIR in the include path has never been a
> > requirement for building against libbpf before, and indeed the libbpf pkg-config
> > file doesn't include it. So let's make all libbpf includes across the kernel
> > tree use the bpf/ prefix in their includes. Since bpftool skeleton generation
> > emits code with a libbpf include, this also ensures that those can be used in
> > existing external projects using the regular pkg-config include path.
> >
> > This turns out to be a somewhat invasive change in the number of files touched;
> > however, the actual changes to files are fairly trivial (most of them are simply
> > made with 'sed'). The series is split to make the change for one tool subdir at
> > a time, while trying not to break the build along the way. It is structured like
> > this:
> >
> > - Patch 1-3: Trivial fixes to Makefiles for issues I discovered while changing
> >   the include paths.
> >
> > - Patch 4-8: Change the include directives to use the bpf/ prefix, and updates
> >   Makefiles to make sure tools/lib/ is part of the include path, but without
> >   removing tools/lib/bpf
> >
> > - Patch 9-11: Remove tools/lib/bpf from include paths to make sure we don't
> >   inadvertently re-introduce includes without the bpf/ prefix.
> >
> > Changelog:
> >
> > v5:
> >   - Combine the libbpf build rules in selftests Makefile (using Andrii's
> >     suggestion for a make rule).
> >   - Re-use self-tests libbpf build for runqslower (new patch 10)
> >   - Formatting fixes
> >
> > v4:
> >   - Move runqslower error on missing BTF into make rule
> >   - Make sure we don't always force a rebuild selftests
> >   - Rebase on latest bpf-next (dropping patch 11)
> >
> > v3:
> >   - Don't add the kernel build dir to the runqslower Makefile, pass it in from
> >     selftests instead.
> >   - Use libbpf's 'make install_headers' in selftests instead of trying to
> >     generate bpf_helper_defs.h in-place (to also work on read-only filesystems).
> >   - Use a scratch builddir for both libbpf and bpftool when building in selftests.
> >   - Revert bpf_helpers.h to quoted include instead of angled include with a bpf/
> >     prefix.
> >   - Fix a few style nits from Andrii
> >
> > v2:
> >   - Do a full cleanup of libbpf includes instead of just changing the
> >     bpf_helper_defs.h include.
> >
> > ---
> >
>
> Looks good, it's a clear improvement on what we had before, thanks!
>
> It doesn't re-build bpftool when bpftool sources changes, but I think
> it was like that even before, so no need to block on that. Would be
> nice to have a follow up fixing that, though. $(wildcard
> $(BPFTOOL_DIR)/*.[ch] $(BPFTOOL_DIR)/Makefile) should do it, same as
> for libbpf.
>
> So, for the series:
>
> Acked-by: Andrii Nakryiko <andriin@...com>
> Tested-by: Andrii Nakryiko <andriin@...com>

Applied. Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ