diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-06 20:15:28 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-06 20:15:28 +0300 |
commit | 2044513ffe4a9c18e6e2a64f048e05d8b62fa927 (patch) | |
tree | 011f45466c3fd87a9efa4f4b57188297e7c24d93 /tools/testing/selftests | |
parent | bbcf9cd1576752ebe8d618ad8c6500b7e262ffac (diff) | |
parent | bdcd93ef9afb42a6051e472fa62c693b1f9edbd8 (diff) | |
download | linux-2044513ffe4a9c18e6e2a64f048e05d8b62fa927.tar.xz |
Merge tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux
Pull arch/csky updates from Guo Ren:
"New features:
- seccomp-filter
- err-injection
- top-down&random mmap-layout
- irq_work
- show_ipi
- context-tracking
Fixes & Optimizations:
- kprobe_on_ftrace
- optimize panic print"
* tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux:
csky: Add context tracking support
csky: Add arch_show_interrupts for IPI interrupts
csky: Add irq_work support
csky: Fixup warning by EXPORT_SYMBOL(kmap)
csky: Set CONFIG_NR_CPU 4 as default
csky: Use top-down mmap layout
csky: Optimize the trap processing flow
csky: Add support for function error injection
csky: Fixup kprobes handler couldn't change pc
csky: Fixup duplicated restore sp in RESTORE_REGS_FTRACE
csky: Add cpu feature register hint for smp
csky: Add SECCOMP_FILTER supported
csky: remove unusued thread_saved_pc and *_segments functions/macros
Diffstat (limited to 'tools/testing/selftests')
-rw-r--r-- | tools/testing/selftests/seccomp/seccomp_bpf.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index 06bd5901be74..535720b2592a 100644 --- a/tools/testing/selftests/seccomp/seccomp_bpf.c +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c @@ -123,6 +123,8 @@ struct seccomp_data { # define __NR_seccomp 277 # elif defined(__riscv) # define __NR_seccomp 277 +# elif defined(__csky__) +# define __NR_seccomp 277 # elif defined(__hppa__) # define __NR_seccomp 338 # elif defined(__powerpc__) @@ -1682,6 +1684,14 @@ TEST_F(TRACE_poke, getpid_runs_normally) # define ARCH_REGS struct user_regs_struct # define SYSCALL_NUM a7 # define SYSCALL_RET a0 +#elif defined(__csky__) +# define ARCH_REGS struct pt_regs +#if defined(__CSKYABIV2__) +# define SYSCALL_NUM regs[3] +#else +# define SYSCALL_NUM regs[9] +#endif +# define SYSCALL_RET a0 #elif defined(__hppa__) # define ARCH_REGS struct user_regs_struct # define SYSCALL_NUM gr[20] @@ -1781,7 +1791,7 @@ void change_syscall(struct __test_metadata *_metadata, #if defined(__x86_64__) || defined(__i386__) || defined(__powerpc__) || \ defined(__s390__) || defined(__hppa__) || defined(__riscv) || \ - defined(__xtensa__) + defined(__xtensa__) || defined(__csky__) { regs.SYSCALL_NUM = syscall; } |