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: <2127a682-1d78-49a5-26e2-cfda5b35602d@infradead.org>
Date:   Wed, 3 Feb 2021 15:29:06 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Andrii Nakryiko <andrii@...nel.org>, bpf@...r.kernel.org,
        netdev@...r.kernel.org, ast@...com, daniel@...earbox.net
Cc:     kernel-team@...com, Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH bpf-next] libbpf: stop using feature-detection Makefiles

On 2/3/21 12:34 PM, Andrii Nakryiko wrote:
> Libbpf's Makefile relies on Linux tools infrastructure's feature detection
> framework, but libbpf's needs are very modest: it detects the presence of
> libelf and libz, both of which are mandatory. So it doesn't benefit much from
> the framework, but pays significant costs in terms of maintainability and
> debugging experience, when something goes wrong. The other feature detector,
> testing for the presernce of minimal BPF API in system headers is long
> obsolete as well, providing no value.
> 
> So stop using feature detection and just assume the presence of libelf and
> libz during build time. Worst case, user will get a clear and actionable
> linker error, e.g.:
> 
>   /usr/bin/ld: cannot find -lelf
> 
> On the other hand, we completely bypass recurring issues various users
> reported over time with false negatives of feature detection (libelf or libz
> not being detected, while they are actually present in the system).
> 
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Andrii Nakryiko <andrii@...nel.org>
> ---
>  tools/lib/bpf/.gitignore |  1 -
>  tools/lib/bpf/Makefile   | 47 ++++------------------------------------
>  2 files changed, 4 insertions(+), 44 deletions(-)

Hi Andrii,

This does indeed fix the build problems that I was seeing,
so I can add:
Acked-by: Randy Dunlap <rdunlap@...radead.org>

but in the long term I think that features/libs/etc. that are
used should be checked for instead of being used blindly... IMO.

Thanks.

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ