BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: 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 v2 bpf-next 0/9] Libbpf-side __arg_ctx fallback support
Date: Wed, 03 Jan 2024 22:57:11 +0200	[thread overview]
Message-ID: <a767a0ca32a8ab30474320594917c1599465ebc1.camel@gmail.com> (raw)
In-Reply-To: <20240102190055.1602698-1-andrii@kernel.org>

On Tue, 2024-01-02 at 11:00 -0800, Andrii Nakryiko wrote:
> Support __arg_ctx global function argument tag semantics even on older kernels
> that don't natively support it through btf_decl_tag("arg:ctx").
> 
> Patch #1 does a bunch of internal renaming to make internal function naming
> consistent. We were doing it lazily up until now, but mixing single and double
> underscored names are confusing, so let's bite a bullet and get it over the
> finish line in one go.
> 
> Patches #3-#7 are preparatory work to allow to postpone BTF loading into the
> kernel until after all the BPF program relocations (including global func
> appending to main programs) are done. Patch #5 is perhaps the most important
> and establishes pre-created stable placeholder FDs, so that relocations can
> embed valid map FDs into ldimm64 instructions.
> 
> Once BTF is done after relocation, what's left is to adjust BTF information to
> have each main program's copy of each used global subprog to point to its own
> adjusted FUNC -> FUNC_PROTO type chain (if they use __arg_ctx) in such a way
> as to satisfy type expectations of BPF verifier regarding the PTR_TO_CTX
> argument definition. See patch #8 for details.
> 
> Patch #9 adds few more __arg_ctx use cases (edge cases like multiple arguments
> having __arg_ctx, etc) to test_global_func_ctx_args.c, to make it simple to
> validate that this logic indeed works on old kernels. It does.

I've read through the patch-set and it seems to be fine,
as far as my (limited) understanding of the code base goes.
Left a few nitpicks.

[...]



      parent reply	other threads:[~2024-01-03 20:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 19:00 [PATCH v2 bpf-next 0/9] Libbpf-side __arg_ctx fallback support Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 1/9] libbpf: name internal functions consistently Andrii Nakryiko
2024-01-03 23:12   ` Alexei Starovoitov
2024-01-03 23:17     ` Eduard Zingerman
2024-01-04  0:30       ` Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 2/9] libbpf: make uniform use of btf__fd() accessor inside libbpf Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 3/9] libbpf: use explicit map reuse flag to skip map creation steps Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 4/9] libbpf: don't rely on map->fd as an indicator of map being created Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 5/9] libbpf: use stable map placeholder FDs Andrii Nakryiko
2024-01-03 20:57   ` Eduard Zingerman
2024-01-03 22:46     ` Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 6/9] libbpf: move exception callbacks assignment logic into relocation step Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 7/9] libbpf: move BTF loading step after " Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 8/9] libbpf: implement __arg_ctx fallback logic Andrii Nakryiko
2024-01-03 20:57   ` Eduard Zingerman
2024-01-03 23:10     ` Andrii Nakryiko
2024-01-03 23:43       ` Eduard Zingerman
2024-01-03 23:59         ` Andrii Nakryiko
2024-01-04  0:09           ` Eduard Zingerman
2024-01-04  0:27             ` Andrii Nakryiko
2024-01-02 19:00 ` [PATCH v2 bpf-next 9/9] selftests/bpf: add arg:ctx cases to test_global_funcs tests Andrii Nakryiko
2024-01-03 20:57   ` Eduard Zingerman
2024-01-03 23:17     ` Andrii Nakryiko
2024-01-03 23:51       ` Eduard Zingerman
2024-01-04  0:26         ` Andrii Nakryiko
2024-01-04  0:28           ` Eduard Zingerman
2024-01-02 19:57 ` [PATCH v2 bpf-next 0/9] Libbpf-side __arg_ctx fallback support Andrii Nakryiko
2024-01-03 20:57 ` Eduard Zingerman [this message]

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=a767a0ca32a8ab30474320594917c1599465ebc1.camel@gmail.com \
    --to=eddyz87@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 \
    /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