Upgrade bcc and libbpf to fix BPF program compilation on 6.10 and later kernel #2041
+6
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: Upgrade bcc and libbpf to fix BPF program compilation on 6.10 and later kernel
Bcc provides some "virtual" includes to BPF programs. The
compat/linux/virtual_bpf.h
file in particular needs to be kept in sync with libbpf and matches the header guard of theinclude/uapi/linux/bpf.h
file. This means that while our linux headers were updated, our older bcc install was inserting an older copy of theuapi/linux/bpf.h
file -- one that didn't contain thebpf_wq
declaration.Note: while this fixes the 6.10 compilation issue, our 6.10 qemu build fails without disabling this logic. 6.10 kernels added BPF token support. This changes the BPF permission model slightly and causes the BPF instruction limit to be dependent on the permissions of the BPF syscall caller (linux source).
This new BPF token logic coupled with our qemu setup, causes our 6.10 build to fallback to the 4096 instruction limit. I'll be addressing this in #2040 and #2042. Those issues shouldn't block this change since that loop limit code can be bypasses at runtime with our current cli flags.
Relevant Issues: Closes #2035
Type of change: /kind bugfix
Test Plan: Built 6.10 and 6.11 kernels and the associated linux headers from #2036 and verified that a local qemu build passes
#ci:bpf-build-all-kernels
build passesChangelog Message: Upgraded bcc and libbpf to support kernels 6.10 and later