[PATCH bpf-next v1 0/5] selftests/bpf: Enable private stack, large stack and arena tests for LoongArch

From: George Guo

Date: Thu Nov 26 2026 - 00:54:09 EST


From: George Guo <guodongtai@xxxxxxxxxx>

This series enables the BPF selftests for the new LoongArch JIT
features, and fixes a libarena build failure with clang 19.

Patch 1 fixes the build of the libarena buddy allocator selftests with
clang 19, which refuses the signed remainder in test_buddy_alloc_free().

Patches 2-5 enable the following tests for LoongArch:

- the 2 KiB private stack test in verifier_large_stack
- the struct_ops private stack tests
- the arena LDSX tests in verifier_ldsx
- the arena load-acquire and store-release tests in arena_atomics, and
the libarena spmc and bitmap parallel tests

The LoongArch JIT support for these features is in the following series,
which goes through the LoongArch tree:

LoongArch: BPF: Add private stack, exceptions, large stack and arena support
https://lore.kernel.org/loongarch/20261126034048.7370-1-dongtai.guo@xxxxxxxxx/T/#u

These patches were part of v2 of the LoongArch BPF series:
https://lore.kernel.org/loongarch/20260702022322.51033-1-dongtai.guo@xxxxxxxxx/

Since then:
- Split the selftests patches out of the LoongArch series and rebase
them onto bpf-next.
- New patch 1: use an unsigned loop counter in test_buddy_alloc_free.
- New patch 2: enable the 2 KiB private stack test.
- Patch 5: also enable the libarena spmc test, which has the same
guard as arena_atomics (Sashiko), and the libarena bitmap test,
which needs cmpxchg on arena too.
- Drop "selftests/bpf: Add LoongArch deny list" (Tiezhu).
- Reword the subjects and commit messages.

George Guo (5):
selftests/bpf: Use unsigned loop counter in test_buddy_alloc_free
selftests/bpf: Enable 2 KiB private stack test for LoongArch
selftests/bpf: Enable struct_ops private stack tests for LoongArch
selftests/bpf: Enable arena LDSX tests for LoongArch
selftests/bpf: Enable arena atomics tests for LoongArch

.../bpf/libarena/selftests/test_buddy.bpf.c | 3 ++-
.../selftests/test_parallel_bitmap.bpf.c | 1 +
.../libarena/selftests/test_parallel_spmc.bpf.c | 1 +
.../bpf/prog_tests/struct_ops_private_stack.c | 3 ++-
.../testing/selftests/bpf/progs/arena_atomics.c | 3 +++
.../selftests/bpf/progs/verifier_large_stack.c | 1 +
.../testing/selftests/bpf/progs/verifier_ldsx.c | 17 +++++++++++++++++
7 files changed, 27 insertions(+), 2 deletions(-)


base-commit: 486b5ce7184f7449ef2fe1e951455b0b8a114060
--
2.53.0