From: Dmitry V. Levin Date: Wed, 26 Jun 2019 08:00:39 +0000 (+0000) Subject: Introduce linux/syscallent-common.h and linux/syscallent-common-32.h X-Git-Tag: v5.2~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d01529942acbfa1fc9a8a88578abddb353e2938;p=strace Introduce linux/syscallent-common.h and linux/syscallent-common-32.h These files are going to be used to define syscall entries for common syscalls added in Linux kernel 5.1+. * linux/syscallent-common.h: New file. * linux/syscallent-common-32.h: Likewise. * Makefile.am (EXTRA_DIST): Add them. (syscallent_names): Add syscallent-common.h and syscallent-common-32.h. * linux/mips/.gitignore: Add syscallent-common-32-stub.h and syscallent-common-stub.h. * linux/mips/genstub.sh: Parametrize source directory. Change syscall name prefix to SYSCALL_NAME_PREFIX. * configure.ac [MIPS]: Generate stubs for linux/syscallent-common.h and linux/syscallent-common-32.h files. * linux/mips/syscallent-n32.h [LINUX_MIPSN32] [BASE_NR + 403..BASE_NR + 427]: Remove, include "syscallent-common-32.h" and "syscallent-common.h" instead. [!LINUX_MIPSN32] (SYSCALL_NAME_PREFIX): Define. [!LINUX_MIPSN32]: Include "syscallent-common-32-sub.h" and "syscallent-common-stub.h". * linux/mips/syscallent-o32.h [LINUX_MIPSO32] [BASE_NR + 403..BASE_NR + 427]: Remove, include "syscallent-common-32.h" and "syscallent-common.h" instead. [!LINUX_MIPSO32] (SYSCALL_NAME_PREFIX): Define. [!LINUX_MIPSO32]: Include "syscallent-common-32-sub.h" * linux/32/syscallent.h [403..427]: Remove, include "syscallent-common-32.h" and "syscallent-common.h" instead. * linux/arm/syscallent.h: Likewise. * linux/hppa/syscallent.h: Likewise. * linux/i386/syscallent.h: Likewise. * linux/m68k/syscallent.h: Likewise. * linux/microblaze/syscallent.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/s390/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. * linux/xtensa/syscallent.h: Likewise. * linux/alpha/syscallent.h (BASE_NR): Define. [534..537]: Remove, include "syscallent-common.h" instead. * linux/ia64/syscallent.h [BASE_NR + 424..BASE_NR + 427]: Remove, include "syscallent-common.h" instead. * linux/mips/syscallent-n64.h [LINUX_MIPSN64]: Likewise. [!LINUX_MIPSN64] (SYSCALL_NAME_PREFIX): Define. [!LINUX_MIPSN64]: Include "syscallent-common-stub.h". * linux/64/syscallent.h [424..427]: Remove, include "syscallent-common.h" instead. * linux/powerpc64/syscallent.h: Likewise. * linux/s390x/syscallent.h: Likewise. * linux/sh64/syscallent.h: Likewise. * linux/sparc64/syscallent.h: Likewise. * linux/x32/syscallent.h: Likewise. * linux/x86_64/syscallent.h: Likewise. --- diff --git a/Makefile.am b/Makefile.am index a8ace321..07918ec9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -841,6 +841,8 @@ EXTRA_DIST = \ linux/subcall32.h \ linux/subcall64.h \ linux/syscall.h \ + linux/syscallent-common-32.h \ + linux/syscallent-common.h \ linux/tile/arch_defs_.h \ linux/tile/arch_get_personality.c \ linux/tile/arch_regs.c \ @@ -963,6 +965,7 @@ sys_func.h: $(patsubst %,$(srcdir)/%,$(sys_func_h_sources)) done | sort -u > $@ syscallent_names = subcall.h syscallent.h syscallent1.h \ + syscallent-common.h syscallent-common-32.h \ syscallent-n32.h syscallent-n64.h syscallent-o32.h syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names)) syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST)) diff --git a/configure.ac b/configure.ac index 621312ac..f3769ca7 100644 --- a/configure.ac +++ b/configure.ac @@ -897,7 +897,10 @@ st_STACKTRACE if test "$arch" = mips && test "$no_create" != yes; then mkdir -p linux/mips - if $srcdir/linux/mips/genstub.sh linux/mips; then + if $srcdir/linux/mips/genstub.sh \ + $srcdir/linux/mips linux/mips n32 n64 o32 && + $srcdir/linux/mips/genstub.sh \ + $srcdir/linux linux/mips common common-32; then AC_MSG_RESULT([Generated MIPS syscallent stubs]) else AC_MSG_ERROR([Failed to generate syscallent stubs]) diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h index 01a5009d..a08d5cc6 100644 --- a/linux/32/syscallent.h +++ b/linux/32/syscallent.h @@ -292,30 +292,9 @@ [292] = { 6, 0, SEN(io_pgetevents_time32), "io_pgetevents" }, [293] = { 4, 0, SEN(rseq), "rseq" }, [294] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +/* [295 ... 402] - reserved to sync up with other architectures */ +#include "syscallent-common-32.h" +#include "syscallent-common.h" #undef sys_ARCH_mmap #undef ARCH_WANT_SYNC_FILE_RANGE2 diff --git a/linux/64/syscallent.h b/linux/64/syscallent.h index 294da690..9a531ada 100644 --- a/linux/64/syscallent.h +++ b/linux/64/syscallent.h @@ -286,7 +286,4 @@ [293] = { 4, 0, SEN(rseq), "rseq" }, [294] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, /* [295 ... 423] - reserved to sync up with other architectures */ -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common.h" diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h index d569fa67..f38d5243 100644 --- a/linux/alpha/syscallent.h +++ b/linux/alpha/syscallent.h @@ -477,7 +477,7 @@ [531] = { 0, PU|NF, SEN(geteuid), "geteuid" }, [532] = { 0, PU|NF, SEN(getppid), "getppid" }, /* all other architectures have common numbers for new syscalls, alpha is the exception */ -[534] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[535] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[536] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[537] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +/* 534 - 424 == 110 */ +#define BASE_NR 110 +#include "syscallent-common.h" +#undef BASE_NR diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index 065e79f3..9fe6b27b 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -410,30 +410,8 @@ [400] = { 4, TM, SEN(migrate_pages), "migrate_pages" }, [401] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, /* [402] - unused */ -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" #ifdef __ARM_EABI__ # define ARM_FIRST_SHUFFLED_SYSCALL 500 diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h index 72f15190..4cbde965 100644 --- a/linux/hppa/syscallent.h +++ b/linux/hppa/syscallent.h @@ -359,27 +359,5 @@ [353] = { 1, 0, SEN(pkey_free), "pkey_free" }, [354] = { 4, 0, SEN(rseq), "rseq" }, /* [355 ... 402] - reserved to sync up with other architectures */ -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index 98866f3d..e2233ec9 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -404,30 +404,8 @@ [400] = { 4, TI, SEN(msgsnd), "msgsnd" }, [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall32.h" diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h index bf1cc424..86f7efd7 100644 --- a/linux/ia64/syscallent.h +++ b/linux/ia64/syscallent.h @@ -343,8 +343,5 @@ [BASE_NR + 332] = { 1, 0, SEN(pkey_free), "pkey_free" }, [BASE_NR + 333] = { 4, 0, SEN(rseq), "rseq" }, /* [BASE_NR + 334 ... BASE_NR + 423] - reserved to sync up with other architectures */ -[BASE_NR + 424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[BASE_NR + 425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[BASE_NR + 426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[BASE_NR + 427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common.h" #undef BASE_NR diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index f2117697..708e89c9 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -402,30 +402,8 @@ [400] = { 4, TI, SEN(msgsnd), "msgsnd" }, [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall32.h" diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h index 8e2a3dd9..dcb00305 100644 --- a/linux/microblaze/syscallent.h +++ b/linux/microblaze/syscallent.h @@ -408,27 +408,5 @@ [399] = { 6, 0, SEN(io_pgetevents_time32), "io_pgetevents" }, [400] = { 4, 0, SEN(rseq), "rseq" }, /* [401 ... 402] - unused */ -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" diff --git a/linux/mips/.gitignore b/linux/mips/.gitignore index 51a6ade0..ece2db34 100644 --- a/linux/mips/.gitignore +++ b/linux/mips/.gitignore @@ -1,3 +1,5 @@ +syscallent-common-32-stub.h +syscallent-common-stub.h syscallent-n32-stub.h syscallent-n64-stub.h syscallent-o32-stub.h diff --git a/linux/mips/genstub.sh b/linux/mips/genstub.sh index 0d21692e..2ffba812 100755 --- a/linux/mips/genstub.sh +++ b/linux/mips/genstub.sh @@ -5,11 +5,11 @@ # # SPDX-License-Identifier: LGPL-2.1-or-later -srcdir="${0%/*}" +srcdir="$1"; shift dstdir="$1"; shift -for n in n32 n64 o32; do +for n; do in="$srcdir/syscallent-$n.h" out="$dstdir/syscallent-$n-stub.h" - sed -r -n '/^#if/,/^#else/ {s/^([^{]*\{[^,]*,[^,]*,[[:space:]]*)[^,[:space:]]+,[[:space:]]*"([^"]+".*)/\1SEN(printargs), "'$n':\2/; s/^\[.*/&/p}' < "$in" > "$out" + sed -r -n '/^#if/,/^#else/ {s/^([^{]*\{[^,]*,[^,]*,[[:space:]]*)[^,[:space:]]+,[[:space:]]*"([^"]+".*)/\1SEN(printargs), SYSCALL_NAME_PREFIX "\2/; s/^\[.*/&/p}' < "$in" > "$out" done diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index 98bf9824..143f8110 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -341,38 +341,19 @@ [BASE_NR + 330] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, [BASE_NR + 331] = { 4, 0, SEN(rseq), "rseq" }, [BASE_NR + 332] = { 6, 0, SEN(io_pgetevents_time32), "io_pgetevents" }, -/* [6333 ... 6402] - reserved to sync up with other architectures */ -[BASE_NR + 403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[BASE_NR + 404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[BASE_NR + 405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[BASE_NR + 406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[BASE_NR + 407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[BASE_NR + 408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[BASE_NR + 409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[BASE_NR + 410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[BASE_NR + 411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[BASE_NR + 412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[BASE_NR + 413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[BASE_NR + 414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[BASE_NR + 416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[BASE_NR + 417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[BASE_NR + 418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[BASE_NR + 419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[BASE_NR + 420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[BASE_NR + 421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[BASE_NR + 422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[BASE_NR + 423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[BASE_NR + 424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[BASE_NR + 425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[BASE_NR + 426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[BASE_NR + 427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +# include "syscallent-common-32.h" +# include "syscallent-common.h" # define SYS_socket_subcall 6500 # include "subcall32.h" #else +# define SYSCALL_NAME_PREFIX "n32:" # include "syscallent-n32-stub.h" +# include "syscallent-common-32-stub.h" +# include "syscallent-common-stub.h" +# undef SYSCALL_NAME_PREFIX #endif #undef BASE_NR diff --git a/linux/mips/syscallent-n64.h b/linux/mips/syscallent-n64.h index 96f90e83..74076823 100644 --- a/linux/mips/syscallent-n64.h +++ b/linux/mips/syscallent-n64.h @@ -337,18 +337,17 @@ [BASE_NR + 326] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, [BASE_NR + 327] = { 4, 0, SEN(rseq), "rseq" }, [BASE_NR + 328] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents" }, -/* [5329 ... 5423] - reserved to sync up with other architectures */ -[BASE_NR + 424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[BASE_NR + 425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[BASE_NR + 426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[BASE_NR + 427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +# include "syscallent-common.h" # define SYS_socket_subcall 5500 # include "subcall64.h" #else +# define SYSCALL_NAME_PREFIX "n64:" # include "syscallent-n64-stub.h" +# include "syscallent-common-stub.h" +# undef SYSCALL_NAME_PREFIX #endif #undef BASE_NR diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index 6428e355..5a356fb8 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -389,37 +389,19 @@ [BASE_NR + 400] = { 4, TI, SEN(msgsnd), "msgsnd" }, [BASE_NR + 401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [BASE_NR + 402] = { 3, TI, SEN(msgctl), "msgctl" }, -[BASE_NR + 403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[BASE_NR + 404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[BASE_NR + 405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[BASE_NR + 406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[BASE_NR + 407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[BASE_NR + 408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[BASE_NR + 409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[BASE_NR + 410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[BASE_NR + 411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[BASE_NR + 412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[BASE_NR + 413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[BASE_NR + 414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[BASE_NR + 416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[BASE_NR + 417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[BASE_NR + 418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[BASE_NR + 419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[BASE_NR + 420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[BASE_NR + 421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[BASE_NR + 422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[BASE_NR + 423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[BASE_NR + 424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[BASE_NR + 425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[BASE_NR + 426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[BASE_NR + 427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +# include "syscallent-common-32.h" +# include "syscallent-common.h" # define SYS_socket_subcall 4500 # include "subcall32.h" #else +# define SYSCALL_NAME_PREFIX "o32:" # include "syscallent-o32-stub.h" +# include "syscallent-common-32-stub.h" +# include "syscallent-common-stub.h" +# undef SYSCALL_NAME_PREFIX #endif #undef BASE_NR diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index 4e184646..f4e11861 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -396,30 +396,8 @@ [400] = { 4, TI, SEN(msgsnd), "msgsnd" }, [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall32.h" diff --git a/linux/powerpc64/syscallent.h b/linux/powerpc64/syscallent.h index 47a59990..edf56388 100644 --- a/linux/powerpc64/syscallent.h +++ b/linux/powerpc64/syscallent.h @@ -393,10 +393,7 @@ [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, /* [403 ... 423] - reserved to sync up with other architectures */ -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall64.h" diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index 24cd190b..e83dc863 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -407,30 +407,8 @@ [400] = { 4, TI, SEN(msgsnd), "msgsnd" }, [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall32.h" diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h index 5b61cdc2..aed5f72a 100644 --- a/linux/s390x/syscallent.h +++ b/linux/s390x/syscallent.h @@ -393,10 +393,7 @@ [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, /* [403 ... 423] - reserved to sync up with other architectures */ -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall64.h" diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h index 44cc9d90..8a5edd3d 100644 --- a/linux/sh/syscallent.h +++ b/linux/sh/syscallent.h @@ -405,30 +405,8 @@ [400] = { 4, TI, SEN(msgsnd), "msgsnd" }, [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall32.h" diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index a21b0c47..9f2d6e37 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -399,10 +399,7 @@ [392] = { 6, TD, SEN(preadv2), "preadv2" }, [393] = { 6, TD, SEN(pwritev2), "pwritev2" }, /* [403 ... 423] - reserved to sync up with other architectures */ -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall64.h" diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index 706c15e6..8a49b686 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -382,30 +382,8 @@ [400] = { 4, TI, SEN(msgsnd), "msgsnd" }, [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall32.h" diff --git a/linux/sparc64/syscallent.h b/linux/sparc64/syscallent.h index 1023b07d..fe8e75e9 100644 --- a/linux/sparc64/syscallent.h +++ b/linux/sparc64/syscallent.h @@ -382,10 +382,7 @@ [401] = { 5, TI, SEN(msgrcv), "msgrcv" }, [402] = { 3, TI, SEN(msgctl), "msgctl" }, /* [403 ... 423] - reserved to sync up with other architectures */ -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common.h" #define SYS_socket_subcall 500 #include "subcall64.h" diff --git a/linux/syscallent-common-32.h b/linux/syscallent-common-32.h new file mode 100644 index 00000000..57d60047 --- /dev/null +++ b/linux/syscallent-common-32.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2019 The strace developers. + * All rights reserved. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef BASE_NR +# define BASE_NR 0 +#endif +[BASE_NR + 403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, +[BASE_NR + 404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, +[BASE_NR + 405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, +[BASE_NR + 406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, +[BASE_NR + 407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, +[BASE_NR + 408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, +[BASE_NR + 409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, +[BASE_NR + 410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, +[BASE_NR + 411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, +[BASE_NR + 412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, +[BASE_NR + 413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, +[BASE_NR + 414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, +[BASE_NR + 416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, +[BASE_NR + 417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, +[BASE_NR + 418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, +[BASE_NR + 419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, +[BASE_NR + 420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, +[BASE_NR + 421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, +[BASE_NR + 422] = { 6, 0, SEN(futex_time64), "futex_time64" }, +[BASE_NR + 423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, diff --git a/linux/syscallent-common.h b/linux/syscallent-common.h new file mode 100644 index 00000000..70116c22 --- /dev/null +++ b/linux/syscallent-common.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2019 The strace developers. + * All rights reserved. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef BASE_NR +# define BASE_NR 0 +#endif +[BASE_NR + 424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, +[BASE_NR + 425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, +[BASE_NR + 426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, +[BASE_NR + 427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h index 76d4676e..530e7e93 100644 --- a/linux/x32/syscallent.h +++ b/linux/x32/syscallent.h @@ -341,7 +341,7 @@ [333] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents" }, [334] = { 4, 0, SEN(rseq), "rseq" }, /* [335 ... 423] - reserved to sync up with other architectures */ -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, +#include "syscallent-common.h" /* * x32-specific system call numbers start at 512 to avoid cache impact * for native 64-bit operation. @@ -382,6 +382,3 @@ [545] = { 5, CST|TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, [546] = { 5, TD, SEN(preadv2), "preadv2" }, [547] = { 5, TD, SEN(pwritev2), "pwritev2" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h index 03bda0d6..40becd82 100644 --- a/linux/x86_64/syscallent.h +++ b/linux/x86_64/syscallent.h @@ -341,7 +341,4 @@ [333] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents" }, [334] = { 4, 0, SEN(rseq), "rseq" }, /* [335 ... 423] - reserved to sync up with other architectures */ -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common.h" diff --git a/linux/xtensa/syscallent.h b/linux/xtensa/syscallent.h index 8cb6a46c..dd2795d3 100644 --- a/linux/xtensa/syscallent.h +++ b/linux/xtensa/syscallent.h @@ -349,27 +349,5 @@ [351] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, [352] = { 4, 0, SEN(rseq), "rseq" }, /* [353 ... 402] - reserved to sync up with other architectures */ -[403] = { 2, 0, SEN(clock_gettime64), "clock_gettime64" }, -[404] = { 2, 0, SEN(clock_settime64), "clock_settime64" }, -[405] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime64" }, -[406] = { 2, 0, SEN(clock_getres_time64), "clock_getres_time64" }, -[407] = { 4, 0, SEN(clock_nanosleep_time64), "clock_nanosleep_time64"}, -[408] = { 2, 0, SEN(timer_gettime64), "timer_gettime64" }, -[409] = { 4, 0, SEN(timer_settime64), "timer_settime64" }, -[410] = { 2, TD, SEN(timerfd_gettime64), "timerfd_gettime64" }, -[411] = { 4, TD, SEN(timerfd_settime64), "timerfd_settime64" }, -[412] = { 4, TD|TF, SEN(utimensat_time64), "utimensat_time64" }, -[413] = { 6, TD, SEN(pselect6_time64), "pselect6_time64" }, -[414] = { 5, TD, SEN(ppoll_time64), "ppoll_time64" }, -[416] = { 6, 0, SEN(io_pgetevents_time64), "io_pgetevents_time64" }, -[417] = { 5, TN, SEN(recvmmsg_time64), "recvmmsg_time64" }, -[418] = { 5, TD, SEN(mq_timedsend_time64), "mq_timedsend_time64" }, -[419] = { 5, TD, SEN(mq_timedreceive_time64), "mq_timedreceive_time64"}, -[420] = { 4, TI, SEN(semtimedop_time64), "semtimedop_time64" }, -[421] = { 4, TS, SEN(rt_sigtimedwait_time64), "rt_sigtimedwait_time64"}, -[422] = { 6, 0, SEN(futex_time64), "futex_time64" }, -[423] = { 2, 0, SEN(sched_rr_get_interval_time64), "sched_rr_get_interval_time64" }, -[424] = { 4, TD|TS, SEN(pidfd_send_signal), "pidfd_send_signal" }, -[425] = { 2, TD, SEN(io_uring_setup), "io_uring_setup" }, -[426] = { 6, TD|TS, SEN(io_uring_enter), "io_uring_enter" }, -[427] = { 4, TD|TM, SEN(io_uring_register), "io_uring_register" }, +#include "syscallent-common-32.h" +#include "syscallent-common.h"