Skip to content

selftests/bpf: Enable private stack, large stack and arena tests for LoongArch

George Guo bpf lkml loongarch 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5selftests/bpf: Use unsigned loop counter in test_buddy_alloc_freetools/testing/selftests/bpf/libarena/selftests/test_buddy.bpf.c+2 -10 replies
2/5selftests/bpf: Enable 2 KiB private stack test for LoongArchtools/testing/selftests/bpf/progs/verifier_large_stack.c+1 -00 replies
3/5selftests/bpf: Enable struct_ops private stack tests for LoongArchtools/testing/selftests/bpf/prog_tests/struct_ops_private_stack.c+2 -10 replies
4/5selftests/bpf: Enable arena LDSX tests for LoongArchtools/testing/selftests/bpf/progs/verifier_ldsx.c+17 -00 replies
5/5selftests/bpf: Enable arena atomics tests for LoongArchtools/testing/selftests/bpf/libarena/selftests/test_parallel_bitmap.bpf.c tools/testing/selftests/bpf/libarena/selftests/test_parallel_spmc.bpf.c tools/testing/selftests/bpf/progs/arena_atomics.c+5 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

From: George Guo <[email protected]>

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/[email protected]/T/#u

These patches were part of v2 of the LoongArch BPF series:
https://lore.kernel.org/loongarch/[email protected]/

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

Signature · 1 line
2.53.0