bpftool: Fix skeletons compilation for older kernels
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 0 repliesApplied 4/4
- v14 patches 8 repliesSuperseded
Patches in v2 All 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | bpftool: use a local copy of perf_event to fix accessing ::bpf_cookietools/ | +5 | 0 replies | Applied |
| 2/4 | bpftool: define a local bpf_perf_link to fix accessing its fieldstools/ | +7 | 0 replies | Applied |
| 3/4 | bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in pid_iter.bpf.ctools/ | +9 | 0 replies | Applied |
| 4/4 | bpftool: use a local bpf_perf_event_value to fix accessing its fieldstools/ | +17 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH bpf-next v2 0/4] bpftool: Fix skeletons compilation for older kernels
At runtime, bpftool may run its own BPF programs to get the pids of processes referencing BPF programs, or to profile programs. The skeletons for these programs rely on a vmlinux.h header and may fail to compile when building bpftool on hosts running older kernels, where some structs or enums are not defined. In this set, we address this issue by using local definitions for struct perf_event, struct bpf_perf_link, BPF_LINK_TYPE_PERF_EVENT (pids.bpf.c) and struct bpf_perf_event_value (profiler.bpf.c).
This set contains patches 1 to 3 from Alexander Lobakin's series, "bpf:
random unpopular userspace fixes (32 bit et al)" (v2) [0], from April 2022. An additional patch defines a local version of BPF_LINK_TYPE_PERF_EVENT in bpftool's pids.bpf.c.
[0] https://lore.kernel.org/bpf/[email protected]/
v2: Fixed description (CO-RE for container_of()) in patch 2.
Alexander Lobakin (3):
bpftool: use a local copy of perf_event to fix accessing ::bpf_cookie
bpftool: define a local bpf_perf_link to fix accessing its fields
bpftool: use a local bpf_perf_event_value to fix accessing its fields
Quentin Monnet (1):
bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in
pid_iter.bpf.c
tools/bpf/bpftool/skeleton/pid_iter.bpf.c | 26 +++++++++++++++++----- tools/bpf/bpftool/skeleton/profiler.bpf.c | 27 ++++++++++++++--------- 2 files changed, 38 insertions(+), 15 deletions(-)
Signature · 1 line
2.34.1