From: WANG Xuerui Date: Tue, 20 Aug 2024 04:16:55 +0000 (+0800) Subject: [PATCH] arch: adapt arch-syscall-validate to Linux 6.11 X-Git-Tag: archive/raspbian/2.5.5-2+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1629cd56a6a933e3a437e697a6e79d81c5c8e0c5;p=libseccomp.git [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 Signed-off-by: Paul Moore Gbp-Pq: Name arch_adapt_arch-syscall-validate_to_Linux_6.11.patch --- diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate index d9ee6f9..8c4d632 100755 --- a/src/arch-syscall-validate +++ b/src/arch-syscall-validate @@ -286,6 +286,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/;' @@ -331,6 +338,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/;' @@ -522,6 +534,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/;'