diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h index 867fab40aa5d..654867c6c032 100644 --- a/arch/arm/include/uapi/asm/unistd.h +++ b/arch/arm/include/uapi/asm/unistd.h @@ -38,10 +38,4 @@ #endif /* _UAPI__ASM_ARM_UNISTD_H */ -/* RSBAC - we use 223, the old sys_security */ -#ifdef CONFIG_RSBAC -#define __NR_rsbac (__NR_SYSCALL_BASE+223) -#else - /* 223 is unused */ -#endif diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index 0bb0e9c6376c..0fcb5819467b 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -238,6 +238,7 @@ 221 common fcntl64 sys_fcntl64 sys_oabi_fcntl64 # 222 for tux # 223 is unused +223 common rsbac sys_rsbac 224 common gettid sys_gettid 225 common readahead sys_readahead sys_oabi_readahead 226 common setxattr sys_setxattr diff --git a/arch/arm/tools/syscallhdr.sh b/arch/arm/tools/syscallhdr.sh index 72d4b2e3bdec..061a8f6471ae 100644 --- a/arch/arm/tools/syscallhdr.sh +++ b/arch/arm/tools/syscallhdr.sh @@ -18,6 +18,14 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( echo "" while read nr abi name entry ; do + # -z string; True if the length of string is zero + if [ -z "$CONFIG_RSBAC" ]; then + # exclude rsbac syscall + if [ "$name" = "rsbac" ]; then + continue + fi + fi + if [ -z "$offset" ]; then echo "#define __NR_${prefix}${name} $nr" else diff --git a/arch/arm/tools/syscallnr.sh b/arch/arm/tools/syscallnr.sh index d2971296469a..46a692a8e742 100644 --- a/arch/arm/tools/syscallnr.sh +++ b/arch/arm/tools/syscallnr.sh @@ -24,6 +24,15 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | tail -n1 | ( align=$(( $align * 4 )) done nr=$(( ($nr + $align - 1) & ~($align - 1) )) + + # -z string; True if the length of string is zero + if [ -z "$CONFIG_RSBAC" ]; then + # exclude rsbac syscall + if [ "$name" = "rsbac" ]; then + continue + fi + fi + echo "/* aligned to $align */" echo "#define __NR_syscalls $nr" done diff --git a/arch/arm/tools/syscalltbl.sh b/arch/arm/tools/syscalltbl.sh index 5ca834545ed3..6ffa9e945b9a 100644 --- a/arch/arm/tools/syscalltbl.sh +++ b/arch/arm/tools/syscalltbl.sh @@ -10,6 +10,14 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( exit 1 fi + # -z string; True if the length of string is zero + if [ -z "$CONFIG_RSBAC" ]; then + # exclude rsbac syscall + if [ "$name" = "rsbac" ]; then + continue + fi + fi + if [ -n "$entry" ]; then if [ -z "$compat" ]; then echo "NATIVE($nr, $entry)"