From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
martin.lau@kernel.org, kernel-team@meta.com,
Mykyta Yatsenko <yatsenko@meta.com>
Subject: Re: [PATCH bpf-next 1/2] bpftool: improve skeleton backwards compat with old buggy libbpfs
Date: Mon, 08 Jul 2024 10:53:16 -0700 [thread overview]
Message-ID: <2422bc243643af56bf4646e6468b5489a3c7769c.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzZVMRtcM6dtLApzjq5zd18Nw52dC0eOJRfHtW+uDaDkLQ@mail.gmail.com>
On Mon, 2024-07-08 at 10:15 -0700, Andrii Nakryiko wrote:
[...]
> > static inline int
> > profiler_bpf__create_skeleton(struct profiler_bpf *obj)
> > {
> > /* ... */
> >
> > map = (struct bpf_map_skeleton *)((char *)s->maps + 0 * s->map_skel_sz);
> > map->name = "events";
> > map->map = &obj->maps.events;
> >
> > /* ... 4 more like this ... */
> >
> > /* ... */
> >
> > s->progs[0].name = "fentry_XXX";
> > s->progs[0].prog = &obj->progs.fentry_XXX;
> > s->progs[0].link = &obj->links.fentry_XXX;
> >
> > s->progs[1].name = "fexit_XXX";
> > s->progs[1].prog = &obj->progs.fexit_XXX;
> > s->progs[1].link = &obj->links.fexit_XXX;
> >
> > /* ... */
> > }
> >
> > Do we need to handle 'progs' array access in a same way as maps?
>
> Given bpf_prog_skeleton has never been extended yet (and maybe never
> will be), I chose not to uglify this unnecessarily. My thinking/hope
> is that by the time we get to extending prog_skeleton struct, all
> actively used libbpf versions will be patched up and will handle this
> correctly without the hacks we have to do for map_skeleton.
Understood, fair enough.
[...]
next prev parent reply other threads:[~2024-07-08 17:53 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
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 [this message]
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=2422bc243643af56bf4646e6468b5489a3c7769c.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--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