From: Eduard Zingerman <eddyz87@gmail.com>
To: Puranjay Mohan <puranjay12@gmail.com>
Cc: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>,
kernel-team@meta.com
Subject: Re: [PATCH bpf-next 1/5] bpf: Add KF_ACQUIRE and KF_RELEASE support for iterators
Date: Thu, 19 Feb 2026 17:09:47 -0800 [thread overview]
Message-ID: <0d16f1af1b7b499b587ce7a5beef6bdbf1ddbccf.camel@gmail.com> (raw)
In-Reply-To: <CANk7y0hiddq=eiViLF6c4kGUBNS-vdHoWXK7PEAvTyb9W5rshA@mail.gmail.com>
On Fri, 2026-02-20 at 01:05 +0000, Puranjay Mohan wrote:
> On Thu, Feb 19, 2026 at 8:37 PM Eduard Zingerman <eddyz87@gmail.com> wrote:
> >
> > On Wed, 2026-02-18 at 10:25 -0800, Puranjay Mohan wrote:
> >
> > [...]
> >
> > > @@ -13797,7 +13826,7 @@ static int check_kfunc_args(struct bpf_verifier_env *env, struct
> > > bpf_kfunc_call_
> > > }
> > > }
> > >
> > > - if (is_kfunc_release(meta) && !meta->release_regno) {
> > > + if (is_kfunc_release(meta) && !meta->release_regno && !meta->has_iter_arg) {
> >
> > This makes the check too strict, right?
> > E.g. for most of the release kfuncs there would be no iter arg,
> > hence the check won't ever be true for those kfuncs.
> > Do we have tests for this check?
> > Either we don't have the tests or the check itself is redundant.
>
> A release kfunc should either have meta->release_regno set or it
> should take an __iter arg, that is what this is checking. If we leave
> it like it was then every release function that take __iter would fail
> her.
Oh, right, I missed the point here.
> But anyway I will be doing it the better way how Mykyta
> Suggested, so this will be gone.
next prev parent reply other threads:[~2026-02-20 1:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 18:25 [PATCH bpf-next 0/5] Introduce KF_FORBID_SLEEP modifier for acquire/release kfuncs Puranjay Mohan
2026-02-18 18:25 ` [PATCH bpf-next 1/5] bpf: Add KF_ACQUIRE and KF_RELEASE support for iterators Puranjay Mohan
2026-02-19 17:45 ` Mykyta Yatsenko
2026-02-19 20:37 ` Eduard Zingerman
2026-02-20 1:05 ` Puranjay Mohan
2026-02-20 1:09 ` Eduard Zingerman [this message]
2026-02-18 18:25 ` [PATCH bpf-next 2/5] bpf: Add KF_FORBID_SLEEP modifier for KF_ACQUIRE kfuncs Puranjay Mohan
2026-02-19 3:24 ` Alexei Starovoitov
2026-02-20 0:14 ` Puranjay Mohan
2026-02-19 22:19 ` Eduard Zingerman
2026-02-20 0:51 ` Puranjay Mohan
2026-02-18 18:25 ` [PATCH bpf-next 3/5] bpf: Move locking to bpf_iter_task_vma_next() Puranjay Mohan
2026-02-18 18:25 ` [PATCH bpf-next 4/5] bpf: Add split iteration support to task_vma iterator Puranjay Mohan
2026-02-18 18:25 ` [PATCH bpf-next 5/5] selftests/bpf: Add tests for split " Puranjay Mohan
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=0d16f1af1b7b499b587ce7a5beef6bdbf1ddbccf.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 \
--cc=memxor@gmail.com \
--cc=mykyta.yatsenko5@gmail.com \
--cc=puranjay12@gmail.com \
/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