From 0b1dfe04f437e055d29aa6af822b6bb282af1dea Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Tue, 20 Aug 2024 12:16:55 +0800 Subject: [PATCH] arch: adapt arch-syscall-validate to Linux 6.11 The aarch64, loongarch64 and riscv64 architectures have their syscall table sources changed to scripts/syscall.tbl, from the original inclusion of asm-generic/unistd.h. Make the script recognize the new format for these architectures. Signed-off-by: WANG Xuerui --- src/arch-syscall-validate | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate index b9808e8d..92229cd5 100755 --- a/src/arch-syscall-validate +++ b/src/arch-syscall-validate @@ -287,6 +287,13 @@ function dump_lib_arm() { # Dump the architecture's syscall table to stdout. # function dump_sys_aarch64() { + local syscall_tbl_file="$1/arch/arm64/tools/syscall_64.tbl" + if [[ -e $syscall_tbl_file ]]; then + dump_from_syscall_tbl "$syscall_tbl_file" \ + 64 renameat rlimit memfd_secret + return + fi + local sed_filter="" sed_filter+='s/__NR3264_statfs/43/;' @@ -332,6 +339,11 @@ function dump_lib_aarch64() { # Dump the architecture's syscall table to stdout. # function dump_sys_loongarch64() { + if [[ -e $1/arch/loongarch/kernel/Makefile.syscalls ]]; then + dump_from_syscall_tbl "$1/scripts/syscall.tbl" 64 + return + fi + local sed_filter="" sed_filter+='s/__NR3264_fadvise64/223/;' @@ -543,6 +555,12 @@ function dump_lib_ppc64() { # Dump the architecture's syscall table to stdout. # function dump_sys_riscv64() { + if [[ -e $1/arch/riscv/kernel/Makefile.syscalls ]]; then + dump_from_syscall_tbl "$1/scripts/syscall.tbl" \ + 64 riscv rlimit memfd_secret + return + fi + local sed_filter="" sed_filter+='s/__NR3264_fadvise64/223/;'