From: sashiko-bot@kernel.org
To: "Pu Lehui" <pulehui@huaweicloud.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: Add testcases for callback with tailcall
Date: Sat, 11 Jul 2026 10:54:01 +0000 [thread overview]
Message-ID: <20260711105401.84DF81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260711104727.4023420-3-pulehui@huaweicloud.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The test `tailcall_direct_callback` intentionally expects a verifier bug message (`"callback unexpected regs 1"`), which triggers a kernel `WARN_ONCE`.
--
--- Patch [2]: [PATCH bpf-next 2/2] selftests/bpf: Add testcases for callback with tailcall ---
commit 037342732803eb60c98636ac87d004705531bc5d
Author: Pu Lehui <pulehui@huawei.com>
selftests/bpf: Add testcases for callback with tailcall
This patch adds three testcases for BPF callbacks interacting with tail calls.
It tests scenarios where a callback directly invokes a tail call, or where
subprograms invoked by the callback issue the tail call.
> diff --git a/tools/testing/selftests/bpf/progs/tailcall_callback.c b/tools/testing/selftests/bpf/progs/tailcall_callback.c
> new file mode 100644
> index 0000000000000..504d8e7a69969
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/tailcall_callback.c
[ ... ]
> +/* callback involving tail call directly is rejected */
> +SEC("tc")
> +__failure __msg("callback unexpected regs 1")
> +int tailcall_direct_callback(struct __sk_buff *skb)
> +{
[Severity: High]
Does expecting this specific failure message codify a kernel warning as a
passing testcase?
The message "callback unexpected regs 1" is emitted by verifier_bug() in
kernel/bpf/backtrack.c during precision backtracking, which intentionally
triggers a kernel WARN_ONCE. On systems configured with panic_on_warn=1,
such as syzbot or standard CI environments, wouldn't loading this test cause
a kernel panic?
If the verifier hits an internal state corruption (tracking r0 back into a
faked exit) and triggers verifier_bug() before it can gracefully reject the
program, does this indicate that the underlying issue with callbacks and tail
calls isn't fully fixed by the series?
> + clobber_regs_stack();
> +
> + bpf_loop(1, callback_loop_1, &skb, 0);
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260711104727.4023420-1-pulehui@huaweicloud.com?part=2
prev parent reply other threads:[~2026-07-11 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 10:47 [PATCH bpf-next 0/2] Reject callback subprogs invoke tailcall Pu Lehui
2026-07-11 10:47 ` [PATCH bpf-next 1/2] bpf: " Pu Lehui
2026-07-11 10:57 ` sashiko-bot
2026-07-11 11:33 ` bot+bpf-ci
2026-07-11 10:47 ` [PATCH bpf-next 2/2] selftests/bpf: Add testcases for callback with tailcall Pu Lehui
2026-07-11 10:54 ` sashiko-bot [this message]
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=20260711105401.84DF81F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=pulehui@huaweicloud.com \
--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