From: Jiri Olsa <olsajiri@gmail.com>
To: Ihor Solodrai <ihor.solodrai@linux.dev>
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Tejun Heo <tj@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH bpf v2 1/2] bpf: Fix tracing of kfuncs with implicit args
Date: Mon, 13 Jul 2026 14:51:01 +0200 [thread overview]
Message-ID: <alTfNc_Q8k0KcSPg@krava> (raw)
In-Reply-To: <20260710192940.3020280-2-ihor.solodrai@linux.dev>
On Fri, Jul 10, 2026 at 12:29:39PM -0700, Ihor Solodrai wrote:
SNIP
> +
> int bpf_check_attach_target(struct bpf_verifier_log *log,
> const struct bpf_prog *prog,
> const struct bpf_prog *tgt_prog,
> @@ -19121,8 +19159,8 @@ int bpf_check_attach_target(struct bpf_verifier_log *log,
> if (prog_extension &&
> btf_check_type_match(log, prog, btf, t))
> return -EINVAL;
> - t = btf_type_by_id(btf, t->type);
> - if (!btf_type_is_func_proto(t))
> + t = btf_attach_func_proto(log, btf, btf_id);
> + if (!t || !btf_type_is_func_proto(t))
> return -EINVAL;
>
> if ((prog->aux->saved_dst_prog_type || prog->aux->saved_dst_attach_type) &&
> @@ -19407,8 +19445,8 @@ int bpf_check_attach_btf_id_multi(struct btf *btf, struct bpf_prog *prog, u32 bt
> return -EINVAL;
> if (!btf_type_is_func(t))
> return -EINVAL;
the btf_type_is_func check is now part of btf_attach_func_proto,
so I think we can remove this one
jirka
> - t = btf_type_by_id(btf, t->type);
> - if (!btf_type_is_func_proto(t))
> + t = btf_attach_func_proto(NULL, btf, btf_id);
> + if (!t || !btf_type_is_func_proto(t))
> return -EINVAL;
> err = btf_distill_func_proto(NULL, btf, t, tname, &tgt_info->fmodel);
> if (err < 0)
> --
> 2.55.0
>
>
next prev parent reply other threads:[~2026-07-13 12:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 19:29 [PATCH bpf v2 0/2] bpf: Fix tracing of kfuncs with implicit args Ihor Solodrai
2026-07-10 19:29 ` [PATCH bpf v2 1/2] " Ihor Solodrai
2026-07-11 10:43 ` Eduard Zingerman
2026-07-11 17:57 ` Ihor Solodrai
2026-07-11 23:51 ` Eduard Zingerman
2026-07-13 16:48 ` Ihor Solodrai
2026-07-13 17:01 ` Eduard Zingerman
2026-07-13 12:51 ` Jiri Olsa [this message]
2026-07-10 19:29 ` [PATCH bpf v2 2/2] selftests/bpf: Cover tracing implicit kfunc args Ihor Solodrai
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=alTfNc_Q8k0KcSPg@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=memxor@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.