[PATCH bpf-next v3 4/4] selftests/bpf: Update DENYLIST.riscv64
From: Pu Lehui
Date: Wed Sep 30 2026 - 04:35:52 EST
From: Pu Lehui <pulehui@xxxxxxxxxx>
Both probe_user and stacktrace_build_id fail on riscv64 due to riscv64's
trap-based kprobe handling.
For probe_user, kprobes on riscv64 are handled via traps where the entry
path invokes irqentry_nmi_enter(). Because bpf_probe_write_user()
rejects execution in NMI context, the test fails. Upstream discussions
regarding NMI semantics on riscv are ongoing [0] and will be tracked.
For stacktrace_build_id, under the kprobe trap context with interrupts
disabled, bpf_get_stackid() obtains a valid build_id, but the queued
irq_work is deferred. As a result, subsequent bpf_get_stack() fails to
acquire mmap_read_trylock() and falls back to BPF_STACK_BUILD_ID_IP,
causing an inconsistency between the two results.
Since stacktrace_build_id is already included in the generic DENYLIST,
only add probe_user to DENYLIST.riscv64.
Link: https://lore.kernel.org/linux-riscv/20230702025708.784106-1-guoren@xxxxxxxxxx [0]
Signed-off-by: Pu Lehui <pulehui@xxxxxxxxxx>
---
tools/testing/selftests/bpf/DENYLIST.riscv64 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/DENYLIST.riscv64 b/tools/testing/selftests/bpf/DENYLIST.riscv64
index ca1beae7fe8f..75a9690fb2f2 100644
--- a/tools/testing/selftests/bpf/DENYLIST.riscv64
+++ b/tools/testing/selftests/bpf/DENYLIST.riscv64
@@ -1,2 +1,3 @@
# riscv64 deny list for BPF CI and local vmtest
exceptions # JIT does not support exceptions
+probe_user # kprobe hit in trap
--
2.34.1