BPF List
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Andrii Nakryiko" <andrii.nakryiko@gmail.com>,
	"Alan Maguire" <almagui@kernel.org>
Cc: <daniel@iogearbox.net>, <andrii@kernel.org>,
	<andrey.grodzovsky@crowdstrike.com>, <eddyz87@gmail.com>,
	<memxor@gmail.com>, <martin.lau@linux.dev>, <song@kernel.org>,
	<yonghong.song@linux.dev>, <jolsa@kernel.org>,
	<emil@etsalapatis.com>, <ihor.solodrai@linux.dev>,
	<john.fastabend@gmail.com>, <mason@kernel.org>,
	<bpf@vger.kernel.org>
Subject: Re: [PATCH v2 bpf-next 0/5] libbpf, bpf: Utilize CO-RE for BPF program parameter presence, ordering
Date: Thu, 26 Nov 2026 04:02:49 +0000	[thread overview]
Message-ID: <DN4UE2L5FO1X.1MKV1JVQWDT7C@gmail.com> (raw)
In-Reply-To: <CAEf4BzbkrVyCSW1aRCo_s=2pxK7NRfUnznk21CY4-txqveRcnQ@mail.gmail.com>

On Wed, Nov 25, 2026 at 02:49 PM Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote:
> we need to make sure that we can use
> __attribute__((preserve_static_offset)) together with
> __attribute__((preserve_access_index))

Yes, but pls remind me, did we make it work in the most recent LLVM ?
So some sort of __BPF_FEATURE guard is necessary?
I don't recall whether we added one.

> And I'm actually wondering if the better name for this would be
> "bpf_ctx___<flavor>" or "bpf_ctx_args___<flavor>", because it's not
> always *function* arguments (tracepoint, BPF program, etc). Keeping it
> more generic as "context arguments" or just "context" seems more
> future-proof.

I'd keep bpf_func_args___ to match existing bpf_get_func_arg() helper
that reads the same slots and works for tp_btf (which is not a *function*
in your definition).

bpf_ctx* sounds like it works for every prog type,
but that is not the case.

> Also (I only skimmed patches, haven't gone through them completely,
> will get back to this next week after holidays, sorry), I saw you
> mentioned the limitation that this context access can be only done
> from entry program code, right?  I think this can be lifted if we
> apply these relocations after subprogs are appended to their
> respective main programs. Not sure how ugly that will be, but you can
> try that and see how it works (please do it as a separate patch to
> distract less from the main logic change).

Agree. good idea.

      reply	other threads:[~2026-11-26  4:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 16:58 [PATCH v2 bpf-next 0/5] libbpf, bpf: Utilize CO-RE for BPF program parameter presence, ordering Alan Maguire
2026-11-25 16:58 ` [PATCH v2 bpf-next 1/5] bpf: Allow loads of the low-order bytes of context slots on big-endian Alan Maguire
2026-11-25 16:58 ` [PATCH v2 bpf-next 2/5] libbpf: Support CO-RE relocation of tracing program arguments Alan Maguire
2026-11-25 17:16   ` sashiko-bot
2026-11-25 16:58 ` [PATCH v2 bpf-next 3/5] bpf: " Alan Maguire
2026-11-25 16:58 ` [PATCH v2 bpf-next 4/5] selftests/bpf: Test " Alan Maguire
2026-11-25 16:58 ` [PATCH v2 bpf-next 5/5] Documentation/bpf: Describe CO-RE relocation of function arguments Alan Maguire
2026-11-25 17:37   ` bot+bpf-ci
2026-11-25 22:49 ` [PATCH v2 bpf-next 0/5] libbpf, bpf: Utilize CO-RE for BPF program parameter presence, ordering Andrii Nakryiko
2026-11-26  4:02   ` Alexei Starovoitov [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=DN4UE2L5FO1X.1MKV1JVQWDT7C@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=almagui@kernel.org \
    --cc=andrey.grodzovsky@crowdstrike.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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