bpftool v7.4
Breaking change
- Kernel configuration options related to bpfilter (namely:
CONFIG_BPFILTERandCONFIG_BPFILTER_UMH) are no longer checked withbpftool feature probe, following bpfilter's removal in recent kernels. (e725e62)
New features
The information displayed for BPF links (bpftool link list) keeps getting enriched:
- Display
uprobe_multilinks. (dd0b761) - Display cookie for perf event link probes. (25df69b)
- Display cookie for
kprobe_multilinks. (4263cc0)
Other features:
-
Generate shadow variables for
struct_opsmaps in program skeletons. Shadow types allow skeleton users to easily access the fields ofstruct_opsmaps at runtime. An example program using shadow types is also added to thebpftool-genmanual page. (fc0ad76, 579d6b0) -
Mark orphaned programs as such when listing programs. Orphaned programs are programs removed in IRQ context, on their way to be unloaded from kernel memory, but possibly passing through audit hooks. Such programs would only be listed on recent kernels. (5b0a3a4)
-
Recognize
arenamap types (a09e203) and global variables (73a2c7e), and support theaddr_space_castinstruction in the disassembler for translated programs, used for working with arena maps (c305ebf).
Bug fixes
- In the mirror repository, fix the detection of
clang-bpf-co-re(for skeletons support) for some clang versions. (515739f) - Displaying PIDs for processes holding references to BPF links when listing links with
bpftool link liston older kernels broke in v7.3.0, because the internal programpid_iterwould fail to load. Fix the program to ensure thatpid_iterloads and PIDs are displayed. (3214350) - When loading the internal
pid_iterprogram for displaying PIDs of processes holding file descriptors to BPF programs, we would suppress the logs from libbpf. Display them when running bpftool in debug mode (--debug). (0cb4aaf)
Other internal changes
- Silence build warning from
calloc()appearing with recent versions of GCC (supporting-Wcalloc-transposed-args). (c4cc180) - Use POSIX's version of
basename()for more portability. (6e0d7d0) - Improve bpftool's bootstrap build by skipping compilation for some unnecessary object files (3dc1ac6) and passing more relevant values in
HOST_CFLAGSandHOST_LDFLAGS(c1adf4a). This also results in more accurate results when listing features withbpftool versionfor the boostrap bpftool binary.
Known bugs
- Command
bpftool cgroup treemay be broken when running with kernels under v6.1. (#41) - When loading multiple programs with
bpftool prog loadalland passing a directory name for pinning them that is not located under an existing bpffs, bpftool attempts to mount a new bpffs on the parent of the directory rather than on the directory itself, possibly leading to a portion of the file arborescence to be unexpectedly hidden by the mount. (#100)
Full Changelog: v7.3.0...v7.4.0