From: Menglong Dong <menglong.dong@linux.dev>
To: Menglong Dong <menglong8.dong@gmail.com>, Jiri Olsa <olsajiri@gmail.com>
Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
memxor@gmail.com, song@kernel.org, yonghong.song@linux.dev,
shuah@kernel.org, emil@etsalapatis.com, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 1/3] bpf: add missing fsession to the verifier log
Date: Thu, 09 Apr 2026 19:28:55 +0800 [thread overview]
Message-ID: <5090408.31r3eYUQgx@7940hx> (raw)
In-Reply-To: <adZWStMinOeunjSH@krava>
On 2026/4/8 21:21 Jiri Olsa <olsajiri@gmail.com> write:
> On Wed, Apr 08, 2026 at 02:21:07PM +0800, Menglong Dong wrote:
> > The fsession attach type is missed in the verifier log in
> > check_get_func_ip(), bpf_check_attach_target() and check_attach_btf_id().
> > Update them to make the verifier log proper. Meanwhile, update the
> > corresponding selftests.
> >
> > Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
> > Acked-by: Leon Hwang <leon.hwang@linux.dev>
> > ---
> > v2:
> > - add a missing FSESSION in bpf_check_attach_target()
> > ---
> > kernel/bpf/verifier.c | 10 +++++-----
> > tools/testing/selftests/bpf/prog_tests/exceptions.c | 8 ++++----
> > tools/testing/selftests/bpf/verifier/sleepable.c | 2 +-
> > 3 files changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index 594260c1f382..beb660b4c3ec 100644
> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -11757,7 +11757,7 @@ static int check_get_func_ip(struct bpf_verifier_env *env)
> >
> > if (type == BPF_PROG_TYPE_TRACING) {
> > if (!bpf_prog_has_trampoline(env->prog)) {
> > - verbose(env, "func %s#%d supported only for fentry/fexit/fmod_ret programs\n",
> > + verbose(env, "func %s#%d supported only for fentry/fexit/fsession/fmod_ret programs\n",
> > func_id_name(func_id), func_id);
> > return -ENOTSUPP;
> > }
> > @@ -25561,7 +25561,7 @@ int bpf_check_attach_target(struct bpf_verifier_log *log,
> > btf = tgt_prog ? tgt_prog->aux->btf : prog->aux->attach_btf;
> > if (!btf) {
> > bpf_log(log,
> > - "FENTRY/FEXIT program can only be attached to another program annotated with BTF\n");
> > + "FENTRY/FEXIT/FSESSION program can only be attached to another program annotated with BTF\n");
>
> I wonder this should say 'Tracing program...' instead,
> we have other tracing types not covered in this error
>
> jirka
>
> > return -EINVAL;
> > }
> > t = btf_type_by_id(btf, btf_id);
> > @@ -25597,7 +25597,7 @@ int bpf_check_attach_target(struct bpf_verifier_log *log,
> > if (aux->func && aux->func[subprog]->aux->exception_cb) {
> > bpf_log(log,
> > "%s programs cannot attach to exception callback\n",
> > - prog_extension ? "Extension" : "FENTRY/FEXIT");
> > + prog_extension ? "Extension" : "FENTRY/FEXIT/FSESSION");
I guess that we'd better use "Tracing" instead of "FENTRY/FEXIT/FSESSION"
here too?
> > return -EINVAL;
> > }
[...]
>
>
next prev parent reply other threads:[~2026-04-09 11:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 6:21 [PATCH bpf-next v2 0/3] bpf: add the missing fsession Menglong Dong
2026-04-08 6:21 ` [PATCH bpf-next v2 1/3] bpf: add missing fsession to the verifier log Menglong Dong
2026-04-08 13:21 ` Jiri Olsa
2026-04-08 15:57 ` Alexei Starovoitov
2026-04-09 2:43 ` Menglong Dong
2026-04-09 11:28 ` Menglong Dong [this message]
2026-04-09 13:16 ` Jiri Olsa
2026-04-08 6:21 ` [PATCH bpf-next v2 2/3] docs/bpf: add missing fsession attach type to docs Menglong Dong
2026-04-08 6:21 ` [PATCH bpf-next v2 3/3] bpftool: add missing fsession to the usage and docs of bpftool Menglong Dong
2026-04-09 13:39 ` Quentin Monnet
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=5090408.31r3eYUQgx@7940hx \
--to=menglong.dong@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=john.fastabend@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=menglong8.dong@gmail.com \
--cc=olsajiri@gmail.com \
--cc=shuah@kernel.org \
--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 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.