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  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:   Wed, 15 Jan 2020 23:10:28 +0100
From:   Toke Høiland-Jørgensen <>
To:     Andrii Nakryiko <>
Cc:     Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Martin KaFai Lau <>,
        Song Liu <>, Yonghong Song <>,
        Andrii Nakryiko <>,
        Doug Ledford <>,
        Jason Gunthorpe <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,
        Jesper Dangaard Brouer <>,
        John Fastabend <>,
        Peter Zijlstra <>,
        Ingo Molnar <>,
        Arnaldo Carvalho de Melo <>,
        Mark Rutland <>,
        Alexander Shishkin <>,
        Jiri Olsa <>,
        Namhyung Kim <>,
        Shuah Khan <>,
        Networking <>, bpf <>,
        open list <>,,
        "open list\:KERNEL SELFTEST FRAMEWORK" 
Subject: Re: [PATCH bpf-next v2 00/10] tools: Use consistent libbpf include paths everywhere

Andrii Nakryiko <> writes:

> On Wed, Jan 15, 2020 at 6:13 AM Toke Høiland-Jørgensen <> 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!

Great, thanks for testing! I'll fix up your comments (and Alexei's) and
submit another version tomorrow.


Powered by blists - more mailing lists