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]
Date:   Tue, 8 Sep 2020 16:27:35 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Tony Ambardar <tony.ambardar@...il.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Andrey Ignatov <rdna@...com>
Subject: Re: [PATCH bpf v1] tools/libbpf: avoid counting local symbols in ABI check

On Tue, Sep 8, 2020 at 12:53 PM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Sat, Sep 5, 2020 at 2:49 PM Tony Ambardar <tony.ambardar@...il.com> wrote:
> >
> > Encountered the following failure building libbpf from kernel 5.8.5 sources
> > with GCC 8.4.0 and binutils 2.34: (long paths shortened)
> >
> >   Warning: Num of global symbols in sharedobjs/libbpf-in.o (234) does NOT
> >   match with num of versioned symbols in libbpf.so (236). Please make sure
> >   all LIBBPF_API symbols are versioned in libbpf.map.
> >   --- libbpf_global_syms.tmp    2020-09-02 07:30:58.920084380 +0000
> >   +++ libbpf_versioned_syms.tmp 2020-09-02 07:30:58.924084388 +0000
> >   @@ -1,3 +1,5 @@
> >   +_fini
> >   +_init
> >    bpf_btf_get_fd_by_id
> >    bpf_btf_get_next_id
> >    bpf_create_map
> >   make[4]: *** [Makefile:210: check_abi] Error 1
> >
> > Investigation shows _fini and _init are actually local symbols counted
> > amongst global ones:
> >
> >   $ readelf --dyn-syms --wide libbpf.so|head -10
> >
> >   Symbol table '.dynsym' contains 343 entries:
> >      Num:    Value  Size Type    Bind   Vis      Ndx Name
> >        0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
> >        1: 00004098     0 SECTION LOCAL  DEFAULT   11
> >        2: 00004098     8 FUNC    LOCAL  DEFAULT   11 _init@@LIBBPF_0.0.1
> >        3: 00023040     8 FUNC    LOCAL  DEFAULT   14 _fini@@LIBBPF_0.0.1
> >        4: 00000000     0 OBJECT  GLOBAL DEFAULT  ABS LIBBPF_0.0.4
> >        5: 00000000     0 OBJECT  GLOBAL DEFAULT  ABS LIBBPF_0.0.1
> >        6: 0000ffa4     8 FUNC    GLOBAL DEFAULT   12 bpf_object__find_map_by_offset@@LIBBPF_0.0.1
> >
> > A previous commit filtered global symbols in sharedobjs/libbpf-in.o. Do the
> > same with the libbpf.so DSO for consistent comparison.
> >
> > Fixes: 306b267cb3c4 ("libbpf: Verify versioned symbols")
> >
> > Signed-off-by: Tony Ambardar <Tony.Ambardar@...il.com>

Applied. Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ