[PATCH bpf-next 5/5] selftests/bpf: Update DENYLIST.riscv64

Pu Lehui pulehui at huaweicloud.com
Tue Sep 29 01:39:24 PDT 2026


From: Pu Lehui <pulehui at huawei.com>

Add probe_user and stacktrace_build_id testcases to DENYLIST.riscv64, as
both tests currently fail 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.

Link: https://lore.kernel.org/linux-riscv/20230702025708.784106-1-guoren@kernel.org [0]
Signed-off-by: Pu Lehui <pulehui at huawei.com>
---
 tools/testing/selftests/bpf/DENYLIST.riscv64 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/bpf/DENYLIST.riscv64 b/tools/testing/selftests/bpf/DENYLIST.riscv64
index ca1beae7fe8f..bce34d0c4f6e 100644
--- a/tools/testing/selftests/bpf/DENYLIST.riscv64
+++ b/tools/testing/selftests/bpf/DENYLIST.riscv64
@@ -1,2 +1,4 @@
 # riscv64 deny list for BPF CI and local vmtest
 exceptions					# JIT does not support exceptions
+probe_user					# kprobe hit in trap
+stacktrace_build_id				# kprobe hit in trap
-- 
2.34.1




More information about the linux-riscv mailing list