summaryrefslogtreecommitdiff
path: root/tools/lib/bpf
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-07-08 13:45:38 -0700
committerAlexei Starovoitov <ast@kernel.org>2024-07-09 19:03:05 -0700
commit06e71ad534881d2a09ced7509d2ab0daedac4c96 (patch)
tree741be1e6e1c2d9effb8ba4fb4dba933bc7e97e6c /tools/lib/bpf
parent746d684ea579927015cde53cff8fc365caaf93b7 (diff)
downloadlwn-06e71ad534881d2a09ced7509d2ab0daedac4c96.tar.gz
lwn-06e71ad534881d2a09ced7509d2ab0daedac4c96.zip
bpftool: improve skeleton backwards compat with old buggy libbpfs
Old versions of libbpf don't handle varying sizes of bpf_map_skeleton struct correctly. As such, BPF skeleton generated by newest bpftool might not be compatible with older libbpf (though only when libbpf is used as a shared library), even though it, by design, should. Going forward libbpf will be fixed, plus we'll release bug fixed versions of relevant old libbpfs, but meanwhile try to mitigate from bpftool side by conservatively assuming older and smaller definition of bpf_map_skeleton, if possible. Meaning, if there are no struct_ops maps. If there are struct_ops, then presumably user would like to have auto-attaching logic and struct_ops map link placeholders, so use the full bpf_map_skeleton definition in that case. Acked-by: Quentin Monnet <qmo@kernel.org> Co-developed-by: Mykyta Yatsenko <yatsenko@meta.com> Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20240708204540.4188946-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf')
0 files changed, 0 insertions, 0 deletions