Re: [PATCHES 00/31] pahole: Bug fixes and small improvements

Arnaldo Carvalho de Melo <[email protected]> Fri, 31 Jul 2026 17:21:24 -0300
Newsgroups org.kernel.vger.dwarves,org.kernel.vger.bpf
Message-ID <am0DxB4WdMdU_31j@x1>
On Fri, Jul 31, 2026 at 01:52:40PM +0100, Alan Maguire wrote:
> On 29/07/2026 20:07, Arnaldo Carvalho de Melo wrote:
> > 	Here are 31 patches fixing pre-existing bugs found via coverage
> > analysis, AI-assisted review (sashiko), and manual testing. No new
> > features.

> > Critical kernel build path fix:
> >   Multi-dimensional arrays (e.g. int[2][3]) were incorrectly collapsed
> >   into flat arrays (int[6]) in BTF encoding. The encoder wrote only
> >   the total element count; the loader read only the first dimension.
> >   Both now preserve the full dimension chain using chained
> >   BTF_KIND_ARRAY nodes, matching bpftool and kernel verifier format.
> > 
> >   Before: pahole -F btf showed int a[3][4] as int a[12]
> >   After:  int a[2][3][4] encodes as three chained BTF_KIND_ARRAY nodes
> >           and round-trips correctly

<SNIP>
 
> Series applied, thanks!

Thanks a lot!

I just submitted the next batch, 12 patches with support for more Rust
tags and for alternate debug files/dwz, both are needed to make the
pretty printing of perf.data contents test to work without warnings,
this also supports building the kernel with almost all DWARF modes
(DWARF5, compression, etc), which should speed up kernel builds that
want BTF.

This first bugfixes series also removed the serialization when elfutils
is built thread safe, so should further speed up kernel builds.

There is a new script that compares the BTF generation (and thus DWARF
loading) for all these modes, everything produces the same end result.

I have these extra branches that will be submitted when this last one
submitted lands:

acme@number:~/git/pahole$ git branch | grep topic
  topic/build-infra
  topic/cli-fixes
  topic/coverage
  topic/cpp-templates
  topic/ctracer
  topic/test-infra
acme@number:~/git/pahole$

Cheers,

- Arnaldo