From: Eduard Zingerman <eddyz87@gmail.com>
To: Ihor Solodrai <ihor.solodrai@linux.dev>,
dwarves@vger.kernel.org, alan.maguire@oracle.com,
acme@kernel.org, andrii <andrii@kernel.org>,
Alexei Starovoitov <ast@kernel.org>
Cc: bpf@vger.kernel.org, andrii@kernel.org, ast@kernel.org,
tj@kernel.org, kernel-team@meta.com
Subject: Re: [PATCH dwarves v1 2/2] btf_encoder: implement KF_IMPLICIT_PROG_AUX_ARG kfunc flag handling
Date: Wed, 24 Sep 2025 18:22:37 -0700 [thread overview]
Message-ID: <4fb8a812fdd01f115a99317c8e46ad055b5bf102.camel@gmail.com> (raw)
In-Reply-To: <20250924211512.1287298-3-ihor.solodrai@linux.dev>
On Wed, 2025-09-24 at 14:15 -0700, Ihor Solodrai wrote:
> When a kfunc is marked with KF_IMPLICIT_PROG_AUX_ARG, do not emit the
> last parameter of this function to BTF.
[...]
> @@ -887,6 +923,12 @@ static int32_t btf_encoder__add_func_proto_for_state(struct btf_encoder *encoder
> nr_params = state->nr_parms;
> type_id = state->ret_type_id;
>
> + if (is_kfunc_state(state) && KF_IMPLICIT_PROG_AUX_ARG & state->elf->kfunc_flags) {
> + if (validate_kfunc_with_implicit_prog_aux_arg(state))
> + return -1;
> + nr_params--;
> + }
> +
> id = btf_encoder__emit_func_proto(encoder, type_id, nr_params);
> if (id < 0)
> return id;
This change hides the fact that function accepts one more parameter
both from kernel BTF and from program BTF (via vmlinux.h).
Do we anticipate other implicit parameter types?
Because if we do, it seems like having some generic KF_IMPLICIT_ARG
and hiding it only from vmlinux.h seem more flexible.
next prev parent reply other threads:[~2025-09-25 1:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 21:15 [PATCH dwarves v1 0/2] btf_encoder: KF_IMPLICIT_PROG_AUX_ARG support Ihor Solodrai
2025-09-24 21:15 ` [PATCH dwarves v1 1/2] btf_encoder: refactor btf_encoder__add_func_proto Ihor Solodrai
2025-09-24 21:15 ` [PATCH dwarves v1 2/2] btf_encoder: implement KF_IMPLICIT_PROG_AUX_ARG kfunc flag handling Ihor Solodrai
2025-09-25 1:22 ` Eduard Zingerman [this message]
2025-09-25 3:59 ` Ihor Solodrai
2025-09-25 13:28 ` Eduard Zingerman
2025-09-25 17:15 ` Andrii Nakryiko
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=4fb8a812fdd01f115a99317c8e46ad055b5bf102.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@meta.com \
--cc=tj@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