From: sashiko-bot@kernel.org
To: "Mike Bazov" <mikeba@sentinelone.com>, bpf@vger.kernel.org
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 4/5] selftests/bpf: Add trampoline and raw_tp preemption recursion test
Date: Wed, 11 Nov 2026 20:08:11 +0000 [thread overview]
Message-ID: <sashiko-outbox-209608@kernel.org> (raw)
In-Reply-To: <20261111-bpf-preempt-v2-r2-v2-4-9d8f6b952ad2@sentinelone.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] selftests/bpf: raw #pragma unroll in fill_stack() breaks
bpf-gcc build
--
commit 85924bc5107b6604b6bb8852a70f1660aa030b1c
Author: Mike Bazov <mikeba@sentinelone.com>
selftests/bpf: Add trampoline and raw_tp preemption recursion test
This commit adds BPF selftests verifying preemption, private-stack
isolation, and recursion rejection across trampoline and raw tracepoint
program types.
> diff --git a/tools/testing/selftests/bpf/progs/trampoline_preempt.c b/tools/testing/selftests/bpf/progs/trampoline_preempt.c
> new file mode 100644
> index 0000000000000..78ed74627a79d
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/trampoline_preempt.c
> @@ -0,0 +1,265 @@
[ ... ]
> +static __always_inline void fill_stack(__u64 *buf, __u32 tid)
> +{
> + #pragma unroll
> + for (int i = 0; i < 8; i++)
> + buf[i] = ((__u64)tid << 32) | (0x5a5a0000U + i);
> +}
> +
> +static __always_inline void check_stack(const __u64 *buf, __u32 tid)
> +{
> + #pragma unroll
> + for (int i = 0; i < 8; i++) {
> + if (buf[i] != (((__u64)tid << 32) | (0x5a5a0000U + i)))
> + stack_corrupt = 1;
> + }
> +}
[Severity: Medium]
Does raw #pragma unroll in fill_stack() and check_stack() break the
test_progs-bpf_gcc build with -Werror=unknown-pragmas? Including
bpf_compiler.h and using __pragma_loop_unroll (or
__pragma_loop_unroll_full), as introduced in 52dbd67dff5d ("bpf: Abstract
loop unrolling pragmas in BPF selftests"), avoids the bpf-gcc build
failure.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-bpf-preempt-v2-r2-v2-0-9d8f6b952ad2@sentinelone.com?part=4
next prev parent reply other threads:[~2026-11-11 20:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 19:39 [PATCH bpf-next v2 0/5] bpf: Check recursion per task for preemptible programs Mike Bazov via B4 Relay
2026-11-11 19:39 ` Mike Bazov
2026-11-11 19:39 ` [PATCH bpf-next v2 1/5] bpf: Avoid per-CPU private stack in preemptible tracing progs Mike Bazov via B4 Relay
2026-11-11 19:39 ` Mike Bazov
2026-11-11 20:10 ` sashiko-bot
2026-11-11 21:07 ` bot+bpf-ci
2026-11-11 19:39 ` [PATCH bpf-next v2 2/5] bpf: Check program recursion per task via bpf_ctx Mike Bazov via B4 Relay
2026-11-11 19:39 ` Mike Bazov
2026-11-12 1:04 ` Alexei Starovoitov
2026-11-12 19:30 ` [EXT.MSG] " Mike Bazov
2026-11-11 19:39 ` [PATCH bpf-next v2 3/5] bpf: Check recursion per task for programs on syscall tracepoints Mike Bazov via B4 Relay
2026-11-11 19:39 ` Mike Bazov
2026-11-11 19:39 ` [PATCH bpf-next v2 4/5] selftests/bpf: Add trampoline and raw_tp preemption recursion test Mike Bazov via B4 Relay
2026-11-11 19:39 ` Mike Bazov
2026-11-11 20:08 ` sashiko-bot [this message]
2026-11-11 19:39 ` [PATCH bpf-next v2 5/5] selftests/bpf: Test syscall tracepoint programs under preemption Mike Bazov via B4 Relay
2026-11-11 19:39 ` Mike Bazov
2026-11-12 1:18 ` [PATCH bpf-next v2 0/5] bpf: Check recursion per task for preemptible programs Alexei Starovoitov
2026-11-12 19:24 ` [EXT.MSG] " Mike Bazov
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=sashiko-outbox-209608@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mikeba@sentinelone.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 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.