diff options
author | Liu Cunyuan <liucunyuan.lcy@linux.alibaba.com> | 2022-10-12 20:23:41 +0800 |
---|---|---|
committer | Mao Han <han_mao@linux.alibaba.com> | 2022-10-12 20:23:41 +0800 |
commit | 96d0f860cc4493913e4669902765d7065bd437a7 (patch) | |
tree | 39ed079e02026e8e0ed057ddd0771fd8f09ae46e | |
parent | f326d3b41267781072bb4f00a7ee9a30ac317787 (diff) | |
download | seccomp-tests-96d0f860cc4493913e4669902765d7065bd437a7.tar.gz |
Add seccomp test support for risc64
Signed-off-by: Liu Cunyuan <liucunyuan.lcy@linux.alibaba.com>
Signed-off-by: haocheng.zy <haocheng.zy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I189664b40b5ff65c985ac6890534a99a79a41e41
-rw-r--r-- | linux/seccomp_bpf.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 |