diff options
author | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2020-08-17 13:12:14 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2021-03-08 19:55:32 -0500 |
commit | c12945db0b7e32f409ba3a68d18c6d6f6dd22b19 (patch) | |
tree | d87fc7447552cc09a1fe385a2a27a604c7717419 /src/arch-syscall-validate | |
parent | 83d7b022fa7ef8c24516cc668efc879e5398403f (diff) | |
download | libseccomp-c12945db0b7e32f409ba3a68d18c6d6f6dd22b19.tar.gz |
arch: Add SuperH 32-bit support
Initial support for seccomp for SuperH in Linux was added in 2.6.27-rc2,
support for SECCOMP_FILTER was added for Linux 5.9. This adds support
for SuperH in libseccomp, both for little-endian and big-endian mode.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'src/arch-syscall-validate')
-rwxr-xr-x | src/arch-syscall-validate | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate index 3b69e9b..68bebef 100755 --- a/src/arch-syscall-validate +++ b/src/arch-syscall-validate @@ -568,6 +568,31 @@ function dump_lib_s390x() { } # +# Dump the sh system syscall table +# +# Arguments: +# 1 path to the kernel source +# +# Dump the architecture's syscall table to stdout. +# +function dump_sys_sh() { + cat $1/arch/sh/kernel/syscalls/syscall.tbl | \ + grep -v "^#" | \ + sed -n "/[0-9]\+[ \t]\+\(common\)/p" | \ + awk '{ print $3","$1 }' | \ + sort +} + +# +# Dump the sh library syscall table +# +# Dump the library's syscall table to stdout. +# +function dump_lib_sh() { + dump_lib_arch sh | mangle_lib_syscall sh +} + +# # Dump the system syscall table # # Arguments: @@ -623,6 +648,9 @@ function dump_sys() { s390x) dump_sys_s390x "$2" ;; + sh) + dump_sys_sh "$2" + ;; *) echo "" return 1 @@ -687,6 +715,9 @@ function dump_lib() { s390x) dump_lib_s390x ;; + sh) + dump_lib_sh + ;; *) echo "" return 1 @@ -722,6 +753,7 @@ function gen_csv() { abi_list+=" ppc ppc64" abi_list+=" riscv64" abi_list+=" s390 s390x" + abi_list+=" sh" # get the full syscall list for abi in $abi_list; do @@ -809,7 +841,8 @@ if [[ $opt_arches == "" ]]; then mips mips64 mips64n32 \ parisc parisc64 \ ppc ppc64 \ - s390 s390x" + s390 s390x \ + sh" fi # sanity checks |