From: sashiko-bot@kernel.org
To: "Ricardo B. Marlière (SUSE)" <ricardo@marliere.net>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH 7.1.y v2] selftests/bpf: Add tests for sleepable tracepoint programs
Date: Fri, 07 Aug 2026 13:07:20 +0000 [thread overview]
Message-ID: <20260807130721.8DFE51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260807-selftests-bpf-sleepable-v2-1-f7e6566f36a1@marliere.net>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Critical] Test codifies a critical kernel crash bug due to incomplete backport of sleepable tracepoint support
--
--- Patch [1]: [PATCH 7.1.y v2] selftests/bpf: Add tests for sleepable tracepoint programs ---
commit d01560ee1bdaeec333977b1890fc06598668aa9f
Author: Mykyta Yatsenko <yatsenko@meta.com>
selftests/bpf: Add tests for sleepable tracepoint programs
Cover all three sleepable tracepoint types (tp_btf.s, raw_tp.s, tp.s)
and sys_exit (via bpf_task_pt_regs) with functional tests using
bpf_copy_from_user() on getcwd.
Link: https://lore.kernel.org/bpf/20260422-sleepable_tracepoints-v13-6-99005dff21ef@meta.com
> diff --git a/tools/testing/selftests/bpf/verifier/sleepable.c b/tools/testing/selftests/bpf/verifier/sleepable.c
> index c2b7f5ebf168c..6dabc55229455 100644
> --- a/tools/testing/selftests/bpf/verifier/sleepable.c
> +++ b/tools/testing/selftests/bpf/verifier/sleepable.c
> @@ -76,7 +76,20 @@
> .runs = -1,
> },
> {
> - "sleepable raw tracepoint reject",
> + "sleepable raw tracepoint accept",
> + .insns = {
> + BPF_MOV64_IMM(BPF_REG_0, 0),
> + BPF_EXIT_INSN(),
> + },
> + .prog_type = BPF_PROG_TYPE_TRACING,
> + .expected_attach_type = BPF_TRACE_RAW_TP,
> + .kfunc = "sys_enter",
> + .result = ACCEPT,
> + .flags = BPF_F_SLEEPABLE,
> + .runs = -1,
> +},
[Severity: Critical]
This is a pre-existing issue, but does this test codify a kernel crash bug
in the baseline tree?
The commit message notes that kernel-side sleepable tracepoint runtime support
was not backported here. Because of an earlier backport, the verifier
currently accepts sleepable raw tracepoints if tracepoint_is_faultable() is
true (like sys_enter), which makes this verifier test pass.
However, without the runtime support, the execution happens unconditionally
under atomic contexts. For example, in __bpf_trace_run():
kernel/trace/bpf_trace.c:__bpf_trace_run() {
...
rcu_read_lock_dont_migrate();
...
}
Or via the tracepoint wrapper:
include/trace/bpf_probe.h:__BPF_DECLARE_TRACE_SYSCALL() {
...
preempt_disable_notrace();
...
}
If a sleepable program is attached to this tracepoint and actually sleeps, it
will trigger a scheduling while atomic panic.
Should this test be removed or adjusted until the runtime support is fully
backported to prevent asserting this unsafe verifier state?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-selftests-bpf-sleepable-v2-1-f7e6566f36a1@marliere.net?part=1
next prev parent reply other threads:[~2026-08-07 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 12:32 [PATCH 7.1.y v2] selftests/bpf: Add tests for sleepable tracepoint programs Ricardo B. Marlière (SUSE)
2026-08-07 13:07 ` sashiko-bot [this message]
2026-08-07 13:50 ` Greg KH
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=20260807130721.8DFE51F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=ricardo@marliere.net \
--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