All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Puranjay Mohan" <puranjay@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 1/4] bpf: Add bpf_call_rcu() kfunc
Date: Tue, 15 Sep 2026 12:01:26 +0000	[thread overview]
Message-ID: <20260915120127.099B91F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915114240.3269184-2-puranjay@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: build failure due to missing bpf_call_rcu_tasks_trace implementation
--

commit 06a7a5ada7a6b07d90668fb28558d25075dfcf41
Author: Puranjay Mohan <puranjay@kernel.org>

bpf: Add bpf_call_rcu() kfunc

This commit introduces the bpf_call_rcu() kfunc to allow BPF programs to
queue callbacks that execute after an RCU grace period. It adds the
necessary BTF fields, map validations, and verifier support to safely
invoke these callbacks.

> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 6c6b8d8520cdf..f91c997bc8445 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -12526,6 +12583,8 @@ enum special_kfunc_type {
>  	KF___bpf_trap,
>  	KF_bpf_task_work_schedule_signal,
>  	KF_bpf_task_work_schedule_resume,
> +	KF_bpf_call_rcu,
> +	KF_bpf_call_rcu_tasks_trace,

[Severity: Low]
Will this cause a build failure? Looking at the addition of
KF_bpf_call_rcu_tasks_trace to enum special_kfunc_type in
kernel/bpf/verifier.c, the kfunc is added to the special list here, but the
actual implementation of bpf_call_rcu_tasks_trace does not seem to be
included in this patch.

I understand the implementation is added later in the series in commit
d37bdb9e0af5ddd44775e974f01a56e73c98e9d3 (bpf: Add
bpf_call_rcu_tasks_trace() kfunc), but shouldn't each patch be
self-contained and compilable to preserve git bisect functionality?

>  	KF_bpf_arena_alloc_pages,
>  	KF_bpf_arena_free_pages,
>  	KF_bpf_arena_reserve_pages,

[ ... ]

> @@ -12619,6 +12678,8 @@ BTF_ID(func, bpf_dynptr_file_discard)
>  BTF_ID(func, __bpf_trap)
>  BTF_ID(func, bpf_task_work_schedule_signal)
>  BTF_ID(func, bpf_task_work_schedule_resume)
> +BTF_ID(func, bpf_call_rcu)
> +BTF_ID(func, bpf_call_rcu_tasks_trace)

[Severity: Low]
Does exposing this function to resolve_btfids without its implementation
present in this commit break the build? Since the symbol is missing in
vmlinux at this point in the series, resolve_btfids might fail to find it
and cause a regression during compilation.

>  BTF_ID(func, bpf_arena_alloc_pages)
>  BTF_ID(func, bpf_arena_free_pages)
>  BTF_ID(func, bpf_arena_reserve_pages)

[ ... ]

> @@ -12690,6 +12751,12 @@ static bool is_bpf_rbtree_add_kfunc(u32 func_id)
>  	       func_id == special_kfunc_list[KF_bpf_rbtree_add_impl];
>  }
>  
> +static bool is_call_rcu_kfunc(u32 func_id)
> +{
> +	return func_id == special_kfunc_list[KF_bpf_call_rcu] ||
> +	       func_id == special_kfunc_list[KF_bpf_call_rcu_tasks_trace];
> +}
> +

[Severity: Low]
Can this check for special_kfunc_list[KF_bpf_call_rcu_tasks_trace] be
deferred to the commit that actually introduces the function, so the
verifier checks remain strictly aligned with the available features?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260915114240.3269184-1-puranjay@kernel.org?part=1

  reply	other threads:[~2026-09-15 12:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 11:42 [PATCH bpf-next v2 0/4] bpf: Add bpf_call_rcu() and bpf_call_rcu_tasks_trace() Puranjay Mohan
2026-09-15 11:42 ` [PATCH bpf-next v2 1/4] bpf: Add bpf_call_rcu() kfunc Puranjay Mohan
2026-09-15 12:01   ` sashiko-bot [this message]
2026-09-15 12:07     ` Puranjay Mohan
2026-09-15 11:42 ` [PATCH bpf-next v2 2/4] selftests/bpf: Add tests for bpf_call_rcu() Puranjay Mohan
2026-09-15 12:12   ` sashiko-bot
2026-09-15 11:42 ` [PATCH bpf-next v2 3/4] bpf: Add bpf_call_rcu_tasks_trace() kfunc Puranjay Mohan
2026-09-15 11:42 ` [PATCH bpf-next v2 4/4] selftests/bpf: Add a test for bpf_call_rcu_tasks_trace() Puranjay Mohan
2026-09-15 12:09 ` [PATCH bpf-next v2 0/4] bpf: Add bpf_call_rcu() and bpf_call_rcu_tasks_trace() 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=20260915120127.099B91F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=puranjay@kernel.org \
    --cc=sashiko-reviews@lists.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.