From 96d0f860cc4493913e4669902765d7065bd437a7 Mon Sep 17 00:00:00 2001 From: Liu Cunyuan Date: Wed, 12 Oct 2022 20:23:41 +0800 Subject: Add seccomp test support for risc64 Signed-off-by: Liu Cunyuan Signed-off-by: haocheng.zy Signed-off-by: Mao Han Change-Id: I189664b40b5ff65c985ac6890534a99a79a41e41 --- linux/seccomp_bpf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/seccomp_bpf.c b/linux/seccomp_bpf.c index 949ac25..ad7d7ce 100644 --- a/linux/seccomp_bpf.c +++ b/linux/seccomp_bpf.c @@ -1242,6 +1242,10 @@ TEST_F(TRACE_poke, getpid_runs_normally) # define ARCH_REGS s390_regs # define SYSCALL_NUM gprs[2] # define SYSCALL_RET gprs[2] +#elif defined(__riscv) +# define ARCH_REGS struct user_regs_struct +# define SYSCALL_NUM a7 +# define SYSCALL_RET a0 #else # error "Do not know how to find your architecture's registers and syscalls" #endif -- cgit v1.2.3