Skip to content

Commit

Permalink
arch: adapt arch-syscall-validate to Linux 6.11
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
xen0n committed Aug 20, 2024
1 parent af3e1c9 commit 0b1dfe0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/arch-syscall-validate
Original file line number Diff line number Diff line change
Expand Up @@ -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/;'
Expand Down Expand Up @@ -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/;'
Expand Down Expand Up @@ -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/;'
Expand Down

0 comments on commit 0b1dfe0

Please sign in to comment.