Arnaldo, On Fri, Aug 26, 2022 at 01:37:24PM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Aug 26, 2022 at 03:52:12PM +0200, Jiri Olsa escreveu: > > On Fri, Aug 26, 2022 at 05:59:44AM +0300, Vitaly Chikunov wrote: > > > > > [ 0.767649] Run /init as init process > > > > [ 0.770858] BPF:[593] ENUM perf_event_task_context > > > > [ 0.771262] BPF:size=4 vlen=4 > > > > [ 0.771511] BPF: > > > > [ 0.771680] BPF:Invalid btf_info kind_flag > > > > [ 0.772016] BPF: > > > I can see the same on 5.15, it looks like the libbpf change that > > pahole is compiled with is setting the type's kflag for values < 0: > > (which is the case for perf_event_task_context enum first value) > > > dffbbdc2d988 libbpf: Add enum64 parsing and new enum64 public API > > > but IIUC kflag should stay zero for normal enum otherwise the btf meta > > verifier screams > > > if I compile pahole with the libbpf change below I can boot 5.15 kernel > > normally > > > Yonghong, any idea? > > This made me try to build pahole with the system libbpf instead of with > the one that goes with it, here, testing with libbpf 0.7.0 it wasn't > building as BTF_KIND_ENUM64 came with libbpf 1.0 so I added the > following patch to again allow with the system libbpf, i.e. using: > > $ cmake -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=Off > > This will return errors if trying to encode or load enum64 tags, but > disabling it, as done with kernels not supporting BTF_KIND_ENUM64 should > now work, can you please test and report results? > > Vitaly I checked and alt:p9 has libbpf 0.2, which is really old, unsure > if it would build there, but alt:sisyphus has 0.8.0, so should work > there, please try. Perhaps this does not need to be tested since Jiri found the solution? BTW, alt:p9 is older ALT branch only for security updates, current branch is alt:p10, so it's relevant to replace p9 testing with p10, for new features. I was building dwarves with -DLIBBPF_EMBEDDED=ON, thinking it would be more stable (since they updated not independently from each other), is it recommended to turn in OFF? ps. I think something needs to be changed somewhere (in kernel src?) or more users will report build failures when switching to the new pahole. Thanks, > > - Arnaldo