Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-17 Thread Arnaldo Carvalho de Melo
Em Wed, Feb 17, 2021 at 01:08:23PM +0100, Domenico Andreoli escreveu:
> On Mon, Feb 08, 2021 at 09:32:53AM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Mon, Feb 08, 2021 at 03:44:54AM +0100, Sedat Dilek escreveu:
> > > On Thu, Feb 4, 2021 at 11:07 PM Arnaldo Carvalho de Melo
> > >  wrote:
> > > >
> > > > Hi,
> > > >
> > > > The v1.20 release of pahole and its friends is out, mostly
> > > > addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> > > > available at the usual places:
> > > >
> > > > Main git repo:
> > > >
> > > >git://git.kernel.org/pub/scm/devel/pahole/pahole.git
> > > >
> > > > Mirror git repo:
> > > >
> > > >https://github.com/acmel/dwarves.git
> > > >
> > > > tarball + gpg signature:
> > > >
> > > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.xz
> > > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.bz2
> > > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.sign
> > > >
> > > 
> > > FYI:
> > > Debian now ships dwarves package version 1.20-1 in unstable.
> > > 
> > > Just a small nit to this release and its tagging:
> > > 
> > > You did:
> > > commit 0d415f68c468b77c5bf8e71965cd08c6efd25fc4 ("pahole: Prep 1.20")
> > > 
> > > Is this new?
> > > 
> > > The release before:
> > > commit dd15aa4b0a6421295cbb7c3913429142fef8abe0 ("dwarves: Prep v1.19")
> > 
> > Its minor but intentional, pahole is by far the most well known tool in
> > dwarves, so using that name more frequently (the git repo is pahole.git
> > , for instance) may help more quickly associate with the tool needed for
> > BTF encoding, data analysis, etc. And since its not about only DWARF,
> > perhaps transitioning to using 'pahole' more widely is interesting.
 
> Any plan to switch also the release tarball name?
 
> We are planning to rename the Debian package once the Bullseye is
> released, currently it's dwarves-dfsg for legacy/unclear reasons.
 
> Would it be a good idea to switch directly to pahole then?

Yeah, I think it is, I'll check what are the bureaucratic steps to do
that rename on Fedora and RHEL, but then, no need for all distros to do
it at once if that is something that requires long term planning or
whatever.

- Arnaldo
 
> Dom
> 
> > 
> > - Arnaldo
> >  
> > > - Sedat -
> > > 
> > > > Best Regards,
> > > >
> > > >  - Arnaldo
> > > >
> > > > v1.20:
> > > >
> > > > BTF encoder:
> > > >
> > > >   - Improve ELF error reporting using elf_errmsg(elf_errno()).
> > > >
> > > >   - Improve objcopy error handling.
> > > >
> > > >   - Fix handling of 'restrict' qualifier, that was being treated as a 
> > > > 'const'.
> > > >
> > > >   - Support SHN_XINDEX in st_shndx symbol indexes, to handle ELF 
> > > > objects with
> > > > more than 65534 sections, for instance, which happens with kernels 
> > > > built
> > > > with 'KCFLAGS="-ffunction-sections -fdata-sections", Other cases may
> > > > include when using FG-ASLR, LTO.
> > > >
> > > >   - Cope with functions without a name, as seen sometimes when building 
> > > > kernel
> > > > images with some versions of clang, when a SEGFAULT was taking 
> > > > place.
> > > >
> > > >   - Fix BTF variable generation for kernel modules, not skipping 
> > > > variables at
> > > > offset zero.
> > > >
> > > >   - Fix address size to match what is in the ELF file being processed, 
> > > > to fix using
> > > > a 64-bit pahole binary to generate BTF for a 32-bit vmlinux image.
> > > >
> > > >   - Use kernel module ftrace addresses when finding which functions to 
> > > > encode,
> > > > which increases the number of functions encoded.
> > > >
> > > > libbpf:
> > > >
> > > >   - Allow use of packaged version, for distros wanting to dynamically 
> > > > link with
> > > > the system's libbpf package instead of using the libbpf git 
> > > > submodule shipped
> > > > in pahole's source code.
> > > >
> > > > DWARF loader:
> > > >
> > > >   - Support DW_AT_data_bit_offset
> > > >
> > > > This appeared in DWARF4 but is supported only in gcc's -gdwarf-5,
> > > > support it in a way that makes the output be the same for both 
> > > > cases.
> > > >
> > > >   $ gcc -gdwarf-5 -c examples/dwarf5/bf.c
> > > >   $ pahole bf.o
> > > >   struct pea {
> > > > long int   a:1;  /* 0: 
> > > > 0  8 */
> > > > long int   b:1;  /* 0: 
> > > > 1  8 */
> > > > long int   c:1;  /* 0: 
> > > > 2  8 */
> > > >
> > > > /* XXX 29 bits hole, try to pack */
> > > > /* Bitfield combined with next fields */
> > > >
> > > > intafter_bitfield;   /* 4   
> > > >   4 */
> > > >
> > > > /* size: 8, cachelines: 1, members: 4 */
> > > > /* sum members: 4 */
> > > > /* sum bitfield members: 3 bits, bit holes: 1, sum bit 
> > > > holes: 29 bits */
> > > >  

Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-17 Thread Domenico Andreoli
On Mon, Feb 08, 2021 at 09:32:53AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Feb 08, 2021 at 03:44:54AM +0100, Sedat Dilek escreveu:
> > On Thu, Feb 4, 2021 at 11:07 PM Arnaldo Carvalho de Melo
> >  wrote:
> > >
> > > Hi,
> > >
> > > The v1.20 release of pahole and its friends is out, mostly
> > > addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> > > available at the usual places:
> > >
> > > Main git repo:
> > >
> > >git://git.kernel.org/pub/scm/devel/pahole/pahole.git
> > >
> > > Mirror git repo:
> > >
> > >https://github.com/acmel/dwarves.git
> > >
> > > tarball + gpg signature:
> > >
> > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.xz
> > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.bz2
> > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.sign
> > >
> > 
> > FYI:
> > Debian now ships dwarves package version 1.20-1 in unstable.
> > 
> > Just a small nit to this release and its tagging:
> > 
> > You did:
> > commit 0d415f68c468b77c5bf8e71965cd08c6efd25fc4 ("pahole: Prep 1.20")
> > 
> > Is this new?
> > 
> > The release before:
> > commit dd15aa4b0a6421295cbb7c3913429142fef8abe0 ("dwarves: Prep v1.19")
> 
> Its minor but intentional, pahole is by far the most well known tool in
> dwarves, so using that name more frequently (the git repo is pahole.git
> , for instance) may help more quickly associate with the tool needed for
> BTF encoding, data analysis, etc. And since its not about only DWARF,
> perhaps transitioning to using 'pahole' more widely is interesting.

Any plan to switch also the release tarball name?

We are planning to rename the Debian package once the Bullseye is
released, currently it's dwarves-dfsg for legacy/unclear reasons.

Would it be a good idea to switch directly to pahole then?

Dom

> 
> - Arnaldo
>  
> > - Sedat -
> > 
> > > Best Regards,
> > >
> > >  - Arnaldo
> > >
> > > v1.20:
> > >
> > > BTF encoder:
> > >
> > >   - Improve ELF error reporting using elf_errmsg(elf_errno()).
> > >
> > >   - Improve objcopy error handling.
> > >
> > >   - Fix handling of 'restrict' qualifier, that was being treated as a 
> > > 'const'.
> > >
> > >   - Support SHN_XINDEX in st_shndx symbol indexes, to handle ELF objects 
> > > with
> > > more than 65534 sections, for instance, which happens with kernels 
> > > built
> > > with 'KCFLAGS="-ffunction-sections -fdata-sections", Other cases may
> > > include when using FG-ASLR, LTO.
> > >
> > >   - Cope with functions without a name, as seen sometimes when building 
> > > kernel
> > > images with some versions of clang, when a SEGFAULT was taking place.
> > >
> > >   - Fix BTF variable generation for kernel modules, not skipping 
> > > variables at
> > > offset zero.
> > >
> > >   - Fix address size to match what is in the ELF file being processed, to 
> > > fix using
> > > a 64-bit pahole binary to generate BTF for a 32-bit vmlinux image.
> > >
> > >   - Use kernel module ftrace addresses when finding which functions to 
> > > encode,
> > > which increases the number of functions encoded.
> > >
> > > libbpf:
> > >
> > >   - Allow use of packaged version, for distros wanting to dynamically 
> > > link with
> > > the system's libbpf package instead of using the libbpf git submodule 
> > > shipped
> > > in pahole's source code.
> > >
> > > DWARF loader:
> > >
> > >   - Support DW_AT_data_bit_offset
> > >
> > > This appeared in DWARF4 but is supported only in gcc's -gdwarf-5,
> > > support it in a way that makes the output be the same for both cases.
> > >
> > >   $ gcc -gdwarf-5 -c examples/dwarf5/bf.c
> > >   $ pahole bf.o
> > >   struct pea {
> > > long int   a:1;  /* 0: 0  
> > > 8 */
> > > long int   b:1;  /* 0: 1  
> > > 8 */
> > > long int   c:1;  /* 0: 2  
> > > 8 */
> > >
> > > /* XXX 29 bits hole, try to pack */
> > > /* Bitfield combined with next fields */
> > >
> > > intafter_bitfield;   /* 4 
> > > 4 */
> > >
> > > /* size: 8, cachelines: 1, members: 4 */
> > > /* sum members: 4 */
> > > /* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 
> > > 29 bits */
> > > /* last cacheline: 8 bytes */
> > >   };
> > >
> > >   - DW_FORM_implicit_const in attr_numeric() and attr_offset()
> > >
> > >   - Support DW_TAG_GNU_call_site, its the standardized rename of the 
> > > previously supported
> > > DW_TAG_GNU_call_site.
> > >
> > > build:
> > >
> > > - Fix compilation on 32-bit architectures.
> > >
> > > Signed-off-by: Arnaldo Carvalho de Melo 
> 
> -- 
> 
> - Arnaldo

-- 
rsa4096: 3B10 0CA1 8674 ACBA B4FE  FCD2 CE5B CF17 9960 DE13
ed25519: FFB4 0CC3 7F2E 091D F7DA  356E CC79 2832 ED38 CB05


signature.asc
Description: PGP 

Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-08 Thread Sedat Dilek
On Mon, Feb 8, 2021 at 1:32 PM Arnaldo Carvalho de Melo
 wrote:
>
> Em Mon, Feb 08, 2021 at 03:44:54AM +0100, Sedat Dilek escreveu:
> > On Thu, Feb 4, 2021 at 11:07 PM Arnaldo Carvalho de Melo
> >  wrote:
> > >
> > > Hi,
> > >
> > > The v1.20 release of pahole and its friends is out, mostly
> > > addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> > > available at the usual places:
> > >
> > > Main git repo:
> > >
> > >git://git.kernel.org/pub/scm/devel/pahole/pahole.git
> > >
> > > Mirror git repo:
> > >
> > >https://github.com/acmel/dwarves.git
> > >
> > > tarball + gpg signature:
> > >
> > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.xz
> > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.bz2
> > >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.sign
> > >
> >
> > FYI:
> > Debian now ships dwarves package version 1.20-1 in unstable.
> >
> > Just a small nit to this release and its tagging:
> >
> > You did:
> > commit 0d415f68c468b77c5bf8e71965cd08c6efd25fc4 ("pahole: Prep 1.20")
> >
> > Is this new?
> >
> > The release before:
> > commit dd15aa4b0a6421295cbb7c3913429142fef8abe0 ("dwarves: Prep v1.19")
>
> Its minor but intentional, pahole is by far the most well known tool in
> dwarves, so using that name more frequently (the git repo is pahole.git
> , for instance) may help more quickly associate with the tool needed for
> BTF encoding, data analysis, etc. And since its not about only DWARF,
> perhaps transitioning to using 'pahole' more widely is interesting.
>

I am fine with that, Arnaldo.
The Git tree is called "pahole" Git, so that makes sense to me.

- Sedat -

> - Arnaldo
>
> > - Sedat -
> >
> > > Best Regards,
> > >
> > >  - Arnaldo
> > >
> > > v1.20:
> > >
> > > BTF encoder:
> > >
> > >   - Improve ELF error reporting using elf_errmsg(elf_errno()).
> > >
> > >   - Improve objcopy error handling.
> > >
> > >   - Fix handling of 'restrict' qualifier, that was being treated as a 
> > > 'const'.
> > >
> > >   - Support SHN_XINDEX in st_shndx symbol indexes, to handle ELF objects 
> > > with
> > > more than 65534 sections, for instance, which happens with kernels 
> > > built
> > > with 'KCFLAGS="-ffunction-sections -fdata-sections", Other cases may
> > > include when using FG-ASLR, LTO.
> > >
> > >   - Cope with functions without a name, as seen sometimes when building 
> > > kernel
> > > images with some versions of clang, when a SEGFAULT was taking place.
> > >
> > >   - Fix BTF variable generation for kernel modules, not skipping 
> > > variables at
> > > offset zero.
> > >
> > >   - Fix address size to match what is in the ELF file being processed, to 
> > > fix using
> > > a 64-bit pahole binary to generate BTF for a 32-bit vmlinux image.
> > >
> > >   - Use kernel module ftrace addresses when finding which functions to 
> > > encode,
> > > which increases the number of functions encoded.
> > >
> > > libbpf:
> > >
> > >   - Allow use of packaged version, for distros wanting to dynamically 
> > > link with
> > > the system's libbpf package instead of using the libbpf git submodule 
> > > shipped
> > > in pahole's source code.
> > >
> > > DWARF loader:
> > >
> > >   - Support DW_AT_data_bit_offset
> > >
> > > This appeared in DWARF4 but is supported only in gcc's -gdwarf-5,
> > > support it in a way that makes the output be the same for both cases.
> > >
> > >   $ gcc -gdwarf-5 -c examples/dwarf5/bf.c
> > >   $ pahole bf.o
> > >   struct pea {
> > > long int   a:1;  /* 0: 0  
> > > 8 */
> > > long int   b:1;  /* 0: 1  
> > > 8 */
> > > long int   c:1;  /* 0: 2  
> > > 8 */
> > >
> > > /* XXX 29 bits hole, try to pack */
> > > /* Bitfield combined with next fields */
> > >
> > > intafter_bitfield;   /* 4 
> > > 4 */
> > >
> > > /* size: 8, cachelines: 1, members: 4 */
> > > /* sum members: 4 */
> > > /* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 
> > > 29 bits */
> > > /* last cacheline: 8 bytes */
> > >   };
> > >
> > >   - DW_FORM_implicit_const in attr_numeric() and attr_offset()
> > >
> > >   - Support DW_TAG_GNU_call_site, its the standardized rename of the 
> > > previously supported
> > > DW_TAG_GNU_call_site.
> > >
> > > build:
> > >
> > > - Fix compilation on 32-bit architectures.
> > >
> > > Signed-off-by: Arnaldo Carvalho de Melo 
>
> --
>
> - Arnaldo


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-08 Thread Arnaldo Carvalho de Melo
Em Mon, Feb 08, 2021 at 03:44:54AM +0100, Sedat Dilek escreveu:
> On Thu, Feb 4, 2021 at 11:07 PM Arnaldo Carvalho de Melo
>  wrote:
> >
> > Hi,
> >
> > The v1.20 release of pahole and its friends is out, mostly
> > addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> > available at the usual places:
> >
> > Main git repo:
> >
> >git://git.kernel.org/pub/scm/devel/pahole/pahole.git
> >
> > Mirror git repo:
> >
> >https://github.com/acmel/dwarves.git
> >
> > tarball + gpg signature:
> >
> >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.xz
> >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.bz2
> >https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.sign
> >
> 
> FYI:
> Debian now ships dwarves package version 1.20-1 in unstable.
> 
> Just a small nit to this release and its tagging:
> 
> You did:
> commit 0d415f68c468b77c5bf8e71965cd08c6efd25fc4 ("pahole: Prep 1.20")
> 
> Is this new?
> 
> The release before:
> commit dd15aa4b0a6421295cbb7c3913429142fef8abe0 ("dwarves: Prep v1.19")

Its minor but intentional, pahole is by far the most well known tool in
dwarves, so using that name more frequently (the git repo is pahole.git
, for instance) may help more quickly associate with the tool needed for
BTF encoding, data analysis, etc. And since its not about only DWARF,
perhaps transitioning to using 'pahole' more widely is interesting.

- Arnaldo
 
> - Sedat -
> 
> > Best Regards,
> >
> >  - Arnaldo
> >
> > v1.20:
> >
> > BTF encoder:
> >
> >   - Improve ELF error reporting using elf_errmsg(elf_errno()).
> >
> >   - Improve objcopy error handling.
> >
> >   - Fix handling of 'restrict' qualifier, that was being treated as a 
> > 'const'.
> >
> >   - Support SHN_XINDEX in st_shndx symbol indexes, to handle ELF objects 
> > with
> > more than 65534 sections, for instance, which happens with kernels built
> > with 'KCFLAGS="-ffunction-sections -fdata-sections", Other cases may
> > include when using FG-ASLR, LTO.
> >
> >   - Cope with functions without a name, as seen sometimes when building 
> > kernel
> > images with some versions of clang, when a SEGFAULT was taking place.
> >
> >   - Fix BTF variable generation for kernel modules, not skipping variables 
> > at
> > offset zero.
> >
> >   - Fix address size to match what is in the ELF file being processed, to 
> > fix using
> > a 64-bit pahole binary to generate BTF for a 32-bit vmlinux image.
> >
> >   - Use kernel module ftrace addresses when finding which functions to 
> > encode,
> > which increases the number of functions encoded.
> >
> > libbpf:
> >
> >   - Allow use of packaged version, for distros wanting to dynamically link 
> > with
> > the system's libbpf package instead of using the libbpf git submodule 
> > shipped
> > in pahole's source code.
> >
> > DWARF loader:
> >
> >   - Support DW_AT_data_bit_offset
> >
> > This appeared in DWARF4 but is supported only in gcc's -gdwarf-5,
> > support it in a way that makes the output be the same for both cases.
> >
> >   $ gcc -gdwarf-5 -c examples/dwarf5/bf.c
> >   $ pahole bf.o
> >   struct pea {
> > long int   a:1;  /* 0: 0  8 
> > */
> > long int   b:1;  /* 0: 1  8 
> > */
> > long int   c:1;  /* 0: 2  8 
> > */
> >
> > /* XXX 29 bits hole, try to pack */
> > /* Bitfield combined with next fields */
> >
> > intafter_bitfield;   /* 4 4 
> > */
> >
> > /* size: 8, cachelines: 1, members: 4 */
> > /* sum members: 4 */
> > /* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 
> > 29 bits */
> > /* last cacheline: 8 bytes */
> >   };
> >
> >   - DW_FORM_implicit_const in attr_numeric() and attr_offset()
> >
> >   - Support DW_TAG_GNU_call_site, its the standardized rename of the 
> > previously supported
> > DW_TAG_GNU_call_site.
> >
> > build:
> >
> > - Fix compilation on 32-bit architectures.
> >
> > Signed-off-by: Arnaldo Carvalho de Melo 

-- 

- Arnaldo


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-07 Thread Sedat Dilek
On Thu, Feb 4, 2021 at 11:07 PM Arnaldo Carvalho de Melo
 wrote:
>
> Hi,
>
> The v1.20 release of pahole and its friends is out, mostly
> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> available at the usual places:
>
> Main git repo:
>
>git://git.kernel.org/pub/scm/devel/pahole/pahole.git
>
> Mirror git repo:
>
>https://github.com/acmel/dwarves.git
>
> tarball + gpg signature:
>
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.xz
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.bz2
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.sign
>

FYI:
Debian now ships dwarves package version 1.20-1 in unstable.

Just a small nit to this release and its tagging:

You did:
commit 0d415f68c468b77c5bf8e71965cd08c6efd25fc4 ("pahole: Prep 1.20")

Is this new?

The release before:
commit dd15aa4b0a6421295cbb7c3913429142fef8abe0 ("dwarves: Prep v1.19")

- Sedat -

> Best Regards,
>
>  - Arnaldo
>
> v1.20:
>
> BTF encoder:
>
>   - Improve ELF error reporting using elf_errmsg(elf_errno()).
>
>   - Improve objcopy error handling.
>
>   - Fix handling of 'restrict' qualifier, that was being treated as a 'const'.
>
>   - Support SHN_XINDEX in st_shndx symbol indexes, to handle ELF objects with
> more than 65534 sections, for instance, which happens with kernels built
> with 'KCFLAGS="-ffunction-sections -fdata-sections", Other cases may
> include when using FG-ASLR, LTO.
>
>   - Cope with functions without a name, as seen sometimes when building kernel
> images with some versions of clang, when a SEGFAULT was taking place.
>
>   - Fix BTF variable generation for kernel modules, not skipping variables at
> offset zero.
>
>   - Fix address size to match what is in the ELF file being processed, to fix 
> using
> a 64-bit pahole binary to generate BTF for a 32-bit vmlinux image.
>
>   - Use kernel module ftrace addresses when finding which functions to encode,
> which increases the number of functions encoded.
>
> libbpf:
>
>   - Allow use of packaged version, for distros wanting to dynamically link 
> with
> the system's libbpf package instead of using the libbpf git submodule 
> shipped
> in pahole's source code.
>
> DWARF loader:
>
>   - Support DW_AT_data_bit_offset
>
> This appeared in DWARF4 but is supported only in gcc's -gdwarf-5,
> support it in a way that makes the output be the same for both cases.
>
>   $ gcc -gdwarf-5 -c examples/dwarf5/bf.c
>   $ pahole bf.o
>   struct pea {
> long int   a:1;  /* 0: 0  8 */
> long int   b:1;  /* 0: 1  8 */
> long int   c:1;  /* 0: 2  8 */
>
> /* XXX 29 bits hole, try to pack */
> /* Bitfield combined with next fields */
>
> intafter_bitfield;   /* 4 4 */
>
> /* size: 8, cachelines: 1, members: 4 */
> /* sum members: 4 */
> /* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 29 
> bits */
> /* last cacheline: 8 bytes */
>   };
>
>   - DW_FORM_implicit_const in attr_numeric() and attr_offset()
>
>   - Support DW_TAG_GNU_call_site, its the standardized rename of the 
> previously supported
> DW_TAG_GNU_call_site.
>
> build:
>
> - Fix compilation on 32-bit architectures.
>
> Signed-off-by: Arnaldo Carvalho de Melo 


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-06 Thread Andrii Nakryiko
On Fri, Feb 5, 2021 at 3:55 PM Arnaldo Carvalho de Melo
 wrote:
>
> Em Fri, Feb 05, 2021 at 02:11:44PM -0800, Andrii Nakryiko escreveu:
> > On Fri, Feb 5, 2021 at 8:25 AM Arnaldo Carvalho de Melo
> >  wrote:
> > >
> > > Em Fri, Feb 05, 2021 at 06:33:43AM -0300, Arnaldo Carvalho de Melo 
> > > escreveu:
> > > > On February 5, 2021 4:39:47 AM GMT-03:00, Andrii Nakryiko 
> > > >  wrote:
> > > > >On Thu, Feb 4, 2021 at 8:34 PM Arnaldo Carvalho de Melo 
> > > > >> wrote:
> > > > >> On February 4, 2021 9:01:51 PM GMT-03:00, Andrii Nakryiko
> > > > > wrote:
> > > > >> >On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de
> > > > >Melo> wrote:
> > > > >> >> The v1.20 release of pahole and its friends is out, mostly
> > > > >> >> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> > > > >> >> available at the usual places:
> > >
> > > > >> >Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?
> > >
> > > > >> It's in rawhide already, I'll do it for f33, f32 later,
> > >
> > > > >Do you have a link? I tried to find it, but only see 1.19 so far.
> > >
> > > > https://koji.fedoraproject.org/koji/buildinfo?buildID=1703678
> > >
> > > And now for Fedora 33, waiting for karma bumps at:
> > >
> > > https://bodhi.fedoraproject.org/updates/FEDORA-2021-804e7a572c
> > >
> > > fedpkg buidling for f32 now.
>
> > Ok, imported dwarves-1.20. Had to fix two dates in changelog (in
> > spec), day of week didn't match the date, tooling complained about
> > that. Also had to undo cmake_build and cmake_install fanciness,
> > because apparently we don't have them or the support for it is not
> > great. But otherwise everything else looks to be ok.
>
> Send patch please, I wasn't expecting this, if you could do some more
> and send me tooling bits to help me in the release process, if that is
> possible, I'd love to get it, otherwise I'll write it, don't want to go
> thru this one more time, sigh :-(
>

I just "reverted" some bits of spec file to what it used to be
pre-1.19, I think. There is also a work-around for lack of
ldconfig_scriptlets support in our platform, so I have to work around
that. Here's full diff:

diff -u sources/git/rpm/SPECS/dwarves.spec specfiles/dwarves.spec
--- sources/git/rpm/SPECS/dwarves.spec  2021-02-05 11:19:54.364938716 -0800
+++ specfiles/dwarves.spec  2021-02-05 13:26:52.502859609 -0800
@@ -3,12 +3,14 @@

 Name: dwarves
 Version: 1.20
-Release: 1%{?dist}
+Release: 1fb1%{?dist}
 License: GPLv2
 Summary: Debugging Information Manipulation Tools (pahole & friends)
 URL: http://acmel.wordpress.com
 Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.xz
 Requires: %{libname}%{libver} = %{version}-%{release}
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
 BuildRequires: gcc
 BuildRequires: cmake >= 2.8.12
 BuildRequires: zlib-devel
@@ -68,13 +70,14 @@

 %build
 %cmake -DCMAKE_BUILD_TYPE=Release .
-%cmake_build
+make VERBOSE=1 %{?_smp_mflags}

 %install
 rm -Rf %{buildroot}
-%cmake_install
+make install DESTDIR=%{buildroot}

-%ldconfig_scriptlets -n %{libname}%{libver}
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig

 %files
 %doc README.ctracer
@@ -295,7 +298,7 @@
 * Sat Nov 20 2010 Arnaldo Carvalho de Melo  - 1.9-1
 - New release

-* Tue Feb 08 2010 Fedora Release Engineering
 - 1.8-2
+* Mon Feb 08 2010 Fedora Release Engineering
 - 1.8-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

 * Fri Dec  4 2009 Arnaldo Carvalho de Melo  - 1.8-1
@@ -446,7 +449,7 @@
 - Fix emission of arrays of structs, unions, etc
 - use sysconf for the default cacheline size

-* Wed Jan 18 2007 Arnaldo Carvalho de Melo 
+* Thu Jan 18 2007 Arnaldo Carvalho de Melo 
 - fab0db03ea9046893ca110bb2b7d71b764f61033
 - pdwtags added

>
> - Arnaldo


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-05 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 05, 2021 at 02:11:44PM -0800, Andrii Nakryiko escreveu:
> On Fri, Feb 5, 2021 at 8:25 AM Arnaldo Carvalho de Melo
>  wrote:
> >
> > Em Fri, Feb 05, 2021 at 06:33:43AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > On February 5, 2021 4:39:47 AM GMT-03:00, Andrii Nakryiko 
> > >  wrote:
> > > >On Thu, Feb 4, 2021 at 8:34 PM Arnaldo Carvalho de Melo 
> > > >> wrote:
> > > >> On February 4, 2021 9:01:51 PM GMT-03:00, Andrii Nakryiko
> > > > wrote:
> > > >> >On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de
> > > >Melo> wrote:
> > > >> >> The v1.20 release of pahole and its friends is out, mostly
> > > >> >> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> > > >> >> available at the usual places:
> >
> > > >> >Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?
> >
> > > >> It's in rawhide already, I'll do it for f33, f32 later,
> >
> > > >Do you have a link? I tried to find it, but only see 1.19 so far.
> >
> > > https://koji.fedoraproject.org/koji/buildinfo?buildID=1703678
> >
> > And now for Fedora 33, waiting for karma bumps at:
> >
> > https://bodhi.fedoraproject.org/updates/FEDORA-2021-804e7a572c
> >
> > fedpkg buidling for f32 now.
 
> Ok, imported dwarves-1.20. Had to fix two dates in changelog (in
> spec), day of week didn't match the date, tooling complained about
> that. Also had to undo cmake_build and cmake_install fanciness,
> because apparently we don't have them or the support for it is not
> great. But otherwise everything else looks to be ok.

Send patch please, I wasn't expecting this, if you could do some more
and send me tooling bits to help me in the release process, if that is
possible, I'd love to get it, otherwise I'll write it, don't want to go
thru this one more time, sigh :-(


- Arnaldo


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-05 Thread Andrii Nakryiko
On Fri, Feb 5, 2021 at 8:25 AM Arnaldo Carvalho de Melo
 wrote:
>
> Em Fri, Feb 05, 2021 at 06:33:43AM -0300, Arnaldo Carvalho de Melo escreveu:
> > On February 5, 2021 4:39:47 AM GMT-03:00, Andrii Nakryiko 
> >  wrote:
> > >On Thu, Feb 4, 2021 at 8:34 PM Arnaldo Carvalho de Melo 
> > >> wrote:
> > >> On February 4, 2021 9:01:51 PM GMT-03:00, Andrii Nakryiko
> > > wrote:
> > >> >On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de
> > >Melo> wrote:
> > >> >> The v1.20 release of pahole and its friends is out, mostly
> > >> >> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> > >> >> available at the usual places:
>
> > >> >Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?
>
> > >> It's in rawhide already, I'll do it for f33, f32 later,
>
> > >Do you have a link? I tried to find it, but only see 1.19 so far.
>
> > https://koji.fedoraproject.org/koji/buildinfo?buildID=1703678
>
> And now for Fedora 33, waiting for karma bumps at:
>
> https://bodhi.fedoraproject.org/updates/FEDORA-2021-804e7a572c
>
> fedpkg buidling for f32 now.
>
> - Arnaldo

Ok, imported dwarves-1.20. Had to fix two dates in changelog (in
spec), day of week didn't match the date, tooling complained about
that. Also had to undo cmake_build and cmake_install fanciness,
because apparently we don't have them or the support for it is not
great. But otherwise everything else looks to be ok.


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-05 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 05, 2021 at 06:33:43AM -0300, Arnaldo Carvalho de Melo escreveu:
> On February 5, 2021 4:39:47 AM GMT-03:00, Andrii Nakryiko 
>  wrote:
> >On Thu, Feb 4, 2021 at 8:34 PM Arnaldo Carvalho de Melo 
> >> wrote:
> >> On February 4, 2021 9:01:51 PM GMT-03:00, Andrii Nakryiko
> > wrote:
> >> >On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de
> >Melo> wrote:
> >> >> The v1.20 release of pahole and its friends is out, mostly
> >> >> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> >> >> available at the usual places:

> >> >Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?

> >> It's in rawhide already, I'll do it for f33, f32 later,

> >Do you have a link? I tried to find it, but only see 1.19 so far.
 
> https://koji.fedoraproject.org/koji/buildinfo?buildID=1703678

And now for Fedora 33, waiting for karma bumps at:

https://bodhi.fedoraproject.org/updates/FEDORA-2021-804e7a572c

fedpkg buidling for f32 now.

- Arnaldo


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-05 Thread Arnaldo Carvalho de Melo



On February 5, 2021 4:39:47 AM GMT-03:00, Andrii Nakryiko 
 wrote:
>On Thu, Feb 4, 2021 at 8:34 PM Arnaldo Carvalho de Melo
> wrote:
>>
>>
>>
>> On February 4, 2021 9:01:51 PM GMT-03:00, Andrii Nakryiko
> wrote:
>> >On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de
>Melo> wrote:
>> >> The v1.20 release of pahole and its friends is out, mostly
>> >> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
>> >> available at the usual places:
>> >
>> >Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?
>>
>> It's in rawhide already, I'll do it for f33, f32 later,
>>
>
>Do you have a link? I tried to find it, but only see 1.19 so far.


https://koji.fedoraproject.org/koji/buildinfo?buildID=1703678

 - Arnaldo

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-04 Thread Andrii Nakryiko
On Thu, Feb 4, 2021 at 8:34 PM Arnaldo Carvalho de Melo
 wrote:
>
>
>
> On February 4, 2021 9:01:51 PM GMT-03:00, Andrii Nakryiko 
>  wrote:
> >On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de Melo> 
> >wrote:
> >> The v1.20 release of pahole and its friends is out, mostly
> >> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> >> available at the usual places:
> >
> >Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?
>
> It's in rawhide already, I'll do it for f33, f32 later,
>

Do you have a link? I tried to find it, but only see 1.19 so far.

> - Arnaldo
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-04 Thread Arnaldo Carvalho de Melo



On February 4, 2021 9:01:51 PM GMT-03:00, Andrii Nakryiko 
 wrote:
>On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de Melo> 
>wrote:
>> The v1.20 release of pahole and its friends is out, mostly
>> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
>> available at the usual places:
>
>Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?

It's in rawhide already, I'll do it for f33, f32 later,

- Arnaldo

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-04 Thread Andrii Nakryiko
On Thu, Feb 4, 2021 at 2:09 PM Arnaldo Carvalho de Melo  wrote:
>
> Hi,
>
> The v1.20 release of pahole and its friends is out, mostly
> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> available at the usual places:

Great, thanks, Arnaldo! Do you plan to build RPMs soon as well?

>
> Main git repo:
>
>git://git.kernel.org/pub/scm/devel/pahole/pahole.git
>
> Mirror git repo:
>
>https://github.com/acmel/dwarves.git
>
> tarball + gpg signature:
>
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.xz
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.bz2
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.sign
>
> Best Regards,
>
>  - Arnaldo
>

[...]


Re: ANNOUNCE: pahole v1.20 (gcc11 DWARF5's default, lots of ELF sections, BTF)

2021-02-04 Thread Sedat Dilek
On Thu, Feb 4, 2021 at 11:07 PM Arnaldo Carvalho de Melo
 wrote:
>
> Hi,
>
> The v1.20 release of pahole and its friends is out, mostly
> addressing problems related to gcc 11 defaulting to DWARF5 for -g,
> available at the usual places:
>

Congrats and thanks for v1.20 and to all involved folks.

- Sedat -

> Main git repo:
>
>git://git.kernel.org/pub/scm/devel/pahole/pahole.git
>
> Mirror git repo:
>
>https://github.com/acmel/dwarves.git
>
> tarball + gpg signature:
>
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.xz
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.bz2
>https://fedorapeople.org/~acme/dwarves/dwarves-1.20.tar.sign
>
> Best Regards,
>
>  - Arnaldo
>
> v1.20:
>
> BTF encoder:
>
>   - Improve ELF error reporting using elf_errmsg(elf_errno()).
>
>   - Improve objcopy error handling.
>
>   - Fix handling of 'restrict' qualifier, that was being treated as a 'const'.
>
>   - Support SHN_XINDEX in st_shndx symbol indexes, to handle ELF objects with
> more than 65534 sections, for instance, which happens with kernels built
> with 'KCFLAGS="-ffunction-sections -fdata-sections", Other cases may
> include when using FG-ASLR, LTO.
>
>   - Cope with functions without a name, as seen sometimes when building kernel
> images with some versions of clang, when a SEGFAULT was taking place.
>
>   - Fix BTF variable generation for kernel modules, not skipping variables at
> offset zero.
>
>   - Fix address size to match what is in the ELF file being processed, to fix 
> using
> a 64-bit pahole binary to generate BTF for a 32-bit vmlinux image.
>
>   - Use kernel module ftrace addresses when finding which functions to encode,
> which increases the number of functions encoded.
>
> libbpf:
>
>   - Allow use of packaged version, for distros wanting to dynamically link 
> with
> the system's libbpf package instead of using the libbpf git submodule 
> shipped
> in pahole's source code.
>
> DWARF loader:
>
>   - Support DW_AT_data_bit_offset
>
> This appeared in DWARF4 but is supported only in gcc's -gdwarf-5,
> support it in a way that makes the output be the same for both cases.
>
>   $ gcc -gdwarf-5 -c examples/dwarf5/bf.c
>   $ pahole bf.o
>   struct pea {
> long int   a:1;  /* 0: 0  8 */
> long int   b:1;  /* 0: 1  8 */
> long int   c:1;  /* 0: 2  8 */
>
> /* XXX 29 bits hole, try to pack */
> /* Bitfield combined with next fields */
>
> intafter_bitfield;   /* 4 4 */
>
> /* size: 8, cachelines: 1, members: 4 */
> /* sum members: 4 */
> /* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 29 
> bits */
> /* last cacheline: 8 bytes */
>   };
>
>   - DW_FORM_implicit_const in attr_numeric() and attr_offset()
>
>   - Support DW_TAG_GNU_call_site, its the standardized rename of the 
> previously supported
> DW_TAG_GNU_call_site.
>
> build:
>
> - Fix compilation on 32-bit architectures.
>
> Signed-off-by: Arnaldo Carvalho de Melo