On Thu, Jul 4, 2024 at 12:21 PM Quentin Monnet <qmo@xxxxxxxxxx> wrote: > > On 04/07/2024 01:15, Andrii Nakryiko wrote: > > 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. > > > > Co-developed-by: Mykyta Yatsenko <yatsenko@xxxxxxxx> > > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > > Note: I don't know to what extent we enforce this, but kernel docs state > that "Since Co-developed-by: denotes authorship, every Co-developed-by: > must be immediately followed by a Signed-off-by: of the associated > co-author". Mykyta's sign-off is missing from both patches. > Oh, sorry about that. I don't do co-developed-by often, so didn't realize. I'll add Mykyta's Signed-off-by in v2, thanks > Other than that, the patch looks good, thanks for fixing bpftool! > > Acked-by: Quentin Monnet <qmo@xxxxxxxxxx>