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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d092d36-4c51-4312-be31-747674c6397f@kernel.org>
Date: Thu, 5 Dec 2024 10:58:05 +0000
From: Quentin Monnet <qmo@...nel.org>
To: Leo Yan <leo.yan@....com>
Cc: Namhyung Kim <namhyung@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
 Martin KaFai Lau <martin.lau@...ux.dev>, Eduard Zingerman
 <eddyz87@...il.com>, Song Liu <song@...nel.org>,
 Yonghong Song <yonghong.song@...ux.dev>,
 John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
 Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
 Jiri Olsa <jolsa@...nel.org>, Nick Terrell <terrelln@...com>,
 bpf@...r.kernel.org, linux-perf-users@...r.kernel.org,
 linux-kernel@...r.kernel.org, Mahe Tardy <mahe.tardy@...il.com>
Subject: Re: [PATCH] bpftool: Fix failure with static linkage

2024-12-05 10:23 UTC+0000 ~ Leo Yan <leo.yan@....com>
> On Wed, Dec 04, 2024 at 10:55:32PM +0000, Quentin Monnet wrote:
> 
> [...]
> 
>>>>> I was about to report exactly the same. :)
>>>>
>>>> Thank you both. This has been reported before [0] but I didn't find the
>>>> time to look into a proper fix.
>>>>
>>>> The tricky part is that static linkage works well without libzstd for
>>>> older versions of elfutils [1], but newer versions now require this
>>>> library. Which means that we don't want to link against libzstd
>>>> unconditionally, or users trying to build bpftool may have to install
>>>> unnecessary dependencies. Instead we should add a new probe under
>>>> tools/build/feature (Note that we already have several combinations in
>>>> there, libbfd, libbfd-liberty, libbfd-liberty-z, and I'm not sure what's
>>>> the best approach in terms of new combinations).
>>>
>>> I think you can use pkg-config if available.
>>>
>>>   $ pkg-config --static --libs libelf
>>>   -lelf -lz -lzstd -pthread
>>
>> That's another dependency that I'd like to avoid if I can :)
> 
> Seems to me, pkg-config is the right tool for doing such kind thing -
> not only it is nature for local building, it is also friendly for build
> system (e.g. buildroot, OpenEmbedded / Yocto).  Though I have no deep
> knowledge for building.


pkg-config would be nice but is not always installed by default. We've
been handling build options without it so far, if we can fix the current
issue without struggling too much with probes I'd just as well avoid
adding a build dependency.


> I am a bit confused why this issue is related to build features libbfd,
> libbfd-liberty, libbfd-liberty-z.  Should not the issue is related to
> libelf?  build/feature has several libelf checking, maybe we can add new
> one libelf-zstd?


Apologies, I was the one getting confused. You're correct, this affects
libelf and not libbfd, and yes libelf-zstd is likely the way to go.

Thank you,
Quentin


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ