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: <CAEf4Bza+dNoD7HbVQGtXBq=raz4DQg0yTShKZHRbCo+zHYfoSA@mail.gmail.com>
Date:   Wed, 15 Jan 2020 10:06:01 -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 <jakub.kicinski@...ronome.com>,
        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 v2 00/10] tools: Use consistent libbpf include
 paths everywhere

On Wed, Jan 15, 2020 at 6:13 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> The recent commit 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are
> taken from selftests dir") broke compilation against libbpf if it is installed
> on the system, and $INCLUDEDIR/bpf is not in the include path.
>
> Since having the bpf/ subdir of $INCLUDEDIR in the include path has never been a
> requirement for building against libbpf before, this needs to be fixed. One
> option is to just revert the offending commit and figure out a different way to
> achieve what it aims for. However, this series takes a different approach:
> Changing all in-tree users of libbpf to consistently use a bpf/ prefix in
> #include directives for header files from libbpf.
>
> 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'). Also, this approach has the advantage that it makes external
> and internal users consistent with each other, and ensures no future changes
> breaks things in the same way as the commit referenced above.
>
> 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-2: Trivial fixes to Makefiles for issues I discovered while changing
>   the include paths.
>
> - Patch 3-7: 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 8: Change the bpf_helpers file in libbpf itself to use the bpf/ prefix
>   when including (the original source of breakage).
>
> - Patch 9-10: Remove tools/lib/bpf from include paths to make sure we don't
>   inadvertently re-introduce includes without the bpf/ prefix.
>
> ---

Thanks, Toke, for this clean up! I tested it locally for my set up:
runqslower, bpftool, libbpf, and selftests all build fine, so it looks
good. My only concern is with selftests/bpf Makefile, we shouldn't
build anything outside of selftests/bpf. Let's fix that. Thanks!

>
> Toke Høiland-Jørgensen (10):
>       samples/bpf: Don't try to remove user's homedir on clean
>       tools/bpf/runqslower: Fix override option for VMLINUX_BTF
>       tools/runqslower: Use consistent include paths for libbpf
>       selftests: Use consistent include paths for libbpf
>       bpftool: Use consistent include paths for libbpf
>       perf: Use consistent include paths for libbpf
>       samples/bpf: Use consistent include paths for libbpf
>       libbpf: Fix include of bpf_helpers.h when libbpf is installed on system
>       selftests: Remove tools/lib/bpf from include path
>       tools/runqslower: Remove tools/lib/bpf from include path
>
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ