diff options
author | Alexei Starovoitov <ast@kernel.org> | 2024-07-09 19:00:25 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-07-09 19:03:36 -0700 |
commit | 02779af2419a91f847c22e488f8d13ec301cf833 (patch) | |
tree | e4a4e77fe98c18d7efda89eabd3de9fd9d8bc962 /tools/testing/selftests/bpf/prog_tests/recursive_attach.c | |
parent | 746d684ea579927015cde53cff8fc365caaf93b7 (diff) | |
parent | a459f4bb27f2e2730039c57786b82288742c8c74 (diff) |
Merge branch 'fix-libbpf-bpf-skeleton-forward-backward-compat'
Andrii Nakryiko says:
====================
Fix libbpf BPF skeleton forward/backward compat
Fix recently identified (but long standing) bug with handling BPF skeleton
forward and backward compatibility. On libbpf side, even though BPF skeleton
was always designed to be forward and backwards compatible through recording
actual size of constrituents of BPF skeleton itself (map/prog/var skeleton
definitions), libbpf implementation did implicitly hard-code those sizes by
virtue of using a trivial array access syntax.
This issue will only affect libbpf used as a shared library. Statically
compiled libbpfs will always be in sync with BPF skeleton, bypassing this
problem altogether.
This patch set fixes libbpf, but also mitigates the problem for old libbpf
versions by teaching bpftool to generate more conservative BPF skeleton,
if possible (i.e., if there are no struct_ops maps defined).
v1->v2:
- fix SOB, add acks, typo fixes (Quentin, Eduard);
- improve reporting of skipped map auto-attachment (Alan, Eduard).
====================
Link: https://lore.kernel.org/r/20240708204540.4188946-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursive_attach.c')
0 files changed, 0 insertions, 0 deletions