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] [day] [month] [year] [list]
Message-ID: <CAEf4BzbRMXmD2K3hku+UJEw61C3nnw1pJr52SySJLtXq5voghg@mail.gmail.com>
Date: Mon, 30 Sep 2024 15:49:10 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: i@...k3r.moe
Cc: bpf@...r.kernel.org, Andrii Nakryiko <andrii@...nel.org>, 
	Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 0/2] BPF static linker: fix failure when
 encountering duplicate extern functions

On Sun, Sep 29, 2024 at 2:31 AM Eric Long via B4 Relay
<devnull+i.hack3r.moe@...nel.org> wrote:
>
> Currently, if `bpftool gen object` tries to link two objects that
> contains the same extern function prototype, libbpf will try to get
> their (non-existent) size by calling bpf__resolve_size like extern
> variables and fail with:
>
>         libbpf: global 'whatever': failed to resolve size of underlying type: -22
>
> This should not be the case, and this series adds conditions to update
> size only when the BTF kind is not function.
>
> Fixes: a46349227cd8 ("libbpf: Add linker extern resolution support for functions and global variables")
> Signed-off-by: Eric Long <i@...k3r.moe>
> ---
> Changes in v2:
> - Fix compile errors. Oops!
> - Link to v1: https://lore.kernel.org/r/20240929-libbpf-dup-extern-funcs-v1-0-df15fbd6525b@hack3r.moe
>
> ---
> Eric Long (2):
>       libbpf: do not resolve size on duplicate FUNCs
>       selftests/bpf: make sure linking objects with duplicate extern functions doesn't fail

please shorten second patch's subject and patch set's owb subject as
well, they are too long, generally we try to fit them under 80
characters


>
>  tools/lib/bpf/linker.c                             | 23 ++++++++++++----------
>  tools/testing/selftests/bpf/Makefile               |  3 ++-
>  .../selftests/bpf/prog_tests/dup_extern_funcs.c    |  9 +++++++++
>  .../selftests/bpf/progs/dup_extern_funcs1.c        | 20 +++++++++++++++++++
>  .../selftests/bpf/progs/dup_extern_funcs2.c        | 18 +++++++++++++++++
>  5 files changed, 62 insertions(+), 11 deletions(-)
> ---
> base-commit: 93eeaab4563cc7fc0309bc1c4d301139762bbd60
> change-id: 20240929-libbpf-dup-extern-funcs-871f4bad2122
>
> Best regards,
> --
> Eric Long <i@...k3r.moe>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ