BPF List
 help / color / mirror / Atom feed
From: Quentin Monnet <qmo@kernel.org>
To: Mykyta Yatsenko <yatsenko@meta.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	martin.lau@kernel.org
Cc: kernel-team@meta.com
Subject: Re: [PATCH bpf-next 1/2] bpftool: improve skeleton backwards compat with old buggy libbpfs
Date: Thu, 4 Jul 2024 20:21:53 +0100	[thread overview]
Message-ID: <fcc66ffb-d565-4596-b166-9f91f8ca1d43@kernel.org> (raw)
In-Reply-To: <20240704001527.754710-2-andrii@kernel.org>

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@meta.com>
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>

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.

Other than that, the patch looks good, thanks for fixing bpftool!

Acked-by: Quentin Monnet <qmo@kernel.org>

  reply	other threads:[~2024-07-04 19:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04  0:15 [PATCH bpf-next 0/2] Fix libbpf BPF skeleton forward/backward compat Andrii Nakryiko
2024-07-04  0:15 ` [PATCH bpf-next 1/2] bpftool: improve skeleton backwards compat with old buggy libbpfs Andrii Nakryiko
2024-07-04 19:21   ` Quentin Monnet [this message]
2024-07-08 17:14     ` Andrii Nakryiko
2024-07-04 20:31   ` Eduard Zingerman
2024-07-08 17:15     ` Andrii Nakryiko
2024-07-08 17:53       ` Eduard Zingerman
2024-07-04  0:15 ` [PATCH bpf-next 2/2] libbpf: fix BPF skeleton forward/backward compat handling Andrii Nakryiko
2024-07-04 15:16   ` Alan Maguire
2024-07-04 20:56     ` Eduard Zingerman
2024-07-08 17:19       ` Andrii Nakryiko
2024-07-08 17:19     ` Andrii Nakryiko
2024-07-04 20:51   ` Eduard Zingerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fcc66ffb-d565-4596-b166-9f91f8ca1d43@kernel.org \
    --to=qmo@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@kernel.org \
    --cc=yatsenko@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox