SUMMARY When attempting to track down the root cause of a valgrind complaint about unitialized fields in some PCP code I noticed that valgrind would print out messages in the following in the output: --1794549-- WARNING: unhandled eBPF command 28 --1794549-- WARNING: unhandled eBPF command 35 The command 28 and 35 map to BPF_LINK_CREATE and BPF_PROG_BIND_MAP, respectively. The handling of things the bpf syscall handles is incomplete. STEPS TO REPRODUCE on Fedora 40 as root: 1. dnf install pcp-pmda-bpf valgrind 2. touch /var/lib/pcp/pmdas/bpf/.NeedInstall 3. systemctl restart pmcd 4. valgrind pminfo -L -K clear -K add,157,/var/lib/pcp/pmdas/bpf/pmda_bpf,bpf_init -dmtT bpf.disk bpf.runq OBSERVED RESULT The output has a number of messages about "unhandled eBPF command ..." EXPECTED RESULT No messages about unhandled eBPF commands in the output SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora 40 pcp-pmda-bpf-6.2.2-3.fc39.x86_64 valgrind-3.22.0-4.fc39.x86_64 ADDITIONAL INFORMATION The last command in the list that valgrind understands is BPF_MAP_FREEZE. There looks to be a number of additional BPF commands after BPF_MAP_FREEZE listed on the 6.11 kernel: https://elixir.bootlin.com/linux/v6.11-rc4/source/include/uapi/linux/bpf.h#L922
Maybe a duplicate of 478774. Can you test the second patch attached to that bugzilla item?
This bug is not a duplicate of 478774. The bug 478774 is tracking the size of objects initialized by the kernel. This bug is filed due to some of the eBPF commands not being handled by valgrind. Just to be sure the reproducer was run with a version of valgrind that included the patch from 478774. The warnings about unhandled eBPF commands were still present on the patched version of valgrind.
OK thanks. When I started looking at 478774 I realized that much has changed since Valgrind last was updated for eBPF. Just adding all the missing eBPF data structures is a fairly significant chunk. I think that when we update eBPF we should tackle this and 478774 and 492125 all in one go.