Re: encoding BTF on glibc was: Re: [PATCH pahole 0/3] fix handling of bitfields in btf_loader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 25, 2019 at 12:08 PM Arnaldo Carvalho de Melo
<arnaldo.melo@xxxxxxxxx> wrote:
>
> Em Mon, Feb 25, 2019 at 11:42:29AM -0800, Andrii Nakryiko escreveu:
> > On Mon, Feb 25, 2019 at 11:00 AM Arnaldo Carvalho de Melo> <arnaldo.melo@xxxxxxxxx> wrote:
>
> > > Em Mon, Feb 25, 2019 at 01:02:39PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > So yeah, the BTF encoder/decoder is working just fine, the problem is in
> > > > pahole's DWARF code, lemme see...
> > >
> > > Please try the patch below, for me btfdiff continues to show no diff for
> > > all types in my vmlinux and now it also produces the same output for
> > > when the first element of a bitfield has its bit_size equal to its
> > > byte_size * 8:
> >
> > Yes, this fixes all the issues I've seen. btfdiff output is now empty
> > for my kernel image. Thanks for quick fix!
> >
> > Reviewed-by: Andrii Nakryiko <andriin@xxxxxx>
>
> Thanks, just for some extra testing I tried encoding BTF for glibc 2.28:
>
> [acme@quaco pahole]$ pahole -JV libc-2.28.so.debug
> <BIG snip>

<snip>

> [386075] INT long unsigned int size=8 bit_offset=0 nr_bits=64 encoding=(none)
> Cannot open libc-2.28.so.debug
> Failed to encode BTF

I've tried the same on libc-2.26.so.debug and it worked.

It failes after BTF encoding and deduping is done, exactly when it
tries to re-open libc-2.28.so.debug to write out new contents. Not
sure why it would fail, as it seems to be just plain open() call, but
the fact that we both can repro this means there is something there.

It also seems that libc-2.28.so.debug is corrupted:

$ readelf -n /home/andriin/local/btf/libc-2.26.so.debug | grep
'Unknown note type' | wc -l
0
$ readelf -n /home/andriin/local/btf/libc-2.28.so.debug | grep
'Unknown note type' | wc -l
17953

> [acme@quaco pahole]$



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux