From: Wei Li liwei391@huawei.com
hulk inclusion category: feature bugzilla: 186175, https://gitee.com/openeuler/kernel/issues/I4S77Z CVE: NA
-------------------------------------------------
Reserve several syscall entries for kabi compatibility. For arch arm32,ppc32,riscv64,ppc64,arm64,x86_64 currently.
Signed-off-by: Wei Li liwei391@huawei.com Reviewed-by: Cheng Jian cj.chengjian@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- arch/arm/tools/syscall.tbl | 16 +++++++++ arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 33 +++++++++++++++++ arch/powerpc/kernel/syscalls/syscall.tbl | 16 +++++++++ arch/x86/entry/syscalls/syscall_32.tbl | 16 +++++++++ arch/x86/entry/syscalls/syscall_64.tbl | 16 +++++++++ include/uapi/asm-generic/unistd.h | 35 ++++++++++++++++++- tools/include/uapi/asm-generic/unistd.h | 35 ++++++++++++++++++- .../arch/powerpc/entry/syscalls/syscall.tbl | 16 +++++++++ .../arch/x86/entry/syscalls/syscall_64.tbl | 16 +++++++++ 10 files changed, 198 insertions(+), 3 deletions(-)
diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index d056a548358e..7a06fde65e1f 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -454,3 +454,19 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise +441 common kabi_reserved441 sys_ni_syscall +442 common kabi_reserved442 sys_ni_syscall +443 common kabi_reserved443 sys_ni_syscall +444 common kabi_reserved444 sys_ni_syscall +445 common kabi_reserved445 sys_ni_syscall +446 common kabi_reserved446 sys_ni_syscall +447 common kabi_reserved447 sys_ni_syscall +448 common kabi_reserved448 sys_ni_syscall +449 common kabi_reserved449 sys_ni_syscall +450 common kabi_reserved450 sys_ni_syscall +451 common kabi_reserved451 sys_ni_syscall +452 common kabi_reserved452 sys_ni_syscall +453 common kabi_reserved453 sys_ni_syscall +454 common kabi_reserved454 sys_ni_syscall +455 common kabi_reserved455 sys_ni_syscall +456 common kabi_reserved456 sys_ni_syscall diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 8db0b0df3dd4..39ce73c8084d 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -43,7 +43,7 @@ #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
-#define __NR_compat_syscalls 441 +#define __NR_compat_syscalls 457 #endif
#define __ARCH_WANT_SYS_CLONE diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index 107f08e03b9f..6eb1c2c6958f 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h @@ -890,6 +890,39 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) #define __NR_process_madvise 440 __SYSCALL(__NR_process_madvise, sys_process_madvise)
+#define __NR_kabi_reserved441 441 +__SYSCALL(__NR_kabi_reserved441, sys_ni_syscall) +#define __NR_kabi_reserved442 442 +__SYSCALL(__NR_kabi_reserved442, sys_ni_syscall) +#define __NR_kabi_reserved443 443 +__SYSCALL(__NR_kabi_reserved443, sys_ni_syscall) +#define __NR_kabi_reserved444 444 +__SYSCALL(__NR_kabi_reserved444, sys_ni_syscall) +#define __NR_kabi_reserved445 445 +__SYSCALL(__NR_kabi_reserved445, sys_ni_syscall) +#define __NR_kabi_reserved446 446 +__SYSCALL(__NR_kabi_reserved446, sys_ni_syscall) +#define __NR_kabi_reserved447 447 +__SYSCALL(__NR_kabi_reserved447, sys_ni_syscall) +#define __NR_kabi_reserved448 448 +__SYSCALL(__NR_kabi_reserved448, sys_ni_syscall) +#define __NR_kabi_reserved449 449 +__SYSCALL(__NR_kabi_reserved449, sys_ni_syscall) +#define __NR_kabi_reserved450 450 +__SYSCALL(__NR_kabi_reserved450, sys_ni_syscall) +#define __NR_kabi_reserved451 451 +__SYSCALL(__NR_kabi_reserved451, sys_ni_syscall) +#define __NR_kabi_reserved452 452 +__SYSCALL(__NR_kabi_reserved452, sys_ni_syscall) +#define __NR_kabi_reserved453 453 +__SYSCALL(__NR_kabi_reserved453, sys_ni_syscall) +#define __NR_kabi_reserved454 454 +__SYSCALL(__NR_kabi_reserved454, sys_ni_syscall) +#define __NR_kabi_reserved455 455 +__SYSCALL(__NR_kabi_reserved455, sys_ni_syscall) +#define __NR_kabi_reserved456 456 +__SYSCALL(__NR_kabi_reserved456, sys_ni_syscall) + /* * Please add new compat syscalls above this comment and update * __NR_compat_syscalls in asm/unistd.h. diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl index 1275daec7fec..c68c1111c155 100644 --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl @@ -530,3 +530,19 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise +441 common kabi_reserved441 sys_ni_syscall +442 common kabi_reserved442 sys_ni_syscall +443 common kabi_reserved443 sys_ni_syscall +444 common kabi_reserved444 sys_ni_syscall +445 common kabi_reserved445 sys_ni_syscall +446 common kabi_reserved446 sys_ni_syscall +447 common kabi_reserved447 sys_ni_syscall +448 common kabi_reserved448 sys_ni_syscall +449 common kabi_reserved449 sys_ni_syscall +450 common kabi_reserved450 sys_ni_syscall +451 common kabi_reserved451 sys_ni_syscall +452 common kabi_reserved452 sys_ni_syscall +453 common kabi_reserved453 sys_ni_syscall +454 common kabi_reserved454 sys_ni_syscall +455 common kabi_reserved455 sys_ni_syscall +456 common kabi_reserved456 sys_ni_syscall diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index 0d0667a9fbd7..7c7fc88afae8 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -445,3 +445,19 @@ 438 i386 pidfd_getfd sys_pidfd_getfd 439 i386 faccessat2 sys_faccessat2 440 i386 process_madvise sys_process_madvise +441 i386 kabi_reserved441 sys_ni_syscall +442 i386 kabi_reserved442 sys_ni_syscall +443 i386 kabi_reserved443 sys_ni_syscall +444 i386 kabi_reserved444 sys_ni_syscall +445 i386 kabi_reserved445 sys_ni_syscall +446 i386 kabi_reserved446 sys_ni_syscall +447 i386 kabi_reserved447 sys_ni_syscall +448 i386 kabi_reserved448 sys_ni_syscall +449 i386 kabi_reserved449 sys_ni_syscall +450 i386 kabi_reserved450 sys_ni_syscall +451 i386 kabi_reserved451 sys_ni_syscall +452 i386 kabi_reserved452 sys_ni_syscall +453 i386 kabi_reserved453 sys_ni_syscall +454 i386 kabi_reserved454 sys_ni_syscall +455 i386 kabi_reserved455 sys_ni_syscall +456 i386 kabi_reserved456 sys_ni_syscall diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 379819244b91..8f4ad1695d8f 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -362,6 +362,22 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise +441 common kabi_reserved441 sys_ni_syscall +442 common kabi_reserved442 sys_ni_syscall +443 common kabi_reserved443 sys_ni_syscall +444 common kabi_reserved444 sys_ni_syscall +445 common kabi_reserved445 sys_ni_syscall +446 common kabi_reserved446 sys_ni_syscall +447 common kabi_reserved447 sys_ni_syscall +448 common kabi_reserved448 sys_ni_syscall +449 common kabi_reserved449 sys_ni_syscall +450 common kabi_reserved450 sys_ni_syscall +451 common kabi_reserved451 sys_ni_syscall +452 common kabi_reserved452 sys_ni_syscall +453 common kabi_reserved453 sys_ni_syscall +454 common kabi_reserved454 sys_ni_syscall +455 common kabi_reserved455 sys_ni_syscall +456 common kabi_reserved456 sys_ni_syscall
# # Due to a historical design error, certain syscalls are numbered differently diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 2056318988f7..ddd5d28b5b7f 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -860,8 +860,41 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) #define __NR_process_madvise 440 __SYSCALL(__NR_process_madvise, sys_process_madvise)
+#define __NR_kabi_reserved441 441 +__SYSCALL(__NR_kabi_reserved441, sys_ni_syscall) +#define __NR_kabi_reserved442 442 +__SYSCALL(__NR_kabi_reserved442, sys_ni_syscall) +#define __NR_kabi_reserved443 443 +__SYSCALL(__NR_kabi_reserved443, sys_ni_syscall) +#define __NR_kabi_reserved444 444 +__SYSCALL(__NR_kabi_reserved444, sys_ni_syscall) +#define __NR_kabi_reserved445 445 +__SYSCALL(__NR_kabi_reserved445, sys_ni_syscall) +#define __NR_kabi_reserved446 446 +__SYSCALL(__NR_kabi_reserved446, sys_ni_syscall) +#define __NR_kabi_reserved447 447 +__SYSCALL(__NR_kabi_reserved447, sys_ni_syscall) +#define __NR_kabi_reserved448 448 +__SYSCALL(__NR_kabi_reserved448, sys_ni_syscall) +#define __NR_kabi_reserved449 449 +__SYSCALL(__NR_kabi_reserved449, sys_ni_syscall) +#define __NR_kabi_reserved450 450 +__SYSCALL(__NR_kabi_reserved450, sys_ni_syscall) +#define __NR_kabi_reserved451 451 +__SYSCALL(__NR_kabi_reserved451, sys_ni_syscall) +#define __NR_kabi_reserved452 452 +__SYSCALL(__NR_kabi_reserved452, sys_ni_syscall) +#define __NR_kabi_reserved453 453 +__SYSCALL(__NR_kabi_reserved453, sys_ni_syscall) +#define __NR_kabi_reserved454 454 +__SYSCALL(__NR_kabi_reserved454, sys_ni_syscall) +#define __NR_kabi_reserved455 455 +__SYSCALL(__NR_kabi_reserved455, sys_ni_syscall) +#define __NR_kabi_reserved456 456 +__SYSCALL(__NR_kabi_reserved456, sys_ni_syscall) + #undef __NR_syscalls -#define __NR_syscalls 441 +#define __NR_syscalls 457
/* * 32 bit systems traditionally used different diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h index 2056318988f7..ddd5d28b5b7f 100644 --- a/tools/include/uapi/asm-generic/unistd.h +++ b/tools/include/uapi/asm-generic/unistd.h @@ -860,8 +860,41 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) #define __NR_process_madvise 440 __SYSCALL(__NR_process_madvise, sys_process_madvise)
+#define __NR_kabi_reserved441 441 +__SYSCALL(__NR_kabi_reserved441, sys_ni_syscall) +#define __NR_kabi_reserved442 442 +__SYSCALL(__NR_kabi_reserved442, sys_ni_syscall) +#define __NR_kabi_reserved443 443 +__SYSCALL(__NR_kabi_reserved443, sys_ni_syscall) +#define __NR_kabi_reserved444 444 +__SYSCALL(__NR_kabi_reserved444, sys_ni_syscall) +#define __NR_kabi_reserved445 445 +__SYSCALL(__NR_kabi_reserved445, sys_ni_syscall) +#define __NR_kabi_reserved446 446 +__SYSCALL(__NR_kabi_reserved446, sys_ni_syscall) +#define __NR_kabi_reserved447 447 +__SYSCALL(__NR_kabi_reserved447, sys_ni_syscall) +#define __NR_kabi_reserved448 448 +__SYSCALL(__NR_kabi_reserved448, sys_ni_syscall) +#define __NR_kabi_reserved449 449 +__SYSCALL(__NR_kabi_reserved449, sys_ni_syscall) +#define __NR_kabi_reserved450 450 +__SYSCALL(__NR_kabi_reserved450, sys_ni_syscall) +#define __NR_kabi_reserved451 451 +__SYSCALL(__NR_kabi_reserved451, sys_ni_syscall) +#define __NR_kabi_reserved452 452 +__SYSCALL(__NR_kabi_reserved452, sys_ni_syscall) +#define __NR_kabi_reserved453 453 +__SYSCALL(__NR_kabi_reserved453, sys_ni_syscall) +#define __NR_kabi_reserved454 454 +__SYSCALL(__NR_kabi_reserved454, sys_ni_syscall) +#define __NR_kabi_reserved455 455 +__SYSCALL(__NR_kabi_reserved455, sys_ni_syscall) +#define __NR_kabi_reserved456 456 +__SYSCALL(__NR_kabi_reserved456, sys_ni_syscall) + #undef __NR_syscalls -#define __NR_syscalls 441 +#define __NR_syscalls 457
/* * 32 bit systems traditionally used different diff --git a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl b/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl index 1275daec7fec..c68c1111c155 100644 --- a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl @@ -530,3 +530,19 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise +441 common kabi_reserved441 sys_ni_syscall +442 common kabi_reserved442 sys_ni_syscall +443 common kabi_reserved443 sys_ni_syscall +444 common kabi_reserved444 sys_ni_syscall +445 common kabi_reserved445 sys_ni_syscall +446 common kabi_reserved446 sys_ni_syscall +447 common kabi_reserved447 sys_ni_syscall +448 common kabi_reserved448 sys_ni_syscall +449 common kabi_reserved449 sys_ni_syscall +450 common kabi_reserved450 sys_ni_syscall +451 common kabi_reserved451 sys_ni_syscall +452 common kabi_reserved452 sys_ni_syscall +453 common kabi_reserved453 sys_ni_syscall +454 common kabi_reserved454 sys_ni_syscall +455 common kabi_reserved455 sys_ni_syscall +456 common kabi_reserved456 sys_ni_syscall diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl index 379819244b91..8f4ad1695d8f 100644 --- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl @@ -362,6 +362,22 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise +441 common kabi_reserved441 sys_ni_syscall +442 common kabi_reserved442 sys_ni_syscall +443 common kabi_reserved443 sys_ni_syscall +444 common kabi_reserved444 sys_ni_syscall +445 common kabi_reserved445 sys_ni_syscall +446 common kabi_reserved446 sys_ni_syscall +447 common kabi_reserved447 sys_ni_syscall +448 common kabi_reserved448 sys_ni_syscall +449 common kabi_reserved449 sys_ni_syscall +450 common kabi_reserved450 sys_ni_syscall +451 common kabi_reserved451 sys_ni_syscall +452 common kabi_reserved452 sys_ni_syscall +453 common kabi_reserved453 sys_ni_syscall +454 common kabi_reserved454 sys_ni_syscall +455 common kabi_reserved455 sys_ni_syscall +456 common kabi_reserved456 sys_ni_syscall
# # Due to a historical design error, certain syscalls are numbered differently