Skip to content

Commit 26e2b31

Browse files
xen0npcmoore
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent cfce7b0 commit 26e2b31

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/arch-syscall-validate

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,13 @@ function dump_lib_arm() {
287287
# Dump the architecture's syscall table to stdout.
288288
#
289289
function dump_sys_aarch64() {
290+
local syscall_tbl_file="$1/arch/arm64/tools/syscall_64.tbl"
291+
if [[ -e $syscall_tbl_file ]]; then
292+
dump_from_syscall_tbl "$syscall_tbl_file" \
293+
64 renameat rlimit memfd_secret
294+
return
295+
fi
296+
290297
local sed_filter=""
291298

292299
sed_filter+='s/__NR3264_statfs/43/;'
@@ -332,6 +339,11 @@ function dump_lib_aarch64() {
332339
# Dump the architecture's syscall table to stdout.
333340
#
334341
function dump_sys_loongarch64() {
342+
if [[ -e $1/arch/loongarch/kernel/Makefile.syscalls ]]; then
343+
dump_from_syscall_tbl "$1/scripts/syscall.tbl" 64
344+
return
345+
fi
346+
335347
local sed_filter=""
336348

337349
sed_filter+='s/__NR3264_fadvise64/223/;'
@@ -543,6 +555,12 @@ function dump_lib_ppc64() {
543555
# Dump the architecture's syscall table to stdout.
544556
#
545557
function dump_sys_riscv64() {
558+
if [[ -e $1/arch/riscv/kernel/Makefile.syscalls ]]; then
559+
dump_from_syscall_tbl "$1/scripts/syscall.tbl" \
560+
64 riscv rlimit memfd_secret
561+
return
562+
fi
563+
546564
local sed_filter=""
547565

548566
sed_filter+='s/__NR3264_fadvise64/223/;'

0 commit comments

Comments
 (0)