diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-16 03:50:32 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-16 03:50:32 +0200 |
commit | 5bbec3cfe376ed0014d9456a9be11d5ed75d587b (patch) | |
tree | 6f08b9135f85ca501bc5f22d75135b23ddf616e8 /tools/testing | |
parent | Merge tag 'perf-tools-2020-08-14' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
parent | sh: landisk: Add missing initialization of sh_io_port_base (diff) | |
download | linux-5bbec3cfe376ed0014d9456a9be11d5ed75d587b.tar.xz linux-5bbec3cfe376ed0014d9456a9be11d5ed75d587b.zip |
Merge tag 'sh-for-5.9' of git://git.libc.org/linux-sh
Pull arch/sh updates from Rich Felker:
"Cleanup, SECCOMP_FILTER support, message printing fixes, and other
changes to arch/sh"
* tag 'sh-for-5.9' of git://git.libc.org/linux-sh: (34 commits)
sh: landisk: Add missing initialization of sh_io_port_base
sh: bring syscall_set_return_value in line with other architectures
sh: Add SECCOMP_FILTER
sh: Rearrange blocks in entry-common.S
sh: switch to copy_thread_tls()
sh: use the generic dma coherent remap allocator
sh: don't allow non-coherent DMA for NOMMU
dma-mapping: consolidate the NO_DMA definition in kernel/dma/Kconfig
sh: unexport register_trapped_io and match_trapped_io_handler
sh: don't include <asm/io_trapped.h> in <asm/io.h>
sh: move the ioremap implementation out of line
sh: move ioremap_fixed details out of <asm/io.h>
sh: remove __KERNEL__ ifdefs from non-UAPI headers
sh: sort the selects for SUPERH alphabetically
sh: remove -Werror from Makefiles
sh: Replace HTTP links with HTTPS ones
arch/sh/configs: remove obsolete CONFIG_SOC_CAMERA*
sh: stacktrace: Remove stacktrace_ops.stack()
sh: machvec: Modernize printing of kernel messages
sh: pci: Modernize printing of kernel messages
...
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/seccomp/seccomp_bpf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index 535720b2592a..7a6d40286a42 100644 --- a/tools/testing/selftests/seccomp/seccomp_bpf.c +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c @@ -133,6 +133,8 @@ struct seccomp_data { # define __NR_seccomp 348 # elif defined(__xtensa__) # define __NR_seccomp 337 +# elif defined(__sh__) +# define __NR_seccomp 372 # else # warning "seccomp syscall number unknown for this architecture" # define __NR_seccomp 0xffff @@ -1719,6 +1721,10 @@ TEST_F(TRACE_poke, getpid_runs_normally) * a2 of the current window which is not fixed. */ #define SYSCALL_RET(reg) a[(reg).windowbase * 4 + 2] +#elif defined(__sh__) +# define ARCH_REGS struct pt_regs +# define SYSCALL_NUM gpr[3] +# define SYSCALL_RET gpr[0] #else # error "Do not know how to find your architecture's registers and syscalls" #endif @@ -1791,7 +1797,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(__csky__) + defined(__xtensa__) || defined(__csky__) || defined(__sh__) { regs.SYSCALL_NUM = syscall; } |