From: sashiko-bot@kernel.org
To: "Puranjay Mohan" <puranjay@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 2/4] selftests/bpf: Add tests for bpf_call_rcu()
Date: Mon, 21 Sep 2026 19:25:38 +0000 [thread overview]
Message-ID: <20260921192538.EEE4F1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260921191407.1742386-3-puranjay@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] bpf: selftest sleepable_callback fails to properly test callback restriction
--
commit 8dcd9155da335ebebbf25f7c26266814bb232e74
Author: Puranjay Mohan <puranjay@kernel.org>
selftests/bpf: Add tests for bpf_call_rcu()
This commit adds selftests to cover bpf_call_rcu() functionality, checking
grace periods, callback re-arming, teardown handling, and negative tests
including verifier rejection of a sleepable callback.
> diff --git a/tools/testing/selftests/bpf/progs/call_rcu_fail.c b/tools/testing/selftests/bpf/progs/call_rcu_fail.c
> new file mode 100644
> index 0000000000000..bf60a27731fb3
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/call_rcu_fail.c
[ ... ]
> +SEC("syscall")
> +__failure __msg("sleepable helper bpf_copy_from_user") __msg("in non-sleepable prog")
> +int sleepable_callback(void *ctx)
> +{
[Severity: Medium]
Does SEC("syscall") cause this test to pass for the wrong reason?
Since the main program is marked as non-sleepable, the verifier will reject
the sleepable helper regardless of the callback context. Should this be
changed to SEC("syscall.s") so the main program is sleepable, which would
properly force the verifier to reject the helper purely because it is inside
the non-sleepable callback context?
> + struct elem *e;
> +
> + e = bpf_map_lookup_elem(&arr, &key);
> + if (!e)
> + return 0;
> + bpf_call_rcu(&e->rh, &arr, sleepable_reclaim);
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260921191407.1742386-1-puranjay@kernel.org?part=2
next prev parent reply other threads:[~2026-09-21 19:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 19:14 [PATCH bpf-next v5 0/4] bpf: Add bpf_call_rcu() and bpf_call_rcu_tasks_trace() Puranjay Mohan
2026-09-21 19:14 ` [PATCH bpf-next v5 1/4] bpf: Add bpf_call_rcu() kfunc Puranjay Mohan
2026-09-21 19:39 ` sashiko-bot
2026-09-21 20:33 ` bot+bpf-ci
2026-09-22 1:53 ` Alexei Starovoitov
2026-09-22 14:17 ` Puranjay Mohan
2026-09-22 18:35 ` Alexei Starovoitov
2026-09-22 19:09 ` Puranjay Mohan
2026-09-22 23:55 ` Paul E. McKenney
2026-09-21 19:14 ` [PATCH bpf-next v5 2/4] selftests/bpf: Add tests for bpf_call_rcu() Puranjay Mohan
2026-09-21 19:25 ` sashiko-bot [this message]
2026-09-21 19:14 ` [PATCH bpf-next v5 3/4] bpf: Add bpf_call_rcu_tasks_trace() kfunc Puranjay Mohan
2026-09-21 19:52 ` sashiko-bot
2026-09-21 20:18 ` bot+bpf-ci
2026-09-21 20:21 ` Puranjay Mohan
2026-09-21 19:14 ` [PATCH bpf-next v5 4/4] selftests/bpf: Add a test for 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=20260921192538.EEE4F1F00893@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox