From e0d1673d39c1768f5372a43771d3776354eb3f96 Mon Sep 17 00:00:00 2001 From: Lirong Yuan Date: Mon, 2 Mar 2020 11:31:53 -0800 Subject: [PATCH 01/32] linux-user: Add AT_EXECFN auxval This change adds the support for AT_EXECFN auxval. Signed-off-by: Lirong Yuan Reviewed-by: Laurent Vivier Message-Id: <20200302193153.66415-1-yuanzi@google.com> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index db748c5877..8198be0446 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1573,7 +1573,7 @@ struct exec ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1)) #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1)) -#define DLINFO_ITEMS 15 +#define DLINFO_ITEMS 16 static inline void memcpy_fromfs(void * to, const void * from, unsigned long n) { @@ -2037,6 +2037,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, NEW_AUX_ENT(AT_CLKTCK, (abi_ulong) sysconf(_SC_CLK_TCK)); NEW_AUX_ENT(AT_RANDOM, (abi_ulong) u_rand_bytes); NEW_AUX_ENT(AT_SECURE, (abi_ulong) qemu_getauxval(AT_SECURE)); + NEW_AUX_ENT(AT_EXECFN, info->file_string); #ifdef ELF_HWCAP2 NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2); From 055d92f8673c9e2bc284a5976e69664c87f18cae Mon Sep 17 00:00:00 2001 From: Tobias Koch Date: Thu, 5 Mar 2020 21:24:00 +0100 Subject: [PATCH 02/32] linux-user: do prlimit selectively Analogous to what commit 5dfa88f7 did for setrlimit, this commit selectively ignores limits for memory-related resources in prlimit64 calls. This is to prevent too restrictive limits from causing QEMU itself to malfunction. Signed-off-by: Tobias Koch Reviewed-by: Laurent Vivier Message-Id: <20200305202400.27574-1-tobias.koch@nonterra.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8d27d10807..4f2f9eb12b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11871,7 +11871,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, struct target_rlimit64 *target_rnew, *target_rold; struct host_rlimit64 rnew, rold, *rnewp = 0; int resource = target_to_host_resource(arg2); - if (arg3) { + + if (arg3 && (resource != RLIMIT_AS && + resource != RLIMIT_DATA && + resource != RLIMIT_STACK)) { if (!lock_user_struct(VERIFY_READ, target_rnew, arg3, 1)) { return -TARGET_EFAULT; } From 2039b1b0dc4a8b5325dcfb60c3f1fe4abf9720bb Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 12 Mar 2020 17:55:30 +0100 Subject: [PATCH 03/32] linux-user: fix socket() strace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit print_socket_type() doesn't manage flags and the correct type cannot be displayed Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200312165530.53450-1-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 4f7130b2ff..69232f7e27 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -444,7 +444,7 @@ print_socket_domain(int domain) static void print_socket_type(int type) { - switch (type) { + switch (type & TARGET_SOCK_TYPE_MASK) { case TARGET_SOCK_DGRAM: qemu_log("SOCK_DGRAM"); break; @@ -464,6 +464,12 @@ print_socket_type(int type) qemu_log("SOCK_PACKET"); break; } + if (type & TARGET_SOCK_CLOEXEC) { + qemu_log("|SOCK_CLOEXEC"); + } + if (type & TARGET_SOCK_NONBLOCK) { + qemu_log("|SOCK_NONBLOCK"); + } } static void From aab613fb9597015b39bdc90da3ee80c0da05b927 Mon Sep 17 00:00:00 2001 From: Lirong Yuan Date: Thu, 12 Mar 2020 17:28:13 -0700 Subject: [PATCH 04/32] linux-user: Update TASK_UNMAPPED_BASE for aarch64 This change updates TASK_UNMAPPED_BASE (the base address for guest programs) for aarch64. It is needed to allow qemu to work with Thread Sanitizer (TSan), which has specific boundary definitions for memory mappings on different platforms: https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/tsan/rtl/tsan_platform.h Signed-off-by: Lirong Yuan Reviewed-by: Laurent Vivier Message-Id: <20200313002813.3857-1-yuanzi@google.com> Signed-off-by: Laurent Vivier --- linux-user/mmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 8685f02e7e..e378033797 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -184,7 +184,11 @@ static int mmap_frag(abi_ulong real_start, } #if HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 64 +#ifdef TARGET_AARCH64 +# define TASK_UNMAPPED_BASE 0x5500000000 +#else # define TASK_UNMAPPED_BASE (1ul << 38) +#endif #else # define TASK_UNMAPPED_BASE 0x40000000 #endif From 859e8a89bede1ba1bdc2dda7a76a861e63cfd49f Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 12 Mar 2020 15:13:49 -0700 Subject: [PATCH 05/32] linux-user: Protect more syscalls New y2038 safe 32-bit architectures (like RISC-V) don't support old syscalls with a 32-bit time_t. The kernel defines new *_time64 versions of these syscalls. Add some more #ifdefs to syscall.c in linux-user to allow us to compile without these old syscalls. Signed-off-by: Alistair Francis Reviewed-by: Laurent Vivier Message-Id: <9ffc3cc6226756895157f16622be5f6edfa2aee6.1584051142.git.alistair.francis@wdc.com> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 2 ++ linux-user/syscall.c | 68 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 69232f7e27..0d9095c674 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -781,6 +781,7 @@ print_syscall_ret_newselect(const struct syscallname *name, abi_long ret) #define TARGET_TIME_OOP 3 /* leap second in progress */ #define TARGET_TIME_WAIT 4 /* leap second has occurred */ #define TARGET_TIME_ERROR 5 /* clock not synchronized */ +#ifdef TARGET_NR_adjtimex static void print_syscall_ret_adjtimex(const struct syscallname *name, abi_long ret) { @@ -819,6 +820,7 @@ print_syscall_ret_adjtimex(const struct syscallname *name, abi_long ret) qemu_log("\n"); } +#endif UNUSED static struct flags access_flags[] = { FLAG_GENERIC(F_OK), diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4f2f9eb12b..ae279702b2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -742,21 +742,30 @@ safe_syscall3(ssize_t, read, int, fd, void *, buff, size_t, count) safe_syscall3(ssize_t, write, int, fd, const void *, buff, size_t, count) safe_syscall4(int, openat, int, dirfd, const char *, pathname, \ int, flags, mode_t, mode) +#if defined(TARGET_NR_wait4) || defined(TARGET_NR_waitpid) safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ struct rusage *, rusage) +#endif safe_syscall5(int, waitid, idtype_t, idtype, id_t, id, siginfo_t *, infop, \ int, options, struct rusage *, rusage) safe_syscall3(int, execve, const char *, filename, char **, argv, char **, envp) +#if defined(TARGET_NR_select) || defined(TARGET_NR__newselect) || \ + defined(TARGET_NR_pselect6) safe_syscall6(int, pselect6, int, nfds, fd_set *, readfds, fd_set *, writefds, \ fd_set *, exceptfds, struct timespec *, timeout, void *, sig) +#endif +#if defined(TARGET_NR_ppoll) || defined(TARGET_NR_poll) safe_syscall5(int, ppoll, struct pollfd *, ufds, unsigned int, nfds, struct timespec *, tsp, const sigset_t *, sigmask, size_t, sigsetsize) +#endif safe_syscall6(int, epoll_pwait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout, const sigset_t *, sigmask, size_t, sigsetsize) +#ifdef TARGET_NR_futex safe_syscall6(int,futex,int *,uaddr,int,op,int,val, \ const struct timespec *,timeout,int *,uaddr2,int,val3) +#endif safe_syscall2(int, rt_sigsuspend, sigset_t *, newset, size_t, sigsetsize) safe_syscall2(int, kill, pid_t, pid, int, sig) safe_syscall2(int, tkill, int, tid, int, sig) @@ -776,12 +785,16 @@ safe_syscall6(ssize_t, recvfrom, int, fd, void *, buf, size_t, len, safe_syscall3(ssize_t, sendmsg, int, fd, const struct msghdr *, msg, int, flags) safe_syscall3(ssize_t, recvmsg, int, fd, struct msghdr *, msg, int, flags) safe_syscall2(int, flock, int, fd, int, operation) +#ifdef TARGET_NR_rt_sigtimedwait safe_syscall4(int, rt_sigtimedwait, const sigset_t *, these, siginfo_t *, uinfo, const struct timespec *, uts, size_t, sigsetsize) +#endif safe_syscall4(int, accept4, int, fd, struct sockaddr *, addr, socklen_t *, len, int, flags) +#if defined(TARGET_NR_nanosleep) safe_syscall2(int, nanosleep, const struct timespec *, req, struct timespec *, rem) +#endif #ifdef TARGET_NR_clock_nanosleep safe_syscall4(int, clock_nanosleep, const clockid_t, clock, int, flags, const struct timespec *, req, struct timespec *, rem) @@ -802,9 +815,11 @@ safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, unsigned, nsops, const struct timespec *, timeout) #endif -#if defined(TARGET_NR_mq_open) && defined(__NR_mq_open) +#ifdef TARGET_NR_mq_timedsend safe_syscall5(int, mq_timedsend, int, mqdes, const char *, msg_ptr, size_t, len, unsigned, prio, const struct timespec *, timeout) +#endif +#ifdef TARGET_NR_mq_timedreceive safe_syscall5(int, mq_timedreceive, int, mqdes, char *, msg_ptr, size_t, len, unsigned *, prio, const struct timespec *, timeout) #endif @@ -946,6 +961,8 @@ abi_long do_brk(abi_ulong new_brk) return target_brk; } +#if defined(TARGET_NR_select) || defined(TARGET_NR__newselect) || \ + defined(TARGET_NR_pselect6) static inline abi_long copy_from_user_fdset(fd_set *fds, abi_ulong target_fds_addr, int n) @@ -1021,6 +1038,7 @@ static inline abi_long copy_to_user_fdset(abi_ulong target_fds_addr, return 0; } +#endif #if defined(__alpha__) #define HOST_HZ 1024 @@ -1067,6 +1085,7 @@ static inline abi_long host_to_target_rusage(abi_ulong target_addr, return 0; } +#ifdef TARGET_NR_setrlimit static inline rlim_t target_to_host_rlim(abi_ulong target_rlim) { abi_ulong target_rlim_swap; @@ -1082,7 +1101,9 @@ static inline rlim_t target_to_host_rlim(abi_ulong target_rlim) return result; } +#endif +#if defined(TARGET_NR_getrlimit) || defined(TARGET_NR_ugetrlimit) static inline abi_ulong host_to_target_rlim(rlim_t rlim) { abi_ulong target_rlim_swap; @@ -1096,6 +1117,7 @@ static inline abi_ulong host_to_target_rlim(rlim_t rlim) return result; } +#endif static inline int target_to_host_resource(int code) { @@ -1186,6 +1208,12 @@ static inline abi_long copy_to_user_timeval64(abi_ulong target_tv_addr, return 0; } +#if defined(TARGET_NR_futex) || \ + defined(TARGET_NR_rt_sigtimedwait) || \ + defined(TARGET_NR_pselect6) || defined(TARGET_NR_pselect6) || \ + defined(TARGET_NR_nanosleep) || defined(TARGET_NR_clock_settime) || \ + defined(TARGET_NR_utimensat) || defined(TARGET_NR_mq_timedsend) || \ + defined(TARGET_NR_mq_timedreceive) static inline abi_long target_to_host_timespec(struct timespec *host_ts, abi_ulong target_addr) { @@ -1199,6 +1227,7 @@ static inline abi_long target_to_host_timespec(struct timespec *host_ts, unlock_user_struct(target_ts, target_addr, 0); return 0; } +#endif static inline abi_long host_to_target_timespec(abi_ulong target_addr, struct timespec *host_ts) @@ -1228,6 +1257,7 @@ static inline abi_long host_to_target_timespec64(abi_ulong target_addr, return 0; } +#if defined(TARGET_NR_settimeofday) static inline abi_long copy_from_user_timezone(struct timezone *tz, abi_ulong target_tz_addr) { @@ -1244,6 +1274,7 @@ static inline abi_long copy_from_user_timezone(struct timezone *tz, return 0; } +#endif #if defined(TARGET_NR_mq_open) && defined(__NR_mq_open) #include @@ -6565,6 +6596,8 @@ static inline abi_long target_ftruncate64(void *cpu_env, abi_long arg1, } #endif +#if defined(TARGET_NR_timer_settime) || \ + (defined(TARGET_NR_timerfd_settime) && defined(CONFIG_TIMERFD)) static inline abi_long target_to_host_itimerspec(struct itimerspec *host_itspec, abi_ulong target_addr) { @@ -6584,7 +6617,11 @@ static inline abi_long target_to_host_itimerspec(struct itimerspec *host_itspec, unlock_user_struct(target_itspec, target_addr, 1); return 0; } +#endif +#if ((defined(TARGET_NR_timerfd_gettime) || \ + defined(TARGET_NR_timerfd_settime)) && defined(CONFIG_TIMERFD)) || \ + defined(TARGET_NR_timer_gettime) || defined(TARGET_NR_timer_settime) static inline abi_long host_to_target_itimerspec(abi_ulong target_addr, struct itimerspec *host_its) { @@ -6603,7 +6640,10 @@ static inline abi_long host_to_target_itimerspec(abi_ulong target_addr, unlock_user_struct(target_itspec, target_addr, 0); return 0; } +#endif +#if defined(TARGET_NR_adjtimex) || \ + (defined(TARGET_NR_clock_adjtime) && defined(CONFIG_CLOCK_ADJTIME)) static inline abi_long target_to_host_timex(struct timex *host_tx, abi_long target_addr) { @@ -6673,7 +6713,7 @@ static inline abi_long host_to_target_timex(abi_long target_addr, unlock_user_struct(target_tx, target_addr, 1); return 0; } - +#endif static inline abi_long target_to_host_sigevent(struct sigevent *host_sevp, abi_ulong target_addr) @@ -6840,6 +6880,7 @@ static inline abi_long host_to_target_statx(struct target_statx *host_stx, futexes locally would make futexes shared between multiple processes tricky. However they're probably useless because guest atomic operations won't work either. */ +#if defined(TARGET_NR_futex) static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, target_ulong uaddr2, int val3) { @@ -6886,6 +6927,7 @@ static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, return -TARGET_ENOSYS; } } +#endif #if defined(TARGET_NR_name_to_handle_at) && defined(CONFIG_OPEN_BY_HANDLE) static abi_long do_name_to_handle_at(abi_long dirfd, abi_long pathname, abi_long handle, abi_long mount_id, @@ -8494,6 +8536,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#ifdef TARGET_NR_rt_sigtimedwait case TARGET_NR_rt_sigtimedwait: { sigset_t set; @@ -8530,6 +8573,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#endif case TARGET_NR_rt_sigqueueinfo: { siginfo_t uinfo; @@ -8629,6 +8673,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#if defined(TARGET_NR_gettimeofday) case TARGET_NR_gettimeofday: { struct timeval tv; @@ -8639,6 +8684,8 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#endif +#if defined(TARGET_NR_settimeofday) case TARGET_NR_settimeofday: { struct timeval tv, *ptv = NULL; @@ -8660,6 +8707,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return get_errno(settimeofday(ptv, ptz)); } +#endif #if defined(TARGET_NR_select) case TARGET_NR_select: #if defined(TARGET_WANT_NI_OLD_SELECT) @@ -9131,6 +9179,8 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, #ifdef TARGET_NR_sendmmsg case TARGET_NR_sendmmsg: return do_sendrecvmmsg(arg1, arg2, arg3, arg4, 1); +#endif +#ifdef TARGET_NR_recvmmsg case TARGET_NR_recvmmsg: return do_sendrecvmmsg(arg1, arg2, arg3, arg4, 0); #endif @@ -9305,6 +9355,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return do_syscall(cpu_env, arg1 & 0xffff, arg2, arg3, arg4, arg5, arg6, arg7, arg8, 0); #endif +#if defined(TARGET_NR_wait4) case TARGET_NR_wait4: { int status; @@ -9332,6 +9383,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#endif #ifdef TARGET_NR_swapoff case TARGET_NR_swapoff: if (!(p = lock_user_string(arg1))) @@ -9476,6 +9528,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return do_vm86(cpu_env, arg1, arg2); #endif #endif +#if defined(TARGET_NR_adjtimex) case TARGET_NR_adjtimex: { struct timex host_buf; @@ -9491,6 +9544,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#endif #if defined(TARGET_NR_clock_adjtime) && defined(CONFIG_CLOCK_ADJTIME) case TARGET_NR_clock_adjtime: { @@ -10007,6 +10061,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return get_errno(sched_get_priority_max(arg1)); case TARGET_NR_sched_get_priority_min: return get_errno(sched_get_priority_min(arg1)); +#ifdef TARGET_NR_sched_rr_get_interval case TARGET_NR_sched_rr_get_interval: { struct timespec ts; @@ -10016,6 +10071,8 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#endif +#if defined(TARGET_NR_nanosleep) case TARGET_NR_nanosleep: { struct timespec req, rem; @@ -10026,6 +10083,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; +#endif case TARGET_NR_prctl: switch (arg1) { case PR_GET_PDEATHSIG: @@ -11496,8 +11554,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } return ret; #endif +#ifdef TARGET_NR_futex case TARGET_NR_futex: return do_futex(arg1, arg2, arg3, arg4, arg5, arg6); +#endif #if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init) case TARGET_NR_inotify_init: ret = get_errno(sys_inotify_init()); @@ -11562,6 +11622,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, unlock_user (p, arg1, 0); return ret; +#ifdef TARGET_NR_mq_timedsend case TARGET_NR_mq_timedsend: { struct timespec ts; @@ -11577,7 +11638,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, unlock_user (p, arg2, arg3); } return ret; +#endif +#ifdef TARGET_NR_mq_timedreceive case TARGET_NR_mq_timedreceive: { struct timespec ts; @@ -11598,6 +11661,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, put_user_u32(prio, arg4); } return ret; +#endif /* Not implemented for now... */ /* case TARGET_NR_mq_notify: */ From c6c8d1026e7555097c1b01b2c701593f7b2c6602 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 12 Mar 2020 15:13:53 -0700 Subject: [PATCH 06/32] linux-user/syscall: Add support for clock_gettime64/clock_settime64 Add support for the clock_gettime64/clock_settime64 syscalls. If your host is 64-bit or is 32-bit with the *_time64 syscall then the timespec will correctly be a 64-bit time_t. Otherwise the host will return a 32-bit time_t which will be rounded to 64-bits. This will be incorrect after y2038. Signed-off-by: Alistair Francis Reviewed-by: Laurent Vivier Message-Id: <4a7fd05532400d10aa0f684c9043e2ac7b34d91c.1584051142.git.alistair.francis@wdc.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ae279702b2..be5f524e0a 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1229,6 +1229,22 @@ static inline abi_long target_to_host_timespec(struct timespec *host_ts, } #endif +#if defined(TARGET_NR_clock_settime64) +static inline abi_long target_to_host_timespec64(struct timespec *host_ts, + abi_ulong target_addr) +{ + struct target__kernel_timespec *target_ts; + + if (!lock_user_struct(VERIFY_READ, target_ts, target_addr, 1)) { + return -TARGET_EFAULT; + } + __get_user(host_ts->tv_sec, &target_ts->tv_sec); + __get_user(host_ts->tv_nsec, &target_ts->tv_nsec); + unlock_user_struct(target_ts, target_addr, 0); + return 0; +} +#endif + static inline abi_long host_to_target_timespec(abi_ulong target_addr, struct timespec *host_ts) { @@ -11458,6 +11474,18 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return ret; } #endif +#ifdef TARGET_NR_clock_settime64 + case TARGET_NR_clock_settime64: + { + struct timespec ts; + + ret = target_to_host_timespec64(&ts, arg2); + if (!is_error(ret)) { + ret = get_errno(clock_settime(arg1, &ts)); + } + return ret; + } +#endif #ifdef TARGET_NR_clock_gettime case TARGET_NR_clock_gettime: { @@ -11469,6 +11497,17 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return ret; } #endif +#ifdef TARGET_NR_clock_gettime64 + case TARGET_NR_clock_gettime64: + { + struct timespec ts; + ret = get_errno(clock_gettime(arg1, &ts)); + if (!is_error(ret)) { + ret = host_to_target_timespec64(arg2, &ts); + } + return ret; + } +#endif #ifdef TARGET_NR_clock_getres case TARGET_NR_clock_getres: { From 50efc69586388a975c1ebd90cb8cc8e4a7328bc4 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 12 Mar 2020 15:14:00 -0700 Subject: [PATCH 07/32] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel Signed-off-by: Alistair Francis Reviewed-by: Laurent Vivier Message-Id: <8e512fa2dc885aafc4d9c4013ee033442827a4a0.1584051142.git.alistair.francis@wdc.com> [lv: guard sys_futex with TARGET_NR_exit] Signed-off-by: Laurent Vivier --- linux-user/riscv/syscall32_nr.h | 295 +++++++++++++++++++++++++++++++ linux-user/riscv/syscall64_nr.h | 301 ++++++++++++++++++++++++++++++++ linux-user/riscv/syscall_nr.h | 294 +------------------------------ linux-user/syscall.c | 2 +- 4 files changed, 599 insertions(+), 293 deletions(-) create mode 100644 linux-user/riscv/syscall32_nr.h create mode 100644 linux-user/riscv/syscall64_nr.h diff --git a/linux-user/riscv/syscall32_nr.h b/linux-user/riscv/syscall32_nr.h new file mode 100644 index 0000000000..4fef73e954 --- /dev/null +++ b/linux-user/riscv/syscall32_nr.h @@ -0,0 +1,295 @@ +/* + * This file contains the system call numbers. + */ +#ifndef LINUX_USER_RISCV_SYSCALL32_NR_H +#define LINUX_USER_RISCV_SYSCALL32_NR_H + +#define TARGET_NR_io_setup 0 +#define TARGET_NR_io_destroy 1 +#define TARGET_NR_io_submit 2 +#define TARGET_NR_io_cancel 3 +#define TARGET_NR_setxattr 5 +#define TARGET_NR_lsetxattr 6 +#define TARGET_NR_fsetxattr 7 +#define TARGET_NR_getxattr 8 +#define TARGET_NR_lgetxattr 9 +#define TARGET_NR_fgetxattr 10 +#define TARGET_NR_listxattr 11 +#define TARGET_NR_llistxattr 12 +#define TARGET_NR_flistxattr 13 +#define TARGET_NR_removexattr 14 +#define TARGET_NR_lremovexattr 15 +#define TARGET_NR_fremovexattr 16 +#define TARGET_NR_getcwd 17 +#define TARGET_NR_lookup_dcookie 18 +#define TARGET_NR_eventfd2 19 +#define TARGET_NR_epoll_create1 20 +#define TARGET_NR_epoll_ctl 21 +#define TARGET_NR_epoll_pwait 22 +#define TARGET_NR_dup 23 +#define TARGET_NR_dup3 24 +#define TARGET_NR_fcntl64 25 +#define TARGET_NR_inotify_init1 26 +#define TARGET_NR_inotify_add_watch 27 +#define TARGET_NR_inotify_rm_watch 28 +#define TARGET_NR_ioctl 29 +#define TARGET_NR_ioprio_set 30 +#define TARGET_NR_ioprio_get 31 +#define TARGET_NR_flock 32 +#define TARGET_NR_mknodat 33 +#define TARGET_NR_mkdirat 34 +#define TARGET_NR_unlinkat 35 +#define TARGET_NR_symlinkat 36 +#define TARGET_NR_linkat 37 +#define TARGET_NR_umount2 39 +#define TARGET_NR_mount 40 +#define TARGET_NR_pivot_root 41 +#define TARGET_NR_nfsservctl 42 +#define TARGET_NR_statfs64 43 +#define TARGET_NR_fstatfs64 44 +#define TARGET_NR_truncate64 45 +#define TARGET_NR_ftruncate64 46 +#define TARGET_NR_fallocate 47 +#define TARGET_NR_faccessat 48 +#define TARGET_NR_chdir 49 +#define TARGET_NR_fchdir 50 +#define TARGET_NR_chroot 51 +#define TARGET_NR_fchmod 52 +#define TARGET_NR_fchmodat 53 +#define TARGET_NR_fchownat 54 +#define TARGET_NR_fchown 55 +#define TARGET_NR_openat 56 +#define TARGET_NR_close 57 +#define TARGET_NR_vhangup 58 +#define TARGET_NR_pipe2 59 +#define TARGET_NR_quotactl 60 +#define TARGET_NR_getdents64 61 +#define TARGET_NR_llseek 62 +#define TARGET_NR_read 63 +#define TARGET_NR_write 64 +#define TARGET_NR_readv 65 +#define TARGET_NR_writev 66 +#define TARGET_NR_pread64 67 +#define TARGET_NR_pwrite64 68 +#define TARGET_NR_preadv 69 +#define TARGET_NR_pwritev 70 +#define TARGET_NR_sendfile64 71 +#define TARGET_NR_signalfd4 74 +#define TARGET_NR_vmsplice 75 +#define TARGET_NR_splice 76 +#define TARGET_NR_tee 77 +#define TARGET_NR_readlinkat 78 +#define TARGET_NR_fstatat64 79 +#define TARGET_NR_fstat64 80 +#define TARGET_NR_sync 81 +#define TARGET_NR_fsync 82 +#define TARGET_NR_fdatasync 83 +#define TARGET_NR_sync_file_range 84 +#define TARGET_NR_timerfd_create 85 +#define TARGET_NR_acct 89 +#define TARGET_NR_capget 90 +#define TARGET_NR_capset 91 +#define TARGET_NR_personality 92 +#define TARGET_NR_exit 93 +#define TARGET_NR_exit_group 94 +#define TARGET_NR_waitid 95 +#define TARGET_NR_set_tid_address 96 +#define TARGET_NR_unshare 97 +#define TARGET_NR_set_robust_list 99 +#define TARGET_NR_get_robust_list 100 +#define TARGET_NR_getitimer 102 +#define TARGET_NR_setitimer 103 +#define TARGET_NR_kexec_load 104 +#define TARGET_NR_init_module 105 +#define TARGET_NR_delete_module 106 +#define TARGET_NR_timer_create 107 +#define TARGET_NR_timer_getoverrun 109 +#define TARGET_NR_timer_delete 111 +#define TARGET_NR_syslog 116 +#define TARGET_NR_ptrace 117 +#define TARGET_NR_sched_setparam 118 +#define TARGET_NR_sched_setscheduler 119 +#define TARGET_NR_sched_getscheduler 120 +#define TARGET_NR_sched_getparam 121 +#define TARGET_NR_sched_setaffinity 122 +#define TARGET_NR_sched_getaffinity 123 +#define TARGET_NR_sched_yield 124 +#define TARGET_NR_sched_get_priority_max 125 +#define TARGET_NR_sched_get_priority_min 126 +#define TARGET_NR_restart_syscall 128 +#define TARGET_NR_kill 129 +#define TARGET_NR_tkill 130 +#define TARGET_NR_tgkill 131 +#define TARGET_NR_sigaltstack 132 +#define TARGET_NR_rt_sigsuspend 133 +#define TARGET_NR_rt_sigaction 134 +#define TARGET_NR_rt_sigprocmask 135 +#define TARGET_NR_rt_sigpending 136 +#define TARGET_NR_rt_sigqueueinfo 138 +#define TARGET_NR_rt_sigreturn 139 +#define TARGET_NR_setpriority 140 +#define TARGET_NR_getpriority 141 +#define TARGET_NR_reboot 142 +#define TARGET_NR_setregid 143 +#define TARGET_NR_setgid 144 +#define TARGET_NR_setreuid 145 +#define TARGET_NR_setuid 146 +#define TARGET_NR_setresuid 147 +#define TARGET_NR_getresuid 148 +#define TARGET_NR_setresgid 149 +#define TARGET_NR_getresgid 150 +#define TARGET_NR_setfsuid 151 +#define TARGET_NR_setfsgid 152 +#define TARGET_NR_times 153 +#define TARGET_NR_setpgid 154 +#define TARGET_NR_getpgid 155 +#define TARGET_NR_getsid 156 +#define TARGET_NR_setsid 157 +#define TARGET_NR_getgroups 158 +#define TARGET_NR_setgroups 159 +#define TARGET_NR_uname 160 +#define TARGET_NR_sethostname 161 +#define TARGET_NR_setdomainname 162 +#define TARGET_NR_getrlimit 163 +#define TARGET_NR_setrlimit 164 +#define TARGET_NR_getrusage 165 +#define TARGET_NR_umask 166 +#define TARGET_NR_prctl 167 +#define TARGET_NR_getcpu 168 +#define TARGET_NR_getpid 172 +#define TARGET_NR_getppid 173 +#define TARGET_NR_getuid 174 +#define TARGET_NR_geteuid 175 +#define TARGET_NR_getgid 176 +#define TARGET_NR_getegid 177 +#define TARGET_NR_gettid 178 +#define TARGET_NR_sysinfo 179 +#define TARGET_NR_mq_open 180 +#define TARGET_NR_mq_unlink 181 +#define TARGET_NR_mq_notify 184 +#define TARGET_NR_mq_getsetattr 185 +#define TARGET_NR_msgget 186 +#define TARGET_NR_msgctl 187 +#define TARGET_NR_msgrcv 188 +#define TARGET_NR_msgsnd 189 +#define TARGET_NR_semget 190 +#define TARGET_NR_semctl 191 +#define TARGET_NR_semop 193 +#define TARGET_NR_shmget 194 +#define TARGET_NR_shmctl 195 +#define TARGET_NR_shmat 196 +#define TARGET_NR_shmdt 197 +#define TARGET_NR_socket 198 +#define TARGET_NR_socketpair 199 +#define TARGET_NR_bind 200 +#define TARGET_NR_listen 201 +#define TARGET_NR_accept 202 +#define TARGET_NR_connect 203 +#define TARGET_NR_getsockname 204 +#define TARGET_NR_getpeername 205 +#define TARGET_NR_sendto 206 +#define TARGET_NR_recvfrom 207 +#define TARGET_NR_setsockopt 208 +#define TARGET_NR_getsockopt 209 +#define TARGET_NR_shutdown 210 +#define TARGET_NR_sendmsg 211 +#define TARGET_NR_recvmsg 212 +#define TARGET_NR_readahead 213 +#define TARGET_NR_brk 214 +#define TARGET_NR_munmap 215 +#define TARGET_NR_mremap 216 +#define TARGET_NR_add_key 217 +#define TARGET_NR_request_key 218 +#define TARGET_NR_keyctl 219 +#define TARGET_NR_clone 220 +#define TARGET_NR_execve 221 +#define TARGET_NR_mmap2 222 +#define TARGET_NR_fadvise64_64 223 +#define TARGET_NR_swapon 224 +#define TARGET_NR_swapoff 225 +#define TARGET_NR_mprotect 226 +#define TARGET_NR_msync 227 +#define TARGET_NR_mlock 228 +#define TARGET_NR_munlock 229 +#define TARGET_NR_mlockall 230 +#define TARGET_NR_munlockall 231 +#define TARGET_NR_mincore 232 +#define TARGET_NR_madvise 233 +#define TARGET_NR_remap_file_pages 234 +#define TARGET_NR_mbind 235 +#define TARGET_NR_get_mempolicy 236 +#define TARGET_NR_set_mempolicy 237 +#define TARGET_NR_migrate_pages 238 +#define TARGET_NR_move_pages 239 +#define TARGET_NR_rt_tgsigqueueinfo 240 +#define TARGET_NR_perf_event_open 241 +#define TARGET_NR_accept4 242 +#define TARGET_NR_arch_specific_syscall 244 +#define TARGET_NR_riscv_flush_icache (TARGET_NR_arch_specific_syscall + 15) +#define TARGET_NR_prlimit64 261 +#define TARGET_NR_fanotify_init 262 +#define TARGET_NR_fanotify_mark 263 +#define TARGET_NR_name_to_handle_at 264 +#define TARGET_NR_open_by_handle_at 265 +#define TARGET_NR_syncfs 267 +#define TARGET_NR_setns 268 +#define TARGET_NR_sendmmsg 269 +#define TARGET_NR_process_vm_readv 270 +#define TARGET_NR_process_vm_writev 271 +#define TARGET_NR_kcmp 272 +#define TARGET_NR_finit_module 273 +#define TARGET_NR_sched_setattr 274 +#define TARGET_NR_sched_getattr 275 +#define TARGET_NR_renameat2 276 +#define TARGET_NR_seccomp 277 +#define TARGET_NR_getrandom 278 +#define TARGET_NR_memfd_create 279 +#define TARGET_NR_bpf 280 +#define TARGET_NR_execveat 281 +#define TARGET_NR_userfaultfd 282 +#define TARGET_NR_membarrier 283 +#define TARGET_NR_mlock2 284 +#define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289 +#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 +#define TARGET_NR_clock_gettime64 403 +#define TARGET_NR_clock_settime64 404 +#define TARGET_NR_clock_adjtime64 405 +#define TARGET_NR_clock_getres_time64 406 +#define TARGET_NR_clock_nanosleep_time64 407 +#define TARGET_NR_timer_gettime64 408 +#define TARGET_NR_timer_settime64 409 +#define TARGET_NR_timerfd_gettime64 410 +#define TARGET_NR_timerfd_settime64 411 +#define TARGET_NR_utimensat_time64 412 +#define TARGET_NR_pselect6_time64 413 +#define TARGET_NR_ppoll_time64 414 +#define TARGET_NR_io_pgetevents_time64 416 +#define TARGET_NR_recvmmsg_time64 417 +#define TARGET_NR_mq_timedsend_time64 418 +#define TARGET_NR_mq_timedreceive_time64 419 +#define TARGET_NR_semtimedop_time64 420 +#define TARGET_NR_rt_sigtimedwait_time64 421 +#define TARGET_NR_futex_time64 422 +#define TARGET_NR_sched_rr_get_interval_time64 423 +#define TARGET_NR_pidfd_send_signal 424 +#define TARGET_NR_io_uring_setup 425 +#define TARGET_NR_io_uring_enter 426 +#define TARGET_NR_io_uring_register 427 +#define TARGET_NR_open_tree 428 +#define TARGET_NR_move_mount 429 +#define TARGET_NR_fsopen 430 +#define TARGET_NR_fsconfig 431 +#define TARGET_NR_fsmount 432 +#define TARGET_NR_fspick 433 +#define TARGET_NR_pidfd_open 434 +#define TARGET_NR_clone3 435 +#define TARGET_NR_syscalls 436 + +#endif /* LINUX_USER_RISCV_SYSCALL32_NR_H */ diff --git a/linux-user/riscv/syscall64_nr.h b/linux-user/riscv/syscall64_nr.h new file mode 100644 index 0000000000..cc82f3244f --- /dev/null +++ b/linux-user/riscv/syscall64_nr.h @@ -0,0 +1,301 @@ +/* + * This file contains the system call numbers. + */ +#ifndef LINUX_USER_RISCV_SYSCALL64_NR_H +#define LINUX_USER_RISCV_SYSCALL64_NR_H + +#define TARGET_NR_io_setup 0 +#define TARGET_NR_io_destroy 1 +#define TARGET_NR_io_submit 2 +#define TARGET_NR_io_cancel 3 +#define TARGET_NR_io_getevents 4 +#define TARGET_NR_setxattr 5 +#define TARGET_NR_lsetxattr 6 +#define TARGET_NR_fsetxattr 7 +#define TARGET_NR_getxattr 8 +#define TARGET_NR_lgetxattr 9 +#define TARGET_NR_fgetxattr 10 +#define TARGET_NR_listxattr 11 +#define TARGET_NR_llistxattr 12 +#define TARGET_NR_flistxattr 13 +#define TARGET_NR_removexattr 14 +#define TARGET_NR_lremovexattr 15 +#define TARGET_NR_fremovexattr 16 +#define TARGET_NR_getcwd 17 +#define TARGET_NR_lookup_dcookie 18 +#define TARGET_NR_eventfd2 19 +#define TARGET_NR_epoll_create1 20 +#define TARGET_NR_epoll_ctl 21 +#define TARGET_NR_epoll_pwait 22 +#define TARGET_NR_dup 23 +#define TARGET_NR_dup3 24 +#define TARGET_NR_fcntl 25 +#define TARGET_NR_inotify_init1 26 +#define TARGET_NR_inotify_add_watch 27 +#define TARGET_NR_inotify_rm_watch 28 +#define TARGET_NR_ioctl 29 +#define TARGET_NR_ioprio_set 30 +#define TARGET_NR_ioprio_get 31 +#define TARGET_NR_flock 32 +#define TARGET_NR_mknodat 33 +#define TARGET_NR_mkdirat 34 +#define TARGET_NR_unlinkat 35 +#define TARGET_NR_symlinkat 36 +#define TARGET_NR_linkat 37 +#define TARGET_NR_umount2 39 +#define TARGET_NR_mount 40 +#define TARGET_NR_pivot_root 41 +#define TARGET_NR_nfsservctl 42 +#define TARGET_NR_statfs 43 +#define TARGET_NR_fstatfs 44 +#define TARGET_NR_truncate 45 +#define TARGET_NR_ftruncate 46 +#define TARGET_NR_fallocate 47 +#define TARGET_NR_faccessat 48 +#define TARGET_NR_chdir 49 +#define TARGET_NR_fchdir 50 +#define TARGET_NR_chroot 51 +#define TARGET_NR_fchmod 52 +#define TARGET_NR_fchmodat 53 +#define TARGET_NR_fchownat 54 +#define TARGET_NR_fchown 55 +#define TARGET_NR_openat 56 +#define TARGET_NR_close 57 +#define TARGET_NR_vhangup 58 +#define TARGET_NR_pipe2 59 +#define TARGET_NR_quotactl 60 +#define TARGET_NR_getdents64 61 +#define TARGET_NR_lseek 62 +#define TARGET_NR_read 63 +#define TARGET_NR_write 64 +#define TARGET_NR_readv 65 +#define TARGET_NR_writev 66 +#define TARGET_NR_pread64 67 +#define TARGET_NR_pwrite64 68 +#define TARGET_NR_preadv 69 +#define TARGET_NR_pwritev 70 +#define TARGET_NR_sendfile 71 +#define TARGET_NR_pselect6 72 +#define TARGET_NR_ppoll 73 +#define TARGET_NR_signalfd4 74 +#define TARGET_NR_vmsplice 75 +#define TARGET_NR_splice 76 +#define TARGET_NR_tee 77 +#define TARGET_NR_readlinkat 78 +#define TARGET_NR_newfstatat 79 +#define TARGET_NR_fstat 80 +#define TARGET_NR_sync 81 +#define TARGET_NR_fsync 82 +#define TARGET_NR_fdatasync 83 +#define TARGET_NR_sync_file_range 84 +#define TARGET_NR_timerfd_create 85 +#define TARGET_NR_timerfd_settime 86 +#define TARGET_NR_timerfd_gettime 87 +#define TARGET_NR_utimensat 88 +#define TARGET_NR_acct 89 +#define TARGET_NR_capget 90 +#define TARGET_NR_capset 91 +#define TARGET_NR_personality 92 +#define TARGET_NR_exit 93 +#define TARGET_NR_exit_group 94 +#define TARGET_NR_waitid 95 +#define TARGET_NR_set_tid_address 96 +#define TARGET_NR_unshare 97 +#define TARGET_NR_futex 98 +#define TARGET_NR_set_robust_list 99 +#define TARGET_NR_get_robust_list 100 +#define TARGET_NR_nanosleep 101 +#define TARGET_NR_getitimer 102 +#define TARGET_NR_setitimer 103 +#define TARGET_NR_kexec_load 104 +#define TARGET_NR_init_module 105 +#define TARGET_NR_delete_module 106 +#define TARGET_NR_timer_create 107 +#define TARGET_NR_timer_gettime 108 +#define TARGET_NR_timer_getoverrun 109 +#define TARGET_NR_timer_settime 110 +#define TARGET_NR_timer_delete 111 +#define TARGET_NR_clock_settime 112 +#define TARGET_NR_clock_gettime 113 +#define TARGET_NR_clock_getres 114 +#define TARGET_NR_clock_nanosleep 115 +#define TARGET_NR_syslog 116 +#define TARGET_NR_ptrace 117 +#define TARGET_NR_sched_setparam 118 +#define TARGET_NR_sched_setscheduler 119 +#define TARGET_NR_sched_getscheduler 120 +#define TARGET_NR_sched_getparam 121 +#define TARGET_NR_sched_setaffinity 122 +#define TARGET_NR_sched_getaffinity 123 +#define TARGET_NR_sched_yield 124 +#define TARGET_NR_sched_get_priority_max 125 +#define TARGET_NR_sched_get_priority_min 126 +#define TARGET_NR_sched_rr_get_interval 127 +#define TARGET_NR_restart_syscall 128 +#define TARGET_NR_kill 129 +#define TARGET_NR_tkill 130 +#define TARGET_NR_tgkill 131 +#define TARGET_NR_sigaltstack 132 +#define TARGET_NR_rt_sigsuspend 133 +#define TARGET_NR_rt_sigaction 134 +#define TARGET_NR_rt_sigprocmask 135 +#define TARGET_NR_rt_sigpending 136 +#define TARGET_NR_rt_sigtimedwait 137 +#define TARGET_NR_rt_sigqueueinfo 138 +#define TARGET_NR_rt_sigreturn 139 +#define TARGET_NR_setpriority 140 +#define TARGET_NR_getpriority 141 +#define TARGET_NR_reboot 142 +#define TARGET_NR_setregid 143 +#define TARGET_NR_setgid 144 +#define TARGET_NR_setreuid 145 +#define TARGET_NR_setuid 146 +#define TARGET_NR_setresuid 147 +#define TARGET_NR_getresuid 148 +#define TARGET_NR_setresgid 149 +#define TARGET_NR_getresgid 150 +#define TARGET_NR_setfsuid 151 +#define TARGET_NR_setfsgid 152 +#define TARGET_NR_times 153 +#define TARGET_NR_setpgid 154 +#define TARGET_NR_getpgid 155 +#define TARGET_NR_getsid 156 +#define TARGET_NR_setsid 157 +#define TARGET_NR_getgroups 158 +#define TARGET_NR_setgroups 159 +#define TARGET_NR_uname 160 +#define TARGET_NR_sethostname 161 +#define TARGET_NR_setdomainname 162 +#define TARGET_NR_getrlimit 163 +#define TARGET_NR_setrlimit 164 +#define TARGET_NR_getrusage 165 +#define TARGET_NR_umask 166 +#define TARGET_NR_prctl 167 +#define TARGET_NR_getcpu 168 +#define TARGET_NR_gettimeofday 169 +#define TARGET_NR_settimeofday 170 +#define TARGET_NR_adjtimex 171 +#define TARGET_NR_getpid 172 +#define TARGET_NR_getppid 173 +#define TARGET_NR_getuid 174 +#define TARGET_NR_geteuid 175 +#define TARGET_NR_getgid 176 +#define TARGET_NR_getegid 177 +#define TARGET_NR_gettid 178 +#define TARGET_NR_sysinfo 179 +#define TARGET_NR_mq_open 180 +#define TARGET_NR_mq_unlink 181 +#define TARGET_NR_mq_timedsend 182 +#define TARGET_NR_mq_timedreceive 183 +#define TARGET_NR_mq_notify 184 +#define TARGET_NR_mq_getsetattr 185 +#define TARGET_NR_msgget 186 +#define TARGET_NR_msgctl 187 +#define TARGET_NR_msgrcv 188 +#define TARGET_NR_msgsnd 189 +#define TARGET_NR_semget 190 +#define TARGET_NR_semctl 191 +#define TARGET_NR_semtimedop 192 +#define TARGET_NR_semop 193 +#define TARGET_NR_shmget 194 +#define TARGET_NR_shmctl 195 +#define TARGET_NR_shmat 196 +#define TARGET_NR_shmdt 197 +#define TARGET_NR_socket 198 +#define TARGET_NR_socketpair 199 +#define TARGET_NR_bind 200 +#define TARGET_NR_listen 201 +#define TARGET_NR_accept 202 +#define TARGET_NR_connect 203 +#define TARGET_NR_getsockname 204 +#define TARGET_NR_getpeername 205 +#define TARGET_NR_sendto 206 +#define TARGET_NR_recvfrom 207 +#define TARGET_NR_setsockopt 208 +#define TARGET_NR_getsockopt 209 +#define TARGET_NR_shutdown 210 +#define TARGET_NR_sendmsg 211 +#define TARGET_NR_recvmsg 212 +#define TARGET_NR_readahead 213 +#define TARGET_NR_brk 214 +#define TARGET_NR_munmap 215 +#define TARGET_NR_mremap 216 +#define TARGET_NR_add_key 217 +#define TARGET_NR_request_key 218 +#define TARGET_NR_keyctl 219 +#define TARGET_NR_clone 220 +#define TARGET_NR_execve 221 +#define TARGET_NR_mmap 222 +#define TARGET_NR_fadvise64 223 +#define TARGET_NR_swapon 224 +#define TARGET_NR_swapoff 225 +#define TARGET_NR_mprotect 226 +#define TARGET_NR_msync 227 +#define TARGET_NR_mlock 228 +#define TARGET_NR_munlock 229 +#define TARGET_NR_mlockall 230 +#define TARGET_NR_munlockall 231 +#define TARGET_NR_mincore 232 +#define TARGET_NR_madvise 233 +#define TARGET_NR_remap_file_pages 234 +#define TARGET_NR_mbind 235 +#define TARGET_NR_get_mempolicy 236 +#define TARGET_NR_set_mempolicy 237 +#define TARGET_NR_migrate_pages 238 +#define TARGET_NR_move_pages 239 +#define TARGET_NR_rt_tgsigqueueinfo 240 +#define TARGET_NR_perf_event_open 241 +#define TARGET_NR_accept4 242 +#define TARGET_NR_recvmmsg 243 +#define TARGET_NR_arch_specific_syscall 244 +#define TARGET_NR_riscv_flush_icache (TARGET_NR_arch_specific_syscall + 15) +#define TARGET_NR_wait4 260 +#define TARGET_NR_prlimit64 261 +#define TARGET_NR_fanotify_init 262 +#define TARGET_NR_fanotify_mark 263 +#define TARGET_NR_name_to_handle_at 264 +#define TARGET_NR_open_by_handle_at 265 +#define TARGET_NR_clock_adjtime 266 +#define TARGET_NR_syncfs 267 +#define TARGET_NR_setns 268 +#define TARGET_NR_sendmmsg 269 +#define TARGET_NR_process_vm_readv 270 +#define TARGET_NR_process_vm_writev 271 +#define TARGET_NR_kcmp 272 +#define TARGET_NR_finit_module 273 +#define TARGET_NR_sched_setattr 274 +#define TARGET_NR_sched_getattr 275 +#define TARGET_NR_renameat2 276 +#define TARGET_NR_seccomp 277 +#define TARGET_NR_getrandom 278 +#define TARGET_NR_memfd_create 279 +#define TARGET_NR_bpf 280 +#define TARGET_NR_execveat 281 +#define TARGET_NR_userfaultfd 282 +#define TARGET_NR_membarrier 283 +#define TARGET_NR_mlock2 284 +#define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289 +#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_io_pgetevents 292 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 +#define TARGET_NR_pidfd_send_signal 424 +#define TARGET_NR_io_uring_setup 425 +#define TARGET_NR_io_uring_enter 426 +#define TARGET_NR_io_uring_register 427 +#define TARGET_NR_open_tree 428 +#define TARGET_NR_move_mount 429 +#define TARGET_NR_fsopen 430 +#define TARGET_NR_fsconfig 431 +#define TARGET_NR_fsmount 432 +#define TARGET_NR_fspick 433 +#define TARGET_NR_pidfd_open 434 +#define TARGET_NR_clone3 435 +#define TARGET_NR_syscalls 436 + +#endif /* LINUX_USER_RISCV_SYSCALL64_NR_H */ diff --git a/linux-user/riscv/syscall_nr.h b/linux-user/riscv/syscall_nr.h index 5c87282209..0a5a2f2fb1 100644 --- a/linux-user/riscv/syscall_nr.h +++ b/linux-user/riscv/syscall_nr.h @@ -6,300 +6,10 @@ #ifndef LINUX_USER_RISCV_SYSCALL_NR_H #define LINUX_USER_RISCV_SYSCALL_NR_H -#define TARGET_NR_io_setup 0 -#define TARGET_NR_io_destroy 1 -#define TARGET_NR_io_submit 2 -#define TARGET_NR_io_cancel 3 -#define TARGET_NR_io_getevents 4 -#define TARGET_NR_setxattr 5 -#define TARGET_NR_lsetxattr 6 -#define TARGET_NR_fsetxattr 7 -#define TARGET_NR_getxattr 8 -#define TARGET_NR_lgetxattr 9 -#define TARGET_NR_fgetxattr 10 -#define TARGET_NR_listxattr 11 -#define TARGET_NR_llistxattr 12 -#define TARGET_NR_flistxattr 13 -#define TARGET_NR_removexattr 14 -#define TARGET_NR_lremovexattr 15 -#define TARGET_NR_fremovexattr 16 -#define TARGET_NR_getcwd 17 -#define TARGET_NR_lookup_dcookie 18 -#define TARGET_NR_eventfd2 19 -#define TARGET_NR_epoll_create1 20 -#define TARGET_NR_epoll_ctl 21 -#define TARGET_NR_epoll_pwait 22 -#define TARGET_NR_dup 23 -#define TARGET_NR_dup3 24 #ifdef TARGET_RISCV32 -#define TARGET_NR_fcntl64 25 +# include "syscall32_nr.h" #else -#define TARGET_NR_fcntl 25 +# include "syscall64_nr.h" #endif -#define TARGET_NR_inotify_init1 26 -#define TARGET_NR_inotify_add_watch 27 -#define TARGET_NR_inotify_rm_watch 28 -#define TARGET_NR_ioctl 29 -#define TARGET_NR_ioprio_set 30 -#define TARGET_NR_ioprio_get 31 -#define TARGET_NR_flock 32 -#define TARGET_NR_mknodat 33 -#define TARGET_NR_mkdirat 34 -#define TARGET_NR_unlinkat 35 -#define TARGET_NR_symlinkat 36 -#define TARGET_NR_linkat 37 -#define TARGET_NR_renameat 38 -#define TARGET_NR_umount2 39 -#define TARGET_NR_mount 40 -#define TARGET_NR_pivot_root 41 -#define TARGET_NR_nfsservctl 42 -#define TARGET_NR_statfs 43 -#define TARGET_NR_fstatfs 44 -#define TARGET_NR_truncate 45 -#define TARGET_NR_ftruncate 46 -#define TARGET_NR_fallocate 47 -#define TARGET_NR_faccessat 48 -#define TARGET_NR_chdir 49 -#define TARGET_NR_fchdir 50 -#define TARGET_NR_chroot 51 -#define TARGET_NR_fchmod 52 -#define TARGET_NR_fchmodat 53 -#define TARGET_NR_fchownat 54 -#define TARGET_NR_fchown 55 -#define TARGET_NR_openat 56 -#define TARGET_NR_close 57 -#define TARGET_NR_vhangup 58 -#define TARGET_NR_pipe2 59 -#define TARGET_NR_quotactl 60 -#define TARGET_NR_getdents64 61 -#ifdef TARGET_RISCV32 -#define TARGET_NR__llseek 62 -#else -#define TARGET_NR_lseek 62 -#endif -#define TARGET_NR_read 63 -#define TARGET_NR_write 64 -#define TARGET_NR_readv 65 -#define TARGET_NR_writev 66 -#define TARGET_NR_pread64 67 -#define TARGET_NR_pwrite64 68 -#define TARGET_NR_preadv 69 -#define TARGET_NR_pwritev 70 -#define TARGET_NR_sendfile 71 -#define TARGET_NR_pselect6 72 -#define TARGET_NR_ppoll 73 -#define TARGET_NR_signalfd4 74 -#define TARGET_NR_vmsplice 75 -#define TARGET_NR_splice 76 -#define TARGET_NR_tee 77 -#define TARGET_NR_readlinkat 78 -#define TARGET_NR_newfstatat 79 -#define TARGET_NR_fstat 80 -#define TARGET_NR_sync 81 -#define TARGET_NR_fsync 82 -#define TARGET_NR_fdatasync 83 -#define TARGET_NR_sync_file_range 84 -#define TARGET_NR_timerfd_create 85 -#define TARGET_NR_timerfd_settime 86 -#define TARGET_NR_timerfd_gettime 87 -#define TARGET_NR_utimensat 88 -#define TARGET_NR_acct 89 -#define TARGET_NR_capget 90 -#define TARGET_NR_capset 91 -#define TARGET_NR_personality 92 -#define TARGET_NR_exit 93 -#define TARGET_NR_exit_group 94 -#define TARGET_NR_waitid 95 -#define TARGET_NR_set_tid_address 96 -#define TARGET_NR_unshare 97 -#define TARGET_NR_futex 98 -#define TARGET_NR_set_robust_list 99 -#define TARGET_NR_get_robust_list 100 -#define TARGET_NR_nanosleep 101 -#define TARGET_NR_getitimer 102 -#define TARGET_NR_setitimer 103 -#define TARGET_NR_kexec_load 104 -#define TARGET_NR_init_module 105 -#define TARGET_NR_delete_module 106 -#define TARGET_NR_timer_create 107 -#define TARGET_NR_timer_gettime 108 -#define TARGET_NR_timer_getoverrun 109 -#define TARGET_NR_timer_settime 110 -#define TARGET_NR_timer_delete 111 -#define TARGET_NR_clock_settime 112 -#define TARGET_NR_clock_gettime 113 -#define TARGET_NR_clock_getres 114 -#define TARGET_NR_clock_nanosleep 115 -#define TARGET_NR_syslog 116 -#define TARGET_NR_ptrace 117 -#define TARGET_NR_sched_setparam 118 -#define TARGET_NR_sched_setscheduler 119 -#define TARGET_NR_sched_getscheduler 120 -#define TARGET_NR_sched_getparam 121 -#define TARGET_NR_sched_setaffinity 122 -#define TARGET_NR_sched_getaffinity 123 -#define TARGET_NR_sched_yield 124 -#define TARGET_NR_sched_get_priority_max 125 -#define TARGET_NR_sched_get_priority_min 126 -#define TARGET_NR_sched_rr_get_interval 127 -#define TARGET_NR_restart_syscall 128 -#define TARGET_NR_kill 129 -#define TARGET_NR_tkill 130 -#define TARGET_NR_tgkill 131 -#define TARGET_NR_sigaltstack 132 -#define TARGET_NR_rt_sigsuspend 133 -#define TARGET_NR_rt_sigaction 134 -#define TARGET_NR_rt_sigprocmask 135 -#define TARGET_NR_rt_sigpending 136 -#define TARGET_NR_rt_sigtimedwait 137 -#define TARGET_NR_rt_sigqueueinfo 138 -#define TARGET_NR_rt_sigreturn 139 -#define TARGET_NR_setpriority 140 -#define TARGET_NR_getpriority 141 -#define TARGET_NR_reboot 142 -#define TARGET_NR_setregid 143 -#define TARGET_NR_setgid 144 -#define TARGET_NR_setreuid 145 -#define TARGET_NR_setuid 146 -#define TARGET_NR_setresuid 147 -#define TARGET_NR_getresuid 148 -#define TARGET_NR_setresgid 149 -#define TARGET_NR_getresgid 150 -#define TARGET_NR_setfsuid 151 -#define TARGET_NR_setfsgid 152 -#define TARGET_NR_times 153 -#define TARGET_NR_setpgid 154 -#define TARGET_NR_getpgid 155 -#define TARGET_NR_getsid 156 -#define TARGET_NR_setsid 157 -#define TARGET_NR_getgroups 158 -#define TARGET_NR_setgroups 159 -#define TARGET_NR_uname 160 -#define TARGET_NR_sethostname 161 -#define TARGET_NR_setdomainname 162 -#define TARGET_NR_getrlimit 163 -#define TARGET_NR_setrlimit 164 -#define TARGET_NR_getrusage 165 -#define TARGET_NR_umask 166 -#define TARGET_NR_prctl 167 -#define TARGET_NR_getcpu 168 -#define TARGET_NR_gettimeofday 169 -#define TARGET_NR_settimeofday 170 -#define TARGET_NR_adjtimex 171 -#define TARGET_NR_getpid 172 -#define TARGET_NR_getppid 173 -#define TARGET_NR_getuid 174 -#define TARGET_NR_geteuid 175 -#define TARGET_NR_getgid 176 -#define TARGET_NR_getegid 177 -#define TARGET_NR_gettid 178 -#define TARGET_NR_sysinfo 179 -#define TARGET_NR_mq_open 180 -#define TARGET_NR_mq_unlink 181 -#define TARGET_NR_mq_timedsend 182 -#define TARGET_NR_mq_timedreceive 183 -#define TARGET_NR_mq_notify 184 -#define TARGET_NR_mq_getsetattr 185 -#define TARGET_NR_msgget 186 -#define TARGET_NR_msgctl 187 -#define TARGET_NR_msgrcv 188 -#define TARGET_NR_msgsnd 189 -#define TARGET_NR_semget 190 -#define TARGET_NR_semctl 191 -#define TARGET_NR_semtimedop 192 -#define TARGET_NR_semop 193 -#define TARGET_NR_shmget 194 -#define TARGET_NR_shmctl 195 -#define TARGET_NR_shmat 196 -#define TARGET_NR_shmdt 197 -#define TARGET_NR_socket 198 -#define TARGET_NR_socketpair 199 -#define TARGET_NR_bind 200 -#define TARGET_NR_listen 201 -#define TARGET_NR_accept 202 -#define TARGET_NR_connect 203 -#define TARGET_NR_getsockname 204 -#define TARGET_NR_getpeername 205 -#define TARGET_NR_sendto 206 -#define TARGET_NR_recvfrom 207 -#define TARGET_NR_setsockopt 208 -#define TARGET_NR_getsockopt 209 -#define TARGET_NR_shutdown 210 -#define TARGET_NR_sendmsg 211 -#define TARGET_NR_recvmsg 212 -#define TARGET_NR_readahead 213 -#define TARGET_NR_brk 214 -#define TARGET_NR_munmap 215 -#define TARGET_NR_mremap 216 -#define TARGET_NR_add_key 217 -#define TARGET_NR_request_key 218 -#define TARGET_NR_keyctl 219 -#define TARGET_NR_clone 220 -#define TARGET_NR_execve 221 -#ifdef TARGET_RISCV32 -#define TARGET_NR_mmap2 222 -#define TARGET_NR_fadvise64_64 223 -#else -#define TARGET_NR_mmap 222 -#define TARGET_NR_fadvise64 223 -#endif -#define TARGET_NR_swapon 224 -#define TARGET_NR_swapoff 225 -#define TARGET_NR_mprotect 226 -#define TARGET_NR_msync 227 -#define TARGET_NR_mlock 228 -#define TARGET_NR_munlock 229 -#define TARGET_NR_mlockall 230 -#define TARGET_NR_munlockall 231 -#define TARGET_NR_mincore 232 -#define TARGET_NR_madvise 233 -#define TARGET_NR_remap_file_pages 234 -#define TARGET_NR_mbind 235 -#define TARGET_NR_get_mempolicy 236 -#define TARGET_NR_set_mempolicy 237 -#define TARGET_NR_migrate_pages 238 -#define TARGET_NR_move_pages 239 -#define TARGET_NR_rt_tgsigqueueinfo 240 -#define TARGET_NR_perf_event_open 241 -#define TARGET_NR_accept4 242 -#define TARGET_NR_recvmmsg 243 -#define TARGET_NR_arch_specific_syscall 244 -#define TARGET_NR_wait4 260 -#define TARGET_NR_prlimit64 261 -#define TARGET_NR_fanotify_init 262 -#define TARGET_NR_fanotify_mark 263 -#define TARGET_NR_name_to_handle_at 264 -#define TARGET_NR_open_by_handle_at 265 -#define TARGET_NR_clock_adjtime 266 -#define TARGET_NR_syncfs 267 -#define TARGET_NR_setns 268 -#define TARGET_NR_sendmmsg 269 -#define TARGET_NR_process_vm_readv 270 -#define TARGET_NR_process_vm_writev 271 -#define TARGET_NR_kcmp 272 -#define TARGET_NR_finit_module 273 -#define TARGET_NR_sched_setattr 274 -#define TARGET_NR_sched_getattr 275 -#define TARGET_NR_renameat2 276 -#define TARGET_NR_seccomp 277 -#define TARGET_NR_getrandom 278 -#define TARGET_NR_memfd_create 279 -#define TARGET_NR_bpf 280 -#define TARGET_NR_execveat 281 -#define TARGET_NR_userfaultfd 282 -#define TARGET_NR_membarrier 283 -#define TARGET_NR_mlock2 284 -#define TARGET_NR_copy_file_range 285 -#define TARGET_NR_preadv2 286 -#define TARGET_NR_pwritev2 287 -#define TARGET_NR_pkey_mprotect 288 -#define TARGET_NR_pkey_alloc 289 -#define TARGET_NR_pkey_free 290 -#define TARGET_NR_statx 291 -#define TARGET_NR_io_pgetevents 292 -#define TARGET_NR_rseq 293 -#define TARGET_NR_kexec_file_load 294 - -#define TARGET_NR_syscalls (TARGET_NR_kexec_file_load + 1) #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index be5f524e0a..e55a477c34 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -295,7 +295,7 @@ _syscall1(int,exit_group,int,error_code) #if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address) _syscall1(int,set_tid_address,int *,tidptr) #endif -#if defined(TARGET_NR_futex) && defined(__NR_futex) +#if (defined(TARGET_NR_futex) || defined(TARGET_NR_exit)) && defined(__NR_futex) _syscall6(int,sys_futex,int *,uaddr,int,op,int,val, const struct timespec *,timeout,int *,uaddr2,int,val3) #endif From 4d6a835dea47bdcdd67e68deb9161c4a6437d944 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:43 +0100 Subject: [PATCH 08/32] linux-user: introduce parameters to generate syscall_nr.h This will be used when we'll import syscall.tbl from the kernel Add a script to remove all the dependencies to syscall_nr.h that point to source directory and not to the build directory. The list of arch will be update while the generated files are added. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-2-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- Makefile.target | 3 ++- configure | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile.target b/Makefile.target index 2d43dc586a..cb3a6fa5e7 100644 --- a/Makefile.target +++ b/Makefile.target @@ -128,7 +128,8 @@ ifdef CONFIG_LINUX_USER QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ -I$(SRC_PATH)/linux-user/host/$(ARCH) \ - -I$(SRC_PATH)/linux-user + -I$(SRC_PATH)/linux-user \ + -Ilinux-user/$(TARGET_ABI_DIR) obj-y += linux-user/ obj-y += gdbstub.o thunk.o diff --git a/configure b/configure index cbf864bff1..39e55a1ecf 100755 --- a/configure +++ b/configure @@ -1887,6 +1887,17 @@ fi # Remove old dependency files to make sure that they get properly regenerated rm -f */config-devices.mak.d +# Remove syscall_nr.h to be sure they will be regenerated in the build +# directory, not in the source directory +for arch in ; do + # remove the file if it has been generated in the source directory + rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" + # remove the dependency files + find . -name "*.d" \ + -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \ + -exec rm {} \; +done + if test -z "$python" then error_exit "Python not found. Use --python=/path/to/python" @@ -7931,6 +7942,9 @@ echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak if [ "$HOST_VARIANT_DIR" != "" ]; then echo "HOST_VARIANT_DIR=$HOST_VARIANT_DIR" >> $config_target_mak fi +if [ "$TARGET_SYSTBL_ABI" != "" ]; then + echo "TARGET_SYSTBL_ABI=$TARGET_SYSTBL_ABI" >> $config_target_mak +fi if supported_xen_target $target; then echo "CONFIG_XEN=y" >> $config_target_mak From 6116aea994082a280c212435763c68e358dac9c7 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:44 +0100 Subject: [PATCH 09/32] linux-user, alpha: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/alpha/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-3-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 2 + linux-user/alpha/Makefile.objs | 5 + linux-user/alpha/syscall.tbl | 479 ++++++++++++++++++++++++++++++++ linux-user/alpha/syscall_nr.h | 492 --------------------------------- linux-user/alpha/syscallhdr.sh | 32 +++ 6 files changed, 520 insertions(+), 493 deletions(-) create mode 100644 linux-user/alpha/Makefile.objs create mode 100644 linux-user/alpha/syscall.tbl delete mode 100644 linux-user/alpha/syscall_nr.h create mode 100644 linux-user/alpha/syscallhdr.sh diff --git a/configure b/configure index 39e55a1ecf..5a024d2490 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in ; do +for arch in alpha ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7795,6 +7795,7 @@ case "$target_name" in ;; alpha) mttcg="yes" + TARGET_SYSTBL_ABI=common ;; arm|armeb) TARGET_ARCH=arm diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index d2f33beb5e..a1afb4d21f 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -8,3 +8,5 @@ obj-$(TARGET_I386) += vm86.o obj-$(TARGET_ARM) += arm/nwfpe/ obj-$(TARGET_ARM) += arm/semihost.o obj-$(TARGET_AARCH64) += arm/semihost.o + +obj-$(TARGET_ALPHA) += alpha/ diff --git a/linux-user/alpha/Makefile.objs b/linux-user/alpha/Makefile.objs new file mode 100644 index 0000000000..d6397a70ab --- /dev/null +++ b/linux-user/alpha/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/alpha/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/alpha/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/alpha/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/alpha/syscall.tbl b/linux-user/alpha/syscall.tbl new file mode 100644 index 0000000000..36d42da746 --- /dev/null +++ b/linux-user/alpha/syscall.tbl @@ -0,0 +1,479 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for alpha +# +# The format is: +# +# +# The is always "common" for this file +# +0 common osf_syscall alpha_syscall_zero +1 common exit sys_exit +2 common fork alpha_fork +3 common read sys_read +4 common write sys_write +5 common osf_old_open sys_ni_syscall +6 common close sys_close +7 common osf_wait4 sys_osf_wait4 +8 common osf_old_creat sys_ni_syscall +9 common link sys_link +10 common unlink sys_unlink +11 common osf_execve sys_ni_syscall +12 common chdir sys_chdir +13 common fchdir sys_fchdir +14 common mknod sys_mknod +15 common chmod sys_chmod +16 common chown sys_chown +17 common brk sys_osf_brk +18 common osf_getfsstat sys_ni_syscall +19 common lseek sys_lseek +20 common getxpid sys_getxpid +21 common osf_mount sys_osf_mount +22 common umount2 sys_umount +23 common setuid sys_setuid +24 common getxuid sys_getxuid +25 common exec_with_loader sys_ni_syscall +26 common ptrace sys_ptrace +27 common osf_nrecvmsg sys_ni_syscall +28 common osf_nsendmsg sys_ni_syscall +29 common osf_nrecvfrom sys_ni_syscall +30 common osf_naccept sys_ni_syscall +31 common osf_ngetpeername sys_ni_syscall +32 common osf_ngetsockname sys_ni_syscall +33 common access sys_access +34 common osf_chflags sys_ni_syscall +35 common osf_fchflags sys_ni_syscall +36 common sync sys_sync +37 common kill sys_kill +38 common osf_old_stat sys_ni_syscall +39 common setpgid sys_setpgid +40 common osf_old_lstat sys_ni_syscall +41 common dup sys_dup +42 common pipe sys_alpha_pipe +43 common osf_set_program_attributes sys_osf_set_program_attributes +44 common osf_profil sys_ni_syscall +45 common open sys_open +46 common osf_old_sigaction sys_ni_syscall +47 common getxgid sys_getxgid +48 common osf_sigprocmask sys_osf_sigprocmask +49 common osf_getlogin sys_ni_syscall +50 common osf_setlogin sys_ni_syscall +51 common acct sys_acct +52 common sigpending sys_sigpending +54 common ioctl sys_ioctl +55 common osf_reboot sys_ni_syscall +56 common osf_revoke sys_ni_syscall +57 common symlink sys_symlink +58 common readlink sys_readlink +59 common execve sys_execve +60 common umask sys_umask +61 common chroot sys_chroot +62 common osf_old_fstat sys_ni_syscall +63 common getpgrp sys_getpgrp +64 common getpagesize sys_getpagesize +65 common osf_mremap sys_ni_syscall +66 common vfork alpha_vfork +67 common stat sys_newstat +68 common lstat sys_newlstat +69 common osf_sbrk sys_ni_syscall +70 common osf_sstk sys_ni_syscall +71 common mmap sys_osf_mmap +72 common osf_old_vadvise sys_ni_syscall +73 common munmap sys_munmap +74 common mprotect sys_mprotect +75 common madvise sys_madvise +76 common vhangup sys_vhangup +77 common osf_kmodcall sys_ni_syscall +78 common osf_mincore sys_ni_syscall +79 common getgroups sys_getgroups +80 common setgroups sys_setgroups +81 common osf_old_getpgrp sys_ni_syscall +82 common setpgrp sys_setpgid +83 common osf_setitimer compat_sys_setitimer +84 common osf_old_wait sys_ni_syscall +85 common osf_table sys_ni_syscall +86 common osf_getitimer compat_sys_getitimer +87 common gethostname sys_gethostname +88 common sethostname sys_sethostname +89 common getdtablesize sys_getdtablesize +90 common dup2 sys_dup2 +91 common fstat sys_newfstat +92 common fcntl sys_fcntl +93 common osf_select sys_osf_select +94 common poll sys_poll +95 common fsync sys_fsync +96 common setpriority sys_setpriority +97 common socket sys_socket +98 common connect sys_connect +99 common accept sys_accept +100 common getpriority sys_osf_getpriority +101 common send sys_send +102 common recv sys_recv +103 common sigreturn sys_sigreturn +104 common bind sys_bind +105 common setsockopt sys_setsockopt +106 common listen sys_listen +107 common osf_plock sys_ni_syscall +108 common osf_old_sigvec sys_ni_syscall +109 common osf_old_sigblock sys_ni_syscall +110 common osf_old_sigsetmask sys_ni_syscall +111 common sigsuspend sys_sigsuspend +112 common osf_sigstack sys_osf_sigstack +113 common recvmsg sys_recvmsg +114 common sendmsg sys_sendmsg +115 common osf_old_vtrace sys_ni_syscall +116 common osf_gettimeofday sys_osf_gettimeofday +117 common osf_getrusage sys_osf_getrusage +118 common getsockopt sys_getsockopt +120 common readv sys_osf_readv +121 common writev sys_osf_writev +122 common osf_settimeofday sys_osf_settimeofday +123 common fchown sys_fchown +124 common fchmod sys_fchmod +125 common recvfrom sys_recvfrom +126 common setreuid sys_setreuid +127 common setregid sys_setregid +128 common rename sys_rename +129 common truncate sys_truncate +130 common ftruncate sys_ftruncate +131 common flock sys_flock +132 common setgid sys_setgid +133 common sendto sys_sendto +134 common shutdown sys_shutdown +135 common socketpair sys_socketpair +136 common mkdir sys_mkdir +137 common rmdir sys_rmdir +138 common osf_utimes sys_osf_utimes +139 common osf_old_sigreturn sys_ni_syscall +140 common osf_adjtime sys_ni_syscall +141 common getpeername sys_getpeername +142 common osf_gethostid sys_ni_syscall +143 common osf_sethostid sys_ni_syscall +144 common getrlimit sys_getrlimit +145 common setrlimit sys_setrlimit +146 common osf_old_killpg sys_ni_syscall +147 common setsid sys_setsid +148 common quotactl sys_quotactl +149 common osf_oldquota sys_ni_syscall +150 common getsockname sys_getsockname +153 common osf_pid_block sys_ni_syscall +154 common osf_pid_unblock sys_ni_syscall +156 common sigaction sys_osf_sigaction +157 common osf_sigwaitprim sys_ni_syscall +158 common osf_nfssvc sys_ni_syscall +159 common osf_getdirentries sys_osf_getdirentries +160 common osf_statfs sys_osf_statfs +161 common osf_fstatfs sys_osf_fstatfs +163 common osf_asynch_daemon sys_ni_syscall +164 common osf_getfh sys_ni_syscall +165 common osf_getdomainname sys_osf_getdomainname +166 common setdomainname sys_setdomainname +169 common osf_exportfs sys_ni_syscall +181 common osf_alt_plock sys_ni_syscall +184 common osf_getmnt sys_ni_syscall +187 common osf_alt_sigpending sys_ni_syscall +188 common osf_alt_setsid sys_ni_syscall +199 common osf_swapon sys_swapon +200 common msgctl sys_old_msgctl +201 common msgget sys_msgget +202 common msgrcv sys_msgrcv +203 common msgsnd sys_msgsnd +204 common semctl sys_old_semctl +205 common semget sys_semget +206 common semop sys_semop +207 common osf_utsname sys_osf_utsname +208 common lchown sys_lchown +209 common shmat sys_shmat +210 common shmctl sys_old_shmctl +211 common shmdt sys_shmdt +212 common shmget sys_shmget +213 common osf_mvalid sys_ni_syscall +214 common osf_getaddressconf sys_ni_syscall +215 common osf_msleep sys_ni_syscall +216 common osf_mwakeup sys_ni_syscall +217 common msync sys_msync +218 common osf_signal sys_ni_syscall +219 common osf_utc_gettime sys_ni_syscall +220 common osf_utc_adjtime sys_ni_syscall +222 common osf_security sys_ni_syscall +223 common osf_kloadcall sys_ni_syscall +224 common osf_stat sys_osf_stat +225 common osf_lstat sys_osf_lstat +226 common osf_fstat sys_osf_fstat +227 common osf_statfs64 sys_osf_statfs64 +228 common osf_fstatfs64 sys_osf_fstatfs64 +233 common getpgid sys_getpgid +234 common getsid sys_getsid +235 common sigaltstack sys_sigaltstack +236 common osf_waitid sys_ni_syscall +237 common osf_priocntlset sys_ni_syscall +238 common osf_sigsendset sys_ni_syscall +239 common osf_set_speculative sys_ni_syscall +240 common osf_msfs_syscall sys_ni_syscall +241 common osf_sysinfo sys_osf_sysinfo +242 common osf_uadmin sys_ni_syscall +243 common osf_fuser sys_ni_syscall +244 common osf_proplist_syscall sys_osf_proplist_syscall +245 common osf_ntp_adjtime sys_ni_syscall +246 common osf_ntp_gettime sys_ni_syscall +247 common osf_pathconf sys_ni_syscall +248 common osf_fpathconf sys_ni_syscall +250 common osf_uswitch sys_ni_syscall +251 common osf_usleep_thread sys_osf_usleep_thread +252 common osf_audcntl sys_ni_syscall +253 common osf_audgen sys_ni_syscall +254 common sysfs sys_sysfs +255 common osf_subsys_info sys_ni_syscall +256 common osf_getsysinfo sys_osf_getsysinfo +257 common osf_setsysinfo sys_osf_setsysinfo +258 common osf_afs_syscall sys_ni_syscall +259 common osf_swapctl sys_ni_syscall +260 common osf_memcntl sys_ni_syscall +261 common osf_fdatasync sys_ni_syscall +300 common bdflush sys_bdflush +301 common sethae sys_sethae +302 common mount sys_mount +303 common old_adjtimex sys_old_adjtimex +304 common swapoff sys_swapoff +305 common getdents sys_getdents +306 common create_module sys_ni_syscall +307 common init_module sys_init_module +308 common delete_module sys_delete_module +309 common get_kernel_syms sys_ni_syscall +310 common syslog sys_syslog +311 common reboot sys_reboot +312 common clone alpha_clone +313 common uselib sys_uselib +314 common mlock sys_mlock +315 common munlock sys_munlock +316 common mlockall sys_mlockall +317 common munlockall sys_munlockall +318 common sysinfo sys_sysinfo +319 common _sysctl sys_sysctl +# 320 was sys_idle +321 common oldumount sys_oldumount +322 common swapon sys_swapon +323 common times sys_times +324 common personality sys_personality +325 common setfsuid sys_setfsuid +326 common setfsgid sys_setfsgid +327 common ustat sys_ustat +328 common statfs sys_statfs +329 common fstatfs sys_fstatfs +330 common sched_setparam sys_sched_setparam +331 common sched_getparam sys_sched_getparam +332 common sched_setscheduler sys_sched_setscheduler +333 common sched_getscheduler sys_sched_getscheduler +334 common sched_yield sys_sched_yield +335 common sched_get_priority_max sys_sched_get_priority_max +336 common sched_get_priority_min sys_sched_get_priority_min +337 common sched_rr_get_interval sys_sched_rr_get_interval +338 common afs_syscall sys_ni_syscall +339 common uname sys_newuname +340 common nanosleep sys_nanosleep +341 common mremap sys_mremap +342 common nfsservctl sys_ni_syscall +343 common setresuid sys_setresuid +344 common getresuid sys_getresuid +345 common pciconfig_read sys_pciconfig_read +346 common pciconfig_write sys_pciconfig_write +347 common query_module sys_ni_syscall +348 common prctl sys_prctl +349 common pread64 sys_pread64 +350 common pwrite64 sys_pwrite64 +351 common rt_sigreturn sys_rt_sigreturn +352 common rt_sigaction sys_rt_sigaction +353 common rt_sigprocmask sys_rt_sigprocmask +354 common rt_sigpending sys_rt_sigpending +355 common rt_sigtimedwait sys_rt_sigtimedwait +356 common rt_sigqueueinfo sys_rt_sigqueueinfo +357 common rt_sigsuspend sys_rt_sigsuspend +358 common select sys_select +359 common gettimeofday sys_gettimeofday +360 common settimeofday sys_settimeofday +361 common getitimer sys_getitimer +362 common setitimer sys_setitimer +363 common utimes sys_utimes +364 common getrusage sys_getrusage +365 common wait4 sys_wait4 +366 common adjtimex sys_adjtimex +367 common getcwd sys_getcwd +368 common capget sys_capget +369 common capset sys_capset +370 common sendfile sys_sendfile64 +371 common setresgid sys_setresgid +372 common getresgid sys_getresgid +373 common dipc sys_ni_syscall +374 common pivot_root sys_pivot_root +375 common mincore sys_mincore +376 common pciconfig_iobase sys_pciconfig_iobase +377 common getdents64 sys_getdents64 +378 common gettid sys_gettid +379 common readahead sys_readahead +# 380 is unused +381 common tkill sys_tkill +382 common setxattr sys_setxattr +383 common lsetxattr sys_lsetxattr +384 common fsetxattr sys_fsetxattr +385 common getxattr sys_getxattr +386 common lgetxattr sys_lgetxattr +387 common fgetxattr sys_fgetxattr +388 common listxattr sys_listxattr +389 common llistxattr sys_llistxattr +390 common flistxattr sys_flistxattr +391 common removexattr sys_removexattr +392 common lremovexattr sys_lremovexattr +393 common fremovexattr sys_fremovexattr +394 common futex sys_futex +395 common sched_setaffinity sys_sched_setaffinity +396 common sched_getaffinity sys_sched_getaffinity +397 common tuxcall sys_ni_syscall +398 common io_setup sys_io_setup +399 common io_destroy sys_io_destroy +400 common io_getevents sys_io_getevents +401 common io_submit sys_io_submit +402 common io_cancel sys_io_cancel +405 common exit_group sys_exit_group +406 common lookup_dcookie sys_lookup_dcookie +407 common epoll_create sys_epoll_create +408 common epoll_ctl sys_epoll_ctl +409 common epoll_wait sys_epoll_wait +410 common remap_file_pages sys_remap_file_pages +411 common set_tid_address sys_set_tid_address +412 common restart_syscall sys_restart_syscall +413 common fadvise64 sys_fadvise64 +414 common timer_create sys_timer_create +415 common timer_settime sys_timer_settime +416 common timer_gettime sys_timer_gettime +417 common timer_getoverrun sys_timer_getoverrun +418 common timer_delete sys_timer_delete +419 common clock_settime sys_clock_settime +420 common clock_gettime sys_clock_gettime +421 common clock_getres sys_clock_getres +422 common clock_nanosleep sys_clock_nanosleep +423 common semtimedop sys_semtimedop +424 common tgkill sys_tgkill +425 common stat64 sys_stat64 +426 common lstat64 sys_lstat64 +427 common fstat64 sys_fstat64 +428 common vserver sys_ni_syscall +429 common mbind sys_ni_syscall +430 common get_mempolicy sys_ni_syscall +431 common set_mempolicy sys_ni_syscall +432 common mq_open sys_mq_open +433 common mq_unlink sys_mq_unlink +434 common mq_timedsend sys_mq_timedsend +435 common mq_timedreceive sys_mq_timedreceive +436 common mq_notify sys_mq_notify +437 common mq_getsetattr sys_mq_getsetattr +438 common waitid sys_waitid +439 common add_key sys_add_key +440 common request_key sys_request_key +441 common keyctl sys_keyctl +442 common ioprio_set sys_ioprio_set +443 common ioprio_get sys_ioprio_get +444 common inotify_init sys_inotify_init +445 common inotify_add_watch sys_inotify_add_watch +446 common inotify_rm_watch sys_inotify_rm_watch +447 common fdatasync sys_fdatasync +448 common kexec_load sys_kexec_load +449 common migrate_pages sys_migrate_pages +450 common openat sys_openat +451 common mkdirat sys_mkdirat +452 common mknodat sys_mknodat +453 common fchownat sys_fchownat +454 common futimesat sys_futimesat +455 common fstatat64 sys_fstatat64 +456 common unlinkat sys_unlinkat +457 common renameat sys_renameat +458 common linkat sys_linkat +459 common symlinkat sys_symlinkat +460 common readlinkat sys_readlinkat +461 common fchmodat sys_fchmodat +462 common faccessat sys_faccessat +463 common pselect6 sys_pselect6 +464 common ppoll sys_ppoll +465 common unshare sys_unshare +466 common set_robust_list sys_set_robust_list +467 common get_robust_list sys_get_robust_list +468 common splice sys_splice +469 common sync_file_range sys_sync_file_range +470 common tee sys_tee +471 common vmsplice sys_vmsplice +472 common move_pages sys_move_pages +473 common getcpu sys_getcpu +474 common epoll_pwait sys_epoll_pwait +475 common utimensat sys_utimensat +476 common signalfd sys_signalfd +477 common timerfd sys_ni_syscall +478 common eventfd sys_eventfd +479 common recvmmsg sys_recvmmsg +480 common fallocate sys_fallocate +481 common timerfd_create sys_timerfd_create +482 common timerfd_settime sys_timerfd_settime +483 common timerfd_gettime sys_timerfd_gettime +484 common signalfd4 sys_signalfd4 +485 common eventfd2 sys_eventfd2 +486 common epoll_create1 sys_epoll_create1 +487 common dup3 sys_dup3 +488 common pipe2 sys_pipe2 +489 common inotify_init1 sys_inotify_init1 +490 common preadv sys_preadv +491 common pwritev sys_pwritev +492 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo +493 common perf_event_open sys_perf_event_open +494 common fanotify_init sys_fanotify_init +495 common fanotify_mark sys_fanotify_mark +496 common prlimit64 sys_prlimit64 +497 common name_to_handle_at sys_name_to_handle_at +498 common open_by_handle_at sys_open_by_handle_at +499 common clock_adjtime sys_clock_adjtime +500 common syncfs sys_syncfs +501 common setns sys_setns +502 common accept4 sys_accept4 +503 common sendmmsg sys_sendmmsg +504 common process_vm_readv sys_process_vm_readv +505 common process_vm_writev sys_process_vm_writev +506 common kcmp sys_kcmp +507 common finit_module sys_finit_module +508 common sched_setattr sys_sched_setattr +509 common sched_getattr sys_sched_getattr +510 common renameat2 sys_renameat2 +511 common getrandom sys_getrandom +512 common memfd_create sys_memfd_create +513 common execveat sys_execveat +514 common seccomp sys_seccomp +515 common bpf sys_bpf +516 common userfaultfd sys_userfaultfd +517 common membarrier sys_membarrier +518 common mlock2 sys_mlock2 +519 common copy_file_range sys_copy_file_range +520 common preadv2 sys_preadv2 +521 common pwritev2 sys_pwritev2 +522 common statx sys_statx +523 common io_pgetevents sys_io_pgetevents +524 common pkey_mprotect sys_pkey_mprotect +525 common pkey_alloc sys_pkey_alloc +526 common pkey_free sys_pkey_free +527 common rseq sys_rseq +528 common statfs64 sys_statfs64 +529 common fstatfs64 sys_fstatfs64 +530 common getegid sys_getegid +531 common geteuid sys_geteuid +532 common getppid sys_getppid +# all other architectures have common numbers for new syscall, alpha +# is the exception. +534 common pidfd_send_signal sys_pidfd_send_signal +535 common io_uring_setup sys_io_uring_setup +536 common io_uring_enter sys_io_uring_enter +537 common io_uring_register sys_io_uring_register +538 common open_tree sys_open_tree +539 common move_mount sys_move_mount +540 common fsopen sys_fsopen +541 common fsconfig sys_fsconfig +542 common fsmount sys_fsmount +543 common fspick sys_fspick +544 common pidfd_open sys_pidfd_open +# 545 reserved for clone3 +547 common openat2 sys_openat2 +548 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h deleted file mode 100644 index c29fc17722..0000000000 --- a/linux-user/alpha/syscall_nr.h +++ /dev/null @@ -1,492 +0,0 @@ -#ifndef LINUX_USER_ALPHA_SYSCALL_NR_H -#define LINUX_USER_ALPHA_SYSCALL_NR_H - -#define TARGET_NR_osf_syscall 0 /* not implemented */ -#define TARGET_NR_exit 1 -#define TARGET_NR_fork 2 -#define TARGET_NR_read 3 -#define TARGET_NR_write 4 -#define TARGET_NR_osf_old_open 5 /* not implemented */ -#define TARGET_NR_close 6 -#define TARGET_NR_osf_wait4 7 -#define TARGET_NR_osf_old_creat 8 /* not implemented */ -#define TARGET_NR_link 9 -#define TARGET_NR_unlink 10 -#define TARGET_NR_osf_execve 11 /* not implemented */ -#define TARGET_NR_chdir 12 -#define TARGET_NR_fchdir 13 -#define TARGET_NR_mknod 14 -#define TARGET_NR_chmod 15 -#define TARGET_NR_chown 16 -#define TARGET_NR_brk 17 -#define TARGET_NR_osf_getfsstat 18 /* not implemented */ -#define TARGET_NR_lseek 19 -#define TARGET_NR_getxpid 20 -#define TARGET_NR_osf_mount 21 -#define TARGET_NR_umount2 22 -#define TARGET_NR_setuid 23 -#define TARGET_NR_getxuid 24 -#define TARGET_NR_exec_with_loader 25 /* not implemented */ -#define TARGET_NR_ptrace 26 -#define TARGET_NR_osf_nrecvmsg 27 /* not implemented */ -#define TARGET_NR_osf_nsendmsg 28 /* not implemented */ -#define TARGET_NR_osf_nrecvfrom 29 /* not implemented */ -#define TARGET_NR_osf_naccept 30 /* not implemented */ -#define TARGET_NR_osf_ngetpeername 31 /* not implemented */ -#define TARGET_NR_osf_ngetsockname 32 /* not implemented */ -#define TARGET_NR_access 33 -#define TARGET_NR_osf_chflags 34 /* not implemented */ -#define TARGET_NR_osf_fchflags 35 /* not implemented */ -#define TARGET_NR_sync 36 -#define TARGET_NR_kill 37 -#define TARGET_NR_osf_old_stat 38 /* not implemented */ -#define TARGET_NR_setpgid 39 -#define TARGET_NR_osf_old_lstat 40 /* not implemented */ -#define TARGET_NR_dup 41 -#define TARGET_NR_pipe 42 -#define TARGET_NR_osf_set_program_attributes 43 -#define TARGET_NR_osf_profil 44 /* not implemented */ -#define TARGET_NR_open 45 -#define TARGET_NR_osf_old_sigaction 46 /* not implemented */ -#define TARGET_NR_getxgid 47 -#define TARGET_NR_sigprocmask 48 -#define TARGET_NR_osf_getlogin 49 /* not implemented */ -#define TARGET_NR_osf_setlogin 50 /* not implemented */ -#define TARGET_NR_acct 51 -#define TARGET_NR_sigpending 52 - -#define TARGET_NR_ioctl 54 -#define TARGET_NR_osf_reboot 55 /* not implemented */ -#define TARGET_NR_osf_revoke 56 /* not implemented */ -#define TARGET_NR_symlink 57 -#define TARGET_NR_readlink 58 -#define TARGET_NR_execve 59 -#define TARGET_NR_umask 60 -#define TARGET_NR_chroot 61 -#define TARGET_NR_osf_old_fstat 62 /* not implemented */ -#define TARGET_NR_getpgrp 63 -#define TARGET_NR_getpagesize 64 -#define TARGET_NR_osf_mremap 65 /* not implemented */ -#define TARGET_NR_vfork 66 -#define TARGET_NR_stat 67 -#define TARGET_NR_lstat 68 -#define TARGET_NR_osf_sbrk 69 /* not implemented */ -#define TARGET_NR_osf_sstk 70 /* not implemented */ -#define TARGET_NR_mmap 71 /* OSF/1 mmap is superset of Linux */ -#define TARGET_NR_osf_old_vadvise 72 /* not implemented */ -#define TARGET_NR_munmap 73 -#define TARGET_NR_mprotect 74 -#define TARGET_NR_madvise 75 -#define TARGET_NR_vhangup 76 -#define TARGET_NR_osf_kmodcall 77 /* not implemented */ -#define TARGET_NR_osf_mincore 78 /* not implemented */ -#define TARGET_NR_getgroups 79 -#define TARGET_NR_setgroups 80 -#define TARGET_NR_osf_old_getpgrp 81 /* not implemented */ -#define TARGET_NR_setpgrp 82 /* BSD alias for setpgid */ -#define TARGET_NR_osf_setitimer 83 -#define TARGET_NR_osf_old_wait 84 /* not implemented */ -#define TARGET_NR_osf_table 85 /* not implemented */ -#define TARGET_NR_osf_getitimer 86 -#define TARGET_NR_gethostname 87 -#define TARGET_NR_sethostname 88 -#define TARGET_NR_getdtablesize 89 -#define TARGET_NR_dup2 90 -#define TARGET_NR_fstat 91 -#define TARGET_NR_fcntl 92 -#define TARGET_NR_osf_select 93 -#define TARGET_NR_poll 94 -#define TARGET_NR_fsync 95 -#define TARGET_NR_setpriority 96 -#define TARGET_NR_socket 97 -#define TARGET_NR_connect 98 -#define TARGET_NR_accept 99 -#define TARGET_NR_getpriority 100 -#define TARGET_NR_send 101 -#define TARGET_NR_recv 102 -#define TARGET_NR_sigreturn 103 -#define TARGET_NR_bind 104 -#define TARGET_NR_setsockopt 105 -#define TARGET_NR_listen 106 -#define TARGET_NR_osf_plock 107 /* not implemented */ -#define TARGET_NR_osf_old_sigvec 108 /* not implemented */ -#define TARGET_NR_osf_old_sigblock 109 /* not implemented */ -#define TARGET_NR_osf_old_sigsetmask 110 /* not implemented */ -#define TARGET_NR_sigsuspend 111 -#define TARGET_NR_osf_sigstack 112 -#define TARGET_NR_recvmsg 113 -#define TARGET_NR_sendmsg 114 -#define TARGET_NR_osf_old_vtrace 115 /* not implemented */ -#define TARGET_NR_osf_gettimeofday 116 -#define TARGET_NR_osf_getrusage 117 -#define TARGET_NR_getsockopt 118 - -#define TARGET_NR_readv 120 -#define TARGET_NR_writev 121 -#define TARGET_NR_osf_settimeofday 122 -#define TARGET_NR_fchown 123 -#define TARGET_NR_fchmod 124 -#define TARGET_NR_recvfrom 125 -#define TARGET_NR_setreuid 126 -#define TARGET_NR_setregid 127 -#define TARGET_NR_rename 128 -#define TARGET_NR_truncate 129 -#define TARGET_NR_ftruncate 130 -#define TARGET_NR_flock 131 -#define TARGET_NR_setgid 132 -#define TARGET_NR_sendto 133 -#define TARGET_NR_shutdown 134 -#define TARGET_NR_socketpair 135 -#define TARGET_NR_mkdir 136 -#define TARGET_NR_rmdir 137 -#define TARGET_NR_osf_utimes 138 -#define TARGET_NR_osf_old_sigreturn 139 /* not implemented */ -#define TARGET_NR_osf_adjtime 140 /* not implemented */ -#define TARGET_NR_getpeername 141 -#define TARGET_NR_osf_gethostid 142 /* not implemented */ -#define TARGET_NR_osf_sethostid 143 /* not implemented */ -#define TARGET_NR_getrlimit 144 -#define TARGET_NR_setrlimit 145 -#define TARGET_NR_osf_old_killpg 146 /* not implemented */ -#define TARGET_NR_setsid 147 -#define TARGET_NR_quotactl 148 -#define TARGET_NR_osf_oldquota 149 /* not implemented */ -#define TARGET_NR_getsockname 150 - -#define TARGET_NR_osf_pid_block 153 /* not implemented */ -#define TARGET_NR_osf_pid_unblock 154 /* not implemented */ - -#define TARGET_NR_sigaction 156 -#define TARGET_NR_osf_sigwaitprim 157 /* not implemented */ -#define TARGET_NR_osf_nfssvc 158 /* not implemented */ -#define TARGET_NR_osf_getdirentries 159 -#define TARGET_NR_osf_statfs 160 -#define TARGET_NR_osf_fstatfs 161 - -#define TARGET_NR_osf_asynch_daemon 163 /* not implemented */ -#define TARGET_NR_osf_getfh 164 /* not implemented */ -#define TARGET_NR_osf_getdomainname 165 -#define TARGET_NR_setdomainname 166 - -#define TARGET_NR_osf_exportfs 169 /* not implemented */ - -#define TARGET_NR_osf_alt_plock 181 /* not implemented */ - -#define TARGET_NR_osf_getmnt 184 /* not implemented */ - -#define TARGET_NR_osf_alt_sigpending 187 /* not implemented */ -#define TARGET_NR_osf_alt_setsid 188 /* not implemented */ - -#define TARGET_NR_osf_swapon 199 -#define TARGET_NR_msgctl 200 -#define TARGET_NR_msgget 201 -#define TARGET_NR_msgrcv 202 -#define TARGET_NR_msgsnd 203 -#define TARGET_NR_semctl 204 -#define TARGET_NR_semget 205 -#define TARGET_NR_semop 206 -#define TARGET_NR_osf_utsname 207 -#define TARGET_NR_lchown 208 -#define TARGET_NR_osf_shmat 209 -/* this has the usual shmat semantics so give it the name syscall.c expects - * so that our support for it is enabled. - */ -#define TARGET_NR_shmat TARGET_NR_osf_shmat -#define TARGET_NR_shmctl 210 -#define TARGET_NR_shmdt 211 -#define TARGET_NR_shmget 212 -#define TARGET_NR_osf_mvalid 213 /* not implemented */ -#define TARGET_NR_osf_getaddressconf 214 /* not implemented */ -#define TARGET_NR_osf_msleep 215 /* not implemented */ -#define TARGET_NR_osf_mwakeup 216 /* not implemented */ -#define TARGET_NR_msync 217 -#define TARGET_NR_osf_signal 218 /* not implemented */ -#define TARGET_NR_osf_utc_gettime 219 /* not implemented */ -#define TARGET_NR_osf_utc_adjtime 220 /* not implemented */ - -#define TARGET_NR_osf_security 222 /* not implemented */ -#define TARGET_NR_osf_kloadcall 223 /* not implemented */ - -#define TARGET_NR_getpgid 233 -#define TARGET_NR_getsid 234 -#define TARGET_NR_sigaltstack 235 -#define TARGET_NR_osf_waitid 236 /* not implemented */ -#define TARGET_NR_osf_priocntlset 237 /* not implemented */ -#define TARGET_NR_osf_sigsendset 238 /* not implemented */ -#define TARGET_NR_osf_set_speculative 239 /* not implemented */ -#define TARGET_NR_osf_msfs_syscall 240 /* not implemented */ -#define TARGET_NR_osf_sysinfo 241 -#define TARGET_NR_osf_uadmin 242 /* not implemented */ -#define TARGET_NR_osf_fuser 243 /* not implemented */ -#define TARGET_NR_osf_proplist_syscall 244 -#define TARGET_NR_osf_ntp_adjtime 245 /* not implemented */ -#define TARGET_NR_osf_ntp_gettime 246 /* not implemented */ -#define TARGET_NR_osf_pathconf 247 /* not implemented */ -#define TARGET_NR_osf_fpathconf 248 /* not implemented */ - -#define TARGET_NR_osf_uswitch 250 /* not implemented */ -#define TARGET_NR_osf_usleep_thread 251 -#define TARGET_NR_osf_audcntl 252 /* not implemented */ -#define TARGET_NR_osf_audgen 253 /* not implemented */ -#define TARGET_NR_sysfs 254 -#define TARGET_NR_osf_subsys_info 255 /* not implemented */ -#define TARGET_NR_osf_getsysinfo 256 -#define TARGET_NR_osf_setsysinfo 257 -#define TARGET_NR_osf_afs_syscall 258 /* not implemented */ -#define TARGET_NR_osf_swapctl 259 /* not implemented */ -#define TARGET_NR_osf_memcntl 260 /* not implemented */ -#define TARGET_NR_osf_fdatasync 261 /* not implemented */ - - -/* - * Linux-specific system calls begin at 300 - */ -#define TARGET_NR_bdflush 300 -#define TARGET_NR_sethae 301 -#define TARGET_NR_mount 302 -#define TARGET_NR_old_adjtimex 303 -#define TARGET_NR_swapoff 304 -#define TARGET_NR_getdents 305 -#define TARGET_NR_create_module 306 -#define TARGET_NR_init_module 307 -#define TARGET_NR_delete_module 308 -#define TARGET_NR_get_kernel_syms 309 -#define TARGET_NR_syslog 310 -#define TARGET_NR_reboot 311 -#define TARGET_NR_clone 312 -#define TARGET_NR_uselib 313 -#define TARGET_NR_mlock 314 -#define TARGET_NR_munlock 315 -#define TARGET_NR_mlockall 316 -#define TARGET_NR_munlockall 317 -#define TARGET_NR_sysinfo 318 -#define TARGET_NR__sysctl 319 -/* 320 was sys_idle. */ -#define TARGET_NR_umount 321 -#define TARGET_NR_swapon 322 -#define TARGET_NR_times 323 -#define TARGET_NR_personality 324 -#define TARGET_NR_setfsuid 325 -#define TARGET_NR_setfsgid 326 -#define TARGET_NR_ustat 327 -#define TARGET_NR_statfs 328 -#define TARGET_NR_fstatfs 329 -#define TARGET_NR_sched_setparam 330 -#define TARGET_NR_sched_getparam 331 -#define TARGET_NR_sched_setscheduler 332 -#define TARGET_NR_sched_getscheduler 333 -#define TARGET_NR_sched_yield 334 -#define TARGET_NR_sched_get_priority_max 335 -#define TARGET_NR_sched_get_priority_min 336 -#define TARGET_NR_sched_rr_get_interval 337 -#define TARGET_NR_afs_syscall 338 -#define TARGET_NR_uname 339 -#define TARGET_NR_nanosleep 340 -#define TARGET_NR_mremap 341 -#define TARGET_NR_nfsservctl 342 -#define TARGET_NR_setresuid 343 -#define TARGET_NR_getresuid 344 -#define TARGET_NR_pciconfig_read 345 -#define TARGET_NR_pciconfig_write 346 -#define TARGET_NR_query_module 347 -#define TARGET_NR_prctl 348 -#define TARGET_NR_pread64 349 -#define TARGET_NR_pwrite64 350 -#define TARGET_NR_rt_sigreturn 351 -#define TARGET_NR_rt_sigaction 352 -#define TARGET_NR_rt_sigprocmask 353 -#define TARGET_NR_rt_sigpending 354 -#define TARGET_NR_rt_sigtimedwait 355 -#define TARGET_NR_rt_sigqueueinfo 356 -#define TARGET_NR_rt_sigsuspend 357 -#define TARGET_NR_select 358 -#define TARGET_NR_gettimeofday 359 -#define TARGET_NR_settimeofday 360 -#define TARGET_NR_getitimer 361 -#define TARGET_NR_setitimer 362 -#define TARGET_NR_utimes 363 -#define TARGET_NR_getrusage 364 -#define TARGET_NR_wait4 365 -#define TARGET_NR_adjtimex 366 -#define TARGET_NR_getcwd 367 -#define TARGET_NR_capget 368 -#define TARGET_NR_capset 369 -#define TARGET_NR_sendfile 370 -#define TARGET_NR_setresgid 371 -#define TARGET_NR_getresgid 372 -#define TARGET_NR_dipc 373 -#define TARGET_NR_pivot_root 374 -#define TARGET_NR_mincore 375 -#define TARGET_NR_pciconfig_iobase 376 -#define TARGET_NR_getdents64 377 -#define TARGET_NR_gettid 378 -#define TARGET_NR_readahead 379 -/* 380 is unused */ -#define TARGET_NR_tkill 381 -#define TARGET_NR_setxattr 382 -#define TARGET_NR_lsetxattr 383 -#define TARGET_NR_fsetxattr 384 -#define TARGET_NR_getxattr 385 -#define TARGET_NR_lgetxattr 386 -#define TARGET_NR_fgetxattr 387 -#define TARGET_NR_listxattr 388 -#define TARGET_NR_llistxattr 389 -#define TARGET_NR_flistxattr 390 -#define TARGET_NR_removexattr 391 -#define TARGET_NR_lremovexattr 392 -#define TARGET_NR_fremovexattr 393 -#define TARGET_NR_futex 394 -#define TARGET_NR_sched_setaffinity 395 -#define TARGET_NR_sched_getaffinity 396 -#define TARGET_NR_tuxcall 397 -#define TARGET_NR_io_setup 398 -#define TARGET_NR_io_destroy 399 -#define TARGET_NR_io_getevents 400 -#define TARGET_NR_io_submit 401 -#define TARGET_NR_io_cancel 402 -#define TARGET_NR_exit_group 405 -#define TARGET_NR_lookup_dcookie 406 -#define TARGET_NR_epoll_create 407 -#define TARGET_NR_epoll_ctl 408 -#define TARGET_NR_epoll_wait 409 -#define TARGET_NR_remap_file_pages 410 -#define TARGET_NR_set_tid_address 411 -#define TARGET_NR_restart_syscall 412 -#define TARGET_NR_fadvise64 413 -#define TARGET_NR_timer_create 414 -#define TARGET_NR_timer_settime 415 -#define TARGET_NR_timer_gettime 416 -#define TARGET_NR_timer_getoverrun 417 -#define TARGET_NR_timer_delete 418 -#define TARGET_NR_clock_settime 419 -#define TARGET_NR_clock_gettime 420 -#define TARGET_NR_clock_getres 421 -#define TARGET_NR_clock_nanosleep 422 -#define TARGET_NR_semtimedop 423 -#define TARGET_NR_tgkill 424 -#define TARGET_NR_stat64 425 -#define TARGET_NR_lstat64 426 -#define TARGET_NR_fstat64 427 -#define TARGET_NR_vserver 428 -#define TARGET_NR_mbind 429 -#define TARGET_NR_get_mempolicy 430 -#define TARGET_NR_set_mempolicy 431 -#define TARGET_NR_mq_open 432 -#define TARGET_NR_mq_unlink 433 -#define TARGET_NR_mq_timedsend 434 -#define TARGET_NR_mq_timedreceive 435 -#define TARGET_NR_mq_notify 436 -#define TARGET_NR_mq_getsetattr 437 -#define TARGET_NR_waitid 438 -#define TARGET_NR_add_key 439 -#define TARGET_NR_request_key 440 -#define TARGET_NR_keyctl 441 -#define TARGET_NR_ioprio_set 442 -#define TARGET_NR_ioprio_get 443 -#define TARGET_NR_inotify_init 444 -#define TARGET_NR_inotify_add_watch 445 -#define TARGET_NR_inotify_rm_watch 446 -#define TARGET_NR_fdatasync 447 -#define TARGET_NR_kexec_load 448 -#define TARGET_NR_migrate_pages 449 -#define TARGET_NR_openat 450 -#define TARGET_NR_mkdirat 451 -#define TARGET_NR_mknodat 452 -#define TARGET_NR_fchownat 453 -#define TARGET_NR_futimesat 454 -#define TARGET_NR_fstatat64 455 -#define TARGET_NR_unlinkat 456 -#define TARGET_NR_renameat 457 -#define TARGET_NR_linkat 458 -#define TARGET_NR_symlinkat 459 -#define TARGET_NR_readlinkat 460 -#define TARGET_NR_fchmodat 461 -#define TARGET_NR_faccessat 462 -#define TARGET_NR_pselect6 463 -#define TARGET_NR_ppoll 464 -#define TARGET_NR_unshare 465 -#define TARGET_NR_set_robust_list 466 -#define TARGET_NR_get_robust_list 467 -#define TARGET_NR_splice 468 -#define TARGET_NR_sync_file_range 469 -#define TARGET_NR_tee 470 -#define TARGET_NR_vmsplice 471 -#define TARGET_NR_move_pages 472 -#define TARGET_NR_getcpu 473 -#define TARGET_NR_epoll_pwait 474 -#define TARGET_NR_utimensat 475 -#define TARGET_NR_signalfd 476 -#define TARGET_NR_timerfd 477 -#define TARGET_NR_eventfd 478 -#define TARGET_NR_recvmmsg 479 -#define TARGET_NR_fallocate 480 -#define TARGET_NR_timerfd_create 481 -#define TARGET_NR_timerfd_settime 482 -#define TARGET_NR_timerfd_gettime 483 -#define TARGET_NR_signalfd4 484 -#define TARGET_NR_eventfd2 485 -#define TARGET_NR_epoll_create1 486 -#define TARGET_NR_dup3 487 -#define TARGET_NR_pipe2 488 -#define TARGET_NR_inotify_init1 489 -#define TARGET_NR_preadv 490 -#define TARGET_NR_pwritev 491 -#define TARGET_NR_rt_tgsigqueueinfo 492 -#define TARGET_NR_perf_event_open 493 -#define TARGET_NR_fanotify_init 494 -#define TARGET_NR_fanotify_mark 495 -#define TARGET_NR_prlimit64 496 -#define TARGET_NR_name_to_handle_at 497 -#define TARGET_NR_open_by_handle_at 498 -#define TARGET_NR_clock_adjtime 499 -#define TARGET_NR_syncfs 500 -#define TARGET_NR_setns 501 -#define TARGET_NR_accept4 502 -#define TARGET_NR_sendmmsg 503 -#define TARGET_NR_process_vm_readv 504 -#define TARGET_NR_process_vm_writev 505 -#define TARGET_NR_kcmp 506 -#define TARGET_NR_finit_module 507 -#define TARGET_NR_sched_setattr 508 -#define TARGET_NR_sched_getattr 509 -#define TARGET_NR_renameat2 510 -#define TARGET_NR_getrandom 511 -#define TARGET_NR_memfd_create 512 -#define TARGET_NR_execveat 513 -#define TARGET_NR_seccomp 514 -#define TARGET_NR_bpf 515 -#define TARGET_NR_userfaultfd 516 -#define TARGET_NR_membarrier 517 -#define TARGET_NR_mlock2 518 -#define TARGET_NR_copy_file_range 519 -#define TARGET_NR_preadv2 520 -#define TARGET_NR_pwritev2 521 -#define TARGET_NR_statx 522 -#define TARGET_NR_io_pgetevents 523 -#define TARGET_NR_pkey_mprotect 524 -#define TARGET_NR_pkey_alloc 525 -#define TARGET_NR_pkey_free 526 -#define TARGET_NR_rseq 527 -#define TARGET_NR_statfs64 528 -#define TARGET_NR_fstatfs64 529 -#define TARGET_NR_getegid 530 -#define TARGET_NR_geteuid 531 -#define TARGET_NR_getppid 532 -/* - * all other architectures have common numbers for new syscall, alpha - * is the exception. - */ -#define TARGET_NR_pidfd_send_signal 534 -#define TARGET_NR_io_uring_setup 535 -#define TARGET_NR_io_uring_enter 536 -#define TARGET_NR_io_uring_register 537 -#define TARGET_NR_open_tree 538 -#define TARGET_NR_move_mount 539 -#define TARGET_NR_fsopen 540 -#define TARGET_NR_fsconfig 541 -#define TARGET_NR_fsmount 542 -#define TARGET_NR_fspick 543 -#define TARGET_NR_pidfd_open 544 -/* 545 reserved for clone3 */ - -#endif diff --git a/linux-user/alpha/syscallhdr.sh b/linux-user/alpha/syscallhdr.sh new file mode 100644 index 0000000000..55cafe6abf --- /dev/null +++ b/linux-user/alpha/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_ALPHA_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" +) > "$out" From 9566f4c61fa3bfcec3a7132d551542115494fa0b Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:45 +0100 Subject: [PATCH 10/32] linux-user, hppa: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/parisc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Reviewed-by: Richard Henderson Message-Id: <20200310103403.3284090-4-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/hppa/Makefile.objs | 5 + linux-user/hppa/syscall.tbl | 435 ++++++++++++++++++++++++++++++++++ linux-user/hppa/syscall_nr.h | 358 ---------------------------- linux-user/hppa/syscallhdr.sh | 32 +++ 6 files changed, 475 insertions(+), 359 deletions(-) create mode 100644 linux-user/hppa/Makefile.objs create mode 100644 linux-user/hppa/syscall.tbl delete mode 100644 linux-user/hppa/syscall_nr.h create mode 100644 linux-user/hppa/syscallhdr.sh diff --git a/configure b/configure index 5a024d2490..d96b767947 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha ; do +for arch in alpha hppa ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7814,6 +7814,7 @@ case "$target_name" in ;; hppa) mttcg="yes" + TARGET_SYSTBL_ABI=common,32 ;; lm32) ;; diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index a1afb4d21f..9f8e001241 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -10,3 +10,4 @@ obj-$(TARGET_ARM) += arm/semihost.o obj-$(TARGET_AARCH64) += arm/semihost.o obj-$(TARGET_ALPHA) += alpha/ +obj-$(TARGET_HPPA) += hppa/ diff --git a/linux-user/hppa/Makefile.objs b/linux-user/hppa/Makefile.objs new file mode 100644 index 0000000000..f8368be6f3 --- /dev/null +++ b/linux-user/hppa/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/hppa/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/hppa/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/hppa/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/hppa/syscall.tbl b/linux-user/hppa/syscall.tbl new file mode 100644 index 0000000000..285ff51615 --- /dev/null +++ b/linux-user/hppa/syscall.tbl @@ -0,0 +1,435 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for parisc +# +# The format is: +# +# +# The can be common, 64, or 32 for this file. +# +0 common restart_syscall sys_restart_syscall +1 common exit sys_exit +2 common fork sys_fork_wrapper +3 common read sys_read +4 common write sys_write +5 common open sys_open compat_sys_open +6 common close sys_close +7 common waitpid sys_waitpid +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 common execve sys_execve compat_sys_execve +12 common chdir sys_chdir +13 32 time sys_time32 +13 64 time sys_time +14 common mknod sys_mknod +15 common chmod sys_chmod +16 common lchown sys_lchown +17 common socket sys_socket +18 common stat sys_newstat compat_sys_newstat +19 common lseek sys_lseek compat_sys_lseek +20 common getpid sys_getpid +21 common mount sys_mount compat_sys_mount +22 common bind sys_bind +23 common setuid sys_setuid +24 common getuid sys_getuid +25 32 stime sys_stime32 +25 64 stime sys_stime +26 common ptrace sys_ptrace compat_sys_ptrace +27 common alarm sys_alarm +28 common fstat sys_newfstat compat_sys_newfstat +29 common pause sys_pause +30 32 utime sys_utime32 +30 64 utime sys_utime +31 common connect sys_connect +32 common listen sys_listen +33 common access sys_access +34 common nice sys_nice +35 common accept sys_accept +36 common sync sys_sync +37 common kill sys_kill +38 common rename sys_rename +39 common mkdir sys_mkdir +40 common rmdir sys_rmdir +41 common dup sys_dup +42 common pipe sys_pipe +43 common times sys_times compat_sys_times +44 common getsockname sys_getsockname +45 common brk sys_brk +46 common setgid sys_setgid +47 common getgid sys_getgid +48 common signal sys_signal +49 common geteuid sys_geteuid +50 common getegid sys_getegid +51 common acct sys_acct +52 common umount2 sys_umount +53 common getpeername sys_getpeername +54 common ioctl sys_ioctl compat_sys_ioctl +55 common fcntl sys_fcntl compat_sys_fcntl +56 common socketpair sys_socketpair +57 common setpgid sys_setpgid +58 common send sys_send +59 common uname sys_newuname +60 common umask sys_umask +61 common chroot sys_chroot +62 common ustat sys_ustat compat_sys_ustat +63 common dup2 sys_dup2 +64 common getppid sys_getppid +65 common getpgrp sys_getpgrp +66 common setsid sys_setsid +67 common pivot_root sys_pivot_root +68 common sgetmask sys_sgetmask sys32_unimplemented +69 common ssetmask sys_ssetmask sys32_unimplemented +70 common setreuid sys_setreuid +71 common setregid sys_setregid +72 common mincore sys_mincore +73 common sigpending sys_sigpending compat_sys_sigpending +74 common sethostname sys_sethostname +75 common setrlimit sys_setrlimit compat_sys_setrlimit +76 common getrlimit sys_getrlimit compat_sys_getrlimit +77 common getrusage sys_getrusage compat_sys_getrusage +78 common gettimeofday sys_gettimeofday compat_sys_gettimeofday +79 common settimeofday sys_settimeofday compat_sys_settimeofday +80 common getgroups sys_getgroups +81 common setgroups sys_setgroups +82 common sendto sys_sendto +83 common symlink sys_symlink +84 common lstat sys_newlstat compat_sys_newlstat +85 common readlink sys_readlink +86 common uselib sys_ni_syscall +87 common swapon sys_swapon +88 common reboot sys_reboot +89 common mmap2 sys_mmap2 +90 common mmap sys_mmap +91 common munmap sys_munmap +92 common truncate sys_truncate compat_sys_truncate +93 common ftruncate sys_ftruncate compat_sys_ftruncate +94 common fchmod sys_fchmod +95 common fchown sys_fchown +96 common getpriority sys_getpriority +97 common setpriority sys_setpriority +98 common recv sys_recv +99 common statfs sys_statfs compat_sys_statfs +100 common fstatfs sys_fstatfs compat_sys_fstatfs +101 common stat64 sys_stat64 +# 102 was socketcall +103 common syslog sys_syslog +104 common setitimer sys_setitimer compat_sys_setitimer +105 common getitimer sys_getitimer compat_sys_getitimer +106 common capget sys_capget +107 common capset sys_capset +108 32 pread64 parisc_pread64 +108 64 pread64 sys_pread64 +109 32 pwrite64 parisc_pwrite64 +109 64 pwrite64 sys_pwrite64 +110 common getcwd sys_getcwd +111 common vhangup sys_vhangup +112 common fstat64 sys_fstat64 +113 common vfork sys_vfork_wrapper +114 common wait4 sys_wait4 compat_sys_wait4 +115 common swapoff sys_swapoff +116 common sysinfo sys_sysinfo compat_sys_sysinfo +117 common shutdown sys_shutdown +118 common fsync sys_fsync +119 common madvise sys_madvise +120 common clone sys_clone_wrapper +121 common setdomainname sys_setdomainname +122 common sendfile sys_sendfile compat_sys_sendfile +123 common recvfrom sys_recvfrom +124 32 adjtimex sys_adjtimex_time32 +124 64 adjtimex sys_adjtimex +125 common mprotect sys_mprotect +126 common sigprocmask sys_sigprocmask compat_sys_sigprocmask +# 127 was create_module +128 common init_module sys_init_module +129 common delete_module sys_delete_module +# 130 was get_kernel_syms +131 common quotactl sys_quotactl +132 common getpgid sys_getpgid +133 common fchdir sys_fchdir +134 common bdflush sys_bdflush +135 common sysfs sys_sysfs +136 32 personality parisc_personality +136 64 personality sys_personality +# 137 was afs_syscall +138 common setfsuid sys_setfsuid +139 common setfsgid sys_setfsgid +140 common _llseek sys_llseek +141 common getdents sys_getdents compat_sys_getdents +142 common _newselect sys_select compat_sys_select +143 common flock sys_flock +144 common msync sys_msync +145 common readv sys_readv compat_sys_readv +146 common writev sys_writev compat_sys_writev +147 common getsid sys_getsid +148 common fdatasync sys_fdatasync +149 common _sysctl sys_sysctl compat_sys_sysctl +150 common mlock sys_mlock +151 common munlock sys_munlock +152 common mlockall sys_mlockall +153 common munlockall sys_munlockall +154 common sched_setparam sys_sched_setparam +155 common sched_getparam sys_sched_getparam +156 common sched_setscheduler sys_sched_setscheduler +157 common sched_getscheduler sys_sched_getscheduler +158 common sched_yield sys_sched_yield +159 common sched_get_priority_max sys_sched_get_priority_max +160 common sched_get_priority_min sys_sched_get_priority_min +161 32 sched_rr_get_interval sys_sched_rr_get_interval_time32 +161 64 sched_rr_get_interval sys_sched_rr_get_interval +162 32 nanosleep sys_nanosleep_time32 +162 64 nanosleep sys_nanosleep +163 common mremap sys_mremap +164 common setresuid sys_setresuid +165 common getresuid sys_getresuid +166 common sigaltstack sys_sigaltstack compat_sys_sigaltstack +# 167 was query_module +168 common poll sys_poll +# 169 was nfsservctl +170 common setresgid sys_setresgid +171 common getresgid sys_getresgid +172 common prctl sys_prctl +173 common rt_sigreturn sys_rt_sigreturn_wrapper +174 common rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction +175 common rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask +176 common rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending +177 32 rt_sigtimedwait sys_rt_sigtimedwait_time32 compat_sys_rt_sigtimedwait_time32 +177 64 rt_sigtimedwait sys_rt_sigtimedwait +178 common rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo +179 common rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend +180 common chown sys_chown +181 common setsockopt sys_setsockopt compat_sys_setsockopt +182 common getsockopt sys_getsockopt compat_sys_getsockopt +183 common sendmsg sys_sendmsg compat_sys_sendmsg +184 common recvmsg sys_recvmsg compat_sys_recvmsg +185 common semop sys_semop +186 common semget sys_semget +187 common semctl sys_semctl compat_sys_semctl +188 common msgsnd sys_msgsnd compat_sys_msgsnd +189 common msgrcv sys_msgrcv compat_sys_msgrcv +190 common msgget sys_msgget +191 common msgctl sys_msgctl compat_sys_msgctl +192 common shmat sys_shmat compat_sys_shmat +193 common shmdt sys_shmdt +194 common shmget sys_shmget +195 common shmctl sys_shmctl compat_sys_shmctl +# 196 was getpmsg +# 197 was putpmsg +198 common lstat64 sys_lstat64 +199 32 truncate64 parisc_truncate64 +199 64 truncate64 sys_truncate64 +200 32 ftruncate64 parisc_ftruncate64 +200 64 ftruncate64 sys_ftruncate64 +201 common getdents64 sys_getdents64 +202 common fcntl64 sys_fcntl64 compat_sys_fcntl64 +# 203 was attrctl +# 204 was acl_get +# 205 was acl_set +206 common gettid sys_gettid +207 32 readahead parisc_readahead +207 64 readahead sys_readahead +208 common tkill sys_tkill +209 common sendfile64 sys_sendfile64 compat_sys_sendfile64 +210 32 futex sys_futex_time32 +210 64 futex sys_futex +211 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity +212 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity +# 213 was set_thread_area +# 214 was get_thread_area +215 common io_setup sys_io_setup compat_sys_io_setup +216 common io_destroy sys_io_destroy +217 32 io_getevents sys_io_getevents_time32 +217 64 io_getevents sys_io_getevents +218 common io_submit sys_io_submit compat_sys_io_submit +219 common io_cancel sys_io_cancel +# 220 was alloc_hugepages +# 221 was free_hugepages +222 common exit_group sys_exit_group +223 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie +224 common epoll_create sys_epoll_create +225 common epoll_ctl sys_epoll_ctl +226 common epoll_wait sys_epoll_wait +227 common remap_file_pages sys_remap_file_pages +228 32 semtimedop sys_semtimedop_time32 +228 64 semtimedop sys_semtimedop +229 common mq_open sys_mq_open compat_sys_mq_open +230 common mq_unlink sys_mq_unlink +231 32 mq_timedsend sys_mq_timedsend_time32 +231 64 mq_timedsend sys_mq_timedsend +232 32 mq_timedreceive sys_mq_timedreceive_time32 +232 64 mq_timedreceive sys_mq_timedreceive +233 common mq_notify sys_mq_notify compat_sys_mq_notify +234 common mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr +235 common waitid sys_waitid compat_sys_waitid +236 32 fadvise64_64 parisc_fadvise64_64 +236 64 fadvise64_64 sys_fadvise64_64 +237 common set_tid_address sys_set_tid_address +238 common setxattr sys_setxattr +239 common lsetxattr sys_lsetxattr +240 common fsetxattr sys_fsetxattr +241 common getxattr sys_getxattr +242 common lgetxattr sys_lgetxattr +243 common fgetxattr sys_fgetxattr +244 common listxattr sys_listxattr +245 common llistxattr sys_llistxattr +246 common flistxattr sys_flistxattr +247 common removexattr sys_removexattr +248 common lremovexattr sys_lremovexattr +249 common fremovexattr sys_fremovexattr +250 common timer_create sys_timer_create compat_sys_timer_create +251 32 timer_settime sys_timer_settime32 +251 64 timer_settime sys_timer_settime +252 32 timer_gettime sys_timer_gettime32 +252 64 timer_gettime sys_timer_gettime +253 common timer_getoverrun sys_timer_getoverrun +254 common timer_delete sys_timer_delete +255 32 clock_settime sys_clock_settime32 +255 64 clock_settime sys_clock_settime +256 32 clock_gettime sys_clock_gettime32 +256 64 clock_gettime sys_clock_gettime +257 32 clock_getres sys_clock_getres_time32 +257 64 clock_getres sys_clock_getres +258 32 clock_nanosleep sys_clock_nanosleep_time32 +258 64 clock_nanosleep sys_clock_nanosleep +259 common tgkill sys_tgkill +260 common mbind sys_mbind compat_sys_mbind +261 common get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy +262 common set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy +# 263 was vserver +264 common add_key sys_add_key +265 common request_key sys_request_key +266 common keyctl sys_keyctl compat_sys_keyctl +267 common ioprio_set sys_ioprio_set +268 common ioprio_get sys_ioprio_get +269 common inotify_init sys_inotify_init +270 common inotify_add_watch sys_inotify_add_watch +271 common inotify_rm_watch sys_inotify_rm_watch +272 common migrate_pages sys_migrate_pages +273 32 pselect6 sys_pselect6_time32 compat_sys_pselect6_time32 +273 64 pselect6 sys_pselect6 +274 32 ppoll sys_ppoll_time32 compat_sys_ppoll_time32 +274 64 ppoll sys_ppoll +275 common openat sys_openat compat_sys_openat +276 common mkdirat sys_mkdirat +277 common mknodat sys_mknodat +278 common fchownat sys_fchownat +279 32 futimesat sys_futimesat_time32 +279 64 futimesat sys_futimesat +280 common fstatat64 sys_fstatat64 +281 common unlinkat sys_unlinkat +282 common renameat sys_renameat +283 common linkat sys_linkat +284 common symlinkat sys_symlinkat +285 common readlinkat sys_readlinkat +286 common fchmodat sys_fchmodat +287 common faccessat sys_faccessat +288 common unshare sys_unshare +289 common set_robust_list sys_set_robust_list compat_sys_set_robust_list +290 common get_robust_list sys_get_robust_list compat_sys_get_robust_list +291 common splice sys_splice +292 32 sync_file_range parisc_sync_file_range +292 64 sync_file_range sys_sync_file_range +293 common tee sys_tee +294 common vmsplice sys_vmsplice compat_sys_vmsplice +295 common move_pages sys_move_pages compat_sys_move_pages +296 common getcpu sys_getcpu +297 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait +298 common statfs64 sys_statfs64 compat_sys_statfs64 +299 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 +300 common kexec_load sys_kexec_load compat_sys_kexec_load +301 32 utimensat sys_utimensat_time32 +301 64 utimensat sys_utimensat +302 common signalfd sys_signalfd compat_sys_signalfd +# 303 was timerfd +304 common eventfd sys_eventfd +305 32 fallocate parisc_fallocate +305 64 fallocate sys_fallocate +306 common timerfd_create sys_timerfd_create +307 32 timerfd_settime sys_timerfd_settime32 +307 64 timerfd_settime sys_timerfd_settime +308 32 timerfd_gettime sys_timerfd_gettime32 +308 64 timerfd_gettime sys_timerfd_gettime +309 common signalfd4 sys_signalfd4 compat_sys_signalfd4 +310 common eventfd2 sys_eventfd2 +311 common epoll_create1 sys_epoll_create1 +312 common dup3 sys_dup3 +313 common pipe2 sys_pipe2 +314 common inotify_init1 sys_inotify_init1 +315 common preadv sys_preadv compat_sys_preadv +316 common pwritev sys_pwritev compat_sys_pwritev +317 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo +318 common perf_event_open sys_perf_event_open +319 32 recvmmsg sys_recvmmsg_time32 compat_sys_recvmmsg_time32 +319 64 recvmmsg sys_recvmmsg +320 common accept4 sys_accept4 +321 common prlimit64 sys_prlimit64 +322 common fanotify_init sys_fanotify_init +323 common fanotify_mark sys_fanotify_mark sys32_fanotify_mark +324 32 clock_adjtime sys_clock_adjtime32 +324 64 clock_adjtime sys_clock_adjtime +325 common name_to_handle_at sys_name_to_handle_at +326 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at +327 common syncfs sys_syncfs +328 common setns sys_setns +329 common sendmmsg sys_sendmmsg compat_sys_sendmmsg +330 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv +331 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +332 common kcmp sys_kcmp +333 common finit_module sys_finit_module +334 common sched_setattr sys_sched_setattr +335 common sched_getattr sys_sched_getattr +336 32 utimes sys_utimes_time32 +336 64 utimes sys_utimes +337 common renameat2 sys_renameat2 +338 common seccomp sys_seccomp +339 common getrandom sys_getrandom +340 common memfd_create sys_memfd_create +341 common bpf sys_bpf +342 common execveat sys_execveat compat_sys_execveat +343 common membarrier sys_membarrier +344 common userfaultfd sys_userfaultfd +345 common mlock2 sys_mlock2 +346 common copy_file_range sys_copy_file_range +347 common preadv2 sys_preadv2 compat_sys_preadv2 +348 common pwritev2 sys_pwritev2 compat_sys_pwritev2 +349 common statx sys_statx +350 32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents +350 64 io_pgetevents sys_io_pgetevents +351 common pkey_mprotect sys_pkey_mprotect +352 common pkey_alloc sys_pkey_alloc +353 common pkey_free sys_pkey_free +354 common rseq sys_rseq +355 common kexec_file_load sys_kexec_file_load sys_kexec_file_load +# up to 402 is unassigned and reserved for arch specific syscalls +403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime +404 32 clock_settime64 sys_clock_settime sys_clock_settime +405 32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime +406 32 clock_getres_time64 sys_clock_getres sys_clock_getres +407 32 clock_nanosleep_time64 sys_clock_nanosleep sys_clock_nanosleep +408 32 timer_gettime64 sys_timer_gettime sys_timer_gettime +409 32 timer_settime64 sys_timer_settime sys_timer_settime +410 32 timerfd_gettime64 sys_timerfd_gettime sys_timerfd_gettime +411 32 timerfd_settime64 sys_timerfd_settime sys_timerfd_settime +412 32 utimensat_time64 sys_utimensat sys_utimensat +413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 +414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 +416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents +417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 +418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend +419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive +420 32 semtimedop_time64 sys_semtimedop sys_semtimedop +421 32 rt_sigtimedwait_time64 sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time64 +422 32 futex_time64 sys_futex sys_futex +423 32 sched_rr_get_interval_time64 sys_sched_rr_get_interval sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +435 common clone3 sys_clone3_wrapper diff --git a/linux-user/hppa/syscall_nr.h b/linux-user/hppa/syscall_nr.h deleted file mode 100644 index ae41e94321..0000000000 --- a/linux-user/hppa/syscall_nr.h +++ /dev/null @@ -1,358 +0,0 @@ -/* - * This file contains the system call numbers. - */ - -#ifndef LINUX_USER_HPPA_SYSCALL_NR_H -#define LINUX_USER_HPPA_SYSCALL_NR_H - -#define TARGET_NR_restart_syscall 0 -#define TARGET_NR_exit 1 -#define TARGET_NR_fork 2 -#define TARGET_NR_read 3 -#define TARGET_NR_write 4 -#define TARGET_NR_open 5 -#define TARGET_NR_close 6 -#define TARGET_NR_waitpid 7 -#define TARGET_NR_creat 8 -#define TARGET_NR_link 9 -#define TARGET_NR_unlink 10 -#define TARGET_NR_execve 11 -#define TARGET_NR_chdir 12 -#define TARGET_NR_time 13 -#define TARGET_NR_mknod 14 -#define TARGET_NR_chmod 15 -#define TARGET_NR_lchown 16 -#define TARGET_NR_socket 17 -#define TARGET_NR_stat 18 -#define TARGET_NR_lseek 19 -#define TARGET_NR_getpid 20 -#define TARGET_NR_mount 21 -#define TARGET_NR_bind 22 -#define TARGET_NR_setuid 23 -#define TARGET_NR_getuid 24 -#define TARGET_NR_stime 25 -#define TARGET_NR_ptrace 26 -#define TARGET_NR_alarm 27 -#define TARGET_NR_fstat 28 -#define TARGET_NR_pause 29 -#define TARGET_NR_utime 30 -#define TARGET_NR_connect 31 -#define TARGET_NR_listen 32 -#define TARGET_NR_access 33 -#define TARGET_NR_nice 34 -#define TARGET_NR_accept 35 -#define TARGET_NR_sync 36 -#define TARGET_NR_kill 37 -#define TARGET_NR_rename 38 -#define TARGET_NR_mkdir 39 -#define TARGET_NR_rmdir 40 -#define TARGET_NR_dup 41 -#define TARGET_NR_pipe 42 -#define TARGET_NR_times 43 -#define TARGET_NR_getsockname 44 -#define TARGET_NR_brk 45 -#define TARGET_NR_setgid 46 -#define TARGET_NR_getgid 47 -#define TARGET_NR_signal 48 -#define TARGET_NR_geteuid 49 -#define TARGET_NR_getegid 50 -#define TARGET_NR_acct 51 -#define TARGET_NR_umount2 52 -#define TARGET_NR_getpeername 53 -#define TARGET_NR_ioctl 54 -#define TARGET_NR_fcntl 55 -#define TARGET_NR_socketpair 56 -#define TARGET_NR_setpgid 57 -#define TARGET_NR_send 58 -#define TARGET_NR_uname 59 -#define TARGET_NR_umask 60 -#define TARGET_NR_chroot 61 -#define TARGET_NR_ustat 62 -#define TARGET_NR_dup2 63 -#define TARGET_NR_getppid 64 -#define TARGET_NR_getpgrp 65 -#define TARGET_NR_setsid 66 -#define TARGET_NR_pivot_root 67 -#define TARGET_NR_sgetmask 68 -#define TARGET_NR_ssetmask 69 -#define TARGET_NR_setreuid 70 -#define TARGET_NR_setregid 71 -#define TARGET_NR_mincore 72 -#define TARGET_NR_sigpending 73 -#define TARGET_NR_sethostname 74 -#define TARGET_NR_setrlimit 75 -#define TARGET_NR_getrlimit 76 -#define TARGET_NR_getrusage 77 -#define TARGET_NR_gettimeofday 78 -#define TARGET_NR_settimeofday 79 -#define TARGET_NR_getgroups 80 -#define TARGET_NR_setgroups 81 -#define TARGET_NR_sendto 82 -#define TARGET_NR_symlink 83 -#define TARGET_NR_lstat 84 -#define TARGET_NR_readlink 85 -#define TARGET_NR_uselib 86 -#define TARGET_NR_swapon 87 -#define TARGET_NR_reboot 88 -#define TARGET_NR_mmap2 89 -#define TARGET_NR_mmap 90 -#define TARGET_NR_munmap 91 -#define TARGET_NR_truncate 92 -#define TARGET_NR_ftruncate 93 -#define TARGET_NR_fchmod 94 -#define TARGET_NR_fchown 95 -#define TARGET_NR_getpriority 96 -#define TARGET_NR_setpriority 97 -#define TARGET_NR_recv 98 -#define TARGET_NR_statfs 99 -#define TARGET_NR_fstatfs 100 -#define TARGET_NR_stat64 101 -#define TARGET_NR_socketcall 102 -#define TARGET_NR_syslog 103 -#define TARGET_NR_setitimer 104 -#define TARGET_NR_getitimer 105 -#define TARGET_NR_capget 106 -#define TARGET_NR_capset 107 -#define TARGET_NR_pread64 108 -#define TARGET_NR_pwrite64 109 -#define TARGET_NR_getcwd 110 -#define TARGET_NR_vhangup 111 -#define TARGET_NR_fstat64 112 -#define TARGET_NR_vfork 113 -#define TARGET_NR_wait4 114 -#define TARGET_NR_swapoff 115 -#define TARGET_NR_sysinfo 116 -#define TARGET_NR_shutdown 117 -#define TARGET_NR_fsync 118 -#define TARGET_NR_madvise 119 -#define TARGET_NR_clone 120 -#define TARGET_NR_setdomainname 121 -#define TARGET_NR_sendfile 122 -#define TARGET_NR_recvfrom 123 -#define TARGET_NR_adjtimex 124 -#define TARGET_NR_mprotect 125 -#define TARGET_NR_sigprocmask 126 -#define TARGET_NR_create_module 127 -#define TARGET_NR_init_module 128 -#define TARGET_NR_delete_module 129 -#define TARGET_NR_get_kernel_syms 130 -#define TARGET_NR_quotactl 131 -#define TARGET_NR_getpgid 132 -#define TARGET_NR_fchdir 133 -#define TARGET_NR_bdflush 134 -#define TARGET_NR_sysfs 135 -#define TARGET_NR_personality 136 -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid 138 -#define TARGET_NR_setfsgid 139 -#define TARGET_NR__llseek 140 -#define TARGET_NR_getdents 141 -#define TARGET_NR__newselect 142 -#define TARGET_NR_flock 143 -#define TARGET_NR_msync 144 -#define TARGET_NR_readv 145 -#define TARGET_NR_writev 146 -#define TARGET_NR_getsid 147 -#define TARGET_NR_fdatasync 148 -#define TARGET_NR__sysctl 149 -#define TARGET_NR_mlock 150 -#define TARGET_NR_munlock 151 -#define TARGET_NR_mlockall 152 -#define TARGET_NR_munlockall 153 -#define TARGET_NR_sched_setparam 154 -#define TARGET_NR_sched_getparam 155 -#define TARGET_NR_sched_setscheduler 156 -#define TARGET_NR_sched_getscheduler 157 -#define TARGET_NR_sched_yield 158 -#define TARGET_NR_sched_get_priority_max 159 -#define TARGET_NR_sched_get_priority_min 160 -#define TARGET_NR_sched_rr_get_interval 161 -#define TARGET_NR_nanosleep 162 -#define TARGET_NR_mremap 163 -#define TARGET_NR_setresuid 164 -#define TARGET_NR_getresuid 165 -#define TARGET_NR_sigaltstack 166 -#define TARGET_NR_query_module 167 -#define TARGET_NR_poll 168 -#define TARGET_NR_nfsservctl 169 -#define TARGET_NR_setresgid 170 -#define TARGET_NR_getresgid 171 -#define TARGET_NR_prctl 172 -#define TARGET_NR_rt_sigreturn 173 -#define TARGET_NR_rt_sigaction 174 -#define TARGET_NR_rt_sigprocmask 175 -#define TARGET_NR_rt_sigpending 176 -#define TARGET_NR_rt_sigtimedwait 177 -#define TARGET_NR_rt_sigqueueinfo 178 -#define TARGET_NR_rt_sigsuspend 179 -#define TARGET_NR_chown 180 -#define TARGET_NR_setsockopt 181 -#define TARGET_NR_getsockopt 182 -#define TARGET_NR_sendmsg 183 -#define TARGET_NR_recvmsg 184 -#define TARGET_NR_semop 185 -#define TARGET_NR_semget 186 -#define TARGET_NR_semctl 187 -#define TARGET_NR_msgsnd 188 -#define TARGET_NR_msgrcv 189 -#define TARGET_NR_msgget 190 -#define TARGET_NR_msgctl 191 -#define TARGET_NR_shmat 192 -#define TARGET_NR_shmdt 193 -#define TARGET_NR_shmget 194 -#define TARGET_NR_shmctl 195 -#define TARGET_NR_getpmsg 196 -#define TARGET_NR_putpmsg 197 -#define TARGET_NR_lstat64 198 -#define TARGET_NR_truncate64 199 -#define TARGET_NR_ftruncate64 200 -#define TARGET_NR_getdents64 201 -#define TARGET_NR_fcntl64 202 -#define TARGET_NR_attrctl 203 -#define TARGET_NR_acl_get 204 -#define TARGET_NR_acl_set 205 -#define TARGET_NR_gettid 206 -#define TARGET_NR_readahead 207 -#define TARGET_NR_tkill 208 -#define TARGET_NR_sendfile64 209 -#define TARGET_NR_futex 210 -#define TARGET_NR_sched_setaffinity 211 -#define TARGET_NR_sched_getaffinity 212 -#define TARGET_NR_set_thread_area 213 -#define TARGET_NR_get_thread_area 214 -#define TARGET_NR_io_setup 215 -#define TARGET_NR_io_destroy 216 -#define TARGET_NR_io_getevents 217 -#define TARGET_NR_io_submit 218 -#define TARGET_NR_io_cancel 219 -#define TARGET_NR_alloc_hugepages 220 -#define TARGET_NR_free_hugepages 221 -#define TARGET_NR_exit_group 222 -#define TARGET_NR_lookup_dcookie 223 -#define TARGET_NR_epoll_create 224 -#define TARGET_NR_epoll_ctl 225 -#define TARGET_NR_epoll_wait 226 -#define TARGET_NR_remap_file_pages 227 -#define TARGET_NR_semtimedop 228 -#define TARGET_NR_mq_open 229 -#define TARGET_NR_mq_unlink 230 -#define TARGET_NR_mq_timedsend 231 -#define TARGET_NR_mq_timedreceive 232 -#define TARGET_NR_mq_notify 233 -#define TARGET_NR_mq_getsetattr 234 -#define TARGET_NR_waitid 235 -#define TARGET_NR_fadvise64_64 236 -#define TARGET_NR_set_tid_address 237 -#define TARGET_NR_setxattr 238 -#define TARGET_NR_lsetxattr 239 -#define TARGET_NR_fsetxattr 240 -#define TARGET_NR_getxattr 241 -#define TARGET_NR_lgetxattr 242 -#define TARGET_NR_fgetxattr 243 -#define TARGET_NR_listxattr 244 -#define TARGET_NR_llistxattr 245 -#define TARGET_NR_flistxattr 246 -#define TARGET_NR_removexattr 247 -#define TARGET_NR_lremovexattr 248 -#define TARGET_NR_fremovexattr 249 -#define TARGET_NR_timer_create 250 -#define TARGET_NR_timer_settime 251 -#define TARGET_NR_timer_gettime 252 -#define TARGET_NR_timer_getoverrun 253 -#define TARGET_NR_timer_delete 254 -#define TARGET_NR_clock_settime 255 -#define TARGET_NR_clock_gettime 256 -#define TARGET_NR_clock_getres 257 -#define TARGET_NR_clock_nanosleep 258 -#define TARGET_NR_tgkill 259 -#define TARGET_NR_mbind 260 -#define TARGET_NR_get_mempolicy 261 -#define TARGET_NR_set_mempolicy 262 -#define TARGET_NR_vserver 263 -#define TARGET_NR_add_key 264 -#define TARGET_NR_request_key 265 -#define TARGET_NR_keyctl 266 -#define TARGET_NR_ioprio_set 267 -#define TARGET_NR_ioprio_get 268 -#define TARGET_NR_inotify_init 269 -#define TARGET_NR_inotify_add_watch 270 -#define TARGET_NR_inotify_rm_watch 271 -#define TARGET_NR_migrate_pages 272 -#define TARGET_NR_pselect6 273 -#define TARGET_NR_ppoll 274 -#define TARGET_NR_openat 275 -#define TARGET_NR_mkdirat 276 -#define TARGET_NR_mknodat 277 -#define TARGET_NR_fchownat 278 -#define TARGET_NR_futimesat 279 -#define TARGET_NR_fstatat64 280 -#define TARGET_NR_unlinkat 281 -#define TARGET_NR_renameat 282 -#define TARGET_NR_linkat 283 -#define TARGET_NR_symlinkat 284 -#define TARGET_NR_readlinkat 285 -#define TARGET_NR_fchmodat 286 -#define TARGET_NR_faccessat 287 -#define TARGET_NR_unshare 288 -#define TARGET_NR_set_robust_list 289 -#define TARGET_NR_get_robust_list 290 -#define TARGET_NR_splice 291 -#define TARGET_NR_sync_file_range 292 -#define TARGET_NR_tee 293 -#define TARGET_NR_vmsplice 294 -#define TARGET_NR_move_pages 295 -#define TARGET_NR_getcpu 296 -#define TARGET_NR_epoll_pwait 297 -#define TARGET_NR_statfs64 298 -#define TARGET_NR_fstatfs64 299 -#define TARGET_NR_kexec_load 300 -#define TARGET_NR_utimensat 301 -#define TARGET_NR_signalfd 302 -#define TARGET_NR_timerfd 303 -#define TARGET_NR_eventfd 304 -#define TARGET_NR_fallocate 305 -#define TARGET_NR_timerfd_create 306 -#define TARGET_NR_timerfd_settime 307 -#define TARGET_NR_timerfd_gettime 308 -#define TARGET_NR_signalfd4 309 -#define TARGET_NR_eventfd2 310 -#define TARGET_NR_epoll_create1 311 -#define TARGET_NR_dup3 312 -#define TARGET_NR_pipe2 313 -#define TARGET_NR_inotify_init1 314 -#define TARGET_NR_preadv 315 -#define TARGET_NR_pwritev 316 -#define TARGET_NR_rt_tgsigqueueinfo 317 -#define TARGET_NR_perf_event_open 318 -#define TARGET_NR_recvmmsg 319 -#define TARGET_NR_accept4 320 -#define TARGET_NR_prlimit64 321 -#define TARGET_NR_fanotify_init 322 -#define TARGET_NR_fanotify_mark 323 -#define TARGET_NR_clock_adjtime 324 -#define TARGET_NR_name_to_handle_at 325 -#define TARGET_NR_open_by_handle_at 326 -#define TARGET_NR_syncfs 327 -#define TARGET_NR_setns 328 -#define TARGET_NR_sendmmsg 329 -#define TARGET_NR_process_vm_readv 330 -#define TARGET_NR_process_vm_writev 331 -#define TARGET_NR_kcmp 332 -#define TARGET_NR_finit_module 333 -#define TARGET_NR_sched_setattr 334 -#define TARGET_NR_sched_getattr 335 -#define TARGET_NR_utimes 336 -#define TARGET_NR_renameat2 337 -#define TARGET_NR_seccomp 338 -#define TARGET_NR_getrandom 339 -#define TARGET_NR_memfd_create 340 -#define TARGET_NR_bpf 341 -#define TARGET_NR_execveat 342 -#define TARGET_NR_membarrier 343 -#define TARGET_NR_userfaultfd 344 -#define TARGET_NR_mlock2 345 -#define TARGET_NR_copy_file_range 346 -#define TARGET_NR_preadv2 347 -#define TARGET_NR_pwritev2 348 - -#endif diff --git a/linux-user/hppa/syscallhdr.sh b/linux-user/hppa/syscallhdr.sh new file mode 100644 index 0000000000..ac91a95762 --- /dev/null +++ b/linux-user/hppa/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_HPPA_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry compat ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" +) > "$out" From 5b85cae95544d1db9f067a3846bb8659d9bc5711 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:46 +0100 Subject: [PATCH 11/32] linux-user, m68k: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/m68k/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-5-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/m68k/Makefile.objs | 5 + linux-user/m68k/syscall.tbl | 437 ++++++++++++++++++++++++++++++++++ linux-user/m68k/syscall_nr.h | 434 --------------------------------- linux-user/m68k/syscallhdr.sh | 32 +++ 6 files changed, 477 insertions(+), 435 deletions(-) create mode 100644 linux-user/m68k/Makefile.objs create mode 100644 linux-user/m68k/syscall.tbl delete mode 100644 linux-user/m68k/syscall_nr.h create mode 100644 linux-user/m68k/syscallhdr.sh diff --git a/configure b/configure index d96b767947..480e1d9af5 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa ; do +for arch in alpha hppa m68k ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7821,6 +7821,7 @@ case "$target_name" in m68k) bflt="yes" gdb_xml_files="cf-core.xml cf-fp.xml m68k-fp.xml" + TARGET_SYSTBL_ABI=common ;; microblaze|microblazeel) TARGET_ARCH=microblaze diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 9f8e001241..ac74b23683 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -11,3 +11,4 @@ obj-$(TARGET_AARCH64) += arm/semihost.o obj-$(TARGET_ALPHA) += alpha/ obj-$(TARGET_HPPA) += hppa/ +obj-$(TARGET_M68K) += m68k/ diff --git a/linux-user/m68k/Makefile.objs b/linux-user/m68k/Makefile.objs new file mode 100644 index 0000000000..961bd05c23 --- /dev/null +++ b/linux-user/m68k/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/m68k/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/m68k/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/m68k/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/m68k/syscall.tbl b/linux-user/m68k/syscall.tbl new file mode 100644 index 0000000000..a88a285a0e --- /dev/null +++ b/linux-user/m68k/syscall.tbl @@ -0,0 +1,437 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for m68k +# +# The format is: +# +# +# The is always "common" for this file +# +0 common restart_syscall sys_restart_syscall +1 common exit sys_exit +2 common fork __sys_fork +3 common read sys_read +4 common write sys_write +5 common open sys_open +6 common close sys_close +7 common waitpid sys_waitpid +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 common execve sys_execve +12 common chdir sys_chdir +13 common time sys_time32 +14 common mknod sys_mknod +15 common chmod sys_chmod +16 common chown sys_chown16 +# 17 was break +18 common oldstat sys_stat +19 common lseek sys_lseek +20 common getpid sys_getpid +21 common mount sys_mount +22 common umount sys_oldumount +23 common setuid sys_setuid16 +24 common getuid sys_getuid16 +25 common stime sys_stime32 +26 common ptrace sys_ptrace +27 common alarm sys_alarm +28 common oldfstat sys_fstat +29 common pause sys_pause +30 common utime sys_utime32 +# 31 was stty +# 32 was gtty +33 common access sys_access +34 common nice sys_nice +# 35 was ftime +36 common sync sys_sync +37 common kill sys_kill +38 common rename sys_rename +39 common mkdir sys_mkdir +40 common rmdir sys_rmdir +41 common dup sys_dup +42 common pipe sys_pipe +43 common times sys_times +# 44 was prof +45 common brk sys_brk +46 common setgid sys_setgid16 +47 common getgid sys_getgid16 +48 common signal sys_signal +49 common geteuid sys_geteuid16 +50 common getegid sys_getegid16 +51 common acct sys_acct +52 common umount2 sys_umount +# 53 was lock +54 common ioctl sys_ioctl +55 common fcntl sys_fcntl +# 56 was mpx +57 common setpgid sys_setpgid +# 58 was ulimit +# 59 was oldolduname +60 common umask sys_umask +61 common chroot sys_chroot +62 common ustat sys_ustat +63 common dup2 sys_dup2 +64 common getppid sys_getppid +65 common getpgrp sys_getpgrp +66 common setsid sys_setsid +67 common sigaction sys_sigaction +68 common sgetmask sys_sgetmask +69 common ssetmask sys_ssetmask +70 common setreuid sys_setreuid16 +71 common setregid sys_setregid16 +72 common sigsuspend sys_sigsuspend +73 common sigpending sys_sigpending +74 common sethostname sys_sethostname +75 common setrlimit sys_setrlimit +76 common getrlimit sys_old_getrlimit +77 common getrusage sys_getrusage +78 common gettimeofday sys_gettimeofday +79 common settimeofday sys_settimeofday +80 common getgroups sys_getgroups16 +81 common setgroups sys_setgroups16 +82 common select sys_old_select +83 common symlink sys_symlink +84 common oldlstat sys_lstat +85 common readlink sys_readlink +86 common uselib sys_uselib +87 common swapon sys_swapon +88 common reboot sys_reboot +89 common readdir sys_old_readdir +90 common mmap sys_old_mmap +91 common munmap sys_munmap +92 common truncate sys_truncate +93 common ftruncate sys_ftruncate +94 common fchmod sys_fchmod +95 common fchown sys_fchown16 +96 common getpriority sys_getpriority +97 common setpriority sys_setpriority +# 98 was profil +99 common statfs sys_statfs +100 common fstatfs sys_fstatfs +# 101 was ioperm +102 common socketcall sys_socketcall +103 common syslog sys_syslog +104 common setitimer sys_setitimer +105 common getitimer sys_getitimer +106 common stat sys_newstat +107 common lstat sys_newlstat +108 common fstat sys_newfstat +# 109 was olduname +# 110 was iopl +111 common vhangup sys_vhangup +# 112 was idle +# 113 was vm86 +114 common wait4 sys_wait4 +115 common swapoff sys_swapoff +116 common sysinfo sys_sysinfo +117 common ipc sys_ipc +118 common fsync sys_fsync +119 common sigreturn sys_sigreturn +120 common clone __sys_clone +121 common setdomainname sys_setdomainname +122 common uname sys_newuname +123 common cacheflush sys_cacheflush +124 common adjtimex sys_adjtimex_time32 +125 common mprotect sys_mprotect +126 common sigprocmask sys_sigprocmask +127 common create_module sys_ni_syscall +128 common init_module sys_init_module +129 common delete_module sys_delete_module +130 common get_kernel_syms sys_ni_syscall +131 common quotactl sys_quotactl +132 common getpgid sys_getpgid +133 common fchdir sys_fchdir +134 common bdflush sys_bdflush +135 common sysfs sys_sysfs +136 common personality sys_personality +# 137 was afs_syscall +138 common setfsuid sys_setfsuid16 +139 common setfsgid sys_setfsgid16 +140 common _llseek sys_llseek +141 common getdents sys_getdents +142 common _newselect sys_select +143 common flock sys_flock +144 common msync sys_msync +145 common readv sys_readv +146 common writev sys_writev +147 common getsid sys_getsid +148 common fdatasync sys_fdatasync +149 common _sysctl sys_sysctl +150 common mlock sys_mlock +151 common munlock sys_munlock +152 common mlockall sys_mlockall +153 common munlockall sys_munlockall +154 common sched_setparam sys_sched_setparam +155 common sched_getparam sys_sched_getparam +156 common sched_setscheduler sys_sched_setscheduler +157 common sched_getscheduler sys_sched_getscheduler +158 common sched_yield sys_sched_yield +159 common sched_get_priority_max sys_sched_get_priority_max +160 common sched_get_priority_min sys_sched_get_priority_min +161 common sched_rr_get_interval sys_sched_rr_get_interval_time32 +162 common nanosleep sys_nanosleep_time32 +163 common mremap sys_mremap +164 common setresuid sys_setresuid16 +165 common getresuid sys_getresuid16 +166 common getpagesize sys_getpagesize +167 common query_module sys_ni_syscall +168 common poll sys_poll +169 common nfsservctl sys_ni_syscall +170 common setresgid sys_setresgid16 +171 common getresgid sys_getresgid16 +172 common prctl sys_prctl +173 common rt_sigreturn sys_rt_sigreturn +174 common rt_sigaction sys_rt_sigaction +175 common rt_sigprocmask sys_rt_sigprocmask +176 common rt_sigpending sys_rt_sigpending +177 common rt_sigtimedwait sys_rt_sigtimedwait_time32 +178 common rt_sigqueueinfo sys_rt_sigqueueinfo +179 common rt_sigsuspend sys_rt_sigsuspend +180 common pread64 sys_pread64 +181 common pwrite64 sys_pwrite64 +182 common lchown sys_lchown16 +183 common getcwd sys_getcwd +184 common capget sys_capget +185 common capset sys_capset +186 common sigaltstack sys_sigaltstack +187 common sendfile sys_sendfile +188 common getpmsg sys_ni_syscall +189 common putpmsg sys_ni_syscall +190 common vfork __sys_vfork +191 common ugetrlimit sys_getrlimit +192 common mmap2 sys_mmap2 +193 common truncate64 sys_truncate64 +194 common ftruncate64 sys_ftruncate64 +195 common stat64 sys_stat64 +196 common lstat64 sys_lstat64 +197 common fstat64 sys_fstat64 +198 common chown32 sys_chown +199 common getuid32 sys_getuid +200 common getgid32 sys_getgid +201 common geteuid32 sys_geteuid +202 common getegid32 sys_getegid +203 common setreuid32 sys_setreuid +204 common setregid32 sys_setregid +205 common getgroups32 sys_getgroups +206 common setgroups32 sys_setgroups +207 common fchown32 sys_fchown +208 common setresuid32 sys_setresuid +209 common getresuid32 sys_getresuid +210 common setresgid32 sys_setresgid +211 common getresgid32 sys_getresgid +212 common lchown32 sys_lchown +213 common setuid32 sys_setuid +214 common setgid32 sys_setgid +215 common setfsuid32 sys_setfsuid +216 common setfsgid32 sys_setfsgid +217 common pivot_root sys_pivot_root +# 218 is reserved +# 219 is reserved +220 common getdents64 sys_getdents64 +221 common gettid sys_gettid +222 common tkill sys_tkill +223 common setxattr sys_setxattr +224 common lsetxattr sys_lsetxattr +225 common fsetxattr sys_fsetxattr +226 common getxattr sys_getxattr +227 common lgetxattr sys_lgetxattr +228 common fgetxattr sys_fgetxattr +229 common listxattr sys_listxattr +230 common llistxattr sys_llistxattr +231 common flistxattr sys_flistxattr +232 common removexattr sys_removexattr +233 common lremovexattr sys_lremovexattr +234 common fremovexattr sys_fremovexattr +235 common futex sys_futex_time32 +236 common sendfile64 sys_sendfile64 +237 common mincore sys_mincore +238 common madvise sys_madvise +239 common fcntl64 sys_fcntl64 +240 common readahead sys_readahead +241 common io_setup sys_io_setup +242 common io_destroy sys_io_destroy +243 common io_getevents sys_io_getevents_time32 +244 common io_submit sys_io_submit +245 common io_cancel sys_io_cancel +246 common fadvise64 sys_fadvise64 +247 common exit_group sys_exit_group +248 common lookup_dcookie sys_lookup_dcookie +249 common epoll_create sys_epoll_create +250 common epoll_ctl sys_epoll_ctl +251 common epoll_wait sys_epoll_wait +252 common remap_file_pages sys_remap_file_pages +253 common set_tid_address sys_set_tid_address +254 common timer_create sys_timer_create +255 common timer_settime sys_timer_settime32 +256 common timer_gettime sys_timer_gettime32 +257 common timer_getoverrun sys_timer_getoverrun +258 common timer_delete sys_timer_delete +259 common clock_settime sys_clock_settime32 +260 common clock_gettime sys_clock_gettime32 +261 common clock_getres sys_clock_getres_time32 +262 common clock_nanosleep sys_clock_nanosleep_time32 +263 common statfs64 sys_statfs64 +264 common fstatfs64 sys_fstatfs64 +265 common tgkill sys_tgkill +266 common utimes sys_utimes_time32 +267 common fadvise64_64 sys_fadvise64_64 +268 common mbind sys_mbind +269 common get_mempolicy sys_get_mempolicy +270 common set_mempolicy sys_set_mempolicy +271 common mq_open sys_mq_open +272 common mq_unlink sys_mq_unlink +273 common mq_timedsend sys_mq_timedsend_time32 +274 common mq_timedreceive sys_mq_timedreceive_time32 +275 common mq_notify sys_mq_notify +276 common mq_getsetattr sys_mq_getsetattr +277 common waitid sys_waitid +# 278 was vserver +279 common add_key sys_add_key +280 common request_key sys_request_key +281 common keyctl sys_keyctl +282 common ioprio_set sys_ioprio_set +283 common ioprio_get sys_ioprio_get +284 common inotify_init sys_inotify_init +285 common inotify_add_watch sys_inotify_add_watch +286 common inotify_rm_watch sys_inotify_rm_watch +287 common migrate_pages sys_migrate_pages +288 common openat sys_openat +289 common mkdirat sys_mkdirat +290 common mknodat sys_mknodat +291 common fchownat sys_fchownat +292 common futimesat sys_futimesat_time32 +293 common fstatat64 sys_fstatat64 +294 common unlinkat sys_unlinkat +295 common renameat sys_renameat +296 common linkat sys_linkat +297 common symlinkat sys_symlinkat +298 common readlinkat sys_readlinkat +299 common fchmodat sys_fchmodat +300 common faccessat sys_faccessat +301 common pselect6 sys_pselect6_time32 +302 common ppoll sys_ppoll_time32 +303 common unshare sys_unshare +304 common set_robust_list sys_set_robust_list +305 common get_robust_list sys_get_robust_list +306 common splice sys_splice +307 common sync_file_range sys_sync_file_range +308 common tee sys_tee +309 common vmsplice sys_vmsplice +310 common move_pages sys_move_pages +311 common sched_setaffinity sys_sched_setaffinity +312 common sched_getaffinity sys_sched_getaffinity +313 common kexec_load sys_kexec_load +314 common getcpu sys_getcpu +315 common epoll_pwait sys_epoll_pwait +316 common utimensat sys_utimensat_time32 +317 common signalfd sys_signalfd +318 common timerfd_create sys_timerfd_create +319 common eventfd sys_eventfd +320 common fallocate sys_fallocate +321 common timerfd_settime sys_timerfd_settime32 +322 common timerfd_gettime sys_timerfd_gettime32 +323 common signalfd4 sys_signalfd4 +324 common eventfd2 sys_eventfd2 +325 common epoll_create1 sys_epoll_create1 +326 common dup3 sys_dup3 +327 common pipe2 sys_pipe2 +328 common inotify_init1 sys_inotify_init1 +329 common preadv sys_preadv +330 common pwritev sys_pwritev +331 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo +332 common perf_event_open sys_perf_event_open +333 common get_thread_area sys_get_thread_area +334 common set_thread_area sys_set_thread_area +335 common atomic_cmpxchg_32 sys_atomic_cmpxchg_32 +336 common atomic_barrier sys_atomic_barrier +337 common fanotify_init sys_fanotify_init +338 common fanotify_mark sys_fanotify_mark +339 common prlimit64 sys_prlimit64 +340 common name_to_handle_at sys_name_to_handle_at +341 common open_by_handle_at sys_open_by_handle_at +342 common clock_adjtime sys_clock_adjtime32 +343 common syncfs sys_syncfs +344 common setns sys_setns +345 common process_vm_readv sys_process_vm_readv +346 common process_vm_writev sys_process_vm_writev +347 common kcmp sys_kcmp +348 common finit_module sys_finit_module +349 common sched_setattr sys_sched_setattr +350 common sched_getattr sys_sched_getattr +351 common renameat2 sys_renameat2 +352 common getrandom sys_getrandom +353 common memfd_create sys_memfd_create +354 common bpf sys_bpf +355 common execveat sys_execveat +356 common socket sys_socket +357 common socketpair sys_socketpair +358 common bind sys_bind +359 common connect sys_connect +360 common listen sys_listen +361 common accept4 sys_accept4 +362 common getsockopt sys_getsockopt +363 common setsockopt sys_setsockopt +364 common getsockname sys_getsockname +365 common getpeername sys_getpeername +366 common sendto sys_sendto +367 common sendmsg sys_sendmsg +368 common recvfrom sys_recvfrom +369 common recvmsg sys_recvmsg +370 common shutdown sys_shutdown +371 common recvmmsg sys_recvmmsg_time32 +372 common sendmmsg sys_sendmmsg +373 common userfaultfd sys_userfaultfd +374 common membarrier sys_membarrier +375 common mlock2 sys_mlock2 +376 common copy_file_range sys_copy_file_range +377 common preadv2 sys_preadv2 +378 common pwritev2 sys_pwritev2 +379 common statx sys_statx +380 common seccomp sys_seccomp +381 common pkey_mprotect sys_pkey_mprotect +382 common pkey_alloc sys_pkey_alloc +383 common pkey_free sys_pkey_free +384 common rseq sys_rseq +# room for arch specific calls +393 common semget sys_semget +394 common semctl sys_semctl +395 common shmget sys_shmget +396 common shmctl sys_shmctl +397 common shmat sys_shmat +398 common shmdt sys_shmdt +399 common msgget sys_msgget +400 common msgsnd sys_msgsnd +401 common msgrcv sys_msgrcv +402 common msgctl sys_msgctl +403 common clock_gettime64 sys_clock_gettime +404 common clock_settime64 sys_clock_settime +405 common clock_adjtime64 sys_clock_adjtime +406 common clock_getres_time64 sys_clock_getres +407 common clock_nanosleep_time64 sys_clock_nanosleep +408 common timer_gettime64 sys_timer_gettime +409 common timer_settime64 sys_timer_settime +410 common timerfd_gettime64 sys_timerfd_gettime +411 common timerfd_settime64 sys_timerfd_settime +412 common utimensat_time64 sys_utimensat +413 common pselect6_time64 sys_pselect6 +414 common ppoll_time64 sys_ppoll +416 common io_pgetevents_time64 sys_io_pgetevents +417 common recvmmsg_time64 sys_recvmmsg +418 common mq_timedsend_time64 sys_mq_timedsend +419 common mq_timedreceive_time64 sys_mq_timedreceive +420 common semtimedop_time64 sys_semtimedop +421 common rt_sigtimedwait_time64 sys_rt_sigtimedwait +422 common futex_time64 sys_futex +423 common sched_rr_get_interval_time64 sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +# 435 reserved for clone3 diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h deleted file mode 100644 index 01aee343a9..0000000000 --- a/linux-user/m68k/syscall_nr.h +++ /dev/null @@ -1,434 +0,0 @@ -/* - * This file contains the system call numbers. - */ - -#ifndef LINUX_USER_M68K_SYSCALL_NR_H -#define LINUX_USER_M68K_SYSCALL_NR_H - -#define TARGET_NR_exit 1 -#define TARGET_NR_fork 2 -#define TARGET_NR_read 3 -#define TARGET_NR_write 4 -#define TARGET_NR_open 5 -#define TARGET_NR_close 6 -#define TARGET_NR_waitpid 7 -#define TARGET_NR_creat 8 -#define TARGET_NR_link 9 -#define TARGET_NR_unlink 10 -#define TARGET_NR_execve 11 -#define TARGET_NR_chdir 12 -#define TARGET_NR_time 13 -#define TARGET_NR_mknod 14 -#define TARGET_NR_chmod 15 -#define TARGET_NR_chown 16 -#define TARGET_NR_break 17 -#define TARGET_NR_oldstat 18 -#define TARGET_NR_lseek 19 -#define TARGET_NR_getpid 20 -#define TARGET_NR_mount 21 -#define TARGET_NR_umount 22 -#define TARGET_NR_setuid 23 -#define TARGET_NR_getuid 24 -#define TARGET_NR_stime 25 -#define TARGET_NR_ptrace 26 -#define TARGET_NR_alarm 27 -#define TARGET_NR_oldfstat 28 -#define TARGET_NR_pause 29 -#define TARGET_NR_utime 30 -#define TARGET_NR_stty 31 -#define TARGET_NR_gtty 32 -#define TARGET_NR_access 33 -#define TARGET_NR_nice 34 -#define TARGET_NR_ftime 35 -#define TARGET_NR_sync 36 -#define TARGET_NR_kill 37 -#define TARGET_NR_rename 38 -#define TARGET_NR_mkdir 39 -#define TARGET_NR_rmdir 40 -#define TARGET_NR_dup 41 -#define TARGET_NR_pipe 42 -#define TARGET_NR_times 43 -#define TARGET_NR_prof 44 -#define TARGET_NR_brk 45 -#define TARGET_NR_setgid 46 -#define TARGET_NR_getgid 47 -#define TARGET_NR_signal 48 -#define TARGET_NR_geteuid 49 -#define TARGET_NR_getegid 50 -#define TARGET_NR_acct 51 -#define TARGET_NR_umount2 52 -#define TARGET_NR_lock 53 -#define TARGET_NR_ioctl 54 -#define TARGET_NR_fcntl 55 -#define TARGET_NR_mpx 56 -#define TARGET_NR_setpgid 57 -#define TARGET_NR_ulimit 58 -#define TARGET_NR_oldolduname 59 -#define TARGET_NR_umask 60 -#define TARGET_NR_chroot 61 -#define TARGET_NR_ustat 62 -#define TARGET_NR_dup2 63 -#define TARGET_NR_getppid 64 -#define TARGET_NR_getpgrp 65 -#define TARGET_NR_setsid 66 -#define TARGET_NR_sigaction 67 -#define TARGET_NR_sgetmask 68 -#define TARGET_NR_ssetmask 69 -#define TARGET_NR_setreuid 70 -#define TARGET_NR_setregid 71 -#define TARGET_NR_sigsuspend 72 -#define TARGET_NR_sigpending 73 -#define TARGET_NR_sethostname 74 -#define TARGET_NR_setrlimit 75 -#define TARGET_NR_getrlimit 76 -#define TARGET_NR_getrusage 77 -#define TARGET_NR_gettimeofday 78 -#define TARGET_NR_settimeofday 79 -#define TARGET_NR_getgroups 80 -#define TARGET_NR_setgroups 81 -#define TARGET_NR_select 82 -#define TARGET_NR_symlink 83 -#define TARGET_NR_oldlstat 84 -#define TARGET_NR_readlink 85 -#define TARGET_NR_uselib 86 -#define TARGET_NR_swapon 87 -#define TARGET_NR_reboot 88 -#define TARGET_NR_readdir 89 -#define TARGET_NR_mmap 90 -#define TARGET_NR_munmap 91 -#define TARGET_NR_truncate 92 -#define TARGET_NR_ftruncate 93 -#define TARGET_NR_fchmod 94 -#define TARGET_NR_fchown 95 -#define TARGET_NR_getpriority 96 -#define TARGET_NR_setpriority 97 -#define TARGET_NR_profil 98 -#define TARGET_NR_statfs 99 -#define TARGET_NR_fstatfs 100 -#define TARGET_NR_ioperm 101 -#define TARGET_NR_socketcall 102 -#define TARGET_NR_syslog 103 -#define TARGET_NR_setitimer 104 -#define TARGET_NR_getitimer 105 -#define TARGET_NR_stat 106 -#define TARGET_NR_lstat 107 -#define TARGET_NR_fstat 108 -#define TARGET_NR_olduname 109 -//#define TARGET_NR_iopl /* 110 */ not supported -#define TARGET_NR_vhangup 111 -//#define TARGET_NR_idle /* 112 */ Obsolete -//#define TARGET_NR_vm86 /* 113 */ not supported -#define TARGET_NR_wait4 114 -#define TARGET_NR_swapoff 115 -#define TARGET_NR_sysinfo 116 -#define TARGET_NR_ipc 117 -#define TARGET_NR_fsync 118 -#define TARGET_NR_sigreturn 119 -#define TARGET_NR_clone 120 -#define TARGET_NR_setdomainname 121 -#define TARGET_NR_uname 122 -#define TARGET_NR_cacheflush 123 -#define TARGET_NR_adjtimex 124 -#define TARGET_NR_mprotect 125 -#define TARGET_NR_sigprocmask 126 -#define TARGET_NR_create_module 127 -#define TARGET_NR_init_module 128 -#define TARGET_NR_delete_module 129 -#define TARGET_NR_get_kernel_syms 130 -#define TARGET_NR_quotactl 131 -#define TARGET_NR_getpgid 132 -#define TARGET_NR_fchdir 133 -#define TARGET_NR_bdflush 134 -#define TARGET_NR_sysfs 135 -#define TARGET_NR_personality 136 -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid 138 -#define TARGET_NR_setfsgid 139 -#define TARGET_NR__llseek 140 -#define TARGET_NR_getdents 141 -#define TARGET_NR__newselect 142 -#define TARGET_NR_flock 143 -#define TARGET_NR_msync 144 -#define TARGET_NR_readv 145 -#define TARGET_NR_writev 146 -#define TARGET_NR_getsid 147 -#define TARGET_NR_fdatasync 148 -#define TARGET_NR__sysctl 149 -#define TARGET_NR_mlock 150 -#define TARGET_NR_munlock 151 -#define TARGET_NR_mlockall 152 -#define TARGET_NR_munlockall 153 -#define TARGET_NR_sched_setparam 154 -#define TARGET_NR_sched_getparam 155 -#define TARGET_NR_sched_setscheduler 156 -#define TARGET_NR_sched_getscheduler 157 -#define TARGET_NR_sched_yield 158 -#define TARGET_NR_sched_get_priority_max 159 -#define TARGET_NR_sched_get_priority_min 160 -#define TARGET_NR_sched_rr_get_interval 161 -#define TARGET_NR_nanosleep 162 -#define TARGET_NR_mremap 163 -#define TARGET_NR_setresuid 164 -#define TARGET_NR_getresuid 165 -#define TARGET_NR_getpagesize 166 -#define TARGET_NR_query_module 167 -#define TARGET_NR_poll 168 -#define TARGET_NR_nfsservctl 169 -#define TARGET_NR_setresgid 170 -#define TARGET_NR_getresgid 171 -#define TARGET_NR_prctl 172 -#define TARGET_NR_rt_sigreturn 173 -#define TARGET_NR_rt_sigaction 174 -#define TARGET_NR_rt_sigprocmask 175 -#define TARGET_NR_rt_sigpending 176 -#define TARGET_NR_rt_sigtimedwait 177 -#define TARGET_NR_rt_sigqueueinfo 178 -#define TARGET_NR_rt_sigsuspend 179 -#define TARGET_NR_pread64 180 -#define TARGET_NR_pwrite64 181 -#define TARGET_NR_lchown 182 -#define TARGET_NR_getcwd 183 -#define TARGET_NR_capget 184 -#define TARGET_NR_capset 185 -#define TARGET_NR_sigaltstack 186 -#define TARGET_NR_sendfile 187 -#define TARGET_NR_getpmsg 188 /* some people actually want streams */ -#define TARGET_NR_putpmsg 189 /* some people actually want streams */ -#define TARGET_NR_vfork 190 -#define TARGET_NR_ugetrlimit 191 -#define TARGET_NR_mmap2 192 -#define TARGET_NR_truncate64 193 -#define TARGET_NR_ftruncate64 194 -#define TARGET_NR_stat64 195 -#define TARGET_NR_lstat64 196 -#define TARGET_NR_fstat64 197 -#define TARGET_NR_chown32 198 -#define TARGET_NR_getuid32 199 -#define TARGET_NR_getgid32 200 -#define TARGET_NR_geteuid32 201 -#define TARGET_NR_getegid32 202 -#define TARGET_NR_setreuid32 203 -#define TARGET_NR_setregid32 204 -#define TARGET_NR_getgroups32 205 -#define TARGET_NR_setgroups32 206 -#define TARGET_NR_fchown32 207 -#define TARGET_NR_setresuid32 208 -#define TARGET_NR_getresuid32 209 -#define TARGET_NR_setresgid32 210 -#define TARGET_NR_getresgid32 211 -#define TARGET_NR_lchown32 212 -#define TARGET_NR_setuid32 213 -#define TARGET_NR_setgid32 214 -#define TARGET_NR_setfsuid32 215 -#define TARGET_NR_setfsgid32 216 -#define TARGET_NR_pivot_root 217 -#define TARGET_NR_getdents64 220 -#define TARGET_NR_gettid 221 -#define TARGET_NR_tkill 222 -#define TARGET_NR_setxattr 223 -#define TARGET_NR_lsetxattr 224 -#define TARGET_NR_fsetxattr 225 -#define TARGET_NR_getxattr 226 -#define TARGET_NR_lgetxattr 227 -#define TARGET_NR_fgetxattr 228 -#define TARGET_NR_listxattr 229 -#define TARGET_NR_llistxattr 230 -#define TARGET_NR_flistxattr 231 -#define TARGET_NR_removexattr 232 -#define TARGET_NR_lremovexattr 233 -#define TARGET_NR_fremovexattr 234 -#define TARGET_NR_futex 235 -#define TARGET_NR_sendfile64 236 -#define TARGET_NR_mincore 237 -#define TARGET_NR_madvise 238 -#define TARGET_NR_fcntl64 239 -#define TARGET_NR_readahead 240 -#define TARGET_NR_io_setup 241 -#define TARGET_NR_io_destroy 242 -#define TARGET_NR_io_getevents 243 -#define TARGET_NR_io_submit 244 -#define TARGET_NR_io_cancel 245 -#define TARGET_NR_fadvise64 246 -#define TARGET_NR_exit_group 247 -#define TARGET_NR_lookup_dcookie 248 -#define TARGET_NR_epoll_create 249 -#define TARGET_NR_epoll_ctl 250 -#define TARGET_NR_epoll_wait 251 -#define TARGET_NR_remap_file_pages 252 -#define TARGET_NR_set_tid_address 253 -#define TARGET_NR_timer_create 254 -#define TARGET_NR_timer_settime 255 -#define TARGET_NR_timer_gettime 256 -#define TARGET_NR_timer_getoverrun 257 -#define TARGET_NR_timer_delete 258 -#define TARGET_NR_clock_settime 259 -#define TARGET_NR_clock_gettime 260 -#define TARGET_NR_clock_getres 261 -#define TARGET_NR_clock_nanosleep 262 -#define TARGET_NR_statfs64 263 -#define TARGET_NR_fstatfs64 264 -#define TARGET_NR_tgkill 265 -#define TARGET_NR_utimes 266 -#define TARGET_NR_fadvise64_64 267 -#define TARGET_NR_mbind 268 -#define TARGET_NR_get_mempolicy 269 -#define TARGET_NR_set_mempolicy 270 -#define TARGET_NR_mq_open 271 -#define TARGET_NR_mq_unlink 272 -#define TARGET_NR_mq_timedsend 273 -#define TARGET_NR_mq_timedreceive 274 -#define TARGET_NR_mq_notify 275 -#define TARGET_NR_mq_getsetattr 276 -#define TARGET_NR_waitid 277 -#define TARGET_NR_vserver 278 -#define TARGET_NR_add_key 279 -#define TARGET_NR_request_key 280 -#define TARGET_NR_keyctl 281 -#define TARGET_NR_ioprio_set 282 -#define TARGET_NR_ioprio_get 283 -#define TARGET_NR_inotify_init 284 -#define TARGET_NR_inotify_add_watch 285 -#define TARGET_NR_inotify_rm_watch 286 -#define TARGET_NR_migrate_pages 287 -#define TARGET_NR_openat 288 -#define TARGET_NR_mkdirat 289 -#define TARGET_NR_mknodat 290 -#define TARGET_NR_fchownat 291 -#define TARGET_NR_futimesat 292 -#define TARGET_NR_fstatat64 293 -#define TARGET_NR_unlinkat 294 -#define TARGET_NR_renameat 295 -#define TARGET_NR_linkat 296 -#define TARGET_NR_symlinkat 297 -#define TARGET_NR_readlinkat 298 -#define TARGET_NR_fchmodat 299 -#define TARGET_NR_faccessat 300 -#define TARGET_NR_pselect6 301 -#define TARGET_NR_ppoll 302 -#define TARGET_NR_unshare 303 -#define TARGET_NR_set_robust_list 304 -#define TARGET_NR_get_robust_list 305 -#define TARGET_NR_splice 306 -#define TARGET_NR_sync_file_range 307 -#define TARGET_NR_tee 308 -#define TARGET_NR_vmsplice 309 -#define TARGET_NR_move_pages 310 -#define TARGET_NR_sched_setaffinity 311 -#define TARGET_NR_sched_getaffinity 312 -#define TARGET_NR_kexec_load 313 -#define TARGET_NR_getcpu 314 -#define TARGET_NR_epoll_pwait 315 -#define TARGET_NR_utimensat 316 -#define TARGET_NR_signalfd 317 -#define TARGET_NR_timerfd_create 318 -#define TARGET_NR_eventfd 319 -#define TARGET_NR_fallocate 320 -#define TARGET_NR_timerfd_settime 321 -#define TARGET_NR_timerfd_gettime 322 -#define TARGET_NR_signalfd4 323 -#define TARGET_NR_eventfd2 324 -#define TARGET_NR_epoll_create1 325 -#define TARGET_NR_dup3 326 -#define TARGET_NR_pipe2 327 -#define TARGET_NR_inotify_init1 328 -#define TARGET_NR_inotify_init1 328 -#define TARGET_NR_preadv 329 -#define TARGET_NR_pwritev 330 -#define TARGET_NR_rt_tgsigqueueinfo 331 -#define TARGET_NR_perf_event_open 332 -#define TARGET_NR_get_thread_area 333 -#define TARGET_NR_set_thread_area 334 -#define TARGET_NR_atomic_cmpxchg_32 335 -#define TARGET_NR_atomic_barrier 336 -#define TARGET_NR_fanotify_init 337 -#define TARGET_NR_fanotify_mark 338 -#define TARGET_NR_prlimit64 339 -#define TARGET_NR_name_to_handle_at 340 -#define TARGET_NR_open_by_handle_at 341 -#define TARGET_NR_clock_adjtime 342 -#define TARGET_NR_syncfs 343 -#define TARGET_NR_setns 344 -#define TARGET_NR_process_vm_readv 345 -#define TARGET_NR_process_vm_writev 346 -#define TARGET_NR_kcmp 347 -#define TARGET_NR_finit_module 348 -#define TARGET_NR_sched_setattr 349 -#define TARGET_NR_sched_getattr 350 -#define TARGET_NR_renameat2 351 -#define TARGET_NR_getrandom 352 -#define TARGET_NR_memfd_create 353 -#define TARGET_NR_bpf 354 -#define TARGET_NR_execveat 355 -#define TARGET_NR_socket 356 -#define TARGET_NR_socketpair 357 -#define TARGET_NR_bind 358 -#define TARGET_NR_connect 359 -#define TARGET_NR_listen 360 -#define TARGET_NR_accept4 361 -#define TARGET_NR_getsockopt 362 -#define TARGET_NR_setsockopt 363 -#define TARGET_NR_getsockname 364 -#define TARGET_NR_getpeername 365 -#define TARGET_NR_sendto 366 -#define TARGET_NR_sendmsg 367 -#define TARGET_NR_recvfrom 368 -#define TARGET_NR_recvmsg 369 -#define TARGET_NR_shutdown 370 -#define TARGET_NR_recvmmsg 371 -#define TARGET_NR_sendmmsg 372 -#define TARGET_NR_userfaultfd 373 -#define TARGET_NR_membarrier 374 -#define TARGET_NR_mlock2 375 -#define TARGET_NR_copy_file_range 376 -#define TARGET_NR_preadv2 377 -#define TARGET_NR_pwritev2 378 -#define TARGET_NR_statx 379 -#define TARGET_NR_seccomp 380 -#define TARGET_NR_pkey_mprotect 381 -#define TARGET_NR_pkey_alloc 382 -#define TARGET_NR_pkey_free 383 -#define TARGET_NR_rseq 384 -/* room for arch specific calls */ -#define TARGET_NR_semget 393 -#define TARGET_NR_semctl 394 -#define TARGET_NR_shmget 395 -#define TARGET_NR_shmctl 396 -#define TARGET_NR_shmat 397 -#define TARGET_NR_shmdt 398 -#define TARGET_NR_msgget 399 -#define TARGET_NR_msgsnd 400 -#define TARGET_NR_msgrcv 401 -#define TARGET_NR_msgctl 402 -#define TARGET_NR_clock_gettime64 403 -#define TARGET_NR_clock_settime64 404 -#define TARGET_NR_clock_adjtime64 405 -#define TARGET_NR_clock_getres_time64 406 -#define TARGET_NR_clock_nanosleep_time64 407 -#define TARGET_NR_timer_gettime64 408 -#define TARGET_NR_timer_settime64 409 -#define TARGET_NR_timerfd_gettime64 410 -#define TARGET_NR_timerfd_settime64 411 -#define TARGET_NR_utimensat_time64 412 -#define TARGET_NR_pselect6_time64 413 -#define TARGET_NR_ppoll_time64 414 -#define TARGET_NR_io_pgetevents_time64 416 -#define TARGET_NR_recvmmsg_time64 417 -#define TARGET_NR_mq_timedsend_time64 418 -#define TARGET_NR_mq_timedreceive_time64 419 -#define TARGET_NR_semtimedop_time64 420 -#define TARGET_NR_rt_sigtimedwait_time64 421 -#define TARGET_NR_futex_time64 422 -#define TARGET_NR_sched_rr_get_interval_time64 423 -#define TARGET_NR_pidfd_send_signal 424 -#define TARGET_NR_io_uring_setup 425 -#define TARGET_NR_io_uring_enter 426 -#define TARGET_NR_io_uring_register 427 -#define TARGET_NR_open_tree 428 -#define TARGET_NR_move_mount 429 -#define TARGET_NR_fsopen 430 -#define TARGET_NR_fsconfig 431 -#define TARGET_NR_fsmount 432 -#define TARGET_NR_fspick 433 -#define TARGET_NR_pidfd_open 434 -/* 435 reserved for clone3 */ -#endif diff --git a/linux-user/m68k/syscallhdr.sh b/linux-user/m68k/syscallhdr.sh new file mode 100644 index 0000000000..eeb4d01d34 --- /dev/null +++ b/linux-user/m68k/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_M68K_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */\n" "${fileguard}" +) > "$out" From a4a9359253f5ee4fd419c3164940cfcfe9635e45 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:47 +0100 Subject: [PATCH 12/32] linux-user, xtensa: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/xtensa/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-6-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/xtensa/Makefile.objs | 5 + linux-user/xtensa/syscall.tbl | 408 +++++++++++++++++++++++++++ linux-user/xtensa/syscall_nr.h | 469 -------------------------------- linux-user/xtensa/syscallhdr.sh | 32 +++ 6 files changed, 448 insertions(+), 470 deletions(-) create mode 100644 linux-user/xtensa/Makefile.objs create mode 100644 linux-user/xtensa/syscall.tbl delete mode 100644 linux-user/xtensa/syscall_nr.h create mode 100644 linux-user/xtensa/syscallhdr.sh diff --git a/configure b/configure index 480e1d9af5..3e72343b2a 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa m68k ; do +for arch in alpha hppa m68k xtensa ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7916,6 +7916,7 @@ case "$target_name" in ;; xtensa|xtensaeb) TARGET_ARCH=xtensa + TARGET_SYSTBL_ABI=common bflt="yes" mttcg="yes" ;; diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index ac74b23683..13b821baf7 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -12,3 +12,4 @@ obj-$(TARGET_AARCH64) += arm/semihost.o obj-$(TARGET_ALPHA) += alpha/ obj-$(TARGET_HPPA) += hppa/ obj-$(TARGET_M68K) += m68k/ +obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/xtensa/Makefile.objs b/linux-user/xtensa/Makefile.objs new file mode 100644 index 0000000000..d4be1b7455 --- /dev/null +++ b/linux-user/xtensa/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/xtensa/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/xtensa/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/xtensa/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/xtensa/syscall.tbl b/linux-user/xtensa/syscall.tbl new file mode 100644 index 0000000000..25f4de729a --- /dev/null +++ b/linux-user/xtensa/syscall.tbl @@ -0,0 +1,408 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for xtensa +# +# The format is: +# +# +# The is always "common" for this file +# +0 common spill sys_ni_syscall +1 common xtensa sys_ni_syscall +2 common available4 sys_ni_syscall +3 common available5 sys_ni_syscall +4 common available6 sys_ni_syscall +5 common available7 sys_ni_syscall +6 common available8 sys_ni_syscall +7 common available9 sys_ni_syscall +# File Operations +8 common open sys_open +9 common close sys_close +10 common dup sys_dup +11 common dup2 sys_dup2 +12 common read sys_read +13 common write sys_write +14 common select sys_select +15 common lseek sys_lseek +16 common poll sys_poll +17 common _llseek sys_llseek +18 common epoll_wait sys_epoll_wait +19 common epoll_ctl sys_epoll_ctl +20 common epoll_create sys_epoll_create +21 common creat sys_creat +22 common truncate sys_truncate +23 common ftruncate sys_ftruncate +24 common readv sys_readv +25 common writev sys_writev +26 common fsync sys_fsync +27 common fdatasync sys_fdatasync +28 common truncate64 sys_truncate64 +29 common ftruncate64 sys_ftruncate64 +30 common pread64 sys_pread64 +31 common pwrite64 sys_pwrite64 +32 common link sys_link +33 common rename sys_rename +34 common symlink sys_symlink +35 common readlink sys_readlink +36 common mknod sys_mknod +37 common pipe sys_pipe +38 common unlink sys_unlink +39 common rmdir sys_rmdir +40 common mkdir sys_mkdir +41 common chdir sys_chdir +42 common fchdir sys_fchdir +43 common getcwd sys_getcwd +44 common chmod sys_chmod +45 common chown sys_chown +46 common stat sys_newstat +47 common stat64 sys_stat64 +48 common lchown sys_lchown +49 common lstat sys_newlstat +50 common lstat64 sys_lstat64 +51 common available51 sys_ni_syscall +52 common fchmod sys_fchmod +53 common fchown sys_fchown +54 common fstat sys_newfstat +55 common fstat64 sys_fstat64 +56 common flock sys_flock +57 common access sys_access +58 common umask sys_umask +59 common getdents sys_getdents +60 common getdents64 sys_getdents64 +61 common fcntl64 sys_fcntl64 +62 common fallocate sys_fallocate +63 common fadvise64_64 xtensa_fadvise64_64 +64 common utime sys_utime32 +65 common utimes sys_utimes_time32 +66 common ioctl sys_ioctl +67 common fcntl sys_fcntl +68 common setxattr sys_setxattr +69 common getxattr sys_getxattr +70 common listxattr sys_listxattr +71 common removexattr sys_removexattr +72 common lsetxattr sys_lsetxattr +73 common lgetxattr sys_lgetxattr +74 common llistxattr sys_llistxattr +75 common lremovexattr sys_lremovexattr +76 common fsetxattr sys_fsetxattr +77 common fgetxattr sys_fgetxattr +78 common flistxattr sys_flistxattr +79 common fremovexattr sys_fremovexattr +# File Map / Shared Memory Operations +80 common mmap2 sys_mmap_pgoff +81 common munmap sys_munmap +82 common mprotect sys_mprotect +83 common brk sys_brk +84 common mlock sys_mlock +85 common munlock sys_munlock +86 common mlockall sys_mlockall +87 common munlockall sys_munlockall +88 common mremap sys_mremap +89 common msync sys_msync +90 common mincore sys_mincore +91 common madvise sys_madvise +92 common shmget sys_shmget +93 common shmat xtensa_shmat +94 common shmctl sys_old_shmctl +95 common shmdt sys_shmdt +# Socket Operations +96 common socket sys_socket +97 common setsockopt sys_setsockopt +98 common getsockopt sys_getsockopt +99 common shutdown sys_shutdown +100 common bind sys_bind +101 common connect sys_connect +102 common listen sys_listen +103 common accept sys_accept +104 common getsockname sys_getsockname +105 common getpeername sys_getpeername +106 common sendmsg sys_sendmsg +107 common recvmsg sys_recvmsg +108 common send sys_send +109 common recv sys_recv +110 common sendto sys_sendto +111 common recvfrom sys_recvfrom +112 common socketpair sys_socketpair +113 common sendfile sys_sendfile +114 common sendfile64 sys_sendfile64 +115 common sendmmsg sys_sendmmsg +# Process Operations +116 common clone sys_clone +117 common execve sys_execve +118 common exit sys_exit +119 common exit_group sys_exit_group +120 common getpid sys_getpid +121 common wait4 sys_wait4 +122 common waitid sys_waitid +123 common kill sys_kill +124 common tkill sys_tkill +125 common tgkill sys_tgkill +126 common set_tid_address sys_set_tid_address +127 common gettid sys_gettid +128 common setsid sys_setsid +129 common getsid sys_getsid +130 common prctl sys_prctl +131 common personality sys_personality +132 common getpriority sys_getpriority +133 common setpriority sys_setpriority +134 common setitimer sys_setitimer +135 common getitimer sys_getitimer +136 common setuid sys_setuid +137 common getuid sys_getuid +138 common setgid sys_setgid +139 common getgid sys_getgid +140 common geteuid sys_geteuid +141 common getegid sys_getegid +142 common setreuid sys_setreuid +143 common setregid sys_setregid +144 common setresuid sys_setresuid +145 common getresuid sys_getresuid +146 common setresgid sys_setresgid +147 common getresgid sys_getresgid +148 common setpgid sys_setpgid +149 common getpgid sys_getpgid +150 common getppid sys_getppid +151 common getpgrp sys_getpgrp +# 152 was set_thread_area +152 common reserved152 sys_ni_syscall +# 153 was get_thread_area +153 common reserved153 sys_ni_syscall +154 common times sys_times +155 common acct sys_acct +156 common sched_setaffinity sys_sched_setaffinity +157 common sched_getaffinity sys_sched_getaffinity +158 common capget sys_capget +159 common capset sys_capset +160 common ptrace sys_ptrace +161 common semtimedop sys_semtimedop_time32 +162 common semget sys_semget +163 common semop sys_semop +164 common semctl sys_old_semctl +165 common available165 sys_ni_syscall +166 common msgget sys_msgget +167 common msgsnd sys_msgsnd +168 common msgrcv sys_msgrcv +169 common msgctl sys_old_msgctl +170 common available170 sys_ni_syscall +# File System +171 common umount2 sys_umount +172 common mount sys_mount +173 common swapon sys_swapon +174 common chroot sys_chroot +175 common pivot_root sys_pivot_root +176 common umount sys_oldumount +177 common swapoff sys_swapoff +178 common sync sys_sync +179 common syncfs sys_syncfs +180 common setfsuid sys_setfsuid +181 common setfsgid sys_setfsgid +182 common sysfs sys_sysfs +183 common ustat sys_ustat +184 common statfs sys_statfs +185 common fstatfs sys_fstatfs +186 common statfs64 sys_statfs64 +187 common fstatfs64 sys_fstatfs64 +# System +188 common setrlimit sys_setrlimit +189 common getrlimit sys_getrlimit +190 common getrusage sys_getrusage +191 common futex sys_futex_time32 +192 common gettimeofday sys_gettimeofday +193 common settimeofday sys_settimeofday +194 common adjtimex sys_adjtimex_time32 +195 common nanosleep sys_nanosleep_time32 +196 common getgroups sys_getgroups +197 common setgroups sys_setgroups +198 common sethostname sys_sethostname +199 common setdomainname sys_setdomainname +200 common syslog sys_syslog +201 common vhangup sys_vhangup +202 common uselib sys_uselib +203 common reboot sys_reboot +204 common quotactl sys_quotactl +# 205 was old nfsservctl +205 common nfsservctl sys_ni_syscall +206 common _sysctl sys_sysctl +207 common bdflush sys_bdflush +208 common uname sys_newuname +209 common sysinfo sys_sysinfo +210 common init_module sys_init_module +211 common delete_module sys_delete_module +212 common sched_setparam sys_sched_setparam +213 common sched_getparam sys_sched_getparam +214 common sched_setscheduler sys_sched_setscheduler +215 common sched_getscheduler sys_sched_getscheduler +216 common sched_get_priority_max sys_sched_get_priority_max +217 common sched_get_priority_min sys_sched_get_priority_min +218 common sched_rr_get_interval sys_sched_rr_get_interval_time32 +219 common sched_yield sys_sched_yield +222 common available222 sys_ni_syscall +# Signal Handling +223 common restart_syscall sys_restart_syscall +224 common sigaltstack sys_sigaltstack +225 common rt_sigreturn xtensa_rt_sigreturn +226 common rt_sigaction sys_rt_sigaction +227 common rt_sigprocmask sys_rt_sigprocmask +228 common rt_sigpending sys_rt_sigpending +229 common rt_sigtimedwait sys_rt_sigtimedwait_time32 +230 common rt_sigqueueinfo sys_rt_sigqueueinfo +231 common rt_sigsuspend sys_rt_sigsuspend +# Message +232 common mq_open sys_mq_open +233 common mq_unlink sys_mq_unlink +234 common mq_timedsend sys_mq_timedsend_time32 +235 common mq_timedreceive sys_mq_timedreceive_time32 +236 common mq_notify sys_mq_notify +237 common mq_getsetattr sys_mq_getsetattr +238 common available238 sys_ni_syscall +239 common io_setup sys_io_setup +# IO +240 common io_destroy sys_io_destroy +241 common io_submit sys_io_submit +242 common io_getevents sys_io_getevents_time32 +243 common io_cancel sys_io_cancel +244 common clock_settime sys_clock_settime32 +245 common clock_gettime sys_clock_gettime32 +246 common clock_getres sys_clock_getres_time32 +247 common clock_nanosleep sys_clock_nanosleep_time32 +# Timer +248 common timer_create sys_timer_create +249 common timer_delete sys_timer_delete +250 common timer_settime sys_timer_settime32 +251 common timer_gettime sys_timer_gettime32 +252 common timer_getoverrun sys_timer_getoverrun +# System +253 common reserved253 sys_ni_syscall +254 common lookup_dcookie sys_lookup_dcookie +255 common available255 sys_ni_syscall +256 common add_key sys_add_key +257 common request_key sys_request_key +258 common keyctl sys_keyctl +259 common available259 sys_ni_syscall +260 common readahead sys_readahead +261 common remap_file_pages sys_remap_file_pages +262 common migrate_pages sys_migrate_pages +263 common mbind sys_mbind +264 common get_mempolicy sys_get_mempolicy +265 common set_mempolicy sys_set_mempolicy +266 common unshare sys_unshare +267 common move_pages sys_move_pages +268 common splice sys_splice +269 common tee sys_tee +270 common vmsplice sys_vmsplice +271 common available271 sys_ni_syscall +272 common pselect6 sys_pselect6_time32 +273 common ppoll sys_ppoll_time32 +274 common epoll_pwait sys_epoll_pwait +275 common epoll_create1 sys_epoll_create1 +276 common inotify_init sys_inotify_init +277 common inotify_add_watch sys_inotify_add_watch +278 common inotify_rm_watch sys_inotify_rm_watch +279 common inotify_init1 sys_inotify_init1 +280 common getcpu sys_getcpu +281 common kexec_load sys_ni_syscall +282 common ioprio_set sys_ioprio_set +283 common ioprio_get sys_ioprio_get +284 common set_robust_list sys_set_robust_list +285 common get_robust_list sys_get_robust_list +286 common available286 sys_ni_syscall +287 common available287 sys_ni_syscall +# Relative File Operations +288 common openat sys_openat +289 common mkdirat sys_mkdirat +290 common mknodat sys_mknodat +291 common unlinkat sys_unlinkat +292 common renameat sys_renameat +293 common linkat sys_linkat +294 common symlinkat sys_symlinkat +295 common readlinkat sys_readlinkat +296 common utimensat sys_utimensat_time32 +297 common fchownat sys_fchownat +298 common futimesat sys_futimesat_time32 +299 common fstatat64 sys_fstatat64 +300 common fchmodat sys_fchmodat +301 common faccessat sys_faccessat +302 common available302 sys_ni_syscall +303 common available303 sys_ni_syscall +304 common signalfd sys_signalfd +# 305 was timerfd +306 common eventfd sys_eventfd +307 common recvmmsg sys_recvmmsg_time32 +308 common setns sys_setns +309 common signalfd4 sys_signalfd4 +310 common dup3 sys_dup3 +311 common pipe2 sys_pipe2 +312 common timerfd_create sys_timerfd_create +313 common timerfd_settime sys_timerfd_settime32 +314 common timerfd_gettime sys_timerfd_gettime32 +315 common available315 sys_ni_syscall +316 common eventfd2 sys_eventfd2 +317 common preadv sys_preadv +318 common pwritev sys_pwritev +319 common available319 sys_ni_syscall +320 common fanotify_init sys_fanotify_init +321 common fanotify_mark sys_fanotify_mark +322 common process_vm_readv sys_process_vm_readv +323 common process_vm_writev sys_process_vm_writev +324 common name_to_handle_at sys_name_to_handle_at +325 common open_by_handle_at sys_open_by_handle_at +326 common sync_file_range2 sys_sync_file_range2 +327 common perf_event_open sys_perf_event_open +328 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo +329 common clock_adjtime sys_clock_adjtime32 +330 common prlimit64 sys_prlimit64 +331 common kcmp sys_kcmp +332 common finit_module sys_finit_module +333 common accept4 sys_accept4 +334 common sched_setattr sys_sched_setattr +335 common sched_getattr sys_sched_getattr +336 common renameat2 sys_renameat2 +337 common seccomp sys_seccomp +338 common getrandom sys_getrandom +339 common memfd_create sys_memfd_create +340 common bpf sys_bpf +341 common execveat sys_execveat +342 common userfaultfd sys_userfaultfd +343 common membarrier sys_membarrier +344 common mlock2 sys_mlock2 +345 common copy_file_range sys_copy_file_range +346 common preadv2 sys_preadv2 +347 common pwritev2 sys_pwritev2 +348 common pkey_mprotect sys_pkey_mprotect +349 common pkey_alloc sys_pkey_alloc +350 common pkey_free sys_pkey_free +351 common statx sys_statx +352 common rseq sys_rseq +# 353 through 402 are unassigned to sync up with generic numbers +403 common clock_gettime64 sys_clock_gettime +404 common clock_settime64 sys_clock_settime +405 common clock_adjtime64 sys_clock_adjtime +406 common clock_getres_time64 sys_clock_getres +407 common clock_nanosleep_time64 sys_clock_nanosleep +408 common timer_gettime64 sys_timer_gettime +409 common timer_settime64 sys_timer_settime +410 common timerfd_gettime64 sys_timerfd_gettime +411 common timerfd_settime64 sys_timerfd_settime +412 common utimensat_time64 sys_utimensat +413 common pselect6_time64 sys_pselect6 +414 common ppoll_time64 sys_ppoll +416 common io_pgetevents_time64 sys_io_pgetevents +417 common recvmmsg_time64 sys_recvmmsg +418 common mq_timedsend_time64 sys_mq_timedsend +419 common mq_timedreceive_time64 sys_mq_timedreceive +420 common semtimedop_time64 sys_semtimedop +421 common rt_sigtimedwait_time64 sys_rt_sigtimedwait +422 common futex_time64 sys_futex +423 common sched_rr_get_interval_time64 sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +435 common clone3 sys_clone3 diff --git a/linux-user/xtensa/syscall_nr.h b/linux-user/xtensa/syscall_nr.h deleted file mode 100644 index 39bff65dca..0000000000 --- a/linux-user/xtensa/syscall_nr.h +++ /dev/null @@ -1,469 +0,0 @@ -/* - * include/asm-xtensa/unistd.h - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2001 - 2009 Tensilica Inc. - */ - -#ifndef XTENSA_SYSCALL_NR_H -#define XTENSA_SYSCALL_NR_H - -#define TARGET_NR_spill 0 -#define TARGET_NR_xtensa 1 -#define TARGET_NR_available4 2 -#define TARGET_NR_available5 3 -#define TARGET_NR_available6 4 -#define TARGET_NR_available7 5 -#define TARGET_NR_available8 6 -#define TARGET_NR_available9 7 - -/* File Operations */ - -#define TARGET_NR_open 8 -#define TARGET_NR_close 9 -#define TARGET_NR_dup 10 -#define TARGET_NR_dup2 11 -#define TARGET_NR_read 12 -#define TARGET_NR_write 13 -#define TARGET_NR_select 14 -#define TARGET_NR_lseek 15 -#define TARGET_NR_poll 16 -#define TARGET_NR__llseek 17 -#define TARGET_NR_epoll_wait 18 -#define TARGET_NR_epoll_ctl 19 -#define TARGET_NR_epoll_create 20 -#define TARGET_NR_creat 21 -#define TARGET_NR_truncate 22 -#define TARGET_NR_ftruncate 23 -#define TARGET_NR_readv 24 -#define TARGET_NR_writev 25 -#define TARGET_NR_fsync 26 -#define TARGET_NR_fdatasync 27 -#define TARGET_NR_truncate64 28 -#define TARGET_NR_ftruncate64 29 -#define TARGET_NR_pread64 30 -#define TARGET_NR_pwrite64 31 - -#define TARGET_NR_link 32 -#define TARGET_NR_rename 33 -#define TARGET_NR_symlink 34 -#define TARGET_NR_readlink 35 -#define TARGET_NR_mknod 36 -#define TARGET_NR_pipe 37 -#define TARGET_NR_unlink 38 -#define TARGET_NR_rmdir 39 - -#define TARGET_NR_mkdir 40 -#define TARGET_NR_chdir 41 -#define TARGET_NR_fchdir 42 -#define TARGET_NR_getcwd 43 - -#define TARGET_NR_chmod 44 -#define TARGET_NR_chown 45 -#define TARGET_NR_stat 46 -#define TARGET_NR_stat64 47 - -#define TARGET_NR_lchown 48 -#define TARGET_NR_lstat 49 -#define TARGET_NR_lstat64 50 -#define TARGET_NR_available51 51 - -#define TARGET_NR_fchmod 52 -#define TARGET_NR_fchown 53 -#define TARGET_NR_fstat 54 -#define TARGET_NR_fstat64 55 - -#define TARGET_NR_flock 56 -#define TARGET_NR_access 57 -#define TARGET_NR_umask 58 -#define TARGET_NR_getdents 59 -#define TARGET_NR_getdents64 60 -#define TARGET_NR_fcntl64 61 -#define TARGET_NR_fallocate 62 -#define TARGET_NR_fadvise64_64 63 -#define TARGET_NR_utime 64 /* glibc 2.3.3 ?? */ -#define TARGET_NR_utimes 65 -#define TARGET_NR_ioctl 66 -#define TARGET_NR_fcntl 67 - -#define TARGET_NR_setxattr 68 -#define TARGET_NR_getxattr 69 -#define TARGET_NR_listxattr 70 -#define TARGET_NR_removexattr 71 -#define TARGET_NR_lsetxattr 72 -#define TARGET_NR_lgetxattr 73 -#define TARGET_NR_llistxattr 74 -#define TARGET_NR_lremovexattr 75 -#define TARGET_NR_fsetxattr 76 -#define TARGET_NR_fgetxattr 77 -#define TARGET_NR_flistxattr 78 -#define TARGET_NR_fremovexattr 79 - -/* File Map / Shared Memory Operations */ - -#define TARGET_NR_mmap2 80 -#define TARGET_NR_munmap 81 -#define TARGET_NR_mprotect 82 -#define TARGET_NR_brk 83 -#define TARGET_NR_mlock 84 -#define TARGET_NR_munlock 85 -#define TARGET_NR_mlockall 86 -#define TARGET_NR_munlockall 87 -#define TARGET_NR_mremap 88 -#define TARGET_NR_msync 89 -#define TARGET_NR_mincore 90 -#define TARGET_NR_madvise 91 -#define TARGET_NR_shmget 92 -#define TARGET_NR_shmat 93 -#define TARGET_NR_shmctl 94 -#define TARGET_NR_shmdt 95 - -/* Socket Operations */ - -#define TARGET_NR_socket 96 -#define TARGET_NR_setsockopt 97 -#define TARGET_NR_getsockopt 98 -#define TARGET_NR_shutdown 99 - -#define TARGET_NR_bind 100 -#define TARGET_NR_connect 101 -#define TARGET_NR_listen 102 -#define TARGET_NR_accept 103 - -#define TARGET_NR_getsockname 104 -#define TARGET_NR_getpeername 105 -#define TARGET_NR_sendmsg 106 -#define TARGET_NR_recvmsg 107 -#define TARGET_NR_send 108 -#define TARGET_NR_recv 109 -#define TARGET_NR_sendto 110 -#define TARGET_NR_recvfrom 111 - -#define TARGET_NR_socketpair 112 -#define TARGET_NR_sendfile 113 -#define TARGET_NR_sendfile64 114 -#define TARGET_NR_sendmmsg 115 - -/* Process Operations */ - -#define TARGET_NR_clone 116 -#define TARGET_NR_execve 117 -#define TARGET_NR_exit 118 -#define TARGET_NR_exit_group 119 -#define TARGET_NR_getpid 120 -#define TARGET_NR_wait4 121 -#define TARGET_NR_waitid 122 -#define TARGET_NR_kill 123 -#define TARGET_NR_tkill 124 -#define TARGET_NR_tgkill 125 -#define TARGET_NR_set_tid_address 126 -#define TARGET_NR_gettid 127 -#define TARGET_NR_setsid 128 -#define TARGET_NR_getsid 129 -#define TARGET_NR_prctl 130 -#define TARGET_NR_personality 131 -#define TARGET_NR_getpriority 132 -#define TARGET_NR_setpriority 133 -#define TARGET_NR_setitimer 134 -#define TARGET_NR_getitimer 135 -#define TARGET_NR_setuid 136 -#define TARGET_NR_getuid 137 -#define TARGET_NR_setgid 138 -#define TARGET_NR_getgid 139 -#define TARGET_NR_geteuid 140 -#define TARGET_NR_getegid 141 -#define TARGET_NR_setreuid 142 -#define TARGET_NR_setregid 143 -#define TARGET_NR_setresuid 144 -#define TARGET_NR_getresuid 145 -#define TARGET_NR_setresgid 146 -#define TARGET_NR_getresgid 147 -#define TARGET_NR_setpgid 148 -#define TARGET_NR_getpgid 149 -#define TARGET_NR_getppid 150 -#define TARGET_NR_getpgrp 151 - -#define TARGET_NR_reserved152 152 /* set_thread_area */ -#define TARGET_NR_reserved153 153 /* get_thread_area */ -#define TARGET_NR_times 154 -#define TARGET_NR_acct 155 -#define TARGET_NR_sched_setaffinity 156 -#define TARGET_NR_sched_getaffinity 157 -#define TARGET_NR_capget 158 -#define TARGET_NR_capset 159 -#define TARGET_NR_ptrace 160 -#define TARGET_NR_semtimedop 161 -#define TARGET_NR_semget 162 -#define TARGET_NR_semop 163 -#define TARGET_NR_semctl 164 -#define TARGET_NR_available165 165 -#define TARGET_NR_msgget 166 -#define TARGET_NR_msgsnd 167 -#define TARGET_NR_msgrcv 168 -#define TARGET_NR_msgctl 169 -#define TARGET_NR_available170 170 - -/* File System */ - -#define TARGET_NR_umount2 171 -#define TARGET_NR_mount 172 -#define TARGET_NR_swapon 173 -#define TARGET_NR_chroot 174 -#define TARGET_NR_pivot_root 175 -#define TARGET_NR_umount 176 -#define TARGET_NR_swapoff 177 -#define TARGET_NR_sync 178 -#define TARGET_NR_syncfs 179 -#define TARGET_NR_setfsuid 180 -#define TARGET_NR_setfsgid 181 -#define TARGET_NR_sysfs 182 -#define TARGET_NR_ustat 183 -#define TARGET_NR_statfs 184 -#define TARGET_NR_fstatfs 185 -#define TARGET_NR_statfs64 186 -#define TARGET_NR_fstatfs64 187 - -/* System */ - -#define TARGET_NR_setrlimit 188 -#define TARGET_NR_getrlimit 189 -#define TARGET_NR_getrusage 190 -#define TARGET_NR_futex 191 -#define TARGET_NR_gettimeofday 192 -#define TARGET_NR_settimeofday 193 -#define TARGET_NR_adjtimex 194 -#define TARGET_NR_nanosleep 195 -#define TARGET_NR_getgroups 196 -#define TARGET_NR_setgroups 197 -#define TARGET_NR_sethostname 198 -#define TARGET_NR_setdomainname 199 -#define TARGET_NR_syslog 200 -#define TARGET_NR_vhangup 201 -#define TARGET_NR_uselib 202 -#define TARGET_NR_reboot 203 -#define TARGET_NR_quotactl 204 -#define TARGET_NR_nfsservctl 205 -#define TARGET_NR__sysctl 206 -#define TARGET_NR_bdflush 207 -#define TARGET_NR_uname 208 -#define TARGET_NR_sysinfo 209 -#define TARGET_NR_init_module 210 -#define TARGET_NR_delete_module 211 - -#define TARGET_NR_sched_setparam 212 -#define TARGET_NR_sched_getparam 213 -#define TARGET_NR_sched_setscheduler 214 -#define TARGET_NR_sched_getscheduler 215 -#define TARGET_NR_sched_get_priority_max 216 -#define TARGET_NR_sched_get_priority_min 217 -#define TARGET_NR_sched_rr_get_interval 218 -#define TARGET_NR_sched_yield 219 -#define TARGET_NR_available222 222 - -/* Signal Handling */ - -#define TARGET_NR_restart_syscall 223 -#define TARGET_NR_sigaltstack 224 -#define TARGET_NR_rt_sigreturn 225 -#define TARGET_NR_rt_sigaction 226 -#define TARGET_NR_rt_sigprocmask 227 -#define TARGET_NR_rt_sigpending 228 -#define TARGET_NR_rt_sigtimedwait 229 -#define TARGET_NR_rt_sigqueueinfo 230 -#define TARGET_NR_rt_sigsuspend 231 - -/* Message */ - -#define TARGET_NR_mq_open 232 -#define TARGET_NR_mq_unlink 233 -#define TARGET_NR_mq_timedsend 234 -#define TARGET_NR_mq_timedreceive 235 -#define TARGET_NR_mq_notify 236 -#define TARGET_NR_mq_getsetattr 237 -#define TARGET_NR_available238 238 - -/* IO */ - -#define TARGET_NR_io_setup 239 -#define TARGET_NR_io_destroy 240 -#define TARGET_NR_io_submit 241 -#define TARGET_NR_io_getevents 242 -#define TARGET_NR_io_cancel 243 -#define TARGET_NR_clock_settime 244 -#define TARGET_NR_clock_gettime 245 -#define TARGET_NR_clock_getres 246 -#define TARGET_NR_clock_nanosleep 247 - -/* Timer */ - -#define TARGET_NR_timer_create 248 -#define TARGET_NR_timer_delete 249 -#define TARGET_NR_timer_settime 250 -#define TARGET_NR_timer_gettime 251 -#define TARGET_NR_timer_getoverrun 252 - -/* System */ - -#define TARGET_NR_reserved253 253 -#define TARGET_NR_lookup_dcookie 254 -#define TARGET_NR_available255 255 -#define TARGET_NR_add_key 256 -#define TARGET_NR_request_key 257 -#define TARGET_NR_keyctl 258 -#define TARGET_NR_available259 259 - - -#define TARGET_NR_readahead 260 -#define TARGET_NR_remap_file_pages 261 -#define TARGET_NR_migrate_pages 262 -#define TARGET_NR_mbind 263 -#define TARGET_NR_get_mempolicy 264 -#define TARGET_NR_set_mempolicy 265 -#define TARGET_NR_unshare 266 -#define TARGET_NR_move_pages 267 -#define TARGET_NR_splice 268 -#define TARGET_NR_tee 269 -#define TARGET_NR_vmsplice 270 -#define TARGET_NR_available271 271 - -#define TARGET_NR_pselect6 272 -#define TARGET_NR_ppoll 273 -#define TARGET_NR_epoll_pwait 274 -#define TARGET_NR_epoll_create1 275 - -#define TARGET_NR_inotify_init 276 -#define TARGET_NR_inotify_add_watch 277 -#define TARGET_NR_inotify_rm_watch 278 -#define TARGET_NR_inotify_init1 279 - -#define TARGET_NR_getcpu 280 -#define TARGET_NR_kexec_load 281 - -#define TARGET_NR_ioprio_set 282 -#define TARGET_NR_ioprio_get 283 - -#define TARGET_NR_set_robust_list 284 -#define TARGET_NR_get_robust_list 285 -#define TARGET_NR_available286 286 -#define TARGET_NR_available287 287 - -/* Relative File Operations */ - -#define TARGET_NR_openat 288 -#define TARGET_NR_mkdirat 289 -#define TARGET_NR_mknodat 290 -#define TARGET_NR_unlinkat 291 -#define TARGET_NR_renameat 292 -#define TARGET_NR_linkat 293 -#define TARGET_NR_symlinkat 294 -#define TARGET_NR_readlinkat 295 -#define TARGET_NR_utimensat 296 -#define TARGET_NR_fchownat 297 -#define TARGET_NR_futimesat 298 -#define TARGET_NR_fstatat64 299 -#define TARGET_NR_fchmodat 300 -#define TARGET_NR_faccessat 301 -#define TARGET_NR_available302 302 -#define TARGET_NR_available303 303 - -#define TARGET_NR_signalfd 304 -/* 305 was TARGET_NR_timerfd */ -#define TARGET_NR_eventfd 306 -#define TARGET_NR_recvmmsg 307 - -#define TARGET_NR_setns 308 -#define TARGET_NR_signalfd4 309 -#define TARGET_NR_dup3 310 -#define TARGET_NR_pipe2 311 - -#define TARGET_NR_timerfd_create 312 -#define TARGET_NR_timerfd_settime 313 -#define TARGET_NR_timerfd_gettime 314 -#define TARGET_NR_available315 315 - -#define TARGET_NR_eventfd2 316 -#define TARGET_NR_preadv 317 -#define TARGET_NR_pwritev 318 -#define TARGET_NR_available319 319 - -#define TARGET_NR_fanotify_init 320 -#define TARGET_NR_fanotify_mark 321 -#define TARGET_NR_process_vm_readv 322 -#define TARGET_NR_process_vm_writev 323 - -#define TARGET_NR_name_to_handle_at 324 -#define TARGET_NR_open_by_handle_at 325 -#define TARGET_NR_sync_file_range2 326 -#define TARGET_NR_perf_event_open 327 - -#define TARGET_NR_rt_tgsigqueueinfo 328 -#define TARGET_NR_clock_adjtime 329 -#define TARGET_NR_prlimit64 330 -#define TARGET_NR_kcmp 331 - -#define TARGET_NR_finit_module 332 - -#define TARGET_NR_accept4 333 - -#define TARGET_NR_sched_setattr 334 -#define TARGET_NR_sched_getattr 335 - -#define TARGET_NR_renameat2 336 - -#define TARGET_NR_seccomp 337 -#define TARGET_NR_getrandom 338 -#define TARGET_NR_memfd_create 339 -#define TARGET_NR_bpf 340 -#define TARGET_NR_execveat 341 - -#define TARGET_NR_userfaultfd 342 -#define TARGET_NR_membarrier 343 -#define TARGET_NR_mlock2 344 -#define TARGET_NR_copy_file_range 345 -#define TARGET_NR_preadv2 346 -#define TARGET_NR_pwritev2 347 - -#define TARGET_NR_pkey_mprotect 348 -#define TARGET_NR_pkey_alloc 349 -#define TARGET_NR_pkey_free 350 - -#define TARGET_NR_statx 351 -#define TARGET_NR_rseq 352 -/* 353 through 402 are unassigned to sync up with generic numbers */ -#define TARGET_NR_clock_gettime64 403 -#define TARGET_NR_clock_settime64 404 -#define TARGET_NR_clock_adjtime64 405 -#define TARGET_NR_clock_getres_time64 406 -#define TARGET_NR_clock_nanosleep_time64 407 -#define TARGET_NR_timer_gettime64 408 -#define TARGET_NR_timer_settime64 409 -#define TARGET_NR_timerfd_gettime64 410 -#define TARGET_NR_timerfd_settime64 411 -#define TARGET_NR_utimensat_time64 412 -#define TARGET_NR_pselect6_time64 413 -#define TARGET_NR_ppoll_time64 414 -#define TARGET_NR_io_pgetevents_time64 416 -#define TARGET_NR_recvmmsg_time64 417 -#define TARGET_NR_mq_timedsend_time64 418 -#define TARGET_NR_mq_timedreceive_time64 419 -#define TARGET_NR_semtimedop_time64 420 -#define TARGET_NR_rt_sigtimedwait_time64 421 -#define TARGET_NR_futex_time64 422 -#define TARGET_NR_sched_rr_get_interval_time64 423 -#define TARGET_NR_pidfd_send_signal 424 -#define TARGET_NR_io_uring_setup 425 -#define TARGET_NR_io_uring_enter 426 -#define TARGET_NR_io_uring_register 427 -#define TARGET_NR_open_tree 428 -#define TARGET_NR_move_mount 429 -#define TARGET_NR_fsopen 430 -#define TARGET_NR_fsconfig 431 -#define TARGET_NR_fsmount 432 -#define TARGET_NR_fspick 433 -#define TARGET_NR_pidfd_open 434 -#define TARGET_NR_clone3 435 - -#endif /* XTENSA_SYSCALL_NR_H */ diff --git a/linux-user/xtensa/syscallhdr.sh b/linux-user/xtensa/syscallhdr.sh new file mode 100644 index 0000000000..eef0644c94 --- /dev/null +++ b/linux-user/xtensa/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_XTENSA_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" +) > "$out" From d0c832f616cadd5bace44986824c0c9142913795 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:48 +0100 Subject: [PATCH 13/32] linux-user, sh4: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/sh/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-7-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/sh4/Makefile.objs | 5 + linux-user/sh4/syscall.tbl | 440 ++++++++++++++++++++++++++++++++++ linux-user/sh4/syscall_nr.h | 441 ----------------------------------- linux-user/sh4/syscallhdr.sh | 32 +++ 6 files changed, 480 insertions(+), 442 deletions(-) create mode 100644 linux-user/sh4/Makefile.objs create mode 100644 linux-user/sh4/syscall.tbl delete mode 100644 linux-user/sh4/syscall_nr.h create mode 100644 linux-user/sh4/syscallhdr.sh diff --git a/configure b/configure index 3e72343b2a..62f5bb601b 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa m68k xtensa ; do +for arch in alpha hppa m68k xtensa sh4 ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7891,6 +7891,7 @@ case "$target_name" in ;; sh4|sh4eb) TARGET_ARCH=sh4 + TARGET_SYSTBL_ABI=common bflt="yes" ;; sparc) diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 13b821baf7..d31f30d758 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -12,4 +12,5 @@ obj-$(TARGET_AARCH64) += arm/semihost.o obj-$(TARGET_ALPHA) += alpha/ obj-$(TARGET_HPPA) += hppa/ obj-$(TARGET_M68K) += m68k/ +obj-$(TARGET_SH4) += sh4/ obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/sh4/Makefile.objs b/linux-user/sh4/Makefile.objs new file mode 100644 index 0000000000..83fc939570 --- /dev/null +++ b/linux-user/sh4/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/sh4/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/sh4/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/sh4/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/sh4/syscall.tbl b/linux-user/sh4/syscall.tbl new file mode 100644 index 0000000000..b5ed26c4c0 --- /dev/null +++ b/linux-user/sh4/syscall.tbl @@ -0,0 +1,440 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for sh +# +# The format is: +# +# +# The is always "common" for this file +# +0 common restart_syscall sys_restart_syscall +1 common exit sys_exit +2 common fork sys_fork +3 common read sys_read +4 common write sys_write +5 common open sys_open +6 common close sys_close +7 common waitpid sys_waitpid +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 common execve sys_execve +12 common chdir sys_chdir +13 common time sys_time32 +14 common mknod sys_mknod +15 common chmod sys_chmod +16 common lchown sys_lchown16 +# 17 was break +18 common oldstat sys_stat +19 common lseek sys_lseek +20 common getpid sys_getpid +21 common mount sys_mount +22 common umount sys_oldumount +23 common setuid sys_setuid16 +24 common getuid sys_getuid16 +25 common stime sys_stime32 +26 common ptrace sys_ptrace +27 common alarm sys_alarm +28 common oldfstat sys_fstat +29 common pause sys_pause +30 common utime sys_utime32 +# 31 was stty +# 32 was gtty +33 common access sys_access +34 common nice sys_nice +# 35 was ftime +36 common sync sys_sync +37 common kill sys_kill +38 common rename sys_rename +39 common mkdir sys_mkdir +40 common rmdir sys_rmdir +41 common dup sys_dup +42 common pipe sys_sh_pipe +43 common times sys_times +# 44 was prof +45 common brk sys_brk +46 common setgid sys_setgid16 +47 common getgid sys_getgid16 +48 common signal sys_signal +49 common geteuid sys_geteuid16 +50 common getegid sys_getegid16 +51 common acct sys_acct +52 common umount2 sys_umount +# 53 was lock +54 common ioctl sys_ioctl +55 common fcntl sys_fcntl +# 56 was mpx +57 common setpgid sys_setpgid +# 58 was ulimit +# 59 was olduname +60 common umask sys_umask +61 common chroot sys_chroot +62 common ustat sys_ustat +63 common dup2 sys_dup2 +64 common getppid sys_getppid +65 common getpgrp sys_getpgrp +66 common setsid sys_setsid +67 common sigaction sys_sigaction +68 common sgetmask sys_sgetmask +69 common ssetmask sys_ssetmask +70 common setreuid sys_setreuid16 +71 common setregid sys_setregid16 +72 common sigsuspend sys_sigsuspend +73 common sigpending sys_sigpending +74 common sethostname sys_sethostname +75 common setrlimit sys_setrlimit +76 common getrlimit sys_old_getrlimit +77 common getrusage sys_getrusage +78 common gettimeofday sys_gettimeofday +79 common settimeofday sys_settimeofday +80 common getgroups sys_getgroups16 +81 common setgroups sys_setgroups16 +# 82 was select +83 common symlink sys_symlink +84 common oldlstat sys_lstat +85 common readlink sys_readlink +86 common uselib sys_uselib +87 common swapon sys_swapon +88 common reboot sys_reboot +89 common readdir sys_old_readdir +90 common mmap old_mmap +91 common munmap sys_munmap +92 common truncate sys_truncate +93 common ftruncate sys_ftruncate +94 common fchmod sys_fchmod +95 common fchown sys_fchown16 +96 common getpriority sys_getpriority +97 common setpriority sys_setpriority +# 98 was profil +99 common statfs sys_statfs +100 common fstatfs sys_fstatfs +# 101 was ioperm +102 common socketcall sys_socketcall +103 common syslog sys_syslog +104 common setitimer sys_setitimer +105 common getitimer sys_getitimer +106 common stat sys_newstat +107 common lstat sys_newlstat +108 common fstat sys_newfstat +109 common olduname sys_uname +# 110 was iopl +111 common vhangup sys_vhangup +# 112 was idle +# 113 was vm86old +114 common wait4 sys_wait4 +115 common swapoff sys_swapoff +116 common sysinfo sys_sysinfo +117 common ipc sys_ipc +118 common fsync sys_fsync +119 common sigreturn sys_sigreturn +120 common clone sys_clone +121 common setdomainname sys_setdomainname +122 common uname sys_newuname +123 common cacheflush sys_cacheflush +124 common adjtimex sys_adjtimex_time32 +125 common mprotect sys_mprotect +126 common sigprocmask sys_sigprocmask +# 127 was create_module +128 common init_module sys_init_module +129 common delete_module sys_delete_module +# 130 was get_kernel_syms +131 common quotactl sys_quotactl +132 common getpgid sys_getpgid +133 common fchdir sys_fchdir +134 common bdflush sys_bdflush +135 common sysfs sys_sysfs +136 common personality sys_personality +# 137 was afs_syscall +138 common setfsuid sys_setfsuid16 +139 common setfsgid sys_setfsgid16 +140 common _llseek sys_llseek +141 common getdents sys_getdents +142 common _newselect sys_select +143 common flock sys_flock +144 common msync sys_msync +145 common readv sys_readv +146 common writev sys_writev +147 common getsid sys_getsid +148 common fdatasync sys_fdatasync +149 common _sysctl sys_sysctl +150 common mlock sys_mlock +151 common munlock sys_munlock +152 common mlockall sys_mlockall +153 common munlockall sys_munlockall +154 common sched_setparam sys_sched_setparam +155 common sched_getparam sys_sched_getparam +156 common sched_setscheduler sys_sched_setscheduler +157 common sched_getscheduler sys_sched_getscheduler +158 common sched_yield sys_sched_yield +159 common sched_get_priority_max sys_sched_get_priority_max +160 common sched_get_priority_min sys_sched_get_priority_min +161 common sched_rr_get_interval sys_sched_rr_get_interval_time32 +162 common nanosleep sys_nanosleep_time32 +163 common mremap sys_mremap +164 common setresuid sys_setresuid16 +165 common getresuid sys_getresuid16 +# 166 was vm86 +# 167 was query_module +168 common poll sys_poll +169 common nfsservctl sys_ni_syscall +170 common setresgid sys_setresgid16 +171 common getresgid sys_getresgid16 +172 common prctl sys_prctl +173 common rt_sigreturn sys_rt_sigreturn +174 common rt_sigaction sys_rt_sigaction +175 common rt_sigprocmask sys_rt_sigprocmask +176 common rt_sigpending sys_rt_sigpending +177 common rt_sigtimedwait sys_rt_sigtimedwait_time32 +178 common rt_sigqueueinfo sys_rt_sigqueueinfo +179 common rt_sigsuspend sys_rt_sigsuspend +180 common pread64 sys_pread_wrapper +181 common pwrite64 sys_pwrite_wrapper +182 common chown sys_chown16 +183 common getcwd sys_getcwd +184 common capget sys_capget +185 common capset sys_capset +186 common sigaltstack sys_sigaltstack +187 common sendfile sys_sendfile +# 188 is reserved for getpmsg +# 189 is reserved for putpmsg +190 common vfork sys_vfork +191 common ugetrlimit sys_getrlimit +192 common mmap2 sys_mmap2 +193 common truncate64 sys_truncate64 +194 common ftruncate64 sys_ftruncate64 +195 common stat64 sys_stat64 +196 common lstat64 sys_lstat64 +197 common fstat64 sys_fstat64 +198 common lchown32 sys_lchown +199 common getuid32 sys_getuid +200 common getgid32 sys_getgid +201 common geteuid32 sys_geteuid +202 common getegid32 sys_getegid +203 common setreuid32 sys_setreuid +204 common setregid32 sys_setregid +205 common getgroups32 sys_getgroups +206 common setgroups32 sys_setgroups +207 common fchown32 sys_fchown +208 common setresuid32 sys_setresuid +209 common getresuid32 sys_getresuid +210 common setresgid32 sys_setresgid +211 common getresgid32 sys_getresgid +212 common chown32 sys_chown +213 common setuid32 sys_setuid +214 common setgid32 sys_setgid +215 common setfsuid32 sys_setfsuid +216 common setfsgid32 sys_setfsgid +217 common pivot_root sys_pivot_root +218 common mincore sys_mincore +219 common madvise sys_madvise +220 common getdents64 sys_getdents64 +221 common fcntl64 sys_fcntl64 +# 222 is reserved for tux +# 223 is unused +224 common gettid sys_gettid +225 common readahead sys_readahead +226 common setxattr sys_setxattr +227 common lsetxattr sys_lsetxattr +228 common fsetxattr sys_fsetxattr +229 common getxattr sys_getxattr +230 common lgetxattr sys_lgetxattr +231 common fgetxattr sys_fgetxattr +232 common listxattr sys_listxattr +233 common llistxattr sys_llistxattr +234 common flistxattr sys_flistxattr +235 common removexattr sys_removexattr +236 common lremovexattr sys_lremovexattr +237 common fremovexattr sys_fremovexattr +238 common tkill sys_tkill +239 common sendfile64 sys_sendfile64 +240 common futex sys_futex_time32 +241 common sched_setaffinity sys_sched_setaffinity +242 common sched_getaffinity sys_sched_getaffinity +# 243 is reserved for set_thread_area +# 244 is reserved for get_thread_area +245 common io_setup sys_io_setup +246 common io_destroy sys_io_destroy +247 common io_getevents sys_io_getevents_time32 +248 common io_submit sys_io_submit +249 common io_cancel sys_io_cancel +250 common fadvise64 sys_fadvise64 +# 251 is unused +252 common exit_group sys_exit_group +253 common lookup_dcookie sys_lookup_dcookie +254 common epoll_create sys_epoll_create +255 common epoll_ctl sys_epoll_ctl +256 common epoll_wait sys_epoll_wait +257 common remap_file_pages sys_remap_file_pages +258 common set_tid_address sys_set_tid_address +259 common timer_create sys_timer_create +260 common timer_settime sys_timer_settime32 +261 common timer_gettime sys_timer_gettime32 +262 common timer_getoverrun sys_timer_getoverrun +263 common timer_delete sys_timer_delete +264 common clock_settime sys_clock_settime32 +265 common clock_gettime sys_clock_gettime32 +266 common clock_getres sys_clock_getres_time32 +267 common clock_nanosleep sys_clock_nanosleep_time32 +268 common statfs64 sys_statfs64 +269 common fstatfs64 sys_fstatfs64 +270 common tgkill sys_tgkill +271 common utimes sys_utimes_time32 +272 common fadvise64_64 sys_fadvise64_64_wrapper +# 273 is reserved for vserver +274 common mbind sys_mbind +275 common get_mempolicy sys_get_mempolicy +276 common set_mempolicy sys_set_mempolicy +277 common mq_open sys_mq_open +278 common mq_unlink sys_mq_unlink +279 common mq_timedsend sys_mq_timedsend_time32 +280 common mq_timedreceive sys_mq_timedreceive_time32 +281 common mq_notify sys_mq_notify +282 common mq_getsetattr sys_mq_getsetattr +283 common kexec_load sys_kexec_load +284 common waitid sys_waitid +285 common add_key sys_add_key +286 common request_key sys_request_key +287 common keyctl sys_keyctl +288 common ioprio_set sys_ioprio_set +289 common ioprio_get sys_ioprio_get +290 common inotify_init sys_inotify_init +291 common inotify_add_watch sys_inotify_add_watch +292 common inotify_rm_watch sys_inotify_rm_watch +# 293 is unused +294 common migrate_pages sys_migrate_pages +295 common openat sys_openat +296 common mkdirat sys_mkdirat +297 common mknodat sys_mknodat +298 common fchownat sys_fchownat +299 common futimesat sys_futimesat_time32 +300 common fstatat64 sys_fstatat64 +301 common unlinkat sys_unlinkat +302 common renameat sys_renameat +303 common linkat sys_linkat +304 common symlinkat sys_symlinkat +305 common readlinkat sys_readlinkat +306 common fchmodat sys_fchmodat +307 common faccessat sys_faccessat +308 common pselect6 sys_pselect6_time32 +309 common ppoll sys_ppoll_time32 +310 common unshare sys_unshare +311 common set_robust_list sys_set_robust_list +312 common get_robust_list sys_get_robust_list +313 common splice sys_splice +314 common sync_file_range sys_sync_file_range +315 common tee sys_tee +316 common vmsplice sys_vmsplice +317 common move_pages sys_move_pages +318 common getcpu sys_getcpu +319 common epoll_pwait sys_epoll_pwait +320 common utimensat sys_utimensat_time32 +321 common signalfd sys_signalfd +322 common timerfd_create sys_timerfd_create +323 common eventfd sys_eventfd +324 common fallocate sys_fallocate +325 common timerfd_settime sys_timerfd_settime32 +326 common timerfd_gettime sys_timerfd_gettime32 +327 common signalfd4 sys_signalfd4 +328 common eventfd2 sys_eventfd2 +329 common epoll_create1 sys_epoll_create1 +330 common dup3 sys_dup3 +331 common pipe2 sys_pipe2 +332 common inotify_init1 sys_inotify_init1 +333 common preadv sys_preadv +334 common pwritev sys_pwritev +335 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo +336 common perf_event_open sys_perf_event_open +337 common fanotify_init sys_fanotify_init +338 common fanotify_mark sys_fanotify_mark +339 common prlimit64 sys_prlimit64 +340 common socket sys_socket +341 common bind sys_bind +342 common connect sys_connect +343 common listen sys_listen +344 common accept sys_accept +345 common getsockname sys_getsockname +346 common getpeername sys_getpeername +347 common socketpair sys_socketpair +348 common send sys_send +349 common sendto sys_sendto +350 common recv sys_recv +351 common recvfrom sys_recvfrom +352 common shutdown sys_shutdown +353 common setsockopt sys_setsockopt +354 common getsockopt sys_getsockopt +355 common sendmsg sys_sendmsg +356 common recvmsg sys_recvmsg +357 common recvmmsg sys_recvmmsg_time32 +358 common accept4 sys_accept4 +359 common name_to_handle_at sys_name_to_handle_at +360 common open_by_handle_at sys_open_by_handle_at +361 common clock_adjtime sys_clock_adjtime32 +362 common syncfs sys_syncfs +363 common sendmmsg sys_sendmmsg +364 common setns sys_setns +365 common process_vm_readv sys_process_vm_readv +366 common process_vm_writev sys_process_vm_writev +367 common kcmp sys_kcmp +368 common finit_module sys_finit_module +369 common sched_getattr sys_sched_getattr +370 common sched_setattr sys_sched_setattr +371 common renameat2 sys_renameat2 +372 common seccomp sys_seccomp +373 common getrandom sys_getrandom +374 common memfd_create sys_memfd_create +375 common bpf sys_bpf +376 common execveat sys_execveat +377 common userfaultfd sys_userfaultfd +378 common membarrier sys_membarrier +379 common mlock2 sys_mlock2 +380 common copy_file_range sys_copy_file_range +381 common preadv2 sys_preadv2 +382 common pwritev2 sys_pwritev2 +383 common statx sys_statx +384 common pkey_mprotect sys_pkey_mprotect +385 common pkey_alloc sys_pkey_alloc +386 common pkey_free sys_pkey_free +387 common rseq sys_rseq +# room for arch specific syscalls +393 common semget sys_semget +394 common semctl sys_semctl +395 common shmget sys_shmget +396 common shmctl sys_shmctl +397 common shmat sys_shmat +398 common shmdt sys_shmdt +399 common msgget sys_msgget +400 common msgsnd sys_msgsnd +401 common msgrcv sys_msgrcv +402 common msgctl sys_msgctl +403 common clock_gettime64 sys_clock_gettime +404 common clock_settime64 sys_clock_settime +405 common clock_adjtime64 sys_clock_adjtime +406 common clock_getres_time64 sys_clock_getres +407 common clock_nanosleep_time64 sys_clock_nanosleep +408 common timer_gettime64 sys_timer_gettime +409 common timer_settime64 sys_timer_settime +410 common timerfd_gettime64 sys_timerfd_gettime +411 common timerfd_settime64 sys_timerfd_settime +412 common utimensat_time64 sys_utimensat +413 common pselect6_time64 sys_pselect6 +414 common ppoll_time64 sys_ppoll +416 common io_pgetevents_time64 sys_io_pgetevents +417 common recvmmsg_time64 sys_recvmmsg +418 common mq_timedsend_time64 sys_mq_timedsend +419 common mq_timedreceive_time64 sys_mq_timedreceive +420 common semtimedop_time64 sys_semtimedop +421 common rt_sigtimedwait_time64 sys_rt_sigtimedwait +422 common futex_time64 sys_futex +423 common sched_rr_get_interval_time64 sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +# 435 reserved for clone3 diff --git a/linux-user/sh4/syscall_nr.h b/linux-user/sh4/syscall_nr.h deleted file mode 100644 index 8c21fcf812..0000000000 --- a/linux-user/sh4/syscall_nr.h +++ /dev/null @@ -1,441 +0,0 @@ -/* - * This file contains the system call numbers. - */ - -#ifndef LINUX_USER_SH4_SYSCALL_NR_H -#define LINUX_USER_SH4_SYSCALL_NR_H - -#define TARGET_NR_restart_syscall 0 -#define TARGET_NR_exit 1 -#define TARGET_NR_fork 2 -#define TARGET_NR_read 3 -#define TARGET_NR_write 4 -#define TARGET_NR_open 5 -#define TARGET_NR_close 6 -#define TARGET_NR_waitpid 7 -#define TARGET_NR_creat 8 -#define TARGET_NR_link 9 -#define TARGET_NR_unlink 10 -#define TARGET_NR_execve 11 -#define TARGET_NR_chdir 12 -#define TARGET_NR_time 13 -#define TARGET_NR_mknod 14 -#define TARGET_NR_chmod 15 -#define TARGET_NR_lchown 16 -#define TARGET_NR_break 17 -#define TARGET_NR_oldstat 18 -#define TARGET_NR_lseek 19 -#define TARGET_NR_getpid 20 -#define TARGET_NR_mount 21 -#define TARGET_NR_umount 22 -#define TARGET_NR_setuid 23 -#define TARGET_NR_getuid 24 -#define TARGET_NR_stime 25 -#define TARGET_NR_ptrace 26 -#define TARGET_NR_alarm 27 -#define TARGET_NR_oldfstat 28 -#define TARGET_NR_pause 29 -#define TARGET_NR_utime 30 -#define TARGET_NR_stty 31 -#define TARGET_NR_gtty 32 -#define TARGET_NR_access 33 -#define TARGET_NR_nice 34 -#define TARGET_NR_ftime 35 -#define TARGET_NR_sync 36 -#define TARGET_NR_kill 37 -#define TARGET_NR_rename 38 -#define TARGET_NR_mkdir 39 -#define TARGET_NR_rmdir 40 -#define TARGET_NR_dup 41 -#define TARGET_NR_pipe 42 -#define TARGET_NR_times 43 -#define TARGET_NR_prof 44 -#define TARGET_NR_brk 45 -#define TARGET_NR_setgid 46 -#define TARGET_NR_getgid 47 -#define TARGET_NR_signal 48 -#define TARGET_NR_geteuid 49 -#define TARGET_NR_getegid 50 -#define TARGET_NR_acct 51 -#define TARGET_NR_umount2 52 -#define TARGET_NR_lock 53 -#define TARGET_NR_ioctl 54 -#define TARGET_NR_fcntl 55 -#define TARGET_NR_mpx 56 -#define TARGET_NR_setpgid 57 -#define TARGET_NR_ulimit 58 -#define TARGET_NR_oldolduname 59 -#define TARGET_NR_umask 60 -#define TARGET_NR_chroot 61 -#define TARGET_NR_ustat 62 -#define TARGET_NR_dup2 63 -#define TARGET_NR_getppid 64 -#define TARGET_NR_getpgrp 65 -#define TARGET_NR_setsid 66 -#define TARGET_NR_sigaction 67 -#define TARGET_NR_sgetmask 68 -#define TARGET_NR_ssetmask 69 -#define TARGET_NR_setreuid 70 -#define TARGET_NR_setregid 71 -#define TARGET_NR_sigsuspend 72 -#define TARGET_NR_sigpending 73 -#define TARGET_NR_sethostname 74 -#define TARGET_NR_setrlimit 75 -#define TARGET_NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ -#define TARGET_NR_getrusage 77 -#define TARGET_NR_gettimeofday 78 -#define TARGET_NR_settimeofday 79 -#define TARGET_NR_getgroups 80 -#define TARGET_NR_setgroups 81 - /* 82 was sys_oldselect */ -#define TARGET_NR_symlink 83 -#define TARGET_NR_oldlstat 84 -#define TARGET_NR_readlink 85 -#define TARGET_NR_uselib 86 -#define TARGET_NR_swapon 87 -#define TARGET_NR_reboot 88 -#define TARGET_NR_readdir 89 -#define TARGET_NR_mmap 90 -#define TARGET_NR_munmap 91 -#define TARGET_NR_truncate 92 -#define TARGET_NR_ftruncate 93 -#define TARGET_NR_fchmod 94 -#define TARGET_NR_fchown 95 -#define TARGET_NR_getpriority 96 -#define TARGET_NR_setpriority 97 -#define TARGET_NR_profil 98 -#define TARGET_NR_statfs 99 -#define TARGET_NR_fstatfs 100 -#define TARGET_NR_ioperm 101 -#define TARGET_NR_socketcall 102 -#define TARGET_NR_syslog 103 -#define TARGET_NR_setitimer 104 -#define TARGET_NR_getitimer 105 -#define TARGET_NR_stat 106 -#define TARGET_NR_lstat 107 -#define TARGET_NR_fstat 108 -#define TARGET_NR_olduname 109 -#define TARGET_NR_iopl 110 -#define TARGET_NR_vhangup 111 -#define TARGET_NR_idle 112 -#define TARGET_NR_vm86old 113 -#define TARGET_NR_wait4 114 -#define TARGET_NR_swapoff 115 -#define TARGET_NR_sysinfo 116 -#define TARGET_NR_ipc 117 -#define TARGET_NR_fsync 118 -#define TARGET_NR_sigreturn 119 -#define TARGET_NR_clone 120 -#define TARGET_NR_setdomainname 121 -#define TARGET_NR_uname 122 -#define TARGET_NR_cacheflush 123 -#define TARGET_NR_adjtimex 124 -#define TARGET_NR_mprotect 125 -#define TARGET_NR_sigprocmask 126 -#define TARGET_NR_create_module 127 -#define TARGET_NR_init_module 128 -#define TARGET_NR_delete_module 129 -#define TARGET_NR_get_kernel_syms 130 -#define TARGET_NR_quotactl 131 -#define TARGET_NR_getpgid 132 -#define TARGET_NR_fchdir 133 -#define TARGET_NR_bdflush 134 -#define TARGET_NR_sysfs 135 -#define TARGET_NR_personality 136 -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid 138 -#define TARGET_NR_setfsgid 139 -#define TARGET_NR__llseek 140 -#define TARGET_NR_getdents 141 -#define TARGET_NR__newselect 142 -#define TARGET_NR_flock 143 -#define TARGET_NR_msync 144 -#define TARGET_NR_readv 145 -#define TARGET_NR_writev 146 -#define TARGET_NR_getsid 147 -#define TARGET_NR_fdatasync 148 -#define TARGET_NR__sysctl 149 -#define TARGET_NR_mlock 150 -#define TARGET_NR_munlock 151 -#define TARGET_NR_mlockall 152 -#define TARGET_NR_munlockall 153 -#define TARGET_NR_sched_setparam 154 -#define TARGET_NR_sched_getparam 155 -#define TARGET_NR_sched_setscheduler 156 -#define TARGET_NR_sched_getscheduler 157 -#define TARGET_NR_sched_yield 158 -#define TARGET_NR_sched_get_priority_max 159 -#define TARGET_NR_sched_get_priority_min 160 -#define TARGET_NR_sched_rr_get_interval 161 -#define TARGET_NR_nanosleep 162 -#define TARGET_NR_mremap 163 -#define TARGET_NR_setresuid 164 -#define TARGET_NR_getresuid 165 -#define TARGET_NR_vm86 166 -#define TARGET_NR_query_module 167 -#define TARGET_NR_poll 168 -#define TARGET_NR_nfsservctl 169 -#define TARGET_NR_setresgid 170 -#define TARGET_NR_getresgid 171 -#define TARGET_NR_prctl 172 -#define TARGET_NR_rt_sigreturn 173 -#define TARGET_NR_rt_sigaction 174 -#define TARGET_NR_rt_sigprocmask 175 -#define TARGET_NR_rt_sigpending 176 -#define TARGET_NR_rt_sigtimedwait 177 -#define TARGET_NR_rt_sigqueueinfo 178 -#define TARGET_NR_rt_sigsuspend 179 -#define TARGET_NR_pread64 180 -#define TARGET_NR_pwrite64 181 -#define TARGET_NR_chown 182 -#define TARGET_NR_getcwd 183 -#define TARGET_NR_capget 184 -#define TARGET_NR_capset 185 -#define TARGET_NR_sigaltstack 186 -#define TARGET_NR_sendfile 187 -#define TARGET_NR_streams1 188 /* some people actually want it */ -#define TARGET_NR_streams2 189 /* some people actually want it */ -#define TARGET_NR_vfork 190 -#define TARGET_NR_ugetrlimit 191 /* SuS compliant getrlimit */ -#define TARGET_NR_mmap2 192 -#define TARGET_NR_truncate64 193 -#define TARGET_NR_ftruncate64 194 -#define TARGET_NR_stat64 195 -#define TARGET_NR_lstat64 196 -#define TARGET_NR_fstat64 197 -#define TARGET_NR_lchown32 198 -#define TARGET_NR_getuid32 199 -#define TARGET_NR_getgid32 200 -#define TARGET_NR_geteuid32 201 -#define TARGET_NR_getegid32 202 -#define TARGET_NR_setreuid32 203 -#define TARGET_NR_setregid32 204 -#define TARGET_NR_getgroups32 205 -#define TARGET_NR_setgroups32 206 -#define TARGET_NR_fchown32 207 -#define TARGET_NR_setresuid32 208 -#define TARGET_NR_getresuid32 209 -#define TARGET_NR_setresgid32 210 -#define TARGET_NR_getresgid32 211 -#define TARGET_NR_chown32 212 -#define TARGET_NR_setuid32 213 -#define TARGET_NR_setgid32 214 -#define TARGET_NR_setfsuid32 215 -#define TARGET_NR_setfsgid32 216 -#define TARGET_NR_pivot_root 217 -#define TARGET_NR_mincore 218 -#define TARGET_NR_madvise 219 -#define TARGET_NR_getdents64 220 -#define TARGET_NR_fcntl64 221 -/* 223 is unused */ -#define TARGET_NR_gettid 224 -#define TARGET_NR_readahead 225 -#define TARGET_NR_setxattr 226 -#define TARGET_NR_lsetxattr 227 -#define TARGET_NR_fsetxattr 228 -#define TARGET_NR_getxattr 229 -#define TARGET_NR_lgetxattr 230 -#define TARGET_NR_fgetxattr 231 -#define TARGET_NR_listxattr 232 -#define TARGET_NR_llistxattr 233 -#define TARGET_NR_flistxattr 234 -#define TARGET_NR_removexattr 235 -#define TARGET_NR_lremovexattr 236 -#define TARGET_NR_fremovexattr 237 -#define TARGET_NR_tkill 238 -#define TARGET_NR_sendfile64 239 -#define TARGET_NR_futex 240 -#define TARGET_NR_sched_setaffinity 241 -#define TARGET_NR_sched_getaffinity 242 -#define TARGET_NR_set_thread_area 243 -#define TARGET_NR_get_thread_area 244 -#define TARGET_NR_io_setup 245 -#define TARGET_NR_io_destroy 246 -#define TARGET_NR_io_getevents 247 -#define TARGET_NR_io_submit 248 -#define TARGET_NR_io_cancel 249 -#define TARGET_NR_fadvise64 250 - -#define TARGET_NR_exit_group 252 -#define TARGET_NR_lookup_dcookie 253 -#define TARGET_NR_epoll_create 254 -#define TARGET_NR_epoll_ctl 255 -#define TARGET_NR_epoll_wait 256 -#define TARGET_NR_remap_file_pages 257 -#define TARGET_NR_set_tid_address 258 -#define TARGET_NR_timer_create 259 -#define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) -#define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) -#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) -#define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) -#define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) -#define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) -#define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) -#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) -#define TARGET_NR_statfs64 268 -#define TARGET_NR_fstatfs64 269 -#define TARGET_NR_tgkill 270 -#define TARGET_NR_utimes 271 -#define TARGET_NR_fadvise64_64 272 -#define TARGET_NR_vserver 273 -#define TARGET_NR_mbind 274 -#define TARGET_NR_get_mempolicy 275 -#define TARGET_NR_set_mempolicy 276 -#define TARGET_NR_mq_open 277 -#define TARGET_NR_mq_unlink (TARGET_NR_mq_open+1) -#define TARGET_NR_mq_timedsend (TARGET_NR_mq_open+2) -#define TARGET_NR_mq_timedreceive (TARGET_NR_mq_open+3) -#define TARGET_NR_mq_notify (TARGET_NR_mq_open+4) -#define TARGET_NR_mq_getsetattr (TARGET_NR_mq_open+5) -#define TARGET_NR_sys_kexec_load 283 -#define TARGET_NR_waitid 284 -#define TARGET_NR_add_key 285 -#define TARGET_NR_request_key 286 -#define TARGET_NR_keyctl 287 -#define TARGET_NR_ioprio_set 288 -#define TARGET_NR_ioprio_get 289 -#define TARGET_NR_inotify_init 290 -#define TARGET_NR_inotify_add_watch 291 -#define TARGET_NR_inotify_rm_watch 292 -/* 293 is unused */ -#define TARGET_NR_migrate_pages 294 -#define TARGET_NR_openat 295 -#define TARGET_NR_mkdirat 296 -#define TARGET_NR_mknodat 297 -#define TARGET_NR_fchownat 298 -#define TARGET_NR_futimesat 299 -#define TARGET_NR_fstatat64 300 -#define TARGET_NR_unlinkat 301 -#define TARGET_NR_renameat 302 -#define TARGET_NR_linkat 303 -#define TARGET_NR_symlinkat 304 -#define TARGET_NR_readlinkat 305 -#define TARGET_NR_fchmodat 306 -#define TARGET_NR_faccessat 307 -#define TARGET_NR_pselect6 308 -#define TARGET_NR_ppoll 309 -#define TARGET_NR_unshare 310 -#define TARGET_NR_set_robust_list 311 -#define TARGET_NR_get_robust_list 312 -#define TARGET_NR_splice 313 -#define TARGET_NR_sync_file_range 314 -#define TARGET_NR_tee 315 -#define TARGET_NR_vmsplice 316 -#define TARGET_NR_move_pages 317 -#define TARGET_NR_getcpu 318 -#define TARGET_NR_epoll_pwait 319 -#define TARGET_NR_utimensat 320 -#define TARGET_NR_signalfd 321 -#define TARGET_NR_timerfd_create 322 -#define TARGET_NR_eventfd 323 -#define TARGET_NR_fallocate 324 -#define TARGET_NR_timerfd_settime 325 -#define TARGET_NR_timerfd_gettime 326 -#define TARGET_NR_signalfd4 327 -#define TARGET_NR_eventfd2 328 -#define TARGET_NR_epoll_create1 329 -#define TARGET_NR_dup3 330 -#define TARGET_NR_pipe2 331 -#define TARGET_NR_inotify_init1 332 -#define TARGET_NR_preadv 333 -#define TARGET_NR_pwritev 334 -#define TARGET_NR_rt_tgsigqueueinfo 335 -#define TARGET_NR_perf_event_open 336 -#define TARGET_NR_fanotify_init 337 -#define TARGET_NR_fanotify_mark 338 -#define TARGET_NR_prlimit64 339 - -/* Non-multiplexed socket family */ -#define TARGET_NR_socket 340 -#define TARGET_NR_bind 341 -#define TARGET_NR_connect 342 -#define TARGET_NR_listen 343 -#define TARGET_NR_accept 344 -#define TARGET_NR_getsockname 345 -#define TARGET_NR_getpeername 346 -#define TARGET_NR_socketpair 347 -#define TARGET_NR_send 348 -#define TARGET_NR_sendto 349 -#define TARGET_NR_recv 350 -#define TARGET_NR_recvfrom 351 -#define TARGET_NR_shutdown 352 -#define TARGET_NR_setsockopt 353 -#define TARGET_NR_getsockopt 354 -#define TARGET_NR_sendmsg 355 -#define TARGET_NR_recvmsg 356 -#define TARGET_NR_recvmmsg 357 -#define TARGET_NR_accept4 358 -#define TARGET_NR_name_to_handle_at 359 -#define TARGET_NR_open_by_handle_at 360 -#define TARGET_NR_clock_adjtime 361 -#define TARGET_NR_syncfs 362 -#define TARGET_NR_sendmmsg 363 -#define TARGET_NR_setns 364 -#define TARGET_NR_process_vm_readv 365 -#define TARGET_NR_process_vm_writev 366 -#define TARGET_NR_kcmp 367 -#define TARGET_NR_finit_module 368 -#define TARGET_NR_sched_getattr 369 -#define TARGET_NR_sched_setattr 370 -#define TARGET_NR_renameat2 371 -#define TARGET_NR_seccomp 372 -#define TARGET_NR_getrandom 373 -#define TARGET_NR_memfd_create 374 -#define TARGET_NR_bpf 375 -#define TARGET_NR_execveat 376 -#define TARGET_NR_userfaultfd 377 -#define TARGET_NR_membarrier 378 -#define TARGET_NR_mlock2 379 -#define TARGET_NR_copy_file_range 380 -#define TARGET_NR_preadv2 381 -#define TARGET_NR_pwritev2 382 -#define TARGET_NR_statx 383 -#define TARGET_NR_pkey_mprotect 384 -#define TARGET_NR_pkey_alloc 385 -#define TARGET_NR_pkey_free 386 -#define TARGET_NR_rseq 387 -/* room for arch specific syscalls */ -#define TARGET_NR_semget 393 -#define TARGET_NR_semctl 394 -#define TARGET_NR_shmget 395 -#define TARGET_NR_shmctl 396 -#define TARGET_NR_shmat 397 -#define TARGET_NR_shmdt 398 -#define TARGET_NR_msgget 399 -#define TARGET_NR_msgsnd 400 -#define TARGET_NR_msgrcv 401 -#define TARGET_NR_msgctl 402 -#define TARGET_NR_clock_gettime64 403 -#define TARGET_NR_clock_settime64 404 -#define TARGET_NR_clock_adjtime64 405 -#define TARGET_NR_clock_getres_time64 406 -#define TARGET_NR_clock_nanosleep_time64 407 -#define TARGET_NR_timer_gettime64 408 -#define TARGET_NR_timer_settime64 409 -#define TARGET_NR_timerfd_gettime64 410 -#define TARGET_NR_timerfd_settime64 411 -#define TARGET_NR_utimensat_time64 412 -#define TARGET_NR_pselect6_time64 413 -#define TARGET_NR_ppoll_time64 414 -#define TARGET_NR_io_pgetevents_time64 416 -#define TARGET_NR_recvmmsg_time64 417 -#define TARGET_NR_mq_timedsend_time64 418 -#define TARGET_NR_mq_timedreceive_time64 419 -#define TARGET_NR_semtimedop_time64 420 -#define TARGET_NR_rt_sigtimedwait_time64 421 -#define TARGET_NR_futex_time64 422 -#define TARGET_NR_sched_rr_get_interval_time64 423 -#define TARGET_NR_pidfd_send_signal 424 -#define TARGET_NR_io_uring_setup 425 -#define TARGET_NR_io_uring_enter 426 -#define TARGET_NR_io_uring_register 427 -#define TARGET_NR_open_tree 428 -#define TARGET_NR_move_mount 429 -#define TARGET_NR_fsopen 430 -#define TARGET_NR_fsconfig 431 -#define TARGET_NR_fsmount 432 -#define TARGET_NR_fspick 433 -#define TARGET_NR_pidfd_open 434 -/* 435 reserved for clone3 */ - -#endif diff --git a/linux-user/sh4/syscallhdr.sh b/linux-user/sh4/syscallhdr.sh new file mode 100644 index 0000000000..080790556a --- /dev/null +++ b/linux-user/sh4/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_SH4_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" +) > "$out" From ddf0c4cdfd3839c5dd3dfcd51770bc4639c1fd37 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:49 +0100 Subject: [PATCH 14/32] linux-user, microblaze: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/microblaze/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-8-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/microblaze/Makefile.objs | 5 + linux-user/microblaze/syscall.tbl | 443 ++++++++++++++++++++++++++++ linux-user/microblaze/syscall_nr.h | 442 --------------------------- linux-user/microblaze/syscallhdr.sh | 32 ++ 6 files changed, 483 insertions(+), 443 deletions(-) create mode 100644 linux-user/microblaze/Makefile.objs create mode 100644 linux-user/microblaze/syscall.tbl delete mode 100644 linux-user/microblaze/syscall_nr.h create mode 100644 linux-user/microblaze/syscallhdr.sh diff --git a/configure b/configure index 62f5bb601b..720bb5a96c 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa m68k xtensa sh4 ; do +for arch in alpha hppa m68k xtensa sh4 microblaze ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7825,6 +7825,7 @@ case "$target_name" in ;; microblaze|microblazeel) TARGET_ARCH=microblaze + TARGET_SYSTBL_ABI=common bflt="yes" echo "TARGET_ABI32=y" >> $config_target_mak ;; diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index d31f30d758..5a26281e88 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -12,5 +12,6 @@ obj-$(TARGET_AARCH64) += arm/semihost.o obj-$(TARGET_ALPHA) += alpha/ obj-$(TARGET_HPPA) += hppa/ obj-$(TARGET_M68K) += m68k/ +obj-$(TARGET_MICROBLAZE) += microblaze/ obj-$(TARGET_SH4) += sh4/ obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/microblaze/Makefile.objs b/linux-user/microblaze/Makefile.objs new file mode 100644 index 0000000000..bb8b318dda --- /dev/null +++ b/linux-user/microblaze/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/microblaze/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/microblaze/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/microblaze/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/microblaze/syscall.tbl b/linux-user/microblaze/syscall.tbl new file mode 100644 index 0000000000..09b0cd7dab --- /dev/null +++ b/linux-user/microblaze/syscall.tbl @@ -0,0 +1,443 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for microblaze +# +# The format is: +# +# +# The is always "common" for this file +# +0 common restart_syscall sys_restart_syscall +1 common exit sys_exit +2 common fork sys_fork +3 common read sys_read +4 common write sys_write +5 common open sys_open +6 common close sys_close +7 common waitpid sys_waitpid +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 common execve sys_execve +12 common chdir sys_chdir +13 common time sys_time32 +14 common mknod sys_mknod +15 common chmod sys_chmod +16 common lchown sys_lchown +17 common break sys_ni_syscall +18 common oldstat sys_ni_syscall +19 common lseek sys_lseek +20 common getpid sys_getpid +21 common mount sys_mount +22 common umount sys_oldumount +23 common setuid sys_setuid +24 common getuid sys_getuid +25 common stime sys_stime32 +26 common ptrace sys_ptrace +27 common alarm sys_alarm +28 common oldfstat sys_ni_syscall +29 common pause sys_pause +30 common utime sys_utime32 +31 common stty sys_ni_syscall +32 common gtty sys_ni_syscall +33 common access sys_access +34 common nice sys_nice +35 common ftime sys_ni_syscall +36 common sync sys_sync +37 common kill sys_kill +38 common rename sys_rename +39 common mkdir sys_mkdir +40 common rmdir sys_rmdir +41 common dup sys_dup +42 common pipe sys_pipe +43 common times sys_times +44 common prof sys_ni_syscall +45 common brk sys_brk +46 common setgid sys_setgid +47 common getgid sys_getgid +48 common signal sys_signal +49 common geteuid sys_geteuid +50 common getegid sys_getegid +51 common acct sys_acct +52 common umount2 sys_umount +53 common lock sys_ni_syscall +54 common ioctl sys_ioctl +55 common fcntl sys_fcntl +56 common mpx sys_ni_syscall +57 common setpgid sys_setpgid +58 common ulimit sys_ni_syscall +59 common oldolduname sys_ni_syscall +60 common umask sys_umask +61 common chroot sys_chroot +62 common ustat sys_ustat +63 common dup2 sys_dup2 +64 common getppid sys_getppid +65 common getpgrp sys_getpgrp +66 common setsid sys_setsid +67 common sigaction sys_ni_syscall +68 common sgetmask sys_sgetmask +69 common ssetmask sys_ssetmask +70 common setreuid sys_setreuid +71 common setregid sys_setregid +72 common sigsuspend sys_ni_syscall +73 common sigpending sys_sigpending +74 common sethostname sys_sethostname +75 common setrlimit sys_setrlimit +76 common getrlimit sys_ni_syscall +77 common getrusage sys_getrusage +78 common gettimeofday sys_gettimeofday +79 common settimeofday sys_settimeofday +80 common getgroups sys_getgroups +81 common setgroups sys_setgroups +82 common select sys_ni_syscall +83 common symlink sys_symlink +84 common oldlstat sys_ni_syscall +85 common readlink sys_readlink +86 common uselib sys_uselib +87 common swapon sys_swapon +88 common reboot sys_reboot +89 common readdir sys_ni_syscall +90 common mmap sys_mmap +91 common munmap sys_munmap +92 common truncate sys_truncate +93 common ftruncate sys_ftruncate +94 common fchmod sys_fchmod +95 common fchown sys_fchown +96 common getpriority sys_getpriority +97 common setpriority sys_setpriority +98 common profil sys_ni_syscall +99 common statfs sys_statfs +100 common fstatfs sys_fstatfs +101 common ioperm sys_ni_syscall +102 common socketcall sys_socketcall +103 common syslog sys_syslog +104 common setitimer sys_setitimer +105 common getitimer sys_getitimer +106 common stat sys_newstat +107 common lstat sys_newlstat +108 common fstat sys_newfstat +109 common olduname sys_ni_syscall +110 common iopl sys_ni_syscall +111 common vhangup sys_vhangup +112 common idle sys_ni_syscall +113 common vm86old sys_ni_syscall +114 common wait4 sys_wait4 +115 common swapoff sys_swapoff +116 common sysinfo sys_sysinfo +117 common ipc sys_ni_syscall +118 common fsync sys_fsync +119 common sigreturn sys_ni_syscall +120 common clone sys_clone +121 common setdomainname sys_setdomainname +122 common uname sys_newuname +123 common modify_ldt sys_ni_syscall +124 common adjtimex sys_adjtimex_time32 +125 common mprotect sys_mprotect +126 common sigprocmask sys_sigprocmask +127 common create_module sys_ni_syscall +128 common init_module sys_init_module +129 common delete_module sys_delete_module +130 common get_kernel_syms sys_ni_syscall +131 common quotactl sys_quotactl +132 common getpgid sys_getpgid +133 common fchdir sys_fchdir +134 common bdflush sys_bdflush +135 common sysfs sys_sysfs +136 common personality sys_personality +137 common afs_syscall sys_ni_syscall +138 common setfsuid sys_setfsuid +139 common setfsgid sys_setfsgid +140 common _llseek sys_llseek +141 common getdents sys_getdents +142 common _newselect sys_select +143 common flock sys_flock +144 common msync sys_msync +145 common readv sys_readv +146 common writev sys_writev +147 common getsid sys_getsid +148 common fdatasync sys_fdatasync +149 common _sysctl sys_sysctl +150 common mlock sys_mlock +151 common munlock sys_munlock +152 common mlockall sys_mlockall +153 common munlockall sys_munlockall +154 common sched_setparam sys_sched_setparam +155 common sched_getparam sys_sched_getparam +156 common sched_setscheduler sys_sched_setscheduler +157 common sched_getscheduler sys_sched_getscheduler +158 common sched_yield sys_sched_yield +159 common sched_get_priority_max sys_sched_get_priority_max +160 common sched_get_priority_min sys_sched_get_priority_min +161 common sched_rr_get_interval sys_sched_rr_get_interval_time32 +162 common nanosleep sys_nanosleep_time32 +163 common mremap sys_mremap +164 common setresuid sys_setresuid +165 common getresuid sys_getresuid +166 common vm86 sys_ni_syscall +167 common query_module sys_ni_syscall +168 common poll sys_poll +169 common nfsservctl sys_ni_syscall +170 common setresgid sys_setresgid +171 common getresgid sys_getresgid +172 common prctl sys_prctl +173 common rt_sigreturn sys_rt_sigreturn_wrapper +174 common rt_sigaction sys_rt_sigaction +175 common rt_sigprocmask sys_rt_sigprocmask +176 common rt_sigpending sys_rt_sigpending +177 common rt_sigtimedwait sys_rt_sigtimedwait_time32 +178 common rt_sigqueueinfo sys_rt_sigqueueinfo +179 common rt_sigsuspend sys_rt_sigsuspend +180 common pread64 sys_pread64 +181 common pwrite64 sys_pwrite64 +182 common chown sys_chown +183 common getcwd sys_getcwd +184 common capget sys_capget +185 common capset sys_capset +186 common sigaltstack sys_ni_syscall +187 common sendfile sys_sendfile +188 common getpmsg sys_ni_syscall +189 common putpmsg sys_ni_syscall +190 common vfork sys_vfork +191 common ugetrlimit sys_getrlimit +192 common mmap2 sys_mmap2 +193 common truncate64 sys_truncate64 +194 common ftruncate64 sys_ftruncate64 +195 common stat64 sys_stat64 +196 common lstat64 sys_lstat64 +197 common fstat64 sys_fstat64 +198 common lchown32 sys_lchown +199 common getuid32 sys_getuid +200 common getgid32 sys_getgid +201 common geteuid32 sys_geteuid +202 common getegid32 sys_getegid +203 common setreuid32 sys_setreuid +204 common setregid32 sys_setregid +205 common getgroups32 sys_getgroups +206 common setgroups32 sys_setgroups +207 common fchown32 sys_fchown +208 common setresuid32 sys_setresuid +209 common getresuid32 sys_getresuid +210 common setresgid32 sys_setresgid +211 common getresgid32 sys_getresgid +212 common chown32 sys_chown +213 common setuid32 sys_setuid +214 common setgid32 sys_setgid +215 common setfsuid32 sys_setfsuid +216 common setfsgid32 sys_setfsgid +217 common pivot_root sys_pivot_root +218 common mincore sys_mincore +219 common madvise sys_madvise +220 common getdents64 sys_getdents64 +221 common fcntl64 sys_fcntl64 +# 222 is reserved for TUX +# 223 is unused +224 common gettid sys_gettid +225 common readahead sys_readahead +226 common setxattr sys_setxattr +227 common lsetxattr sys_lsetxattr +228 common fsetxattr sys_fsetxattr +229 common getxattr sys_getxattr +230 common lgetxattr sys_lgetxattr +231 common fgetxattr sys_fgetxattr +232 common listxattr sys_listxattr +233 common llistxattr sys_llistxattr +234 common flistxattr sys_flistxattr +235 common removexattr sys_removexattr +236 common lremovexattr sys_lremovexattr +237 common fremovexattr sys_fremovexattr +238 common tkill sys_tkill +239 common sendfile64 sys_sendfile64 +240 common futex sys_futex_time32 +241 common sched_setaffinity sys_sched_setaffinity +242 common sched_getaffinity sys_sched_getaffinity +243 common set_thread_area sys_ni_syscall +244 common get_thread_area sys_ni_syscall +245 common io_setup sys_io_setup +246 common io_destroy sys_io_destroy +247 common io_getevents sys_io_getevents_time32 +248 common io_submit sys_io_submit +249 common io_cancel sys_io_cancel +250 common fadvise64 sys_fadvise64 +# 251 is available for reuse (was briefly sys_set_zone_reclaim) +252 common exit_group sys_exit_group +253 common lookup_dcookie sys_lookup_dcookie +254 common epoll_create sys_epoll_create +255 common epoll_ctl sys_epoll_ctl +256 common epoll_wait sys_epoll_wait +257 common remap_file_pages sys_remap_file_pages +258 common set_tid_address sys_set_tid_address +259 common timer_create sys_timer_create +260 common timer_settime sys_timer_settime32 +261 common timer_gettime sys_timer_gettime32 +262 common timer_getoverrun sys_timer_getoverrun +263 common timer_delete sys_timer_delete +264 common clock_settime sys_clock_settime32 +265 common clock_gettime sys_clock_gettime32 +266 common clock_getres sys_clock_getres_time32 +267 common clock_nanosleep sys_clock_nanosleep_time32 +268 common statfs64 sys_statfs64 +269 common fstatfs64 sys_fstatfs64 +270 common tgkill sys_tgkill +271 common utimes sys_utimes_time32 +272 common fadvise64_64 sys_fadvise64_64 +273 common vserver sys_ni_syscall +274 common mbind sys_mbind +275 common get_mempolicy sys_get_mempolicy +276 common set_mempolicy sys_set_mempolicy +277 common mq_open sys_mq_open +278 common mq_unlink sys_mq_unlink +279 common mq_timedsend sys_mq_timedsend_time32 +280 common mq_timedreceive sys_mq_timedreceive_time32 +281 common mq_notify sys_mq_notify +282 common mq_getsetattr sys_mq_getsetattr +283 common kexec_load sys_kexec_load +284 common waitid sys_waitid +# 285 was setaltroot +286 common add_key sys_add_key +287 common request_key sys_request_key +288 common keyctl sys_keyctl +289 common ioprio_set sys_ioprio_set +290 common ioprio_get sys_ioprio_get +291 common inotify_init sys_inotify_init +292 common inotify_add_watch sys_inotify_add_watch +293 common inotify_rm_watch sys_inotify_rm_watch +294 common migrate_pages sys_ni_syscall +295 common openat sys_openat +296 common mkdirat sys_mkdirat +297 common mknodat sys_mknodat +298 common fchownat sys_fchownat +299 common futimesat sys_futimesat_time32 +300 common fstatat64 sys_fstatat64 +301 common unlinkat sys_unlinkat +302 common renameat sys_renameat +303 common linkat sys_linkat +304 common symlinkat sys_symlinkat +305 common readlinkat sys_readlinkat +306 common fchmodat sys_fchmodat +307 common faccessat sys_faccessat +308 common pselect6 sys_pselect6_time32 +309 common ppoll sys_ppoll_time32 +310 common unshare sys_unshare +311 common set_robust_list sys_set_robust_list +312 common get_robust_list sys_get_robust_list +313 common splice sys_splice +314 common sync_file_range sys_sync_file_range +315 common tee sys_tee +316 common vmsplice sys_vmsplice +317 common move_pages sys_move_pages +318 common getcpu sys_getcpu +319 common epoll_pwait sys_epoll_pwait +320 common utimensat sys_utimensat_time32 +321 common signalfd sys_signalfd +322 common timerfd_create sys_timerfd_create +323 common eventfd sys_eventfd +324 common fallocate sys_fallocate +325 common semtimedop sys_semtimedop_time32 +326 common timerfd_settime sys_timerfd_settime32 +327 common timerfd_gettime sys_timerfd_gettime32 +328 common semctl sys_old_semctl +329 common semget sys_semget +330 common semop sys_semop +331 common msgctl sys_old_msgctl +332 common msgget sys_msgget +333 common msgrcv sys_msgrcv +334 common msgsnd sys_msgsnd +335 common shmat sys_shmat +336 common shmctl sys_old_shmctl +337 common shmdt sys_shmdt +338 common shmget sys_shmget +339 common signalfd4 sys_signalfd4 +340 common eventfd2 sys_eventfd2 +341 common epoll_create1 sys_epoll_create1 +342 common dup3 sys_dup3 +343 common pipe2 sys_pipe2 +344 common inotify_init1 sys_inotify_init1 +345 common socket sys_socket +346 common socketpair sys_socketpair +347 common bind sys_bind +348 common listen sys_listen +349 common accept sys_accept +350 common connect sys_connect +351 common getsockname sys_getsockname +352 common getpeername sys_getpeername +353 common sendto sys_sendto +354 common send sys_send +355 common recvfrom sys_recvfrom +356 common recv sys_recv +357 common setsockopt sys_setsockopt +358 common getsockopt sys_getsockopt +359 common shutdown sys_shutdown +360 common sendmsg sys_sendmsg +361 common recvmsg sys_recvmsg +362 common accept4 sys_accept4 +363 common preadv sys_preadv +364 common pwritev sys_pwritev +365 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo +366 common perf_event_open sys_perf_event_open +367 common recvmmsg sys_recvmmsg_time32 +368 common fanotify_init sys_fanotify_init +369 common fanotify_mark sys_fanotify_mark +370 common prlimit64 sys_prlimit64 +371 common name_to_handle_at sys_name_to_handle_at +372 common open_by_handle_at sys_open_by_handle_at +373 common clock_adjtime sys_clock_adjtime32 +374 common syncfs sys_syncfs +375 common setns sys_setns +376 common sendmmsg sys_sendmmsg +377 common process_vm_readv sys_process_vm_readv +378 common process_vm_writev sys_process_vm_writev +379 common kcmp sys_kcmp +380 common finit_module sys_finit_module +381 common sched_setattr sys_sched_setattr +382 common sched_getattr sys_sched_getattr +383 common renameat2 sys_renameat2 +384 common seccomp sys_seccomp +385 common getrandom sys_getrandom +386 common memfd_create sys_memfd_create +387 common bpf sys_bpf +388 common execveat sys_execveat +389 common userfaultfd sys_userfaultfd +390 common membarrier sys_membarrier +391 common mlock2 sys_mlock2 +392 common copy_file_range sys_copy_file_range +393 common preadv2 sys_preadv2 +394 common pwritev2 sys_pwritev2 +395 common pkey_mprotect sys_pkey_mprotect +396 common pkey_alloc sys_pkey_alloc +397 common pkey_free sys_pkey_free +398 common statx sys_statx +399 common io_pgetevents sys_io_pgetevents_time32 +400 common rseq sys_rseq +# 401 and 402 are unused +403 common clock_gettime64 sys_clock_gettime +404 common clock_settime64 sys_clock_settime +405 common clock_adjtime64 sys_clock_adjtime +406 common clock_getres_time64 sys_clock_getres +407 common clock_nanosleep_time64 sys_clock_nanosleep +408 common timer_gettime64 sys_timer_gettime +409 common timer_settime64 sys_timer_settime +410 common timerfd_gettime64 sys_timerfd_gettime +411 common timerfd_settime64 sys_timerfd_settime +412 common utimensat_time64 sys_utimensat +413 common pselect6_time64 sys_pselect6 +414 common ppoll_time64 sys_ppoll +416 common io_pgetevents_time64 sys_io_pgetevents +417 common recvmmsg_time64 sys_recvmmsg +418 common mq_timedsend_time64 sys_mq_timedsend +419 common mq_timedreceive_time64 sys_mq_timedreceive +420 common semtimedop_time64 sys_semtimedop +421 common rt_sigtimedwait_time64 sys_rt_sigtimedwait +422 common futex_time64 sys_futex +423 common sched_rr_get_interval_time64 sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +435 common clone3 sys_clone3 diff --git a/linux-user/microblaze/syscall_nr.h b/linux-user/microblaze/syscall_nr.h deleted file mode 100644 index ec1758e374..0000000000 --- a/linux-user/microblaze/syscall_nr.h +++ /dev/null @@ -1,442 +0,0 @@ -#ifndef LINUX_USER_MICROBLAZE_SYSCALL_NR_H -#define LINUX_USER_MICROBLAZE_SYSCALL_NR_H - -#define TARGET_NR_restart_syscall 0 /* ok */ -#define TARGET_NR_exit 1 /* ok */ -#define TARGET_NR_fork 2 /* not for no MMU - weird */ -#define TARGET_NR_read 3 /* ok */ -#define TARGET_NR_write 4 /* ok */ -#define TARGET_NR_open 5 /* openat */ -#define TARGET_NR_close 6 /* ok */ -#define TARGET_NR_waitpid 7 /* waitid */ -#define TARGET_NR_creat 8 /* openat */ -#define TARGET_NR_link 9 /* linkat */ -#define TARGET_NR_unlink 10 /* unlinkat */ -#define TARGET_NR_execve 11 /* ok */ -#define TARGET_NR_chdir 12 /* ok */ -#define TARGET_NR_time 13 /* obsolete -> sys_gettimeofday */ -#define TARGET_NR_mknod 14 /* mknodat */ -#define TARGET_NR_chmod 15 /* fchmodat */ -#define TARGET_NR_lchown 16 /* ok */ -#define TARGET_NR_break 17 /* don't know */ -#define TARGET_NR_oldstat 18 /* remove */ -#define TARGET_NR_lseek 19 /* ok */ -#define TARGET_NR_getpid 20 /* ok */ -#define TARGET_NR_mount 21 /* ok */ -#define TARGET_NR_umount 22 /* ok */ /* use only umount2 */ -#define TARGET_NR_setuid 23 /* ok */ -#define TARGET_NR_getuid 24 /* ok */ -#define TARGET_NR_stime 25 /* obsolete -> sys_settimeofday */ -#define TARGET_NR_ptrace 26 /* ok */ -#define TARGET_NR_alarm 27 /* obsolete -> sys_setitimer */ -#define TARGET_NR_oldfstat 28 /* remove */ -#define TARGET_NR_pause 29 /* obsolete -> sys_rt_sigtimedwait */ -#define TARGET_NR_utime 30 /* obsolete -> sys_utimesat */ -#define TARGET_NR_stty 31 /* remove */ -#define TARGET_NR_gtty 32 /* remove */ -#define TARGET_NR_access 33 /* faccessat */ -#define TARGET_NR_nice 34 /* can be implemented by sys_setpriority */ -#define TARGET_NR_ftime 35 /* remove */ -#define TARGET_NR_sync 36 /* ok */ -#define TARGET_NR_kill 37 /* ok */ -#define TARGET_NR_rename 38 /* renameat */ -#define TARGET_NR_mkdir 39 /* mkdirat */ -#define TARGET_NR_rmdir 40 /* unlinkat */ -#define TARGET_NR_dup 41 /* ok */ -#define TARGET_NR_pipe 42 /* ok */ -#define TARGET_NR_times 43 /* ok */ -#define TARGET_NR_prof 44 /* remove */ -#define TARGET_NR_brk 45 /* ok -mmu, nommu specific */ -#define TARGET_NR_setgid 46 /* ok */ -#define TARGET_NR_getgid 47 /* ok */ -#define TARGET_NR_signal 48 /* obsolete -> sys_rt_sigaction */ -#define TARGET_NR_geteuid 49 /* ok */ -#define TARGET_NR_getegid 50 /* ok */ -#define TARGET_NR_acct 51 /* add it and then I can disable it */ -#define TARGET_NR_umount2 52 /* remove */ -#define TARGET_NR_lock 53 /* remove */ -#define TARGET_NR_ioctl 54 /* ok */ -#define TARGET_NR_fcntl 55 /* ok -> 64bit version*/ -#define TARGET_NR_mpx 56 /* remove */ -#define TARGET_NR_setpgid 57 /* ok */ -#define TARGET_NR_ulimit 58 /* remove */ -#define TARGET_NR_oldolduname 59 /* remove */ -#define TARGET_NR_umask 60 /* ok */ -#define TARGET_NR_chroot 61 /* ok */ -#define TARGET_NR_ustat 62 /* obsolete -> statfs64 */ -#define TARGET_NR_dup2 63 /* ok */ -#define TARGET_NR_getppid 64 /* ok */ -#define TARGET_NR_getpgrp 65 /* obsolete -> sys_getpgid */ -#define TARGET_NR_setsid 66 /* ok */ -#define TARGET_NR_sigaction 67 /* obsolete -> rt_sigaction */ -#define TARGET_NR_sgetmask 68 /* obsolete -> sys_rt_sigprocmask */ -#define TARGET_NR_ssetmask 69 /* obsolete ->sys_rt_sigprocmask */ -#define TARGET_NR_setreuid 70 /* ok */ -#define TARGET_NR_setregid 71 /* ok */ -#define TARGET_NR_sigsuspend 72 /* obsolete -> rt_sigsuspend */ -#define TARGET_NR_sigpending 73 /* obsolete -> sys_rt_sigpending */ -#define TARGET_NR_sethostname 74 /* ok */ -#define TARGET_NR_setrlimit 75 /* ok */ -#define TARGET_NR_getrlimit 76 /* ok Back compatible 2Gig limited rlimit */ -#define TARGET_NR_getrusage 77 /* ok */ -#define TARGET_NR_gettimeofday 78 /* ok */ -#define TARGET_NR_settimeofday 79 /* ok */ -#define TARGET_NR_getgroups 80 /* ok */ -#define TARGET_NR_setgroups 81 /* ok */ -#define TARGET_NR_select 82 /* obsolete -> sys_pselect7 */ -#define TARGET_NR_symlink 83 /* symlinkat */ -#define TARGET_NR_oldlstat 84 /* remove */ -#define TARGET_NR_readlink 85 /* obsolete -> sys_readlinkat */ -#define TARGET_NR_uselib 86 /* remove */ -#define TARGET_NR_swapon 87 /* ok */ -#define TARGET_NR_reboot 88 /* ok */ -#define TARGET_NR_readdir 89 /* remove ? */ -#define TARGET_NR_mmap 90 /* obsolete -> sys_mmap2 */ -#define TARGET_NR_munmap 91 /* ok - mmu and nommu */ -#define TARGET_NR_truncate 92 /* ok or truncate64 */ -#define TARGET_NR_ftruncate 93 /* ok or ftruncate64 */ -#define TARGET_NR_fchmod 94 /* ok */ -#define TARGET_NR_fchown 95 /* ok */ -#define TARGET_NR_getpriority 96 /* ok */ -#define TARGET_NR_setpriority 97 /* ok */ -#define TARGET_NR_profil 98 /* remove */ -#define TARGET_NR_statfs 99 /* ok or statfs64 */ -#define TARGET_NR_fstatfs 100 /* ok or fstatfs64 */ -#define TARGET_NR_ioperm 101 /* remove */ -#define TARGET_NR_socketcall 102 /* remove */ -#define TARGET_NR_syslog 103 /* ok */ -#define TARGET_NR_setitimer 104 /* ok */ -#define TARGET_NR_getitimer 105 /* ok */ -#define TARGET_NR_stat 106 /* remove */ -#define TARGET_NR_lstat 107 /* remove */ -#define TARGET_NR_fstat 108 /* remove */ -#define TARGET_NR_olduname 109 /* remove */ -#define TARGET_NR_iopl 110 /* remove */ -#define TARGET_NR_vhangup 111 /* ok */ -#define TARGET_NR_idle 112 /* remove */ -#define TARGET_NR_vm86old 113 /* remove */ -#define TARGET_NR_wait4 114 /* obsolete -> waitid */ -#define TARGET_NR_swapoff 115 /* ok */ -#define TARGET_NR_sysinfo 116 /* ok */ -#define TARGET_NR_ipc 117 /* remove - direct call */ -#define TARGET_NR_fsync 118 /* ok */ -#define TARGET_NR_sigreturn 119 /* obsolete -> sys_rt_sigreturn */ -#define TARGET_NR_clone 120 /* ok */ -#define TARGET_NR_setdomainname 121 /* ok */ -#define TARGET_NR_uname 122 /* remove */ -#define TARGET_NR_modify_ldt 123 /* remove */ -#define TARGET_NR_adjtimex 124 /* ok */ -#define TARGET_NR_mprotect 125 /* remove */ -#define TARGET_NR_sigprocmask 126 /* obsolete -> sys_rt_sigprocmask */ -#define TARGET_NR_create_module 127 /* remove */ -#define TARGET_NR_init_module 128 /* ok */ -#define TARGET_NR_delete_module 129 /* ok */ -#define TARGET_NR_get_kernel_syms 130 /* remove */ -#define TARGET_NR_quotactl 131 /* ok */ -#define TARGET_NR_getpgid 132 /* ok */ -#define TARGET_NR_fchdir 133 /* ok */ -#define TARGET_NR_bdflush 134 /* remove */ -#define TARGET_NR_sysfs 135 /* needed for busybox */ -#define TARGET_NR_personality 136 /* ok */ -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid 138 /* ok */ -#define TARGET_NR_setfsgid 139 /* ok */ -#define TARGET_NR__llseek 140 /* remove only lseek */ -#define TARGET_NR_getdents 141 /* ok or getdents64 */ -#define TARGET_NR__newselect 142 /* remove */ -#define TARGET_NR_flock 143 /* ok */ -#define TARGET_NR_msync 144 /* remove */ -#define TARGET_NR_readv 145 /* ok */ -#define TARGET_NR_writev 146 /* ok */ -#define TARGET_NR_getsid 147 /* ok */ -#define TARGET_NR_fdatasync 148 /* ok */ -#define TARGET_NR__sysctl 149 /* remove */ -#define TARGET_NR_mlock 150 /* ok - nommu or mmu */ -#define TARGET_NR_munlock 151 /* ok - nommu or mmu */ -#define TARGET_NR_mlockall 152 /* ok - nommu or mmu */ -#define TARGET_NR_munlockall 153 /* ok - nommu or mmu */ -#define TARGET_NR_sched_setparam 154 /* ok */ -#define TARGET_NR_sched_getparam 155 /* ok */ -#define TARGET_NR_sched_setscheduler 156 /* ok */ -#define TARGET_NR_sched_getscheduler 157 /* ok */ -#define TARGET_NR_sched_yield 158 /* ok */ -#define TARGET_NR_sched_get_priority_max 159 /* ok */ -#define TARGET_NR_sched_get_priority_min 160 /* ok */ -#define TARGET_NR_sched_rr_get_interval 161 /* ok */ -#define TARGET_NR_nanosleep 162 /* ok */ -#define TARGET_NR_mremap 163 /* ok - nommu or mmu */ -#define TARGET_NR_setresuid 164 /* ok */ -#define TARGET_NR_getresuid 165 /* ok */ -#define TARGET_NR_vm86 166 /* remove */ -#define TARGET_NR_query_module 167 /* ok */ -#define TARGET_NR_poll 168 /* obsolete -> sys_ppoll */ -#define TARGET_NR_nfsservctl 169 /* ok */ -#define TARGET_NR_setresgid 170 /* ok */ -#define TARGET_NR_getresgid 171 /* ok */ -#define TARGET_NR_prctl 172 /* ok */ -#define TARGET_NR_rt_sigreturn 173 /* ok */ -#define TARGET_NR_rt_sigaction 174 /* ok */ -#define TARGET_NR_rt_sigprocmask 175 /* ok */ -#define TARGET_NR_rt_sigpending 176 /* ok */ -#define TARGET_NR_rt_sigtimedwait 177 /* ok */ -#define TARGET_NR_rt_sigqueueinfo 178 /* ok */ -#define TARGET_NR_rt_sigsuspend 179 /* ok */ -#define TARGET_NR_pread64 180 /* ok */ -#define TARGET_NR_pwrite64 181 /* ok */ -#define TARGET_NR_chown 182 /* obsolete -> fchownat */ -#define TARGET_NR_getcwd 183 /* ok */ -#define TARGET_NR_capget 184 /* ok */ -#define TARGET_NR_capset 185 /* ok */ -#define TARGET_NR_sigaltstack 186 /* remove */ -#define TARGET_NR_sendfile 187 /* ok -> exist 64bit version*/ -#define TARGET_NR_getpmsg 188 /* remove - some people actually want streams */ -#define TARGET_NR_putpmsg 189 /* remove - some people actually want streams */ -#define TARGET_NR_vfork 190 /* for noMMU - group with clone -> maybe remove */ -#define TARGET_NR_ugetrlimit 191 /* remove - SuS compliant getrlimit */ -#define TARGET_NR_mmap2 192 /* ok */ -#define TARGET_NR_truncate64 193 /* ok */ -#define TARGET_NR_ftruncate64 194 /* ok */ -#define TARGET_NR_stat64 195 /* remove _ARCH_WANT_STAT64 */ -#define TARGET_NR_lstat64 196 /* remove _ARCH_WANT_STAT64 */ -#define TARGET_NR_fstat64 197 /* remove _ARCH_WANT_STAT64 */ -#define TARGET_NR_lchown32 198 /* ok - without 32 */ -#define TARGET_NR_getuid32 199 /* ok - without 32 */ -#define TARGET_NR_getgid32 200 /* ok - without 32 */ -#define TARGET_NR_geteuid32 201 /* ok - without 32 */ -#define TARGET_NR_getegid32 202 /* ok - without 32 */ -#define TARGET_NR_setreuid32 203 /* ok - without 32 */ -#define TARGET_NR_setregid32 204 /* ok - without 32 */ -#define TARGET_NR_getgroups32 205 /* ok - without 32 */ -#define TARGET_NR_setgroups32 206 /* ok - without 32 */ -#define TARGET_NR_fchown32 207 /* ok - without 32 */ -#define TARGET_NR_setresuid32 208 /* ok - without 32 */ -#define TARGET_NR_getresuid32 209 /* ok - without 32 */ -#define TARGET_NR_setresgid32 210 /* ok - without 32 */ -#define TARGET_NR_getresgid32 211 /* ok - without 32 */ -#define TARGET_NR_chown32 212 /* ok - without 32 -obsolete -> fchownat */ -#define TARGET_NR_setuid32 213 /* ok - without 32 */ -#define TARGET_NR_setgid32 214 /* ok - without 32 */ -#define TARGET_NR_setfsuid32 215 /* ok - without 32 */ -#define TARGET_NR_setfsgid32 216 /* ok - without 32 */ -#define TARGET_NR_pivot_root 217 /* ok */ -#define TARGET_NR_mincore 218 /* ok */ -#define TARGET_NR_madvise 219 /* ok */ -//#define TARGET_NR_madvise1 219 /* remove delete when C lib stub is removed */ -#define TARGET_NR_getdents64 220 /* ok */ -#define TARGET_NR_fcntl64 221 /* ok */ -/* 223 is unused */ -#define TARGET_NR_gettid 224 /* ok */ -#define TARGET_NR_readahead 225 /* ok */ -#define TARGET_NR_setxattr 226 /* ok */ -#define TARGET_NR_lsetxattr 227 /* ok */ -#define TARGET_NR_fsetxattr 228 /* ok */ -#define TARGET_NR_getxattr 229 /* ok */ -#define TARGET_NR_lgetxattr 230 /* ok */ -#define TARGET_NR_fgetxattr 231 /* ok */ -#define TARGET_NR_listxattr 232 /* ok */ -#define TARGET_NR_llistxattr 233 /* ok */ -#define TARGET_NR_flistxattr 234 /* ok */ -#define TARGET_NR_removexattr 235 /* ok */ -#define TARGET_NR_lremovexattr 236 /* ok */ -#define TARGET_NR_fremovexattr 237 /* ok */ -#define TARGET_NR_tkill 238 /* ok */ -#define TARGET_NR_sendfile64 239 /* ok */ -#define TARGET_NR_futex 240 /* ok */ -#define TARGET_NR_sched_setaffinity 241 /* ok */ -#define TARGET_NR_sched_getaffinity 242 /* ok */ -#define TARGET_NR_set_thread_area 243 /* remove */ -#define TARGET_NR_get_thread_area 244 /* remove */ -#define TARGET_NR_io_setup 245 /* ok */ -#define TARGET_NR_io_destroy 246 /* ok */ -#define TARGET_NR_io_getevents 247 /* ok */ -#define TARGET_NR_io_submit 248 /* ok */ -#define TARGET_NR_io_cancel 249 /* ok */ -#define TARGET_NR_fadvise64 250 /* remove -> sys_fadvise64_64 */ -/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ -#define TARGET_NR_exit_group 252 /* ok */ -#define TARGET_NR_lookup_dcookie 253 /* ok */ -#define TARGET_NR_epoll_create 254 /* ok */ -#define TARGET_NR_epoll_ctl 255 /* ok */ -#define TARGET_NR_epoll_wait 256 /* obsolete -> sys_epoll_pwait */ -#define TARGET_NR_remap_file_pages 257 /* only for mmu */ -#define TARGET_NR_set_tid_address 258 /* ok */ -#define TARGET_NR_timer_create 259 /* ok */ -#define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) /* 260 */ /* ok */ -#define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) /* 261 */ /* ok */ -#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) /* 262 */ /* ok */ -#define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) /* 263 */ /* ok */ -#define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) /* 264 */ /* ok */ -#define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) /* 265 */ /* ok */ -#define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) /* 266 */ /* ok */ -#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) /* 267 */ /* ok */ -#define TARGET_NR_statfs64 268 /* ok */ -#define TARGET_NR_fstatfs64 269 /* ok */ -#define TARGET_NR_tgkill 270 /* ok */ -#define TARGET_NR_utimes 271 /* obsolete -> sys_futimesat */ -#define TARGET_NR_fadvise64_64 272 /* ok */ -#define TARGET_NR_vserver 273 /* ok */ -#define TARGET_NR_mbind 274 /* only for mmu */ -#define TARGET_NR_get_mempolicy 275 /* only for mmu */ -#define TARGET_NR_set_mempolicy 276 /* only for mmu */ -#define TARGET_NR_mq_open 277 /* ok */ -#define TARGET_NR_mq_unlink (TARGET_NR_mq_open+1) /* 278 */ /* ok */ -#define TARGET_NR_mq_timedsend (TARGET_NR_mq_open+2) /* 279 */ /* ok */ -#define TARGET_NR_mq_timedreceive (TARGET_NR_mq_open+3) /* 280 */ /* ok */ -#define TARGET_NR_mq_notify (TARGET_NR_mq_open+4) /* 281 */ /* ok */ -#define TARGET_NR_mq_getsetattr (TARGET_NR_mq_open+5) /* 282 */ /* ok */ -#define TARGET_NR_kexec_load 283 /* ok */ -#define TARGET_NR_waitid 284 /* ok */ -/* #define TARGET_NR_sys_setaltroot 285 */ -#define TARGET_NR_add_key 286 /* ok */ -#define TARGET_NR_request_key 287 /* ok */ -#define TARGET_NR_keyctl 288 /* ok */ -#define TARGET_NR_ioprio_set 289 /* ok */ -#define TARGET_NR_ioprio_get 290 /* ok */ -#define TARGET_NR_inotify_init 291 /* ok */ -#define TARGET_NR_inotify_add_watch 292 /* ok */ -#define TARGET_NR_inotify_rm_watch 293 /* ok */ -#define TARGET_NR_migrate_pages 294 /* mmu */ -#define TARGET_NR_openat 295 /* ok */ -#define TARGET_NR_mkdirat 296 /* ok */ -#define TARGET_NR_mknodat 297 /* ok */ -#define TARGET_NR_fchownat 298 /* ok */ -#define TARGET_NR_futimesat 299 /* obsolete -> sys_utimesat */ -#define TARGET_NR_fstatat64 300 /* stat64 */ -#define TARGET_NR_unlinkat 301 /* ok */ -#define TARGET_NR_renameat 302 /* ok */ -#define TARGET_NR_linkat 303 /* ok */ -#define TARGET_NR_symlinkat 304 /* ok */ -#define TARGET_NR_readlinkat 305 /* ok */ -#define TARGET_NR_fchmodat 306 /* ok */ -#define TARGET_NR_faccessat 307 /* ok */ -#define TARGET_NR_pselect6 308 /* obsolete -> sys_pselect7 */ -#define TARGET_NR_ppoll 309 /* ok */ -#define TARGET_NR_unshare 310 /* ok */ -#define TARGET_NR_set_robust_list 311 /* ok */ -#define TARGET_NR_get_robust_list 312 /* ok */ -#define TARGET_NR_splice 313 /* ok */ -#define TARGET_NR_sync_file_range 314 /* ok */ -#define TARGET_NR_tee 315 /* ok */ -#define TARGET_NR_vmsplice 316 /* ok */ -#define TARGET_NR_move_pages 317 /* mmu */ -#define TARGET_NR_getcpu 318 /* ok */ -#define TARGET_NR_epoll_pwait 319 /* ok */ -#define TARGET_NR_utimensat 320 /* ok */ -#define TARGET_NR_signalfd 321 /* ok */ -#define TARGET_NR_timerfd_create 322 /* ok */ -#define TARGET_NR_eventfd 323 /* ok */ -#define TARGET_NR_fallocate 324 /* ok */ -#define TARGET_NR_semtimedop 325 /* ok - semaphore group */ -#define TARGET_NR_timerfd_settime 326 /* ok */ -#define TARGET_NR_timerfd_gettime 327 /* ok */ -/* sysv ipc syscalls */ -#define TARGET_NR_semctl 328 /* ok */ -#define TARGET_NR_semget 329 /* ok */ -#define TARGET_NR_semop 330 /* ok */ -#define TARGET_NR_msgctl 331 /* ok */ -#define TARGET_NR_msgget 332 /* ok */ -#define TARGET_NR_msgrcv 333 /* ok */ -#define TARGET_NR_msgsnd 334 /* ok */ -#define TARGET_NR_shmat 335 /* ok */ -#define TARGET_NR_shmctl 336 /* ok */ -#define TARGET_NR_shmdt 337 /* ok */ -#define TARGET_NR_shmget 338 /* ok */ - - -#define TARGET_NR_signalfd4 339 /* new */ -#define TARGET_NR_eventfd2 340 /* new */ -#define TARGET_NR_epoll_create1 341 /* new */ -#define TARGET_NR_dup3 342 /* new */ -#define TARGET_NR_pipe2 343 /* new */ -#define TARGET_NR_inotify_init1 344 /* new */ -#define TARGET_NR_socket 345 /* new */ -#define TARGET_NR_socketpair 346 /* new */ -#define TARGET_NR_bind 347 /* new */ -#define TARGET_NR_listen 348 /* new */ -#define TARGET_NR_accept 349 /* new */ -#define TARGET_NR_connect 350 /* new */ -#define TARGET_NR_getsockname 351 /* new */ -#define TARGET_NR_getpeername 352 /* new */ -#define TARGET_NR_sendto 353 /* new */ -#define TARGET_NR_send 354 /* new */ -#define TARGET_NR_recvfrom 355 /* new */ -#define TARGET_NR_recv 356 /* new */ -#define TARGET_NR_setsockopt 357 /* new */ -#define TARGET_NR_getsockopt 358 /* new */ -#define TARGET_NR_shutdown 359 /* new */ -#define TARGET_NR_sendmsg 360 /* new */ -#define TARGET_NR_recvmsg 361 /* new */ -#define TARGET_NR_accept4 362 /* new */ -#define TARGET_NR_preadv 363 /* new */ -#define TARGET_NR_pwritev 364 /* new */ -#define TARGET_NR_rt_tgsigqueueinfo 365 /* new */ -#define TARGET_NR_perf_event_open 366 /* new */ -#define TARGET_NR_recvmmsg 367 /* new */ -#define TARGET_NR_fanotify_init 368 -#define TARGET_NR_fanotify_mark 369 -#define TARGET_NR_prlimit64 370 -#define TARGET_NR_name_to_handle_at 371 -#define TARGET_NR_open_by_handle_at 372 -#define TARGET_NR_clock_adjtime 373 -#define TARGET_NR_syncfs 374 -#define TARGET_NR_setns 375 -#define TARGET_NR_sendmmsg 376 -#define TARGET_NR_process_vm_readv 377 -#define TARGET_NR_process_vm_writev 378 -#define TARGET_NR_kcmp 379 -#define TARGET_NR_finit_module 380 -#define TARGET_NR_sched_setattr 381 -#define TARGET_NR_sched_getattr 382 -#define TARGET_NR_renameat2 383 -#define TARGET_NR_seccomp 384 -#define TARGET_NR_getrandom 385 -#define TARGET_NR_memfd_create 386 -#define TARGET_NR_bpf 387 -#define TARGET_NR_execveat 388 -#define TARGET_NR_userfaultfd 389 -#define TARGET_NR_membarrier 390 -#define TARGET_NR_mlock2 391 -#define TARGET_NR_copy_file_range 392 -#define TARGET_NR_preadv2 393 -#define TARGET_NR_pwritev2 394 -#define TARGET_NR_pkey_mprotect 395 -#define TARGET_NR_pkey_alloc 396 -#define TARGET_NR_pkey_free 397 -#define TARGET_NR_statx 398 -#define TARGET_NR_io_pgetevents 399 -#define TARGET_NR_rseq 400 -/* 401 and 402 are unused */ -#define TARGET_NR_clock_gettime64 403 -#define TARGET_NR_clock_settime64 404 -#define TARGET_NR_clock_adjtime64 405 -#define TARGET_NR_clock_getres_time64 406 -#define TARGET_NR_clock_nanosleep_time64 407 -#define TARGET_NR_timer_gettime64 408 -#define TARGET_NR_timer_settime64 409 -#define TARGET_NR_timerfd_gettime64 410 -#define TARGET_NR_timerfd_settime64 411 -#define TARGET_NR_utimensat_time64 412 -#define TARGET_NR_pselect6_time64 413 -#define TARGET_NR_ppoll_time64 414 -#define TARGET_NR_io_pgetevents_time64 416 -#define TARGET_NR_recvmmsg_time64 417 -#define TARGET_NR_mq_timedsend_time64 418 -#define TARGET_NR_mq_timedreceive_time64 419 -#define TARGET_NR_semtimedop_time64 420 -#define TARGET_NR_rt_sigtimedwait_time64 421 -#define TARGET_NR_futex_time64 422 -#define TARGET_NR_sched_rr_get_interval_time64 423 -#define TARGET_NR_pidfd_send_signal 424 -#define TARGET_NR_io_uring_setup 425 -#define TARGET_NR_io_uring_enter 426 -#define TARGET_NR_io_uring_register 427 -#define TARGET_NR_open_tree 428 -#define TARGET_NR_move_mount 429 -#define TARGET_NR_fsopen 430 -#define TARGET_NR_fsconfig 431 -#define TARGET_NR_fsmount 432 -#define TARGET_NR_fspick 433 -#define TARGET_NR_pidfd_open 434 -#define TARGET_NR_clone3 435 - -#endif diff --git a/linux-user/microblaze/syscallhdr.sh b/linux-user/microblaze/syscallhdr.sh new file mode 100644 index 0000000000..f55dce8a62 --- /dev/null +++ b/linux-user/microblaze/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_MICROBLAZE_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" +) > "$out" From 5bcb4986384e02669418a411cac10377cf48e698 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:50 +0100 Subject: [PATCH 15/32] linux-user, arm: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/arm/tools/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Update syscall.c to manage TARGET_NR_arm_sync_file_range as it has replaced TARGET_NR_sync_file_range2 Move existing stuff from linux-user/Makefile.objs to linux-user/arm/Makefile.objs Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Reviewed-by: Richard Henderson Message-Id: <20200310103403.3284090-9-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 3 +- linux-user/arm/Makefile.objs | 8 + linux-user/arm/syscall.tbl | 451 +++++++++++++++++++++++++++++++++++ linux-user/arm/syscall_nr.h | 447 ---------------------------------- linux-user/arm/syscallhdr.sh | 31 +++ linux-user/syscall.c | 6 + 7 files changed, 499 insertions(+), 450 deletions(-) create mode 100644 linux-user/arm/Makefile.objs create mode 100644 linux-user/arm/syscall.tbl delete mode 100644 linux-user/arm/syscall_nr.h create mode 100644 linux-user/arm/syscallhdr.sh diff --git a/configure b/configure index 720bb5a96c..5ed5e37df8 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa m68k xtensa sh4 microblaze ; do +for arch in alpha hppa m68k xtensa sh4 microblaze arm ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7799,6 +7799,7 @@ case "$target_name" in ;; arm|armeb) TARGET_ARCH=arm + TARGET_SYSTBL_ABI=common,oabi bflt="yes" mttcg="yes" gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 5a26281e88..bc12e38291 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -5,11 +5,10 @@ obj-y = main.o syscall.o strace.o mmap.o signal.o \ obj-$(TARGET_HAS_BFLT) += flatload.o obj-$(TARGET_I386) += vm86.o -obj-$(TARGET_ARM) += arm/nwfpe/ -obj-$(TARGET_ARM) += arm/semihost.o obj-$(TARGET_AARCH64) += arm/semihost.o obj-$(TARGET_ALPHA) += alpha/ +obj-$(TARGET_ARM) += arm/ obj-$(TARGET_HPPA) += hppa/ obj-$(TARGET_M68K) += m68k/ obj-$(TARGET_MICROBLAZE) += microblaze/ diff --git a/linux-user/arm/Makefile.objs b/linux-user/arm/Makefile.objs new file mode 100644 index 0000000000..c7eb94dcba --- /dev/null +++ b/linux-user/arm/Makefile.objs @@ -0,0 +1,8 @@ +obj-$(TARGET_ARM) += nwfpe/ +obj-$(TARGET_ARM) += semihost.o + +generated-files-y += linux-user/arm/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/arm/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/arm/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/arm/syscall.tbl b/linux-user/arm/syscall.tbl new file mode 100644 index 0000000000..6da7dc4d79 --- /dev/null +++ b/linux-user/arm/syscall.tbl @@ -0,0 +1,451 @@ +# +# Linux system call numbers and entry vectors +# +# The format is: +# [ []] +# +# Where abi is: +# common - for system calls shared between oabi and eabi (may have compat) +# oabi - for oabi-only system calls (may have compat) +# eabi - for eabi-only system calls +# +# For each syscall number, "common" is mutually exclusive with oabi and eabi +# +0 common restart_syscall sys_restart_syscall +1 common exit sys_exit +2 common fork sys_fork +3 common read sys_read +4 common write sys_write +5 common open sys_open +6 common close sys_close +# 7 was sys_waitpid +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 common execve sys_execve +12 common chdir sys_chdir +13 oabi time sys_time32 +14 common mknod sys_mknod +15 common chmod sys_chmod +16 common lchown sys_lchown16 +# 17 was sys_break +# 18 was sys_stat +19 common lseek sys_lseek +20 common getpid sys_getpid +21 common mount sys_mount +22 oabi umount sys_oldumount +23 common setuid sys_setuid16 +24 common getuid sys_getuid16 +25 oabi stime sys_stime32 +26 common ptrace sys_ptrace +27 oabi alarm sys_alarm +# 28 was sys_fstat +29 common pause sys_pause +30 oabi utime sys_utime32 +# 31 was sys_stty +# 32 was sys_gtty +33 common access sys_access +34 common nice sys_nice +# 35 was sys_ftime +36 common sync sys_sync +37 common kill sys_kill +38 common rename sys_rename +39 common mkdir sys_mkdir +40 common rmdir sys_rmdir +41 common dup sys_dup +42 common pipe sys_pipe +43 common times sys_times +# 44 was sys_prof +45 common brk sys_brk +46 common setgid sys_setgid16 +47 common getgid sys_getgid16 +# 48 was sys_signal +49 common geteuid sys_geteuid16 +50 common getegid sys_getegid16 +51 common acct sys_acct +52 common umount2 sys_umount +# 53 was sys_lock +54 common ioctl sys_ioctl +55 common fcntl sys_fcntl +# 56 was sys_mpx +57 common setpgid sys_setpgid +# 58 was sys_ulimit +# 59 was sys_olduname +60 common umask sys_umask +61 common chroot sys_chroot +62 common ustat sys_ustat +63 common dup2 sys_dup2 +64 common getppid sys_getppid +65 common getpgrp sys_getpgrp +66 common setsid sys_setsid +67 common sigaction sys_sigaction +# 68 was sys_sgetmask +# 69 was sys_ssetmask +70 common setreuid sys_setreuid16 +71 common setregid sys_setregid16 +72 common sigsuspend sys_sigsuspend +73 common sigpending sys_sigpending +74 common sethostname sys_sethostname +75 common setrlimit sys_setrlimit +# Back compat 2GB limited rlimit +76 oabi getrlimit sys_old_getrlimit +77 common getrusage sys_getrusage +78 common gettimeofday sys_gettimeofday +79 common settimeofday sys_settimeofday +80 common getgroups sys_getgroups16 +81 common setgroups sys_setgroups16 +82 oabi select sys_old_select +83 common symlink sys_symlink +# 84 was sys_lstat +85 common readlink sys_readlink +86 common uselib sys_uselib +87 common swapon sys_swapon +88 common reboot sys_reboot +89 oabi readdir sys_old_readdir +90 oabi mmap sys_old_mmap +91 common munmap sys_munmap +92 common truncate sys_truncate +93 common ftruncate sys_ftruncate +94 common fchmod sys_fchmod +95 common fchown sys_fchown16 +96 common getpriority sys_getpriority +97 common setpriority sys_setpriority +# 98 was sys_profil +99 common statfs sys_statfs +100 common fstatfs sys_fstatfs +# 101 was sys_ioperm +102 oabi socketcall sys_socketcall sys_oabi_socketcall +103 common syslog sys_syslog +104 common setitimer sys_setitimer +105 common getitimer sys_getitimer +106 common stat sys_newstat +107 common lstat sys_newlstat +108 common fstat sys_newfstat +# 109 was sys_uname +# 110 was sys_iopl +111 common vhangup sys_vhangup +# 112 was sys_idle +# syscall to call a syscall! +113 oabi syscall sys_syscall +114 common wait4 sys_wait4 +115 common swapoff sys_swapoff +116 common sysinfo sys_sysinfo +117 oabi ipc sys_ipc sys_oabi_ipc +118 common fsync sys_fsync +119 common sigreturn sys_sigreturn_wrapper +120 common clone sys_clone +121 common setdomainname sys_setdomainname +122 common uname sys_newuname +# 123 was sys_modify_ldt +124 common adjtimex sys_adjtimex_time32 +125 common mprotect sys_mprotect +126 common sigprocmask sys_sigprocmask +# 127 was sys_create_module +128 common init_module sys_init_module +129 common delete_module sys_delete_module +# 130 was sys_get_kernel_syms +131 common quotactl sys_quotactl +132 common getpgid sys_getpgid +133 common fchdir sys_fchdir +134 common bdflush sys_bdflush +135 common sysfs sys_sysfs +136 common personality sys_personality +# 137 was sys_afs_syscall +138 common setfsuid sys_setfsuid16 +139 common setfsgid sys_setfsgid16 +140 common _llseek sys_llseek +141 common getdents sys_getdents +142 common _newselect sys_select +143 common flock sys_flock +144 common msync sys_msync +145 common readv sys_readv +146 common writev sys_writev +147 common getsid sys_getsid +148 common fdatasync sys_fdatasync +149 common _sysctl sys_sysctl +150 common mlock sys_mlock +151 common munlock sys_munlock +152 common mlockall sys_mlockall +153 common munlockall sys_munlockall +154 common sched_setparam sys_sched_setparam +155 common sched_getparam sys_sched_getparam +156 common sched_setscheduler sys_sched_setscheduler +157 common sched_getscheduler sys_sched_getscheduler +158 common sched_yield sys_sched_yield +159 common sched_get_priority_max sys_sched_get_priority_max +160 common sched_get_priority_min sys_sched_get_priority_min +161 common sched_rr_get_interval sys_sched_rr_get_interval_time32 +162 common nanosleep sys_nanosleep_time32 +163 common mremap sys_mremap +164 common setresuid sys_setresuid16 +165 common getresuid sys_getresuid16 +# 166 was sys_vm86 +# 167 was sys_query_module +168 common poll sys_poll +169 common nfsservctl +170 common setresgid sys_setresgid16 +171 common getresgid sys_getresgid16 +172 common prctl sys_prctl +173 common rt_sigreturn sys_rt_sigreturn_wrapper +174 common rt_sigaction sys_rt_sigaction +175 common rt_sigprocmask sys_rt_sigprocmask +176 common rt_sigpending sys_rt_sigpending +177 common rt_sigtimedwait sys_rt_sigtimedwait_time32 +178 common rt_sigqueueinfo sys_rt_sigqueueinfo +179 common rt_sigsuspend sys_rt_sigsuspend +180 common pread64 sys_pread64 sys_oabi_pread64 +181 common pwrite64 sys_pwrite64 sys_oabi_pwrite64 +182 common chown sys_chown16 +183 common getcwd sys_getcwd +184 common capget sys_capget +185 common capset sys_capset +186 common sigaltstack sys_sigaltstack +187 common sendfile sys_sendfile +# 188 reserved +# 189 reserved +190 common vfork sys_vfork +# SuS compliant getrlimit +191 common ugetrlimit sys_getrlimit +192 common mmap2 sys_mmap2 +193 common truncate64 sys_truncate64 sys_oabi_truncate64 +194 common ftruncate64 sys_ftruncate64 sys_oabi_ftruncate64 +195 common stat64 sys_stat64 sys_oabi_stat64 +196 common lstat64 sys_lstat64 sys_oabi_lstat64 +197 common fstat64 sys_fstat64 sys_oabi_fstat64 +198 common lchown32 sys_lchown +199 common getuid32 sys_getuid +200 common getgid32 sys_getgid +201 common geteuid32 sys_geteuid +202 common getegid32 sys_getegid +203 common setreuid32 sys_setreuid +204 common setregid32 sys_setregid +205 common getgroups32 sys_getgroups +206 common setgroups32 sys_setgroups +207 common fchown32 sys_fchown +208 common setresuid32 sys_setresuid +209 common getresuid32 sys_getresuid +210 common setresgid32 sys_setresgid +211 common getresgid32 sys_getresgid +212 common chown32 sys_chown +213 common setuid32 sys_setuid +214 common setgid32 sys_setgid +215 common setfsuid32 sys_setfsuid +216 common setfsgid32 sys_setfsgid +217 common getdents64 sys_getdents64 +218 common pivot_root sys_pivot_root +219 common mincore sys_mincore +220 common madvise sys_madvise +221 common fcntl64 sys_fcntl64 sys_oabi_fcntl64 +# 222 for tux +# 223 is unused +224 common gettid sys_gettid +225 common readahead sys_readahead sys_oabi_readahead +226 common setxattr sys_setxattr +227 common lsetxattr sys_lsetxattr +228 common fsetxattr sys_fsetxattr +229 common getxattr sys_getxattr +230 common lgetxattr sys_lgetxattr +231 common fgetxattr sys_fgetxattr +232 common listxattr sys_listxattr +233 common llistxattr sys_llistxattr +234 common flistxattr sys_flistxattr +235 common removexattr sys_removexattr +236 common lremovexattr sys_lremovexattr +237 common fremovexattr sys_fremovexattr +238 common tkill sys_tkill +239 common sendfile64 sys_sendfile64 +240 common futex sys_futex_time32 +241 common sched_setaffinity sys_sched_setaffinity +242 common sched_getaffinity sys_sched_getaffinity +243 common io_setup sys_io_setup +244 common io_destroy sys_io_destroy +245 common io_getevents sys_io_getevents_time32 +246 common io_submit sys_io_submit +247 common io_cancel sys_io_cancel +248 common exit_group sys_exit_group +249 common lookup_dcookie sys_lookup_dcookie +250 common epoll_create sys_epoll_create +251 common epoll_ctl sys_epoll_ctl sys_oabi_epoll_ctl +252 common epoll_wait sys_epoll_wait sys_oabi_epoll_wait +253 common remap_file_pages sys_remap_file_pages +# 254 for set_thread_area +# 255 for get_thread_area +256 common set_tid_address sys_set_tid_address +257 common timer_create sys_timer_create +258 common timer_settime sys_timer_settime32 +259 common timer_gettime sys_timer_gettime32 +260 common timer_getoverrun sys_timer_getoverrun +261 common timer_delete sys_timer_delete +262 common clock_settime sys_clock_settime32 +263 common clock_gettime sys_clock_gettime32 +264 common clock_getres sys_clock_getres_time32 +265 common clock_nanosleep sys_clock_nanosleep_time32 +266 common statfs64 sys_statfs64_wrapper +267 common fstatfs64 sys_fstatfs64_wrapper +268 common tgkill sys_tgkill +269 common utimes sys_utimes_time32 +270 common arm_fadvise64_64 sys_arm_fadvise64_64 +271 common pciconfig_iobase sys_pciconfig_iobase +272 common pciconfig_read sys_pciconfig_read +273 common pciconfig_write sys_pciconfig_write +274 common mq_open sys_mq_open +275 common mq_unlink sys_mq_unlink +276 common mq_timedsend sys_mq_timedsend_time32 +277 common mq_timedreceive sys_mq_timedreceive_time32 +278 common mq_notify sys_mq_notify +279 common mq_getsetattr sys_mq_getsetattr +280 common waitid sys_waitid +281 common socket sys_socket +282 common bind sys_bind sys_oabi_bind +283 common connect sys_connect sys_oabi_connect +284 common listen sys_listen +285 common accept sys_accept +286 common getsockname sys_getsockname +287 common getpeername sys_getpeername +288 common socketpair sys_socketpair +289 common send sys_send +290 common sendto sys_sendto sys_oabi_sendto +291 common recv sys_recv +292 common recvfrom sys_recvfrom +293 common shutdown sys_shutdown +294 common setsockopt sys_setsockopt +295 common getsockopt sys_getsockopt +296 common sendmsg sys_sendmsg sys_oabi_sendmsg +297 common recvmsg sys_recvmsg +298 common semop sys_semop sys_oabi_semop +299 common semget sys_semget +300 common semctl sys_old_semctl +301 common msgsnd sys_msgsnd +302 common msgrcv sys_msgrcv +303 common msgget sys_msgget +304 common msgctl sys_old_msgctl +305 common shmat sys_shmat +306 common shmdt sys_shmdt +307 common shmget sys_shmget +308 common shmctl sys_old_shmctl +309 common add_key sys_add_key +310 common request_key sys_request_key +311 common keyctl sys_keyctl +312 common semtimedop sys_semtimedop_time32 sys_oabi_semtimedop +313 common vserver +314 common ioprio_set sys_ioprio_set +315 common ioprio_get sys_ioprio_get +316 common inotify_init sys_inotify_init +317 common inotify_add_watch sys_inotify_add_watch +318 common inotify_rm_watch sys_inotify_rm_watch +319 common mbind sys_mbind +320 common get_mempolicy sys_get_mempolicy +321 common set_mempolicy sys_set_mempolicy +322 common openat sys_openat +323 common mkdirat sys_mkdirat +324 common mknodat sys_mknodat +325 common fchownat sys_fchownat +326 common futimesat sys_futimesat_time32 +327 common fstatat64 sys_fstatat64 sys_oabi_fstatat64 +328 common unlinkat sys_unlinkat +329 common renameat sys_renameat +330 common linkat sys_linkat +331 common symlinkat sys_symlinkat +332 common readlinkat sys_readlinkat +333 common fchmodat sys_fchmodat +334 common faccessat sys_faccessat +335 common pselect6 sys_pselect6_time32 +336 common ppoll sys_ppoll_time32 +337 common unshare sys_unshare +338 common set_robust_list sys_set_robust_list +339 common get_robust_list sys_get_robust_list +340 common splice sys_splice +341 common arm_sync_file_range sys_sync_file_range2 +342 common tee sys_tee +343 common vmsplice sys_vmsplice +344 common move_pages sys_move_pages +345 common getcpu sys_getcpu +346 common epoll_pwait sys_epoll_pwait +347 common kexec_load sys_kexec_load +348 common utimensat sys_utimensat_time32 +349 common signalfd sys_signalfd +350 common timerfd_create sys_timerfd_create +351 common eventfd sys_eventfd +352 common fallocate sys_fallocate +353 common timerfd_settime sys_timerfd_settime32 +354 common timerfd_gettime sys_timerfd_gettime32 +355 common signalfd4 sys_signalfd4 +356 common eventfd2 sys_eventfd2 +357 common epoll_create1 sys_epoll_create1 +358 common dup3 sys_dup3 +359 common pipe2 sys_pipe2 +360 common inotify_init1 sys_inotify_init1 +361 common preadv sys_preadv +362 common pwritev sys_pwritev +363 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo +364 common perf_event_open sys_perf_event_open +365 common recvmmsg sys_recvmmsg_time32 +366 common accept4 sys_accept4 +367 common fanotify_init sys_fanotify_init +368 common fanotify_mark sys_fanotify_mark +369 common prlimit64 sys_prlimit64 +370 common name_to_handle_at sys_name_to_handle_at +371 common open_by_handle_at sys_open_by_handle_at +372 common clock_adjtime sys_clock_adjtime32 +373 common syncfs sys_syncfs +374 common sendmmsg sys_sendmmsg +375 common setns sys_setns +376 common process_vm_readv sys_process_vm_readv +377 common process_vm_writev sys_process_vm_writev +378 common kcmp sys_kcmp +379 common finit_module sys_finit_module +380 common sched_setattr sys_sched_setattr +381 common sched_getattr sys_sched_getattr +382 common renameat2 sys_renameat2 +383 common seccomp sys_seccomp +384 common getrandom sys_getrandom +385 common memfd_create sys_memfd_create +386 common bpf sys_bpf +387 common execveat sys_execveat +388 common userfaultfd sys_userfaultfd +389 common membarrier sys_membarrier +390 common mlock2 sys_mlock2 +391 common copy_file_range sys_copy_file_range +392 common preadv2 sys_preadv2 +393 common pwritev2 sys_pwritev2 +394 common pkey_mprotect sys_pkey_mprotect +395 common pkey_alloc sys_pkey_alloc +396 common pkey_free sys_pkey_free +397 common statx sys_statx +398 common rseq sys_rseq +399 common io_pgetevents sys_io_pgetevents_time32 +400 common migrate_pages sys_migrate_pages +401 common kexec_file_load sys_kexec_file_load +# 402 is unused +403 common clock_gettime64 sys_clock_gettime +404 common clock_settime64 sys_clock_settime +405 common clock_adjtime64 sys_clock_adjtime +406 common clock_getres_time64 sys_clock_getres +407 common clock_nanosleep_time64 sys_clock_nanosleep +408 common timer_gettime64 sys_timer_gettime +409 common timer_settime64 sys_timer_settime +410 common timerfd_gettime64 sys_timerfd_gettime +411 common timerfd_settime64 sys_timerfd_settime +412 common utimensat_time64 sys_utimensat +413 common pselect6_time64 sys_pselect6 +414 common ppoll_time64 sys_ppoll +416 common io_pgetevents_time64 sys_io_pgetevents +417 common recvmmsg_time64 sys_recvmmsg +418 common mq_timedsend_time64 sys_mq_timedsend +419 common mq_timedreceive_time64 sys_mq_timedreceive +420 common semtimedop_time64 sys_semtimedop +421 common rt_sigtimedwait_time64 sys_rt_sigtimedwait +422 common futex_time64 sys_futex +423 common sched_rr_get_interval_time64 sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +435 common clone3 sys_clone3 diff --git a/linux-user/arm/syscall_nr.h b/linux-user/arm/syscall_nr.h deleted file mode 100644 index 6db9235f2b..0000000000 --- a/linux-user/arm/syscall_nr.h +++ /dev/null @@ -1,447 +0,0 @@ -/* - * This file contains the system call numbers. - */ - -#ifndef LINUX_USER_ARM_SYSCALL_NR_H -#define LINUX_USER_ARM_SYSCALL_NR_H - -#define TARGET_NR_restart_syscall ( 0) -#define TARGET_NR_exit ( 1) -#define TARGET_NR_fork ( 2) -#define TARGET_NR_read ( 3) -#define TARGET_NR_write ( 4) -#define TARGET_NR_open ( 5) -#define TARGET_NR_close ( 6) -#define TARGET_NR_waitpid ( 7) /* removed */ -#define TARGET_NR_creat ( 8) -#define TARGET_NR_link ( 9) -#define TARGET_NR_unlink ( 10) -#define TARGET_NR_execve ( 11) -#define TARGET_NR_chdir ( 12) -#define TARGET_NR_time ( 13) -#define TARGET_NR_mknod ( 14) -#define TARGET_NR_chmod ( 15) -#define TARGET_NR_lchown ( 16) -#define TARGET_NR_break ( 17) /* removed */ - /* 18 was sys_stat */ -#define TARGET_NR_lseek ( 19) -#define TARGET_NR_getpid ( 20) -#define TARGET_NR_mount ( 21) -#define TARGET_NR_umount ( 22) -#define TARGET_NR_setuid ( 23) -#define TARGET_NR_getuid ( 24) -#define TARGET_NR_stime ( 25) -#define TARGET_NR_ptrace ( 26) -#define TARGET_NR_alarm ( 27) - -#define TARGET_NR_pause ( 29) -#define TARGET_NR_utime ( 30) -#define TARGET_NR_stty ( 31) /* removed */ -#define TARGET_NR_gtty ( 32) /* removed */ -#define TARGET_NR_access ( 33) -#define TARGET_NR_nice ( 34) -#define TARGET_NR_ftime ( 35) /* removed */ -#define TARGET_NR_sync ( 36) -#define TARGET_NR_kill ( 37) -#define TARGET_NR_rename ( 38) -#define TARGET_NR_mkdir ( 39) -#define TARGET_NR_rmdir ( 40) -#define TARGET_NR_dup ( 41) -#define TARGET_NR_pipe ( 42) -#define TARGET_NR_times ( 43) -#define TARGET_NR_prof ( 44) /* removed */ -#define TARGET_NR_brk ( 45) -#define TARGET_NR_setgid ( 46) -#define TARGET_NR_getgid ( 47) -#define TARGET_NR_signal ( 48) /* removed */ -#define TARGET_NR_geteuid ( 49) -#define TARGET_NR_getegid ( 50) -#define TARGET_NR_acct ( 51) -#define TARGET_NR_umount2 ( 52) -#define TARGET_NR_lock ( 53) /* removed */ -#define TARGET_NR_ioctl ( 54) -#define TARGET_NR_fcntl ( 55) -#define TARGET_NR_mpx ( 56) /* removed */ -#define TARGET_NR_setpgid ( 57) -#define TARGET_NR_ulimit ( 58) /* removed */ - /* 59 was sys_olduname */ -#define TARGET_NR_umask ( 60) -#define TARGET_NR_chroot ( 61) -#define TARGET_NR_ustat ( 62) -#define TARGET_NR_dup2 ( 63) -#define TARGET_NR_getppid ( 64) -#define TARGET_NR_getpgrp ( 65) -#define TARGET_NR_setsid ( 66) -#define TARGET_NR_sigaction ( 67) -#define TARGET_NR_sgetmask ( 68) /* removed */ -#define TARGET_NR_ssetmask ( 69) /* removed */ -#define TARGET_NR_setreuid ( 70) -#define TARGET_NR_setregid ( 71) -#define TARGET_NR_sigsuspend ( 72) -#define TARGET_NR_sigpending ( 73) -#define TARGET_NR_sethostname ( 74) -#define TARGET_NR_setrlimit ( 75) -#define TARGET_NR_getrlimit ( 76) /* Back compat 2GB limited rlimit */ -#define TARGET_NR_getrusage ( 77) -#define TARGET_NR_gettimeofday ( 78) -#define TARGET_NR_settimeofday ( 79) -#define TARGET_NR_getgroups ( 80) -#define TARGET_NR_setgroups ( 81) -#define TARGET_NR_select ( 82) -#define TARGET_NR_symlink ( 83) - /* 84 was sys_lstat */ -#define TARGET_NR_readlink ( 85) -#define TARGET_NR_uselib ( 86) -#define TARGET_NR_swapon ( 87) -#define TARGET_NR_reboot ( 88) -#define TARGET_NR_readdir ( 89) -#define TARGET_NR_mmap ( 90) -#define TARGET_NR_munmap ( 91) -#define TARGET_NR_truncate ( 92) -#define TARGET_NR_ftruncate ( 93) -#define TARGET_NR_fchmod ( 94) -#define TARGET_NR_fchown ( 95) -#define TARGET_NR_getpriority ( 96) -#define TARGET_NR_setpriority ( 97) -#define TARGET_NR_profil ( 98) /* removed */ -#define TARGET_NR_statfs ( 99) -#define TARGET_NR_fstatfs (100) -#define TARGET_NR_ioperm (101) -#define TARGET_NR_socketcall (102) -#define TARGET_NR_syslog (103) -#define TARGET_NR_setitimer (104) -#define TARGET_NR_getitimer (105) -#define TARGET_NR_stat (106) -#define TARGET_NR_lstat (107) -#define TARGET_NR_fstat (108) - /* 109 was sys_uname */ - /* 110 was sys_iopl */ -#define TARGET_NR_vhangup (111) -#define TARGET_NR_idle (112) -#define TARGET_NR_syscall (113) /* syscall to call a syscall! */ -#define TARGET_NR_wait4 (114) -#define TARGET_NR_swapoff (115) -#define TARGET_NR_sysinfo (116) -#define TARGET_NR_ipc (117) -#define TARGET_NR_fsync (118) -#define TARGET_NR_sigreturn (119) -#define TARGET_NR_clone (120) -#define TARGET_NR_setdomainname (121) -#define TARGET_NR_uname (122) -#define TARGET_NR_modify_ldt (123) -#define TARGET_NR_adjtimex (124) -#define TARGET_NR_mprotect (125) -#define TARGET_NR_sigprocmask (126) -#define TARGET_NR_create_module (127) /* removed */ -#define TARGET_NR_init_module (128) -#define TARGET_NR_delete_module (129) -#define TARGET_NR_get_kernel_syms (130) /* removed */ -#define TARGET_NR_quotactl (131) -#define TARGET_NR_getpgid (132) -#define TARGET_NR_fchdir (133) -#define TARGET_NR_bdflush (134) -#define TARGET_NR_sysfs (135) -#define TARGET_NR_personality (136) -#define TARGET_NR_afs_syscall (137) /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid (138) -#define TARGET_NR_setfsgid (139) -#define TARGET_NR__llseek (140) -#define TARGET_NR_getdents (141) -#define TARGET_NR__newselect (142) -#define TARGET_NR_flock (143) -#define TARGET_NR_msync (144) -#define TARGET_NR_readv (145) -#define TARGET_NR_writev (146) -#define TARGET_NR_getsid (147) -#define TARGET_NR_fdatasync (148) -#define TARGET_NR__sysctl (149) -#define TARGET_NR_mlock (150) -#define TARGET_NR_munlock (151) -#define TARGET_NR_mlockall (152) -#define TARGET_NR_munlockall (153) -#define TARGET_NR_sched_setparam (154) -#define TARGET_NR_sched_getparam (155) -#define TARGET_NR_sched_setscheduler (156) -#define TARGET_NR_sched_getscheduler (157) -#define TARGET_NR_sched_yield (158) -#define TARGET_NR_sched_get_priority_max (159) -#define TARGET_NR_sched_get_priority_min (160) -#define TARGET_NR_sched_rr_get_interval (161) -#define TARGET_NR_nanosleep (162) -#define TARGET_NR_mremap (163) -#define TARGET_NR_setresuid (164) -#define TARGET_NR_getresuid (165) -#define TARGET_NR_vm86 (166) /* removed */ -#define TARGET_NR_query_module (167) /* removed */ -#define TARGET_NR_poll (168) -#define TARGET_NR_nfsservctl (169) -#define TARGET_NR_setresgid (170) -#define TARGET_NR_getresgid (171) -#define TARGET_NR_prctl (172) -#define TARGET_NR_rt_sigreturn (173) -#define TARGET_NR_rt_sigaction (174) -#define TARGET_NR_rt_sigprocmask (175) -#define TARGET_NR_rt_sigpending (176) -#define TARGET_NR_rt_sigtimedwait (177) -#define TARGET_NR_rt_sigqueueinfo (178) -#define TARGET_NR_rt_sigsuspend (179) -#define TARGET_NR_pread64 (180) -#define TARGET_NR_pwrite64 (181) -#define TARGET_NR_chown (182) -#define TARGET_NR_getcwd (183) -#define TARGET_NR_capget (184) -#define TARGET_NR_capset (185) -#define TARGET_NR_sigaltstack (186) -#define TARGET_NR_sendfile (187) - /* 188 reserved */ - /* 189 reserved */ -#define TARGET_NR_vfork (190) -#define TARGET_NR_ugetrlimit (191) /* SuS compliant getrlimit */ -#define TARGET_NR_mmap2 (192) -#define TARGET_NR_truncate64 (193) -#define TARGET_NR_ftruncate64 (194) -#define TARGET_NR_stat64 (195) -#define TARGET_NR_lstat64 (196) -#define TARGET_NR_fstat64 (197) -#define TARGET_NR_lchown32 (198) -#define TARGET_NR_getuid32 (199) -#define TARGET_NR_getgid32 (200) -#define TARGET_NR_geteuid32 (201) -#define TARGET_NR_getegid32 (202) -#define TARGET_NR_setreuid32 (203) -#define TARGET_NR_setregid32 (204) -#define TARGET_NR_getgroups32 (205) -#define TARGET_NR_setgroups32 (206) -#define TARGET_NR_fchown32 (207) -#define TARGET_NR_setresuid32 (208) -#define TARGET_NR_getresuid32 (209) -#define TARGET_NR_setresgid32 (210) -#define TARGET_NR_getresgid32 (211) -#define TARGET_NR_chown32 (212) -#define TARGET_NR_setuid32 (213) -#define TARGET_NR_setgid32 (214) -#define TARGET_NR_setfsuid32 (215) -#define TARGET_NR_setfsgid32 (216) -#define TARGET_NR_getdents64 (217) -#define TARGET_NR_pivot_root (218) -#define TARGET_NR_mincore (219) -#define TARGET_NR_madvise (220) -#define TARGET_NR_fcntl64 (221) - /* 222 for tux */ - /* 223 is unused */ -#define TARGET_NR_gettid (224) -#define TARGET_NR_readahead (225) -#define TARGET_NR_setxattr (226) -#define TARGET_NR_lsetxattr (227) -#define TARGET_NR_fsetxattr (228) -#define TARGET_NR_getxattr (229) -#define TARGET_NR_lgetxattr (230) -#define TARGET_NR_fgetxattr (231) -#define TARGET_NR_listxattr (232) -#define TARGET_NR_llistxattr (233) -#define TARGET_NR_flistxattr (234) -#define TARGET_NR_removexattr (235) -#define TARGET_NR_lremovexattr (236) -#define TARGET_NR_fremovexattr (237) -#define TARGET_NR_tkill (238) -#define TARGET_NR_sendfile64 (239) -#define TARGET_NR_futex (240) -#define TARGET_NR_sched_setaffinity (241) -#define TARGET_NR_sched_getaffinity (242) -#define TARGET_NR_io_setup (243) -#define TARGET_NR_io_destroy (244) -#define TARGET_NR_io_getevents (245) -#define TARGET_NR_io_submit (246) -#define TARGET_NR_io_cancel (247) -#define TARGET_NR_exit_group (248) -#define TARGET_NR_lookup_dcookie (249) -#define TARGET_NR_epoll_create (250) -#define TARGET_NR_epoll_ctl (251) -#define TARGET_NR_epoll_wait (252) -#define TARGET_NR_remap_file_pages (253) - /* 254 for set_thread_area */ - /* 255 for get_thread_area */ - /* 256 for set_tid_address */ -#define TARGET_NR_set_tid_address 256 -#define TARGET_NR_timer_create 257 -#define TARGET_NR_timer_settime 258 -#define TARGET_NR_timer_gettime 259 -#define TARGET_NR_timer_getoverrun 260 -#define TARGET_NR_timer_delete 261 -#define TARGET_NR_clock_settime 262 -#define TARGET_NR_clock_gettime 263 -#define TARGET_NR_clock_getres 264 -#define TARGET_NR_clock_nanosleep 265 -#define TARGET_NR_statfs64 266 -#define TARGET_NR_fstatfs64 267 -#define TARGET_NR_tgkill 268 -#define TARGET_NR_utimes 269 -#define TARGET_NR_arm_fadvise64_64 270 -#define TARGET_NR_pciconfig_iobase 271 -#define TARGET_NR_pciconfig_read 272 -#define TARGET_NR_pciconfig_write 273 -#define TARGET_NR_mq_open 274 -#define TARGET_NR_mq_unlink 275 -#define TARGET_NR_mq_timedsend 276 -#define TARGET_NR_mq_timedreceive 277 -#define TARGET_NR_mq_notify 278 -#define TARGET_NR_mq_getsetattr 279 -#define TARGET_NR_waitid 280 -#define TARGET_NR_socket 281 -#define TARGET_NR_bind 282 -#define TARGET_NR_connect 283 -#define TARGET_NR_listen 284 -#define TARGET_NR_accept 285 -#define TARGET_NR_getsockname 286 -#define TARGET_NR_getpeername 287 -#define TARGET_NR_socketpair 288 -#define TARGET_NR_send 289 -#define TARGET_NR_sendto 290 -#define TARGET_NR_recv 291 -#define TARGET_NR_recvfrom 292 -#define TARGET_NR_shutdown 293 -#define TARGET_NR_setsockopt 294 -#define TARGET_NR_getsockopt 295 -#define TARGET_NR_sendmsg 296 -#define TARGET_NR_recvmsg 297 -#define TARGET_NR_semop 298 -#define TARGET_NR_semget 299 -#define TARGET_NR_semctl 300 -#define TARGET_NR_msgsnd 301 -#define TARGET_NR_msgrcv 302 -#define TARGET_NR_msgget 303 -#define TARGET_NR_msgctl 304 -#define TARGET_NR_shmat 305 -#define TARGET_NR_shmdt 306 -#define TARGET_NR_shmget 307 -#define TARGET_NR_shmctl 308 -#define TARGET_NR_add_key 309 -#define TARGET_NR_request_key 310 -#define TARGET_NR_keyctl 311 -#define TARGET_NR_semtimedop 312 -#define TARGET_NR_vserver 313 -#define TARGET_NR_ioprio_set 314 -#define TARGET_NR_ioprio_get 315 -#define TARGET_NR_inotify_init 316 -#define TARGET_NR_inotify_add_watch 317 -#define TARGET_NR_inotify_rm_watch 318 -#define TARGET_NR_mbind 319 -#define TARGET_NR_get_mempolicy 320 -#define TARGET_NR_set_mempolicy 321 -#define TARGET_NR_openat (322) -#define TARGET_NR_mkdirat (323) -#define TARGET_NR_mknodat (324) -#define TARGET_NR_fchownat (325) -#define TARGET_NR_futimesat (326) -#define TARGET_NR_fstatat64 (327) -#define TARGET_NR_unlinkat (328) -#define TARGET_NR_renameat (329) -#define TARGET_NR_linkat (330) -#define TARGET_NR_symlinkat (331) -#define TARGET_NR_readlinkat (332) -#define TARGET_NR_fchmodat (333) -#define TARGET_NR_faccessat (334) -#define TARGET_NR_pselect6 (335) -#define TARGET_NR_ppoll (336) -#define TARGET_NR_unshare (337) -#define TARGET_NR_set_robust_list (338) -#define TARGET_NR_get_robust_list (339) -#define TARGET_NR_splice (340) -#define TARGET_NR_arm_sync_file_range (341) -#define TARGET_NR_sync_file_range2 TARGET_NR_arm_sync_file_range -#define TARGET_NR_tee (342) -#define TARGET_NR_vmsplice (343) -#define TARGET_NR_move_pages (344) -#define TARGET_NR_getcpu (345) -#define TARGET_NR_epoll_pwait (346) -#define TARGET_NR_kexec_load (347) -#define TARGET_NR_utimensat (348) -#define TARGET_NR_signalfd (349) -#define TARGET_NR_timerfd_create (350) -#define TARGET_NR_eventfd (351) -#define TARGET_NR_fallocate (352) -#define TARGET_NR_timerfd_settime (353) -#define TARGET_NR_timerfd_gettime (354) -#define TARGET_NR_signalfd4 (355) -#define TARGET_NR_eventfd2 (356) -#define TARGET_NR_epoll_create1 (357) -#define TARGET_NR_dup3 (358) -#define TARGET_NR_pipe2 (359) -#define TARGET_NR_inotify_init1 (360) -#define TARGET_NR_preadv (361) -#define TARGET_NR_pwritev (362) -#define TARGET_NR_rt_tgsigqueueinfo (363) -#define TARGET_NR_perf_event_open (364) -#define TARGET_NR_recvmmsg (365) -#define TARGET_NR_accept4 (366) -#define TARGET_NR_fanotify_init (367) -#define TARGET_NR_fanotify_mark (368) -#define TARGET_NR_prlimit64 (369) -#define TARGET_NR_name_to_handle_at (370) -#define TARGET_NR_open_by_handle_at (371) -#define TARGET_NR_clock_adjtime (372) -#define TARGET_NR_syncfs (373) -#define TARGET_NR_sendmmsg (374) -#define TARGET_NR_setns (375) -#define TARGET_NR_process_vm_readv (376) -#define TARGET_NR_process_vm_writev (377) -#define TARGET_NR_kcmp (378) -#define TARGET_NR_finit_module (379) - -#define TARGET_NR_sched_setattr (380) -#define TARGET_NR_sched_getattr (381) -#define TARGET_NR_renameat2 (382) -#define TARGET_NR_seccomp (383) -#define TARGET_NR_getrandom (384) -#define TARGET_NR_memfd_create (385) -#define TARGET_NR_bpf (386) -#define TARGET_NR_execveat (387) -#define TARGET_NR_userfaultfd (388) -#define TARGET_NR_membarrier (389) -#define TARGET_NR_mlock2 (390) -#define TARGET_NR_copy_file_range (391) -#define TARGET_NR_preadv2 (392) -#define TARGET_NR_pwritev2 (393) -#define TARGET_NR_pkey_mprotect (394) -#define TARGET_NR_pkey_alloc (395) -#define TARGET_NR_pkey_free (396) -#define TARGET_NR_statx (397) -#define TARGET_NR_rseq (398) -#define TARGET_NR_io_pgetevents (399) -#define TARGET_NR_migrate_pages (400) -#define TARGET_NR_kexec_file_load (401) -/* 402 is unused */ -#define TARGET_NR_clock_gettime64 (403) -#define TARGET_NR_clock_settime64 (404) -#define TARGET_NR_clock_adjtime64 (405) -#define TARGET_NR_clock_getres_time64 (406) -#define TARGET_NR_clock_nanosleep_time64 (407) -#define TARGET_NR_timer_gettime64 (408) -#define TARGET_NR_timer_settime64 (409) -#define TARGET_NR_timerfd_gettime64 (410) -#define TARGET_NR_timerfd_settime64 (411) -#define TARGET_NR_utimensat_time64 (412) -#define TARGET_NR_pselect6_time64 (413) -#define TARGET_NR_ppoll_time64 (414) -#define TARGET_NR_io_pgetevents_time64 (416) -#define TARGET_NR_recvmmsg_time64 (417) -#define TARGET_NR_mq_timedsend_time64 (418) -#define TARGET_NR_mq_timedreceive_time64 (419) -#define TARGET_NR_semtimedop_time64 (420) -#define TARGET_NR_rt_sigtimedwait_time64 (421) -#define TARGET_NR_futex_time64 (422) -#define TARGET_NR_sched_rr_get_interval_time64 (423) -#define TARGET_NR_pidfd_send_signal (424) -#define TARGET_NR_io_uring_setup (425) -#define TARGET_NR_io_uring_enter (426) -#define TARGET_NR_io_uring_register (427) -#define TARGET_NR_open_tree (428) -#define TARGET_NR_move_mount (429) -#define TARGET_NR_fsopen (430) -#define TARGET_NR_fsconfig (431) -#define TARGET_NR_fsmount (432) -#define TARGET_NR_fspick (433) -#define TARGET_NR_pidfd_open (434) -#define TARGET_NR_clone3 (435) - -#endif diff --git a/linux-user/arm/syscallhdr.sh b/linux-user/arm/syscallhdr.sh new file mode 100644 index 0000000000..4c952b2cfb --- /dev/null +++ b/linux-user/arm/syscallhdr.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_ARM_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +if echo $out | grep -q uapi; then + fileguard="_UAPI$fileguard" +fi +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + echo "#ifndef ${fileguard}" + echo "#define ${fileguard} 1" + echo "" + + while read nr abi name entry ; do + if [ -z "$offset" ]; then + echo "#define TARGET_NR_${prefix}${name} $nr" + else + echo "#define TARGET_NR_${prefix}${name} ($offset + $nr)" + fi + done + + echo "" + echo "#endif /* ${fileguard} */" +) > "$out" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e55a477c34..61078342f7 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11830,8 +11830,14 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, #endif return ret; #endif +#if defined(TARGET_NR_sync_file_range2) || \ + defined(TARGET_NR_arm_sync_file_range) #if defined(TARGET_NR_sync_file_range2) case TARGET_NR_sync_file_range2: +#endif +#if defined(TARGET_NR_arm_sync_file_range) + case TARGET_NR_arm_sync_file_range: +#endif /* This is like sync_file_range but the arguments are reordered */ #if TARGET_ABI_BITS == 32 ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4), From 76a691f1af65f64d070ace531adef01fe187e29a Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:51 +0100 Subject: [PATCH 16/32] linux-user, ppc: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/ppc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h and to not generate the entry if entry point is sys_ni_syscall. Fix ppc/signal.c to define do_sigreturn() for TARGET_ABI32. Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-10-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 6 +- linux-user/Makefile.objs | 2 + linux-user/ppc/Makefile.objs | 6 + linux-user/ppc/signal.c | 2 +- linux-user/ppc/syscall.tbl | 519 +++++++++++++++++++++++++++++++++++ linux-user/ppc/syscall_nr.h | 402 --------------------------- linux-user/ppc/syscallhdr.sh | 34 +++ 7 files changed, 567 insertions(+), 404 deletions(-) create mode 100644 linux-user/ppc/Makefile.objs create mode 100644 linux-user/ppc/syscall.tbl delete mode 100644 linux-user/ppc/syscall_nr.h create mode 100644 linux-user/ppc/syscallhdr.sh diff --git a/configure b/configure index 5ed5e37df8..f2500823ba 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa m68k xtensa sh4 microblaze arm ; do +for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7858,10 +7858,12 @@ case "$target_name" in ;; ppc) gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" + TARGET_SYSTBL_ABI=common,nospu,32 ;; ppc64) TARGET_BASE_ARCH=ppc TARGET_ABI_DIR=ppc + TARGET_SYSTBL_ABI=common,nospu,64 mttcg=yes gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml" ;; @@ -7869,6 +7871,7 @@ case "$target_name" in TARGET_ARCH=ppc64 TARGET_BASE_ARCH=ppc TARGET_ABI_DIR=ppc + TARGET_SYSTBL_ABI=common,nospu,64 mttcg=yes gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml" ;; @@ -7876,6 +7879,7 @@ case "$target_name" in TARGET_ARCH=ppc64 TARGET_BASE_ARCH=ppc TARGET_ABI_DIR=ppc + TARGET_SYSTBL_ABI=common,nospu,32 echo "TARGET_ABI32=y" >> $config_target_mak gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml" ;; diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index bc12e38291..8b00dad687 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -12,5 +12,7 @@ obj-$(TARGET_ARM) += arm/ obj-$(TARGET_HPPA) += hppa/ obj-$(TARGET_M68K) += m68k/ obj-$(TARGET_MICROBLAZE) += microblaze/ +obj-$(TARGET_PPC) += ppc/ +obj-$(TARGET_PPC64) += ppc/ obj-$(TARGET_SH4) += sh4/ obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/ppc/Makefile.objs b/linux-user/ppc/Makefile.objs new file mode 100644 index 0000000000..be92e67eb1 --- /dev/null +++ b/linux-user/ppc/Makefile.objs @@ -0,0 +1,6 @@ +generated-files-y += linux-user/$(TARGET_ABI_DIR)/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscallhdr.sh + +%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index 5b82af6cb6..0c4e7ba54c 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -588,7 +588,7 @@ sigsegv: } -#if !defined(TARGET_PPC64) +#if !defined(TARGET_PPC64) || defined(TARGET_ABI32) long do_sigreturn(CPUPPCState *env) { struct target_sigcontext *sc = NULL; diff --git a/linux-user/ppc/syscall.tbl b/linux-user/ppc/syscall.tbl new file mode 100644 index 0000000000..43f736ed47 --- /dev/null +++ b/linux-user/ppc/syscall.tbl @@ -0,0 +1,519 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for powerpc +# +# The format is: +# +# +# The can be common, spu, nospu, 64, or 32 for this file. +# +0 nospu restart_syscall sys_restart_syscall +1 nospu exit sys_exit +2 nospu fork ppc_fork +3 common read sys_read +4 common write sys_write +5 common open sys_open compat_sys_open +6 common close sys_close +7 common waitpid sys_waitpid +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 nospu execve sys_execve compat_sys_execve +12 common chdir sys_chdir +13 32 time sys_time32 +13 64 time sys_time +13 spu time sys_time +14 common mknod sys_mknod +15 common chmod sys_chmod +16 common lchown sys_lchown +17 common break sys_ni_syscall +18 32 oldstat sys_stat sys_ni_syscall +18 64 oldstat sys_ni_syscall +18 spu oldstat sys_ni_syscall +19 common lseek sys_lseek compat_sys_lseek +20 common getpid sys_getpid +21 nospu mount sys_mount compat_sys_mount +22 32 umount sys_oldumount +22 64 umount sys_ni_syscall +22 spu umount sys_ni_syscall +23 common setuid sys_setuid +24 common getuid sys_getuid +25 32 stime sys_stime32 +25 64 stime sys_stime +25 spu stime sys_stime +26 nospu ptrace sys_ptrace compat_sys_ptrace +27 common alarm sys_alarm +28 32 oldfstat sys_fstat sys_ni_syscall +28 64 oldfstat sys_ni_syscall +28 spu oldfstat sys_ni_syscall +29 nospu pause sys_pause +30 32 utime sys_utime32 +30 64 utime sys_utime +31 common stty sys_ni_syscall +32 common gtty sys_ni_syscall +33 common access sys_access +34 common nice sys_nice +35 common ftime sys_ni_syscall +36 common sync sys_sync +37 common kill sys_kill +38 common rename sys_rename +39 common mkdir sys_mkdir +40 common rmdir sys_rmdir +41 common dup sys_dup +42 common pipe sys_pipe +43 common times sys_times compat_sys_times +44 common prof sys_ni_syscall +45 common brk sys_brk +46 common setgid sys_setgid +47 common getgid sys_getgid +48 nospu signal sys_signal +49 common geteuid sys_geteuid +50 common getegid sys_getegid +51 nospu acct sys_acct +52 nospu umount2 sys_umount +53 common lock sys_ni_syscall +54 common ioctl sys_ioctl compat_sys_ioctl +55 common fcntl sys_fcntl compat_sys_fcntl +56 common mpx sys_ni_syscall +57 common setpgid sys_setpgid +58 common ulimit sys_ni_syscall +59 32 oldolduname sys_olduname +59 64 oldolduname sys_ni_syscall +59 spu oldolduname sys_ni_syscall +60 common umask sys_umask +61 common chroot sys_chroot +62 nospu ustat sys_ustat compat_sys_ustat +63 common dup2 sys_dup2 +64 common getppid sys_getppid +65 common getpgrp sys_getpgrp +66 common setsid sys_setsid +67 32 sigaction sys_sigaction compat_sys_sigaction +67 64 sigaction sys_ni_syscall +67 spu sigaction sys_ni_syscall +68 common sgetmask sys_sgetmask +69 common ssetmask sys_ssetmask +70 common setreuid sys_setreuid +71 common setregid sys_setregid +72 32 sigsuspend sys_sigsuspend +72 64 sigsuspend sys_ni_syscall +72 spu sigsuspend sys_ni_syscall +73 32 sigpending sys_sigpending compat_sys_sigpending +73 64 sigpending sys_ni_syscall +73 spu sigpending sys_ni_syscall +74 common sethostname sys_sethostname +75 common setrlimit sys_setrlimit compat_sys_setrlimit +76 32 getrlimit sys_old_getrlimit compat_sys_old_getrlimit +76 64 getrlimit sys_ni_syscall +76 spu getrlimit sys_ni_syscall +77 common getrusage sys_getrusage compat_sys_getrusage +78 common gettimeofday sys_gettimeofday compat_sys_gettimeofday +79 common settimeofday sys_settimeofday compat_sys_settimeofday +80 common getgroups sys_getgroups +81 common setgroups sys_setgroups +82 32 select ppc_select sys_ni_syscall +82 64 select sys_ni_syscall +82 spu select sys_ni_syscall +83 common symlink sys_symlink +84 32 oldlstat sys_lstat sys_ni_syscall +84 64 oldlstat sys_ni_syscall +84 spu oldlstat sys_ni_syscall +85 common readlink sys_readlink +86 nospu uselib sys_uselib +87 nospu swapon sys_swapon +88 nospu reboot sys_reboot +89 32 readdir sys_old_readdir compat_sys_old_readdir +89 64 readdir sys_ni_syscall +89 spu readdir sys_ni_syscall +90 common mmap sys_mmap +91 common munmap sys_munmap +92 common truncate sys_truncate compat_sys_truncate +93 common ftruncate sys_ftruncate compat_sys_ftruncate +94 common fchmod sys_fchmod +95 common fchown sys_fchown +96 common getpriority sys_getpriority +97 common setpriority sys_setpriority +98 common profil sys_ni_syscall +99 nospu statfs sys_statfs compat_sys_statfs +100 nospu fstatfs sys_fstatfs compat_sys_fstatfs +101 common ioperm sys_ni_syscall +102 common socketcall sys_socketcall compat_sys_socketcall +103 common syslog sys_syslog +104 common setitimer sys_setitimer compat_sys_setitimer +105 common getitimer sys_getitimer compat_sys_getitimer +106 common stat sys_newstat compat_sys_newstat +107 common lstat sys_newlstat compat_sys_newlstat +108 common fstat sys_newfstat compat_sys_newfstat +109 32 olduname sys_uname +109 64 olduname sys_ni_syscall +109 spu olduname sys_ni_syscall +110 common iopl sys_ni_syscall +111 common vhangup sys_vhangup +112 common idle sys_ni_syscall +113 common vm86 sys_ni_syscall +114 common wait4 sys_wait4 compat_sys_wait4 +115 nospu swapoff sys_swapoff +116 common sysinfo sys_sysinfo compat_sys_sysinfo +117 nospu ipc sys_ipc compat_sys_ipc +118 common fsync sys_fsync +119 32 sigreturn sys_sigreturn compat_sys_sigreturn +119 64 sigreturn sys_ni_syscall +119 spu sigreturn sys_ni_syscall +120 nospu clone ppc_clone +121 common setdomainname sys_setdomainname +122 common uname sys_newuname +123 common modify_ldt sys_ni_syscall +124 32 adjtimex sys_adjtimex_time32 +124 64 adjtimex sys_adjtimex +124 spu adjtimex sys_adjtimex +125 common mprotect sys_mprotect +126 32 sigprocmask sys_sigprocmask compat_sys_sigprocmask +126 64 sigprocmask sys_ni_syscall +126 spu sigprocmask sys_ni_syscall +127 common create_module sys_ni_syscall +128 nospu init_module sys_init_module +129 nospu delete_module sys_delete_module +130 common get_kernel_syms sys_ni_syscall +131 nospu quotactl sys_quotactl +132 common getpgid sys_getpgid +133 common fchdir sys_fchdir +134 common bdflush sys_bdflush +135 common sysfs sys_sysfs +136 32 personality sys_personality ppc64_personality +136 64 personality ppc64_personality +136 spu personality ppc64_personality +137 common afs_syscall sys_ni_syscall +138 common setfsuid sys_setfsuid +139 common setfsgid sys_setfsgid +140 common _llseek sys_llseek +141 common getdents sys_getdents compat_sys_getdents +142 common _newselect sys_select compat_sys_select +143 common flock sys_flock +144 common msync sys_msync +145 common readv sys_readv compat_sys_readv +146 common writev sys_writev compat_sys_writev +147 common getsid sys_getsid +148 common fdatasync sys_fdatasync +149 nospu _sysctl sys_sysctl compat_sys_sysctl +150 common mlock sys_mlock +151 common munlock sys_munlock +152 common mlockall sys_mlockall +153 common munlockall sys_munlockall +154 common sched_setparam sys_sched_setparam +155 common sched_getparam sys_sched_getparam +156 common sched_setscheduler sys_sched_setscheduler +157 common sched_getscheduler sys_sched_getscheduler +158 common sched_yield sys_sched_yield +159 common sched_get_priority_max sys_sched_get_priority_max +160 common sched_get_priority_min sys_sched_get_priority_min +161 32 sched_rr_get_interval sys_sched_rr_get_interval_time32 +161 64 sched_rr_get_interval sys_sched_rr_get_interval +161 spu sched_rr_get_interval sys_sched_rr_get_interval +162 32 nanosleep sys_nanosleep_time32 +162 64 nanosleep sys_nanosleep +162 spu nanosleep sys_nanosleep +163 common mremap sys_mremap +164 common setresuid sys_setresuid +165 common getresuid sys_getresuid +166 common query_module sys_ni_syscall +167 common poll sys_poll +168 common nfsservctl sys_ni_syscall +169 common setresgid sys_setresgid +170 common getresgid sys_getresgid +171 common prctl sys_prctl +172 nospu rt_sigreturn sys_rt_sigreturn compat_sys_rt_sigreturn +173 nospu rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction +174 nospu rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask +175 nospu rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending +176 32 rt_sigtimedwait sys_rt_sigtimedwait_time32 compat_sys_rt_sigtimedwait_time32 +176 64 rt_sigtimedwait sys_rt_sigtimedwait +177 nospu rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo +178 nospu rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend +179 common pread64 sys_pread64 compat_sys_pread64 +180 common pwrite64 sys_pwrite64 compat_sys_pwrite64 +181 common chown sys_chown +182 common getcwd sys_getcwd +183 common capget sys_capget +184 common capset sys_capset +185 nospu sigaltstack sys_sigaltstack compat_sys_sigaltstack +186 32 sendfile sys_sendfile compat_sys_sendfile +186 64 sendfile sys_sendfile64 +186 spu sendfile sys_sendfile64 +187 common getpmsg sys_ni_syscall +188 common putpmsg sys_ni_syscall +189 nospu vfork ppc_vfork +190 common ugetrlimit sys_getrlimit compat_sys_getrlimit +191 common readahead sys_readahead compat_sys_readahead +192 32 mmap2 sys_mmap2 compat_sys_mmap2 +193 32 truncate64 sys_truncate64 compat_sys_truncate64 +194 32 ftruncate64 sys_ftruncate64 compat_sys_ftruncate64 +195 32 stat64 sys_stat64 +196 32 lstat64 sys_lstat64 +197 32 fstat64 sys_fstat64 +198 nospu pciconfig_read sys_pciconfig_read +199 nospu pciconfig_write sys_pciconfig_write +200 nospu pciconfig_iobase sys_pciconfig_iobase +201 common multiplexer sys_ni_syscall +202 common getdents64 sys_getdents64 +203 common pivot_root sys_pivot_root +204 32 fcntl64 sys_fcntl64 compat_sys_fcntl64 +205 common madvise sys_madvise +206 common mincore sys_mincore +207 common gettid sys_gettid +208 common tkill sys_tkill +209 common setxattr sys_setxattr +210 common lsetxattr sys_lsetxattr +211 common fsetxattr sys_fsetxattr +212 common getxattr sys_getxattr +213 common lgetxattr sys_lgetxattr +214 common fgetxattr sys_fgetxattr +215 common listxattr sys_listxattr +216 common llistxattr sys_llistxattr +217 common flistxattr sys_flistxattr +218 common removexattr sys_removexattr +219 common lremovexattr sys_lremovexattr +220 common fremovexattr sys_fremovexattr +221 32 futex sys_futex_time32 +221 64 futex sys_futex +221 spu futex sys_futex +222 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity +223 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity +# 224 unused +225 common tuxcall sys_ni_syscall +226 32 sendfile64 sys_sendfile64 compat_sys_sendfile64 +227 common io_setup sys_io_setup compat_sys_io_setup +228 common io_destroy sys_io_destroy +229 32 io_getevents sys_io_getevents_time32 +229 64 io_getevents sys_io_getevents +229 spu io_getevents sys_io_getevents +230 common io_submit sys_io_submit compat_sys_io_submit +231 common io_cancel sys_io_cancel +232 nospu set_tid_address sys_set_tid_address +233 common fadvise64 sys_fadvise64 ppc32_fadvise64 +234 nospu exit_group sys_exit_group +235 nospu lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie +236 common epoll_create sys_epoll_create +237 common epoll_ctl sys_epoll_ctl +238 common epoll_wait sys_epoll_wait +239 common remap_file_pages sys_remap_file_pages +240 common timer_create sys_timer_create compat_sys_timer_create +241 32 timer_settime sys_timer_settime32 +241 64 timer_settime sys_timer_settime +241 spu timer_settime sys_timer_settime +242 32 timer_gettime sys_timer_gettime32 +242 64 timer_gettime sys_timer_gettime +242 spu timer_gettime sys_timer_gettime +243 common timer_getoverrun sys_timer_getoverrun +244 common timer_delete sys_timer_delete +245 32 clock_settime sys_clock_settime32 +245 64 clock_settime sys_clock_settime +245 spu clock_settime sys_clock_settime +246 32 clock_gettime sys_clock_gettime32 +246 64 clock_gettime sys_clock_gettime +246 spu clock_gettime sys_clock_gettime +247 32 clock_getres sys_clock_getres_time32 +247 64 clock_getres sys_clock_getres +247 spu clock_getres sys_clock_getres +248 32 clock_nanosleep sys_clock_nanosleep_time32 +248 64 clock_nanosleep sys_clock_nanosleep +248 spu clock_nanosleep sys_clock_nanosleep +249 32 swapcontext ppc_swapcontext ppc32_swapcontext +249 64 swapcontext ppc64_swapcontext +249 spu swapcontext sys_ni_syscall +250 common tgkill sys_tgkill +251 32 utimes sys_utimes_time32 +251 64 utimes sys_utimes +251 spu utimes sys_utimes +252 common statfs64 sys_statfs64 compat_sys_statfs64 +253 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 +254 32 fadvise64_64 ppc_fadvise64_64 +254 spu fadvise64_64 sys_ni_syscall +255 common rtas sys_rtas +256 32 sys_debug_setcontext sys_debug_setcontext sys_ni_syscall +256 64 sys_debug_setcontext sys_ni_syscall +256 spu sys_debug_setcontext sys_ni_syscall +# 257 reserved for vserver +258 nospu migrate_pages sys_migrate_pages compat_sys_migrate_pages +259 nospu mbind sys_mbind compat_sys_mbind +260 nospu get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy +261 nospu set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy +262 nospu mq_open sys_mq_open compat_sys_mq_open +263 nospu mq_unlink sys_mq_unlink +264 32 mq_timedsend sys_mq_timedsend_time32 +264 64 mq_timedsend sys_mq_timedsend +265 32 mq_timedreceive sys_mq_timedreceive_time32 +265 64 mq_timedreceive sys_mq_timedreceive +266 nospu mq_notify sys_mq_notify compat_sys_mq_notify +267 nospu mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr +268 nospu kexec_load sys_kexec_load compat_sys_kexec_load +269 nospu add_key sys_add_key +270 nospu request_key sys_request_key +271 nospu keyctl sys_keyctl compat_sys_keyctl +272 nospu waitid sys_waitid compat_sys_waitid +273 nospu ioprio_set sys_ioprio_set +274 nospu ioprio_get sys_ioprio_get +275 nospu inotify_init sys_inotify_init +276 nospu inotify_add_watch sys_inotify_add_watch +277 nospu inotify_rm_watch sys_inotify_rm_watch +278 nospu spu_run sys_spu_run +279 nospu spu_create sys_spu_create +280 32 pselect6 sys_pselect6_time32 compat_sys_pselect6_time32 +280 64 pselect6 sys_pselect6 +281 32 ppoll sys_ppoll_time32 compat_sys_ppoll_time32 +281 64 ppoll sys_ppoll +282 common unshare sys_unshare +283 common splice sys_splice +284 common tee sys_tee +285 common vmsplice sys_vmsplice compat_sys_vmsplice +286 common openat sys_openat compat_sys_openat +287 common mkdirat sys_mkdirat +288 common mknodat sys_mknodat +289 common fchownat sys_fchownat +290 32 futimesat sys_futimesat_time32 +290 64 futimesat sys_futimesat +290 spu utimesat sys_futimesat +291 32 fstatat64 sys_fstatat64 +291 64 newfstatat sys_newfstatat +291 spu newfstatat sys_newfstatat +292 common unlinkat sys_unlinkat +293 common renameat sys_renameat +294 common linkat sys_linkat +295 common symlinkat sys_symlinkat +296 common readlinkat sys_readlinkat +297 common fchmodat sys_fchmodat +298 common faccessat sys_faccessat +299 common get_robust_list sys_get_robust_list compat_sys_get_robust_list +300 common set_robust_list sys_set_robust_list compat_sys_set_robust_list +301 common move_pages sys_move_pages compat_sys_move_pages +302 common getcpu sys_getcpu +303 nospu epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait +304 32 utimensat sys_utimensat_time32 +304 64 utimensat sys_utimensat +304 spu utimensat sys_utimensat +305 common signalfd sys_signalfd compat_sys_signalfd +306 common timerfd_create sys_timerfd_create +307 common eventfd sys_eventfd +308 common sync_file_range2 sys_sync_file_range2 compat_sys_sync_file_range2 +309 nospu fallocate sys_fallocate compat_sys_fallocate +310 nospu subpage_prot sys_subpage_prot +311 32 timerfd_settime sys_timerfd_settime32 +311 64 timerfd_settime sys_timerfd_settime +311 spu timerfd_settime sys_timerfd_settime +312 32 timerfd_gettime sys_timerfd_gettime32 +312 64 timerfd_gettime sys_timerfd_gettime +312 spu timerfd_gettime sys_timerfd_gettime +313 common signalfd4 sys_signalfd4 compat_sys_signalfd4 +314 common eventfd2 sys_eventfd2 +315 common epoll_create1 sys_epoll_create1 +316 common dup3 sys_dup3 +317 common pipe2 sys_pipe2 +318 nospu inotify_init1 sys_inotify_init1 +319 common perf_event_open sys_perf_event_open +320 common preadv sys_preadv compat_sys_preadv +321 common pwritev sys_pwritev compat_sys_pwritev +322 nospu rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo +323 nospu fanotify_init sys_fanotify_init +324 nospu fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark +325 common prlimit64 sys_prlimit64 +326 common socket sys_socket +327 common bind sys_bind +328 common connect sys_connect +329 common listen sys_listen +330 common accept sys_accept +331 common getsockname sys_getsockname +332 common getpeername sys_getpeername +333 common socketpair sys_socketpair +334 common send sys_send +335 common sendto sys_sendto +336 common recv sys_recv compat_sys_recv +337 common recvfrom sys_recvfrom compat_sys_recvfrom +338 common shutdown sys_shutdown +339 common setsockopt sys_setsockopt compat_sys_setsockopt +340 common getsockopt sys_getsockopt compat_sys_getsockopt +341 common sendmsg sys_sendmsg compat_sys_sendmsg +342 common recvmsg sys_recvmsg compat_sys_recvmsg +343 32 recvmmsg sys_recvmmsg_time32 compat_sys_recvmmsg_time32 +343 64 recvmmsg sys_recvmmsg +343 spu recvmmsg sys_recvmmsg +344 common accept4 sys_accept4 +345 common name_to_handle_at sys_name_to_handle_at +346 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at +347 32 clock_adjtime sys_clock_adjtime32 +347 64 clock_adjtime sys_clock_adjtime +347 spu clock_adjtime sys_clock_adjtime +348 common syncfs sys_syncfs +349 common sendmmsg sys_sendmmsg compat_sys_sendmmsg +350 common setns sys_setns +351 nospu process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv +352 nospu process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +353 nospu finit_module sys_finit_module +354 nospu kcmp sys_kcmp +355 common sched_setattr sys_sched_setattr +356 common sched_getattr sys_sched_getattr +357 common renameat2 sys_renameat2 +358 common seccomp sys_seccomp +359 common getrandom sys_getrandom +360 common memfd_create sys_memfd_create +361 common bpf sys_bpf +362 nospu execveat sys_execveat compat_sys_execveat +363 32 switch_endian sys_ni_syscall +363 64 switch_endian ppc_switch_endian +363 spu switch_endian sys_ni_syscall +364 common userfaultfd sys_userfaultfd +365 common membarrier sys_membarrier +# 366-377 originally left for IPC, now unused +378 nospu mlock2 sys_mlock2 +379 nospu copy_file_range sys_copy_file_range +380 common preadv2 sys_preadv2 compat_sys_preadv2 +381 common pwritev2 sys_pwritev2 compat_sys_pwritev2 +382 nospu kexec_file_load sys_kexec_file_load +383 nospu statx sys_statx +384 nospu pkey_alloc sys_pkey_alloc +385 nospu pkey_free sys_pkey_free +386 nospu pkey_mprotect sys_pkey_mprotect +387 nospu rseq sys_rseq +388 32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents +388 64 io_pgetevents sys_io_pgetevents +# room for arch specific syscalls +392 64 semtimedop sys_semtimedop +393 common semget sys_semget +394 common semctl sys_semctl compat_sys_semctl +395 common shmget sys_shmget +396 common shmctl sys_shmctl compat_sys_shmctl +397 common shmat sys_shmat compat_sys_shmat +398 common shmdt sys_shmdt +399 common msgget sys_msgget +400 common msgsnd sys_msgsnd compat_sys_msgsnd +401 common msgrcv sys_msgrcv compat_sys_msgrcv +402 common msgctl sys_msgctl compat_sys_msgctl +403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime +404 32 clock_settime64 sys_clock_settime sys_clock_settime +405 32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime +406 32 clock_getres_time64 sys_clock_getres sys_clock_getres +407 32 clock_nanosleep_time64 sys_clock_nanosleep sys_clock_nanosleep +408 32 timer_gettime64 sys_timer_gettime sys_timer_gettime +409 32 timer_settime64 sys_timer_settime sys_timer_settime +410 32 timerfd_gettime64 sys_timerfd_gettime sys_timerfd_gettime +411 32 timerfd_settime64 sys_timerfd_settime sys_timerfd_settime +412 32 utimensat_time64 sys_utimensat sys_utimensat +413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 +414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 +416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents +417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 +418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend +419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive +420 32 semtimedop_time64 sys_semtimedop sys_semtimedop +421 32 rt_sigtimedwait_time64 sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time64 +422 32 futex_time64 sys_futex sys_futex +423 32 sched_rr_get_interval_time64 sys_sched_rr_get_interval sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +435 nospu clone3 ppc_clone3 diff --git a/linux-user/ppc/syscall_nr.h b/linux-user/ppc/syscall_nr.h deleted file mode 100644 index b57a07b931..0000000000 --- a/linux-user/ppc/syscall_nr.h +++ /dev/null @@ -1,402 +0,0 @@ -/* - * This file contains the system call numbers. - */ - -#ifndef LINUX_USER_PPC_SYSCALL_NR_H -#define LINUX_USER_PPC_SYSCALL_NR_H - -#define TARGET_NR_restart_syscall 0 -#define TARGET_NR_exit 1 -#define TARGET_NR_fork 2 -#define TARGET_NR_read 3 -#define TARGET_NR_write 4 -#define TARGET_NR_open 5 -#define TARGET_NR_close 6 -#define TARGET_NR_waitpid 7 -#define TARGET_NR_creat 8 -#define TARGET_NR_link 9 -#define TARGET_NR_unlink 10 -#define TARGET_NR_execve 11 -#define TARGET_NR_chdir 12 -#define TARGET_NR_time 13 -#define TARGET_NR_mknod 14 -#define TARGET_NR_chmod 15 -#define TARGET_NR_lchown 16 -#define TARGET_NR_break 17 -#define TARGET_NR_oldstat 18 -#define TARGET_NR_lseek 19 -#define TARGET_NR_getpid 20 -#define TARGET_NR_mount 21 -#define TARGET_NR_umount 22 -#define TARGET_NR_setuid 23 -#define TARGET_NR_getuid 24 -#define TARGET_NR_stime 25 -#define TARGET_NR_ptrace 26 -#define TARGET_NR_alarm 27 -#define TARGET_NR_oldfstat 28 -#define TARGET_NR_pause 29 -#define TARGET_NR_utime 30 -#define TARGET_NR_stty 31 -#define TARGET_NR_gtty 32 -#define TARGET_NR_access 33 -#define TARGET_NR_nice 34 -#define TARGET_NR_ftime 35 -#define TARGET_NR_sync 36 -#define TARGET_NR_kill 37 -#define TARGET_NR_rename 38 -#define TARGET_NR_mkdir 39 -#define TARGET_NR_rmdir 40 -#define TARGET_NR_dup 41 -#define TARGET_NR_pipe 42 -#define TARGET_NR_times 43 -#define TARGET_NR_prof 44 -#define TARGET_NR_brk 45 -#define TARGET_NR_setgid 46 -#define TARGET_NR_getgid 47 -#define TARGET_NR_signal 48 -#define TARGET_NR_geteuid 49 -#define TARGET_NR_getegid 50 -#define TARGET_NR_acct 51 -#define TARGET_NR_umount2 52 -#define TARGET_NR_lock 53 -#define TARGET_NR_ioctl 54 -#define TARGET_NR_fcntl 55 -#define TARGET_NR_mpx 56 -#define TARGET_NR_setpgid 57 -#define TARGET_NR_ulimit 58 -#define TARGET_NR_oldolduname 59 -#define TARGET_NR_umask 60 -#define TARGET_NR_chroot 61 -#define TARGET_NR_ustat 62 -#define TARGET_NR_dup2 63 -#define TARGET_NR_getppid 64 -#define TARGET_NR_getpgrp 65 -#define TARGET_NR_setsid 66 -#define TARGET_NR_sigaction 67 -#define TARGET_NR_sgetmask 68 -#define TARGET_NR_ssetmask 69 -#define TARGET_NR_setreuid 70 -#define TARGET_NR_setregid 71 -#define TARGET_NR_sigsuspend 72 -#define TARGET_NR_sigpending 73 -#define TARGET_NR_sethostname 74 -#define TARGET_NR_setrlimit 75 -#define TARGET_NR_getrlimit 76 -#define TARGET_NR_getrusage 77 -#define TARGET_NR_gettimeofday 78 -#define TARGET_NR_settimeofday 79 -#define TARGET_NR_getgroups 80 -#define TARGET_NR_setgroups 81 -#define TARGET_NR_select 82 -#define TARGET_NR_symlink 83 -#define TARGET_NR_oldlstat 84 -#define TARGET_NR_readlink 85 -#define TARGET_NR_uselib 86 -#define TARGET_NR_swapon 87 -#define TARGET_NR_reboot 88 -#define TARGET_NR_readdir 89 -#define TARGET_NR_mmap 90 -#define TARGET_NR_munmap 91 -#define TARGET_NR_truncate 92 -#define TARGET_NR_ftruncate 93 -#define TARGET_NR_fchmod 94 -#define TARGET_NR_fchown 95 -#define TARGET_NR_getpriority 96 -#define TARGET_NR_setpriority 97 -#define TARGET_NR_profil 98 -#define TARGET_NR_statfs 99 -#define TARGET_NR_fstatfs 100 -#define TARGET_NR_ioperm 101 -#define TARGET_NR_socketcall 102 -#define TARGET_NR_syslog 103 -#define TARGET_NR_setitimer 104 -#define TARGET_NR_getitimer 105 -#define TARGET_NR_stat 106 -#define TARGET_NR_lstat 107 -#define TARGET_NR_fstat 108 -#define TARGET_NR_olduname 109 -#define TARGET_NR_iopl 110 -#define TARGET_NR_vhangup 111 -#define TARGET_NR_idle 112 -#define TARGET_NR_vm86 113 -#define TARGET_NR_wait4 114 -#define TARGET_NR_swapoff 115 -#define TARGET_NR_sysinfo 116 -#define TARGET_NR_ipc 117 -#define TARGET_NR_fsync 118 -#if !defined(TARGET_PPC64) -#define TARGET_NR_sigreturn 119 -#endif -#define TARGET_NR_clone 120 -#define TARGET_NR_setdomainname 121 -#define TARGET_NR_uname 122 -#define TARGET_NR_modify_ldt 123 -#define TARGET_NR_adjtimex 124 -#define TARGET_NR_mprotect 125 -#define TARGET_NR_sigprocmask 126 -#define TARGET_NR_create_module 127 -#define TARGET_NR_init_module 128 -#define TARGET_NR_delete_module 129 -#define TARGET_NR_get_kernel_syms 130 -#define TARGET_NR_quotactl 131 -#define TARGET_NR_getpgid 132 -#define TARGET_NR_fchdir 133 -#define TARGET_NR_bdflush 134 -#define TARGET_NR_sysfs 135 -#define TARGET_NR_personality 136 -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid 138 -#define TARGET_NR_setfsgid 139 -#define TARGET_NR__llseek 140 -#define TARGET_NR_getdents 141 -#define TARGET_NR__newselect 142 -#define TARGET_NR_flock 143 -#define TARGET_NR_msync 144 -#define TARGET_NR_readv 145 -#define TARGET_NR_writev 146 -#define TARGET_NR_getsid 147 -#define TARGET_NR_fdatasync 148 -#define TARGET_NR__sysctl 149 -#define TARGET_NR_mlock 150 -#define TARGET_NR_munlock 151 -#define TARGET_NR_mlockall 152 -#define TARGET_NR_munlockall 153 -#define TARGET_NR_sched_setparam 154 -#define TARGET_NR_sched_getparam 155 -#define TARGET_NR_sched_setscheduler 156 -#define TARGET_NR_sched_getscheduler 157 -#define TARGET_NR_sched_yield 158 -#define TARGET_NR_sched_get_priority_max 159 -#define TARGET_NR_sched_get_priority_min 160 -#define TARGET_NR_sched_rr_get_interval 161 -#define TARGET_NR_nanosleep 162 -#define TARGET_NR_mremap 163 -#define TARGET_NR_setresuid32 164 -#define TARGET_NR_getresuid32 165 -#define TARGET_NR_query_module 166 -#define TARGET_NR_poll 167 -#define TARGET_NR_nfsservctl 168 -#define TARGET_NR_setresgid32 169 -#define TARGET_NR_getresgid32 170 -#define TARGET_NR_prctl 171 -#define TARGET_NR_rt_sigreturn 172 -#define TARGET_NR_rt_sigaction 173 -#define TARGET_NR_rt_sigprocmask 174 -#define TARGET_NR_rt_sigpending 175 -#define TARGET_NR_rt_sigtimedwait 176 -#define TARGET_NR_rt_sigqueueinfo 177 -#define TARGET_NR_rt_sigsuspend 178 -#define TARGET_NR_pread64 179 -#define TARGET_NR_pwrite64 180 -#define TARGET_NR_chown 181 -#define TARGET_NR_getcwd 182 -#define TARGET_NR_capget 183 -#define TARGET_NR_capset 184 -#define TARGET_NR_sigaltstack 185 -#define TARGET_NR_sendfile 186 -#define TARGET_NR_getpmsg 187 /* some people actually want streams */ -#define TARGET_NR_putpmsg 188 /* some people actually want streams */ -#define TARGET_NR_vfork 189 -#define TARGET_NR_ugetrlimit 190 /* SuS compliant getrlimit */ -#define TARGET_NR_readahead 191 -#if !defined(TARGET_PPC64) || defined(TARGET_ABI32) -#define TARGET_NR_mmap2 192 -#define TARGET_NR_truncate64 193 -#define TARGET_NR_ftruncate64 194 -#define TARGET_NR_stat64 195 -#define TARGET_NR_lstat64 196 -#define TARGET_NR_fstat64 197 -#endif -#define TARGET_NR_pciconfig_read 198 -#define TARGET_NR_pciconfig_write 199 -#define TARGET_NR_pciconfig_iobase 200 -#define TARGET_NR_multiplexer 201 -#define TARGET_NR_getdents64 202 -#define TARGET_NR_pivot_root 203 -#if !defined(TARGET_PPC64) || defined(TARGET_ABI32) -#define TARGET_NR_fcntl64 204 -#endif -#define TARGET_NR_madvise 205 -#define TARGET_NR_mincore 206 -#define TARGET_NR_gettid 207 -#define TARGET_NR_tkill 208 -#define TARGET_NR_setxattr 209 -#define TARGET_NR_lsetxattr 210 -#define TARGET_NR_fsetxattr 211 -#define TARGET_NR_getxattr 212 -#define TARGET_NR_lgetxattr 213 -#define TARGET_NR_fgetxattr 214 -#define TARGET_NR_listxattr 215 -#define TARGET_NR_llistxattr 216 -#define TARGET_NR_flistxattr 217 -#define TARGET_NR_removexattr 218 -#define TARGET_NR_lremovexattr 219 -#define TARGET_NR_fremovexattr 220 -#define TARGET_NR_futex 221 -#define TARGET_NR_sched_setaffinity 222 -#define TARGET_NR_sched_getaffinity 223 -/* 224 currently unused */ -#define TARGET_NR_tuxcall 225 -#if !defined(TARGET_PPC64) || defined(TARGET_ABI32) -#define TARGET_NR_sendfile64 226 -#endif -#define TARGET_NR_io_setup 227 -#define TARGET_NR_io_destroy 228 -#define TARGET_NR_io_getevents 229 -#define TARGET_NR_io_submit 230 -#define TARGET_NR_io_cancel 231 -#define TARGET_NR_set_tid_address 232 -#define TARGET_NR_fadvise64 233 -#define TARGET_NR_exit_group 234 -#define TARGET_NR_lookup_dcookie 235 -#define TARGET_NR_epoll_create 236 -#define TARGET_NR_epoll_ctl 237 -#define TARGET_NR_epoll_wait 238 -#define TARGET_NR_remap_file_pages 239 -#define TARGET_NR_timer_create 240 -#define TARGET_NR_timer_settime 241 -#define TARGET_NR_timer_gettime 242 -#define TARGET_NR_timer_getoverrun 243 -#define TARGET_NR_timer_delete 244 -#define TARGET_NR_clock_settime 245 -#define TARGET_NR_clock_gettime 246 -#define TARGET_NR_clock_getres 247 -#define TARGET_NR_clock_nanosleep 248 -#define TARGET_NR_swapcontext 249 -#define TARGET_NR_tgkill 250 -#define TARGET_NR_utimes 251 -#define TARGET_NR_statfs64 252 -#define TARGET_NR_fstatfs64 253 -#if !defined(TARGET_PPC64) || defined(TARGET_ABI32) -#define TARGET_NR_fadvise64_64 254 -#endif -#define TARGET_NR_rtas 255 -#define TARGET_NR_sys_debug_setcontext 256 -/* Number 257 is reserved for vserver */ -#define TARGET_NR_migrate_pages 258 -#define TARGET_NR_mbind 259 -#define TARGET_NR_get_mempolicy 260 -#define TARGET_NR_set_mempolicy 261 -#define TARGET_NR_mq_open 262 -#define TARGET_NR_mq_unlink 263 -#define TARGET_NR_mq_timedsend 264 -#define TARGET_NR_mq_timedreceive 265 -#define TARGET_NR_mq_notify 266 -#define TARGET_NR_mq_getsetattr 267 -#define TARGET_NR_kexec_load 268 -#define TARGET_NR_add_key 269 -#define TARGET_NR_request_key 270 -#define TARGET_NR_keyctl 271 -#define TARGET_NR_waitid 272 -#define TARGET_NR_ioprio_set 273 -#define TARGET_NR_ioprio_get 274 -#define TARGET_NR_inotify_init 275 -#define TARGET_NR_inotify_add_watch 276 -#define TARGET_NR_inotify_rm_watch 277 -#define TARGET_NR_spu_run 278 -#define TARGET_NR_spu_create 279 -#define TARGET_NR_pselect6 280 -#define TARGET_NR_ppoll 281 -#define TARGET_NR_unshare 282 -#define TARGET_NR_splice 283 -#define TARGET_NR_tee 284 -#define TARGET_NR_vmsplice 285 -#define TARGET_NR_openat 286 -#define TARGET_NR_mkdirat 287 -#define TARGET_NR_mknodat 288 -#define TARGET_NR_fchownat 289 -#define TARGET_NR_futimesat 290 -#if defined(TARGET_PPC64) && !defined(TARGET_ABI32) -#define TARGET_NR_newfstatat 291 -#else -#define TARGET_NR_fstatat64 291 -#endif -#define TARGET_NR_unlinkat 292 -#define TARGET_NR_renameat 293 -#define TARGET_NR_linkat 294 -#define TARGET_NR_symlinkat 295 -#define TARGET_NR_readlinkat 296 -#define TARGET_NR_fchmodat 297 -#define TARGET_NR_faccessat 298 -#define TARGET_NR_get_robust_list 299 -#define TARGET_NR_set_robust_list 300 -#define TARGET_NR_move_pages 301 -#define TARGET_NR_getcpu 302 -#define TARGET_NR_epoll_pwait 303 -#define TARGET_NR_utimensat 304 -#define TARGET_NR_signalfd 305 -#define TARGET_NR_timerfd_create 306 -#define TARGET_NR_eventfd 307 -#define TARGET_NR_sync_file_range2 308 -#define TARGET_NR_fallocate 309 -#define TARGET_NR_subpage_prot 310 -#define TARGET_NR_timerfd_settime 311 -#define TARGET_NR_timerfd_gettime 312 -#define TARGET_NR_signalfd4 313 -#define TARGET_NR_eventfd2 314 -#define TARGET_NR_epoll_create1 315 -#define TARGET_NR_dup3 316 -#define TARGET_NR_pipe2 317 -#define TARGET_NR_inotify_init1 318 -#define TARGET_NR_perf_event_open 319 -#define TARGET_NR_preadv 320 -#define TARGET_NR_pwritev 321 -#define TARGET_NR_rt_tgsigqueueinfo 322 -#define TARGET_NR_fanotify_init 323 -#define TARGET_NR_fanotify_mark 324 -#define TARGET_NR_prlimit64 325 -#define TARGET_NR_socket 326 -#define TARGET_NR_bind 327 -#define TARGET_NR_connect 328 -#define TARGET_NR_listen 329 -#define TARGET_NR_accept 330 -#define TARGET_NR_getsockname 331 -#define TARGET_NR_getpeername 332 -#define TARGET_NR_socketpair 333 -#define TARGET_NR_send 334 -#define TARGET_NR_sendto 335 -#define TARGET_NR_recv 336 -#define TARGET_NR_recvfrom 337 -#define TARGET_NR_shutdown 338 -#define TARGET_NR_setsockopt 339 -#define TARGET_NR_getsockopt 340 -#define TARGET_NR_sendmsg 341 -#define TARGET_NR_recvmsg 342 -#define TARGET_NR_recvmmsg 343 -#define TARGET_NR_accept4 344 -#define TARGET_NR_name_to_handle_at 345 -#define TARGET_NR_open_by_handle_at 346 -#define TARGET_NR_clock_adjtime 347 -#define TARGET_NR_syncfs 348 -#define TARGET_NR_sendmmsg 349 -#define TARGET_NR_setns 350 -#define TARGET_NR_process_vm_readv 351 -#define TARGET_NR_process_vm_writev 352 -#define TARGET_NR_finit_module 353 -#define TARGET_NR_kcmp 354 -#define TARGET_NR_sched_setattr 355 -#define TARGET_NR_sched_getattr 356 -#define TARGET_NR_renameat2 357 -#define TARGET_NR_seccomp 358 -#define TARGET_NR_getrandom 359 -#define TARGET_NR_memfd_create 360 -#define TARGET_NR_bpf 361 -#define TARGET_NR_execveat 362 -#define TARGET_NR_switch_endian 363 -#define TARGET_NR_userfaultfd 364 -#define TARGET_NR_membarrier 365 -#define TARGET_NR_semop 366 -#define TARGET_NR_semget 367 -#define TARGET_NR_semctl 368 -#define TARGET_NR_semtimedop 369 -#define TARGET_NR_msgsnd 370 -#define TARGET_NR_msgrcv 371 -#define TARGET_NR_msgget 372 -#define TARGET_NR_msgctl 373 -#define TARGET_NR_shmat 374 -#define TARGET_NR_shmdt 375 -#define TARGET_NR_shmget 376 -#define TARGET_NR_shmctl 377 -#define TARGET_NR_mlock2 378 - -#endif diff --git a/linux-user/ppc/syscallhdr.sh b/linux-user/ppc/syscallhdr.sh new file mode 100644 index 0000000000..6c44e0eaad --- /dev/null +++ b/linux-user/ppc/syscallhdr.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_PPC_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + while read nr abi name entry compat ; do + if [ "$entry" = "sys_ni_syscall" ] ; then + continue + fi + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" + printf "\n" +) > "$out" From b632d67913d9d27274d879424059a0698020f1a0 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:52 +0100 Subject: [PATCH 17/32] linux-user, s390x: remove syscall definitions for !TARGET_S390X We don't support other 32bit architecture. Update file to comply with coding style (TAB). Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-11-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/s390x/syscall_nr.h | 313 +++++++++++++--------------------- 1 file changed, 123 insertions(+), 190 deletions(-) diff --git a/linux-user/s390x/syscall_nr.h b/linux-user/s390x/syscall_nr.h index b1553a0810..261da1b0c3 100644 --- a/linux-user/s390x/syscall_nr.h +++ b/linux-user/s390x/syscall_nr.h @@ -11,7 +11,7 @@ #define TARGET_NR_write 4 #define TARGET_NR_open 5 #define TARGET_NR_close 6 -#define TARGET_NR_restart_syscall 7 +#define TARGET_NR_restart_syscall 7 #define TARGET_NR_creat 8 #define TARGET_NR_link 9 #define TARGET_NR_unlink 10 @@ -108,6 +108,7 @@ #define TARGET_NR_personality 136 #define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ #define TARGET_NR_getdents 141 +#define TARGET_NR_select 142 #define TARGET_NR_flock 143 #define TARGET_NR_msync 144 #define TARGET_NR_readv 145 @@ -147,116 +148,137 @@ #define TARGET_NR_capset 185 #define TARGET_NR_sigaltstack 186 #define TARGET_NR_sendfile 187 -#define TARGET_NR_getpmsg 188 -#define TARGET_NR_putpmsg 189 -#define TARGET_NR_vfork 190 +#define TARGET_NR_getpmsg 188 +#define TARGET_NR_putpmsg 189 +#define TARGET_NR_vfork 190 +#define TARGET_NR_getrlimit 191 /* SuS compliant getrlimit */ +#define TARGET_NR_lchown 198 +#define TARGET_NR_getuid 199 +#define TARGET_NR_getgid 200 +#define TARGET_NR_geteuid 201 +#define TARGET_NR_getegid 202 +#define TARGET_NR_setreuid 203 +#define TARGET_NR_setregid 204 +#define TARGET_NR_getgroups 205 +#define TARGET_NR_setgroups 206 +#define TARGET_NR_fchown 207 +#define TARGET_NR_setresuid 208 +#define TARGET_NR_getresuid 209 +#define TARGET_NR_setresgid 210 +#define TARGET_NR_getresgid 211 +#define TARGET_NR_chown 212 +#define TARGET_NR_setuid 213 +#define TARGET_NR_setgid 214 +#define TARGET_NR_setfsuid 215 +#define TARGET_NR_setfsgid 216 #define TARGET_NR_pivot_root 217 #define TARGET_NR_mincore 218 #define TARGET_NR_madvise 219 -#define TARGET_NR_getdents64 220 -#define TARGET_NR_readahead 222 -#define TARGET_NR_setxattr 224 -#define TARGET_NR_lsetxattr 225 -#define TARGET_NR_fsetxattr 226 -#define TARGET_NR_getxattr 227 -#define TARGET_NR_lgetxattr 228 -#define TARGET_NR_fgetxattr 229 -#define TARGET_NR_listxattr 230 -#define TARGET_NR_llistxattr 231 -#define TARGET_NR_flistxattr 232 -#define TARGET_NR_removexattr 233 -#define TARGET_NR_lremovexattr 234 -#define TARGET_NR_fremovexattr 235 -#define TARGET_NR_gettid 236 -#define TARGET_NR_tkill 237 -#define TARGET_NR_futex 238 -#define TARGET_NR_sched_setaffinity 239 -#define TARGET_NR_sched_getaffinity 240 -#define TARGET_NR_tgkill 241 +#define TARGET_NR_getdents64 220 +#define TARGET_NR_readahead 222 +#define TARGET_NR_setxattr 224 +#define TARGET_NR_lsetxattr 225 +#define TARGET_NR_fsetxattr 226 +#define TARGET_NR_getxattr 227 +#define TARGET_NR_lgetxattr 228 +#define TARGET_NR_fgetxattr 229 +#define TARGET_NR_listxattr 230 +#define TARGET_NR_llistxattr 231 +#define TARGET_NR_flistxattr 232 +#define TARGET_NR_removexattr 233 +#define TARGET_NR_lremovexattr 234 +#define TARGET_NR_fremovexattr 235 +#define TARGET_NR_gettid 236 +#define TARGET_NR_tkill 237 +#define TARGET_NR_futex 238 +#define TARGET_NR_sched_setaffinity 239 +#define TARGET_NR_sched_getaffinity 240 +#define TARGET_NR_tgkill 241 /* Number 242 is reserved for tux */ -#define TARGET_NR_io_setup 243 -#define TARGET_NR_io_destroy 244 -#define TARGET_NR_io_getevents 245 -#define TARGET_NR_io_submit 246 -#define TARGET_NR_io_cancel 247 -#define TARGET_NR_exit_group 248 -#define TARGET_NR_epoll_create 249 -#define TARGET_NR_epoll_ctl 250 -#define TARGET_NR_epoll_wait 251 -#define TARGET_NR_set_tid_address 252 -#define TARGET_NR_fadvise64 253 -#define TARGET_NR_timer_create 254 -#define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) -#define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) -#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) -#define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) -#define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) -#define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) -#define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) -#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) +#define TARGET_NR_io_setup 243 +#define TARGET_NR_io_destroy 244 +#define TARGET_NR_io_getevents 245 +#define TARGET_NR_io_submit 246 +#define TARGET_NR_io_cancel 247 +#define TARGET_NR_exit_group 248 +#define TARGET_NR_epoll_create 249 +#define TARGET_NR_epoll_ctl 250 +#define TARGET_NR_epoll_wait 251 +#define TARGET_NR_set_tid_address 252 +#define TARGET_NR_fadvise64 253 +#define TARGET_NR_timer_create 254 +#define TARGET_NR_timer_settime (TARGET_NR_timer_create + 1) +#define TARGET_NR_timer_gettime (TARGET_NR_timer_create + 2) +#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create + 3) +#define TARGET_NR_timer_delete (TARGET_NR_timer_create + 4) +#define TARGET_NR_clock_settime (TARGET_NR_timer_create + 5) +#define TARGET_NR_clock_gettime (TARGET_NR_timer_create + 6) +#define TARGET_NR_clock_getres (TARGET_NR_timer_create + 7) +#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create + 8) /* Number 263 is reserved for vserver */ -#define TARGET_NR_statfs64 265 -#define TARGET_NR_fstatfs64 266 -#define TARGET_NR_remap_file_pages 267 +#define TARGET_NR_statfs64 265 +#define TARGET_NR_fstatfs64 266 +#define TARGET_NR_remap_file_pages 267 /* Number 268 is reserved for new sys_mbind */ /* Number 269 is reserved for new sys_get_mempolicy */ /* Number 270 is reserved for new sys_set_mempolicy */ -#define TARGET_NR_mq_open 271 -#define TARGET_NR_mq_unlink 272 -#define TARGET_NR_mq_timedsend 273 -#define TARGET_NR_mq_timedreceive 274 -#define TARGET_NR_mq_notify 275 -#define TARGET_NR_mq_getsetattr 276 -#define TARGET_NR_kexec_load 277 -#define TARGET_NR_add_key 278 -#define TARGET_NR_request_key 279 -#define TARGET_NR_keyctl 280 -#define TARGET_NR_waitid 281 -#define TARGET_NR_ioprio_set 282 -#define TARGET_NR_ioprio_get 283 -#define TARGET_NR_inotify_init 284 -#define TARGET_NR_inotify_add_watch 285 -#define TARGET_NR_inotify_rm_watch 286 +#define TARGET_NR_mq_open 271 +#define TARGET_NR_mq_unlink 272 +#define TARGET_NR_mq_timedsend 273 +#define TARGET_NR_mq_timedreceive 274 +#define TARGET_NR_mq_notify 275 +#define TARGET_NR_mq_getsetattr 276 +#define TARGET_NR_kexec_load 277 +#define TARGET_NR_add_key 278 +#define TARGET_NR_request_key 279 +#define TARGET_NR_keyctl 280 +#define TARGET_NR_waitid 281 +#define TARGET_NR_ioprio_set 282 +#define TARGET_NR_ioprio_get 283 +#define TARGET_NR_inotify_init 284 +#define TARGET_NR_inotify_add_watch 285 +#define TARGET_NR_inotify_rm_watch 286 /* Number 287 is reserved for new sys_migrate_pages */ -#define TARGET_NR_openat 288 -#define TARGET_NR_mkdirat 289 -#define TARGET_NR_mknodat 290 -#define TARGET_NR_fchownat 291 -#define TARGET_NR_futimesat 292 -#define TARGET_NR_unlinkat 294 -#define TARGET_NR_renameat 295 -#define TARGET_NR_linkat 296 -#define TARGET_NR_symlinkat 297 -#define TARGET_NR_readlinkat 298 -#define TARGET_NR_fchmodat 299 -#define TARGET_NR_faccessat 300 -#define TARGET_NR_pselect6 301 -#define TARGET_NR_ppoll 302 -#define TARGET_NR_unshare 303 -#define TARGET_NR_set_robust_list 304 -#define TARGET_NR_get_robust_list 305 -#define TARGET_NR_splice 306 -#define TARGET_NR_sync_file_range 307 -#define TARGET_NR_tee 308 -#define TARGET_NR_vmsplice 309 +#define TARGET_NR_openat 288 +#define TARGET_NR_mkdirat 289 +#define TARGET_NR_mknodat 290 +#define TARGET_NR_fchownat 291 +#define TARGET_NR_futimesat 292 +#define TARGET_NR_newfstatat 293 +#define TARGET_NR_unlinkat 294 +#define TARGET_NR_renameat 295 +#define TARGET_NR_linkat 296 +#define TARGET_NR_symlinkat 297 +#define TARGET_NR_readlinkat 298 +#define TARGET_NR_fchmodat 299 +#define TARGET_NR_faccessat 300 +#define TARGET_NR_pselect6 301 +#define TARGET_NR_ppoll 302 +#define TARGET_NR_unshare 303 +#define TARGET_NR_set_robust_list 304 +#define TARGET_NR_get_robust_list 305 +#define TARGET_NR_splice 306 +#define TARGET_NR_sync_file_range 307 +#define TARGET_NR_tee 308 +#define TARGET_NR_vmsplice 309 /* Number 310 is reserved for new sys_move_pages */ -#define TARGET_NR_getcpu 311 -#define TARGET_NR_epoll_pwait 312 -#define TARGET_NR_utimes 313 -#define TARGET_NR_fallocate 314 -#define TARGET_NR_utimensat 315 -#define TARGET_NR_signalfd 316 -#define TARGET_NR_timerfd 317 -#define TARGET_NR_eventfd 318 -#define TARGET_NR_timerfd_create 319 -#define TARGET_NR_timerfd_settime 320 -#define TARGET_NR_timerfd_gettime 321 -#define TARGET_NR_signalfd4 322 -#define TARGET_NR_eventfd2 323 -#define TARGET_NR_inotify_init1 324 -#define TARGET_NR_pipe2 325 -#define TARGET_NR_dup3 326 -#define TARGET_NR_epoll_create1 327 +#define TARGET_NR_getcpu 311 +#define TARGET_NR_epoll_pwait 312 +#define TARGET_NR_utimes 313 +#define TARGET_NR_fallocate 314 +#define TARGET_NR_utimensat 315 +#define TARGET_NR_signalfd 316 +#define TARGET_NR_timerfd 317 +#define TARGET_NR_eventfd 318 +#define TARGET_NR_timerfd_create 319 +#define TARGET_NR_timerfd_settime 320 +#define TARGET_NR_timerfd_gettime 321 +#define TARGET_NR_signalfd4 322 +#define TARGET_NR_eventfd2 323 +#define TARGET_NR_inotify_init1 324 +#define TARGET_NR_pipe2 325 +#define TARGET_NR_dup3 326 +#define TARGET_NR_epoll_create1 327 #define TARGET_NR_preadv 328 #define TARGET_NR_pwritev 329 #define TARGET_NR_rt_tgsigqueueinfo 330 @@ -305,94 +327,5 @@ #define TARGET_NR_shutdown 373 #define TARGET_NR_mlock2 374 -/* - * There are some system calls that are not present on 64 bit, some - * have a different name although they do the same (e.g. TARGET_NR_chown32 - * is TARGET_NR_chown on 64 bit). - */ -#ifndef TARGET_S390X - -#define TARGET_NR_time 13 -#define TARGET_NR_lchown 16 -#define TARGET_NR_setuid 23 -#define TARGET_NR_getuid 24 -#define TARGET_NR_stime 25 -#define TARGET_NR_setgid 46 -#define TARGET_NR_getgid 47 -#define TARGET_NR_geteuid 49 -#define TARGET_NR_getegid 50 -#define TARGET_NR_setreuid 70 -#define TARGET_NR_setregid 71 -#define TARGET_NR_getrlimit 76 -#define TARGET_NR_getgroups 80 -#define TARGET_NR_setgroups 81 -#define TARGET_NR_fchown 95 -#define TARGET_NR_ioperm 101 -#define TARGET_NR_setfsuid 138 -#define TARGET_NR_setfsgid 139 -#define TARGET_NR__llseek 140 -#define TARGET_NR__newselect 142 -#define TARGET_NR_setresuid 164 -#define TARGET_NR_getresuid 165 -#define TARGET_NR_setresgid 170 -#define TARGET_NR_getresgid 171 -#define TARGET_NR_chown 182 -#define TARGET_NR_ugetrlimit 191 /* SuS compliant getrlimit */ -#define TARGET_NR_mmap2 192 -#define TARGET_NR_truncate64 193 -#define TARGET_NR_ftruncate64 194 -#define TARGET_NR_stat64 195 -#define TARGET_NR_lstat64 196 -#define TARGET_NR_fstat64 197 -#define TARGET_NR_lchown32 198 -#define TARGET_NR_getuid32 199 -#define TARGET_NR_getgid32 200 -#define TARGET_NR_geteuid32 201 -#define TARGET_NR_getegid32 202 -#define TARGET_NR_setreuid32 203 -#define TARGET_NR_setregid32 204 -#define TARGET_NR_getgroups32 205 -#define TARGET_NR_setgroups32 206 -#define TARGET_NR_fchown32 207 -#define TARGET_NR_setresuid32 208 -#define TARGET_NR_getresuid32 209 -#define TARGET_NR_setresgid32 210 -#define TARGET_NR_getresgid32 211 -#define TARGET_NR_chown32 212 -#define TARGET_NR_setuid32 213 -#define TARGET_NR_setgid32 214 -#define TARGET_NR_setfsuid32 215 -#define TARGET_NR_setfsgid32 216 -#define TARGET_NR_fcntl64 221 -#define TARGET_NR_sendfile64 223 -#define TARGET_NR_fadvise64_64 264 -#define TARGET_NR_fstatat64 293 - -#else - -#define TARGET_NR_select 142 -#define TARGET_NR_getrlimit 191 /* SuS compliant getrlimit */ -#define TARGET_NR_lchown 198 -#define TARGET_NR_getuid 199 -#define TARGET_NR_getgid 200 -#define TARGET_NR_geteuid 201 -#define TARGET_NR_getegid 202 -#define TARGET_NR_setreuid 203 -#define TARGET_NR_setregid 204 -#define TARGET_NR_getgroups 205 -#define TARGET_NR_setgroups 206 -#define TARGET_NR_fchown 207 -#define TARGET_NR_setresuid 208 -#define TARGET_NR_getresuid 209 -#define TARGET_NR_setresgid 210 -#define TARGET_NR_getresgid 211 -#define TARGET_NR_chown 212 -#define TARGET_NR_setuid 213 -#define TARGET_NR_setgid 214 -#define TARGET_NR_setfsuid 215 -#define TARGET_NR_setfsgid 216 -#define TARGET_NR_newfstatat 293 - -#endif #endif From 318f371dcf797ab29dccabd3d9956f835c6fa69e Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:53 +0100 Subject: [PATCH 18/32] linux-user, s390x: add syscall table generation support Copy syscall.tbl from linux/arch/s390x/kernel/syscalls v5.5 Copy syscallhdr.sh from m68k. Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-12-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/s390x/Makefile.objs | 5 + linux-user/s390x/syscall.tbl | 440 +++++++++++++++++++++++++++++++++ linux-user/s390x/syscall_nr.h | 331 ------------------------- linux-user/s390x/syscallhdr.sh | 32 +++ 6 files changed, 480 insertions(+), 332 deletions(-) create mode 100644 linux-user/s390x/Makefile.objs create mode 100644 linux-user/s390x/syscall.tbl delete mode 100644 linux-user/s390x/syscall_nr.h create mode 100755 linux-user/s390x/syscallhdr.sh diff --git a/configure b/configure index f2500823ba..8805fab482 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc ; do +for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7912,6 +7912,7 @@ case "$target_name" in echo "TARGET_ABI32=y" >> $config_target_mak ;; s390x) + TARGET_SYSTBL_ABI=common,64 mttcg=yes gdb_xml_files="s390x-core64.xml s390-acr.xml s390-fpr.xml s390-vx.xml s390-cr.xml s390-virt.xml s390-gs.xml" ;; diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 8b00dad687..f4e666e74c 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -14,5 +14,6 @@ obj-$(TARGET_M68K) += m68k/ obj-$(TARGET_MICROBLAZE) += microblaze/ obj-$(TARGET_PPC) += ppc/ obj-$(TARGET_PPC64) += ppc/ +obj-$(TARGET_S390X) += s390x/ obj-$(TARGET_SH4) += sh4/ obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/s390x/Makefile.objs b/linux-user/s390x/Makefile.objs new file mode 100644 index 0000000000..f30f1625cc --- /dev/null +++ b/linux-user/s390x/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/s390x/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/s390x/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/s390x/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/s390x/syscall.tbl b/linux-user/s390x/syscall.tbl new file mode 100644 index 0000000000..3054e9c035 --- /dev/null +++ b/linux-user/s390x/syscall.tbl @@ -0,0 +1,440 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# System call table for s390 +# +# Format: +# +# +# +# where can be common, 64, or 32 + +1 common exit sys_exit sys_exit +2 common fork sys_fork sys_fork +3 common read sys_read compat_sys_s390_read +4 common write sys_write compat_sys_s390_write +5 common open sys_open compat_sys_open +6 common close sys_close sys_close +7 common restart_syscall sys_restart_syscall sys_restart_syscall +8 common creat sys_creat sys_creat +9 common link sys_link sys_link +10 common unlink sys_unlink sys_unlink +11 common execve sys_execve compat_sys_execve +12 common chdir sys_chdir sys_chdir +13 32 time - sys_time32 +14 common mknod sys_mknod sys_mknod +15 common chmod sys_chmod sys_chmod +16 32 lchown - sys_lchown16 +19 common lseek sys_lseek compat_sys_lseek +20 common getpid sys_getpid sys_getpid +21 common mount sys_mount compat_sys_mount +22 common umount sys_oldumount sys_oldumount +23 32 setuid - sys_setuid16 +24 32 getuid - sys_getuid16 +25 32 stime - sys_stime32 +26 common ptrace sys_ptrace compat_sys_ptrace +27 common alarm sys_alarm sys_alarm +29 common pause sys_pause sys_pause +30 common utime sys_utime sys_utime32 +33 common access sys_access sys_access +34 common nice sys_nice sys_nice +36 common sync sys_sync sys_sync +37 common kill sys_kill sys_kill +38 common rename sys_rename sys_rename +39 common mkdir sys_mkdir sys_mkdir +40 common rmdir sys_rmdir sys_rmdir +41 common dup sys_dup sys_dup +42 common pipe sys_pipe sys_pipe +43 common times sys_times compat_sys_times +45 common brk sys_brk sys_brk +46 32 setgid - sys_setgid16 +47 32 getgid - sys_getgid16 +48 common signal sys_signal sys_signal +49 32 geteuid - sys_geteuid16 +50 32 getegid - sys_getegid16 +51 common acct sys_acct sys_acct +52 common umount2 sys_umount sys_umount +54 common ioctl sys_ioctl compat_sys_ioctl +55 common fcntl sys_fcntl compat_sys_fcntl +57 common setpgid sys_setpgid sys_setpgid +60 common umask sys_umask sys_umask +61 common chroot sys_chroot sys_chroot +62 common ustat sys_ustat compat_sys_ustat +63 common dup2 sys_dup2 sys_dup2 +64 common getppid sys_getppid sys_getppid +65 common getpgrp sys_getpgrp sys_getpgrp +66 common setsid sys_setsid sys_setsid +67 common sigaction sys_sigaction compat_sys_sigaction +70 32 setreuid - sys_setreuid16 +71 32 setregid - sys_setregid16 +72 common sigsuspend sys_sigsuspend sys_sigsuspend +73 common sigpending sys_sigpending compat_sys_sigpending +74 common sethostname sys_sethostname sys_sethostname +75 common setrlimit sys_setrlimit compat_sys_setrlimit +76 32 getrlimit - compat_sys_old_getrlimit +77 common getrusage sys_getrusage compat_sys_getrusage +78 common gettimeofday sys_gettimeofday compat_sys_gettimeofday +79 common settimeofday sys_settimeofday compat_sys_settimeofday +80 32 getgroups - sys_getgroups16 +81 32 setgroups - sys_setgroups16 +83 common symlink sys_symlink sys_symlink +85 common readlink sys_readlink sys_readlink +86 common uselib sys_uselib sys_uselib +87 common swapon sys_swapon sys_swapon +88 common reboot sys_reboot sys_reboot +89 common readdir - compat_sys_old_readdir +90 common mmap sys_old_mmap compat_sys_s390_old_mmap +91 common munmap sys_munmap sys_munmap +92 common truncate sys_truncate compat_sys_truncate +93 common ftruncate sys_ftruncate compat_sys_ftruncate +94 common fchmod sys_fchmod sys_fchmod +95 32 fchown - sys_fchown16 +96 common getpriority sys_getpriority sys_getpriority +97 common setpriority sys_setpriority sys_setpriority +99 common statfs sys_statfs compat_sys_statfs +100 common fstatfs sys_fstatfs compat_sys_fstatfs +101 32 ioperm - - +102 common socketcall sys_socketcall compat_sys_socketcall +103 common syslog sys_syslog sys_syslog +104 common setitimer sys_setitimer compat_sys_setitimer +105 common getitimer sys_getitimer compat_sys_getitimer +106 common stat sys_newstat compat_sys_newstat +107 common lstat sys_newlstat compat_sys_newlstat +108 common fstat sys_newfstat compat_sys_newfstat +110 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie +111 common vhangup sys_vhangup sys_vhangup +112 common idle - - +114 common wait4 sys_wait4 compat_sys_wait4 +115 common swapoff sys_swapoff sys_swapoff +116 common sysinfo sys_sysinfo compat_sys_sysinfo +117 common ipc sys_s390_ipc compat_sys_s390_ipc +118 common fsync sys_fsync sys_fsync +119 common sigreturn sys_sigreturn compat_sys_sigreturn +120 common clone sys_clone sys_clone +121 common setdomainname sys_setdomainname sys_setdomainname +122 common uname sys_newuname sys_newuname +124 common adjtimex sys_adjtimex sys_adjtimex_time32 +125 common mprotect sys_mprotect sys_mprotect +126 common sigprocmask sys_sigprocmask compat_sys_sigprocmask +127 common create_module - - +128 common init_module sys_init_module sys_init_module +129 common delete_module sys_delete_module sys_delete_module +130 common get_kernel_syms - - +131 common quotactl sys_quotactl sys_quotactl +132 common getpgid sys_getpgid sys_getpgid +133 common fchdir sys_fchdir sys_fchdir +134 common bdflush sys_bdflush sys_bdflush +135 common sysfs sys_sysfs sys_sysfs +136 common personality sys_s390_personality sys_s390_personality +137 common afs_syscall - - +138 32 setfsuid - sys_setfsuid16 +139 32 setfsgid - sys_setfsgid16 +140 32 _llseek - sys_llseek +141 common getdents sys_getdents compat_sys_getdents +142 32 _newselect - compat_sys_select +142 64 select sys_select - +143 common flock sys_flock sys_flock +144 common msync sys_msync sys_msync +145 common readv sys_readv compat_sys_readv +146 common writev sys_writev compat_sys_writev +147 common getsid sys_getsid sys_getsid +148 common fdatasync sys_fdatasync sys_fdatasync +149 common _sysctl sys_sysctl compat_sys_sysctl +150 common mlock sys_mlock sys_mlock +151 common munlock sys_munlock sys_munlock +152 common mlockall sys_mlockall sys_mlockall +153 common munlockall sys_munlockall sys_munlockall +154 common sched_setparam sys_sched_setparam sys_sched_setparam +155 common sched_getparam sys_sched_getparam sys_sched_getparam +156 common sched_setscheduler sys_sched_setscheduler sys_sched_setscheduler +157 common sched_getscheduler sys_sched_getscheduler sys_sched_getscheduler +158 common sched_yield sys_sched_yield sys_sched_yield +159 common sched_get_priority_max sys_sched_get_priority_max sys_sched_get_priority_max +160 common sched_get_priority_min sys_sched_get_priority_min sys_sched_get_priority_min +161 common sched_rr_get_interval sys_sched_rr_get_interval sys_sched_rr_get_interval_time32 +162 common nanosleep sys_nanosleep sys_nanosleep_time32 +163 common mremap sys_mremap sys_mremap +164 32 setresuid - sys_setresuid16 +165 32 getresuid - sys_getresuid16 +167 common query_module - - +168 common poll sys_poll sys_poll +169 common nfsservctl - - +170 32 setresgid - sys_setresgid16 +171 32 getresgid - sys_getresgid16 +172 common prctl sys_prctl sys_prctl +173 common rt_sigreturn sys_rt_sigreturn compat_sys_rt_sigreturn +174 common rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction +175 common rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask +176 common rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending +177 common rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time32 +178 common rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo +179 common rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend +180 common pread64 sys_pread64 compat_sys_s390_pread64 +181 common pwrite64 sys_pwrite64 compat_sys_s390_pwrite64 +182 32 chown - sys_chown16 +183 common getcwd sys_getcwd sys_getcwd +184 common capget sys_capget sys_capget +185 common capset sys_capset sys_capset +186 common sigaltstack sys_sigaltstack compat_sys_sigaltstack +187 common sendfile sys_sendfile64 compat_sys_sendfile +188 common getpmsg - - +189 common putpmsg - - +190 common vfork sys_vfork sys_vfork +191 32 ugetrlimit - compat_sys_getrlimit +191 64 getrlimit sys_getrlimit - +192 32 mmap2 - compat_sys_s390_mmap2 +193 32 truncate64 - compat_sys_s390_truncate64 +194 32 ftruncate64 - compat_sys_s390_ftruncate64 +195 32 stat64 - compat_sys_s390_stat64 +196 32 lstat64 - compat_sys_s390_lstat64 +197 32 fstat64 - compat_sys_s390_fstat64 +198 32 lchown32 - sys_lchown +198 64 lchown sys_lchown - +199 32 getuid32 - sys_getuid +199 64 getuid sys_getuid - +200 32 getgid32 - sys_getgid +200 64 getgid sys_getgid - +201 32 geteuid32 - sys_geteuid +201 64 geteuid sys_geteuid - +202 32 getegid32 - sys_getegid +202 64 getegid sys_getegid - +203 32 setreuid32 - sys_setreuid +203 64 setreuid sys_setreuid - +204 32 setregid32 - sys_setregid +204 64 setregid sys_setregid - +205 32 getgroups32 - sys_getgroups +205 64 getgroups sys_getgroups - +206 32 setgroups32 - sys_setgroups +206 64 setgroups sys_setgroups - +207 32 fchown32 - sys_fchown +207 64 fchown sys_fchown - +208 32 setresuid32 - sys_setresuid +208 64 setresuid sys_setresuid - +209 32 getresuid32 - sys_getresuid +209 64 getresuid sys_getresuid - +210 32 setresgid32 - sys_setresgid +210 64 setresgid sys_setresgid - +211 32 getresgid32 - sys_getresgid +211 64 getresgid sys_getresgid - +212 32 chown32 - sys_chown +212 64 chown sys_chown - +213 32 setuid32 - sys_setuid +213 64 setuid sys_setuid - +214 32 setgid32 - sys_setgid +214 64 setgid sys_setgid - +215 32 setfsuid32 - sys_setfsuid +215 64 setfsuid sys_setfsuid - +216 32 setfsgid32 - sys_setfsgid +216 64 setfsgid sys_setfsgid - +217 common pivot_root sys_pivot_root sys_pivot_root +218 common mincore sys_mincore sys_mincore +219 common madvise sys_madvise sys_madvise +220 common getdents64 sys_getdents64 sys_getdents64 +221 32 fcntl64 - compat_sys_fcntl64 +222 common readahead sys_readahead compat_sys_s390_readahead +223 32 sendfile64 - compat_sys_sendfile64 +224 common setxattr sys_setxattr sys_setxattr +225 common lsetxattr sys_lsetxattr sys_lsetxattr +226 common fsetxattr sys_fsetxattr sys_fsetxattr +227 common getxattr sys_getxattr sys_getxattr +228 common lgetxattr sys_lgetxattr sys_lgetxattr +229 common fgetxattr sys_fgetxattr sys_fgetxattr +230 common listxattr sys_listxattr sys_listxattr +231 common llistxattr sys_llistxattr sys_llistxattr +232 common flistxattr sys_flistxattr sys_flistxattr +233 common removexattr sys_removexattr sys_removexattr +234 common lremovexattr sys_lremovexattr sys_lremovexattr +235 common fremovexattr sys_fremovexattr sys_fremovexattr +236 common gettid sys_gettid sys_gettid +237 common tkill sys_tkill sys_tkill +238 common futex sys_futex sys_futex_time32 +239 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity +240 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity +241 common tgkill sys_tgkill sys_tgkill +243 common io_setup sys_io_setup compat_sys_io_setup +244 common io_destroy sys_io_destroy sys_io_destroy +245 common io_getevents sys_io_getevents sys_io_getevents_time32 +246 common io_submit sys_io_submit compat_sys_io_submit +247 common io_cancel sys_io_cancel sys_io_cancel +248 common exit_group sys_exit_group sys_exit_group +249 common epoll_create sys_epoll_create sys_epoll_create +250 common epoll_ctl sys_epoll_ctl sys_epoll_ctl +251 common epoll_wait sys_epoll_wait sys_epoll_wait +252 common set_tid_address sys_set_tid_address sys_set_tid_address +253 common fadvise64 sys_fadvise64_64 compat_sys_s390_fadvise64 +254 common timer_create sys_timer_create compat_sys_timer_create +255 common timer_settime sys_timer_settime sys_timer_settime32 +256 common timer_gettime sys_timer_gettime sys_timer_gettime32 +257 common timer_getoverrun sys_timer_getoverrun sys_timer_getoverrun +258 common timer_delete sys_timer_delete sys_timer_delete +259 common clock_settime sys_clock_settime sys_clock_settime32 +260 common clock_gettime sys_clock_gettime sys_clock_gettime32 +261 common clock_getres sys_clock_getres sys_clock_getres_time32 +262 common clock_nanosleep sys_clock_nanosleep sys_clock_nanosleep_time32 +264 32 fadvise64_64 - compat_sys_s390_fadvise64_64 +265 common statfs64 sys_statfs64 compat_sys_statfs64 +266 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 +267 common remap_file_pages sys_remap_file_pages sys_remap_file_pages +268 common mbind sys_mbind compat_sys_mbind +269 common get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy +270 common set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy +271 common mq_open sys_mq_open compat_sys_mq_open +272 common mq_unlink sys_mq_unlink sys_mq_unlink +273 common mq_timedsend sys_mq_timedsend sys_mq_timedsend_time32 +274 common mq_timedreceive sys_mq_timedreceive sys_mq_timedreceive_time32 +275 common mq_notify sys_mq_notify compat_sys_mq_notify +276 common mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr +277 common kexec_load sys_kexec_load compat_sys_kexec_load +278 common add_key sys_add_key sys_add_key +279 common request_key sys_request_key sys_request_key +280 common keyctl sys_keyctl compat_sys_keyctl +281 common waitid sys_waitid compat_sys_waitid +282 common ioprio_set sys_ioprio_set sys_ioprio_set +283 common ioprio_get sys_ioprio_get sys_ioprio_get +284 common inotify_init sys_inotify_init sys_inotify_init +285 common inotify_add_watch sys_inotify_add_watch sys_inotify_add_watch +286 common inotify_rm_watch sys_inotify_rm_watch sys_inotify_rm_watch +287 common migrate_pages sys_migrate_pages compat_sys_migrate_pages +288 common openat sys_openat compat_sys_openat +289 common mkdirat sys_mkdirat sys_mkdirat +290 common mknodat sys_mknodat sys_mknodat +291 common fchownat sys_fchownat sys_fchownat +292 common futimesat sys_futimesat sys_futimesat_time32 +293 32 fstatat64 - compat_sys_s390_fstatat64 +293 64 newfstatat sys_newfstatat - +294 common unlinkat sys_unlinkat sys_unlinkat +295 common renameat sys_renameat sys_renameat +296 common linkat sys_linkat sys_linkat +297 common symlinkat sys_symlinkat sys_symlinkat +298 common readlinkat sys_readlinkat sys_readlinkat +299 common fchmodat sys_fchmodat sys_fchmodat +300 common faccessat sys_faccessat sys_faccessat +301 common pselect6 sys_pselect6 compat_sys_pselect6_time32 +302 common ppoll sys_ppoll compat_sys_ppoll_time32 +303 common unshare sys_unshare sys_unshare +304 common set_robust_list sys_set_robust_list compat_sys_set_robust_list +305 common get_robust_list sys_get_robust_list compat_sys_get_robust_list +306 common splice sys_splice sys_splice +307 common sync_file_range sys_sync_file_range compat_sys_s390_sync_file_range +308 common tee sys_tee sys_tee +309 common vmsplice sys_vmsplice compat_sys_vmsplice +310 common move_pages sys_move_pages compat_sys_move_pages +311 common getcpu sys_getcpu sys_getcpu +312 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait +313 common utimes sys_utimes sys_utimes_time32 +314 common fallocate sys_fallocate compat_sys_s390_fallocate +315 common utimensat sys_utimensat sys_utimensat_time32 +316 common signalfd sys_signalfd compat_sys_signalfd +317 common timerfd - - +318 common eventfd sys_eventfd sys_eventfd +319 common timerfd_create sys_timerfd_create sys_timerfd_create +320 common timerfd_settime sys_timerfd_settime sys_timerfd_settime32 +321 common timerfd_gettime sys_timerfd_gettime sys_timerfd_gettime32 +322 common signalfd4 sys_signalfd4 compat_sys_signalfd4 +323 common eventfd2 sys_eventfd2 sys_eventfd2 +324 common inotify_init1 sys_inotify_init1 sys_inotify_init1 +325 common pipe2 sys_pipe2 sys_pipe2 +326 common dup3 sys_dup3 sys_dup3 +327 common epoll_create1 sys_epoll_create1 sys_epoll_create1 +328 common preadv sys_preadv compat_sys_preadv +329 common pwritev sys_pwritev compat_sys_pwritev +330 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo +331 common perf_event_open sys_perf_event_open sys_perf_event_open +332 common fanotify_init sys_fanotify_init sys_fanotify_init +333 common fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark +334 common prlimit64 sys_prlimit64 sys_prlimit64 +335 common name_to_handle_at sys_name_to_handle_at sys_name_to_handle_at +336 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at +337 common clock_adjtime sys_clock_adjtime sys_clock_adjtime32 +338 common syncfs sys_syncfs sys_syncfs +339 common setns sys_setns sys_setns +340 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv +341 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +342 common s390_runtime_instr sys_s390_runtime_instr sys_s390_runtime_instr +343 common kcmp sys_kcmp sys_kcmp +344 common finit_module sys_finit_module sys_finit_module +345 common sched_setattr sys_sched_setattr sys_sched_setattr +346 common sched_getattr sys_sched_getattr sys_sched_getattr +347 common renameat2 sys_renameat2 sys_renameat2 +348 common seccomp sys_seccomp sys_seccomp +349 common getrandom sys_getrandom sys_getrandom +350 common memfd_create sys_memfd_create sys_memfd_create +351 common bpf sys_bpf sys_bpf +352 common s390_pci_mmio_write sys_s390_pci_mmio_write sys_s390_pci_mmio_write +353 common s390_pci_mmio_read sys_s390_pci_mmio_read sys_s390_pci_mmio_read +354 common execveat sys_execveat compat_sys_execveat +355 common userfaultfd sys_userfaultfd sys_userfaultfd +356 common membarrier sys_membarrier sys_membarrier +357 common recvmmsg sys_recvmmsg compat_sys_recvmmsg_time32 +358 common sendmmsg sys_sendmmsg compat_sys_sendmmsg +359 common socket sys_socket sys_socket +360 common socketpair sys_socketpair sys_socketpair +361 common bind sys_bind sys_bind +362 common connect sys_connect sys_connect +363 common listen sys_listen sys_listen +364 common accept4 sys_accept4 sys_accept4 +365 common getsockopt sys_getsockopt compat_sys_getsockopt +366 common setsockopt sys_setsockopt compat_sys_setsockopt +367 common getsockname sys_getsockname sys_getsockname +368 common getpeername sys_getpeername sys_getpeername +369 common sendto sys_sendto sys_sendto +370 common sendmsg sys_sendmsg compat_sys_sendmsg +371 common recvfrom sys_recvfrom compat_sys_recvfrom +372 common recvmsg sys_recvmsg compat_sys_recvmsg +373 common shutdown sys_shutdown sys_shutdown +374 common mlock2 sys_mlock2 sys_mlock2 +375 common copy_file_range sys_copy_file_range sys_copy_file_range +376 common preadv2 sys_preadv2 compat_sys_preadv2 +377 common pwritev2 sys_pwritev2 compat_sys_pwritev2 +378 common s390_guarded_storage sys_s390_guarded_storage sys_s390_guarded_storage +379 common statx sys_statx sys_statx +380 common s390_sthyi sys_s390_sthyi sys_s390_sthyi +381 common kexec_file_load sys_kexec_file_load sys_kexec_file_load +382 common io_pgetevents sys_io_pgetevents compat_sys_io_pgetevents +383 common rseq sys_rseq sys_rseq +384 common pkey_mprotect sys_pkey_mprotect sys_pkey_mprotect +385 common pkey_alloc sys_pkey_alloc sys_pkey_alloc +386 common pkey_free sys_pkey_free sys_pkey_free +# room for arch specific syscalls +392 64 semtimedop sys_semtimedop - +393 common semget sys_semget sys_semget +394 common semctl sys_semctl compat_sys_semctl +395 common shmget sys_shmget sys_shmget +396 common shmctl sys_shmctl compat_sys_shmctl +397 common shmat sys_shmat compat_sys_shmat +398 common shmdt sys_shmdt sys_shmdt +399 common msgget sys_msgget sys_msgget +400 common msgsnd sys_msgsnd compat_sys_msgsnd +401 common msgrcv sys_msgrcv compat_sys_msgrcv +402 common msgctl sys_msgctl compat_sys_msgctl +403 32 clock_gettime64 - sys_clock_gettime +404 32 clock_settime64 - sys_clock_settime +405 32 clock_adjtime64 - sys_clock_adjtime +406 32 clock_getres_time64 - sys_clock_getres +407 32 clock_nanosleep_time64 - sys_clock_nanosleep +408 32 timer_gettime64 - sys_timer_gettime +409 32 timer_settime64 - sys_timer_settime +410 32 timerfd_gettime64 - sys_timerfd_gettime +411 32 timerfd_settime64 - sys_timerfd_settime +412 32 utimensat_time64 - sys_utimensat +413 32 pselect6_time64 - compat_sys_pselect6_time64 +414 32 ppoll_time64 - compat_sys_ppoll_time64 +416 32 io_pgetevents_time64 - sys_io_pgetevents +417 32 recvmmsg_time64 - compat_sys_recvmmsg_time64 +418 32 mq_timedsend_time64 - sys_mq_timedsend +419 32 mq_timedreceive_time64 - sys_mq_timedreceive +420 32 semtimedop_time64 - sys_semtimedop +421 32 rt_sigtimedwait_time64 - compat_sys_rt_sigtimedwait_time64 +422 32 futex_time64 - sys_futex +423 32 sched_rr_get_interval_time64 - sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree sys_open_tree +429 common move_mount sys_move_mount sys_move_mount +430 common fsopen sys_fsopen sys_fsopen +431 common fsconfig sys_fsconfig sys_fsconfig +432 common fsmount sys_fsmount sys_fsmount +433 common fspick sys_fspick sys_fspick +434 common pidfd_open sys_pidfd_open sys_pidfd_open +435 common clone3 sys_clone3 sys_clone3 diff --git a/linux-user/s390x/syscall_nr.h b/linux-user/s390x/syscall_nr.h deleted file mode 100644 index 261da1b0c3..0000000000 --- a/linux-user/s390x/syscall_nr.h +++ /dev/null @@ -1,331 +0,0 @@ -/* - * This file contains the system call numbers. - */ - -#ifndef LINUX_USER_S390X_SYSCALL_NR_H -#define LINUX_USER_S390X_SYSCALL_NR_H - -#define TARGET_NR_exit 1 -#define TARGET_NR_fork 2 -#define TARGET_NR_read 3 -#define TARGET_NR_write 4 -#define TARGET_NR_open 5 -#define TARGET_NR_close 6 -#define TARGET_NR_restart_syscall 7 -#define TARGET_NR_creat 8 -#define TARGET_NR_link 9 -#define TARGET_NR_unlink 10 -#define TARGET_NR_execve 11 -#define TARGET_NR_chdir 12 -#define TARGET_NR_mknod 14 -#define TARGET_NR_chmod 15 -#define TARGET_NR_lseek 19 -#define TARGET_NR_getpid 20 -#define TARGET_NR_mount 21 -#define TARGET_NR_umount 22 -#define TARGET_NR_ptrace 26 -#define TARGET_NR_alarm 27 -#define TARGET_NR_pause 29 -#define TARGET_NR_utime 30 -#define TARGET_NR_access 33 -#define TARGET_NR_nice 34 -#define TARGET_NR_sync 36 -#define TARGET_NR_kill 37 -#define TARGET_NR_rename 38 -#define TARGET_NR_mkdir 39 -#define TARGET_NR_rmdir 40 -#define TARGET_NR_dup 41 -#define TARGET_NR_pipe 42 -#define TARGET_NR_times 43 -#define TARGET_NR_brk 45 -#define TARGET_NR_signal 48 -#define TARGET_NR_acct 51 -#define TARGET_NR_umount2 52 -#define TARGET_NR_ioctl 54 -#define TARGET_NR_fcntl 55 -#define TARGET_NR_setpgid 57 -#define TARGET_NR_umask 60 -#define TARGET_NR_chroot 61 -#define TARGET_NR_ustat 62 -#define TARGET_NR_dup2 63 -#define TARGET_NR_getppid 64 -#define TARGET_NR_getpgrp 65 -#define TARGET_NR_setsid 66 -#define TARGET_NR_sigaction 67 -#define TARGET_NR_sigsuspend 72 -#define TARGET_NR_sigpending 73 -#define TARGET_NR_sethostname 74 -#define TARGET_NR_setrlimit 75 -#define TARGET_NR_getrusage 77 -#define TARGET_NR_gettimeofday 78 -#define TARGET_NR_settimeofday 79 -#define TARGET_NR_symlink 83 -#define TARGET_NR_readlink 85 -#define TARGET_NR_uselib 86 -#define TARGET_NR_swapon 87 -#define TARGET_NR_reboot 88 -#define TARGET_NR_readdir 89 -#define TARGET_NR_mmap 90 -#define TARGET_NR_munmap 91 -#define TARGET_NR_truncate 92 -#define TARGET_NR_ftruncate 93 -#define TARGET_NR_fchmod 94 -#define TARGET_NR_getpriority 96 -#define TARGET_NR_setpriority 97 -#define TARGET_NR_statfs 99 -#define TARGET_NR_fstatfs 100 -#define TARGET_NR_socketcall 102 -#define TARGET_NR_syslog 103 -#define TARGET_NR_setitimer 104 -#define TARGET_NR_getitimer 105 -#define TARGET_NR_stat 106 -#define TARGET_NR_lstat 107 -#define TARGET_NR_fstat 108 -#define TARGET_NR_lookup_dcookie 110 -#define TARGET_NR_vhangup 111 -#define TARGET_NR_idle 112 -#define TARGET_NR_wait4 114 -#define TARGET_NR_swapoff 115 -#define TARGET_NR_sysinfo 116 -#define TARGET_NR_ipc 117 -#define TARGET_NR_fsync 118 -#define TARGET_NR_sigreturn 119 -#define TARGET_NR_clone 120 -#define TARGET_NR_setdomainname 121 -#define TARGET_NR_uname 122 -#define TARGET_NR_adjtimex 124 -#define TARGET_NR_mprotect 125 -#define TARGET_NR_sigprocmask 126 -#define TARGET_NR_create_module 127 -#define TARGET_NR_init_module 128 -#define TARGET_NR_delete_module 129 -#define TARGET_NR_get_kernel_syms 130 -#define TARGET_NR_quotactl 131 -#define TARGET_NR_getpgid 132 -#define TARGET_NR_fchdir 133 -#define TARGET_NR_bdflush 134 -#define TARGET_NR_sysfs 135 -#define TARGET_NR_personality 136 -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define TARGET_NR_getdents 141 -#define TARGET_NR_select 142 -#define TARGET_NR_flock 143 -#define TARGET_NR_msync 144 -#define TARGET_NR_readv 145 -#define TARGET_NR_writev 146 -#define TARGET_NR_getsid 147 -#define TARGET_NR_fdatasync 148 -#define TARGET_NR__sysctl 149 -#define TARGET_NR_mlock 150 -#define TARGET_NR_munlock 151 -#define TARGET_NR_mlockall 152 -#define TARGET_NR_munlockall 153 -#define TARGET_NR_sched_setparam 154 -#define TARGET_NR_sched_getparam 155 -#define TARGET_NR_sched_setscheduler 156 -#define TARGET_NR_sched_getscheduler 157 -#define TARGET_NR_sched_yield 158 -#define TARGET_NR_sched_get_priority_max 159 -#define TARGET_NR_sched_get_priority_min 160 -#define TARGET_NR_sched_rr_get_interval 161 -#define TARGET_NR_nanosleep 162 -#define TARGET_NR_mremap 163 -#define TARGET_NR_query_module 167 -#define TARGET_NR_poll 168 -#define TARGET_NR_nfsservctl 169 -#define TARGET_NR_prctl 172 -#define TARGET_NR_rt_sigreturn 173 -#define TARGET_NR_rt_sigaction 174 -#define TARGET_NR_rt_sigprocmask 175 -#define TARGET_NR_rt_sigpending 176 -#define TARGET_NR_rt_sigtimedwait 177 -#define TARGET_NR_rt_sigqueueinfo 178 -#define TARGET_NR_rt_sigsuspend 179 -#define TARGET_NR_pread64 180 -#define TARGET_NR_pwrite64 181 -#define TARGET_NR_getcwd 183 -#define TARGET_NR_capget 184 -#define TARGET_NR_capset 185 -#define TARGET_NR_sigaltstack 186 -#define TARGET_NR_sendfile 187 -#define TARGET_NR_getpmsg 188 -#define TARGET_NR_putpmsg 189 -#define TARGET_NR_vfork 190 -#define TARGET_NR_getrlimit 191 /* SuS compliant getrlimit */ -#define TARGET_NR_lchown 198 -#define TARGET_NR_getuid 199 -#define TARGET_NR_getgid 200 -#define TARGET_NR_geteuid 201 -#define TARGET_NR_getegid 202 -#define TARGET_NR_setreuid 203 -#define TARGET_NR_setregid 204 -#define TARGET_NR_getgroups 205 -#define TARGET_NR_setgroups 206 -#define TARGET_NR_fchown 207 -#define TARGET_NR_setresuid 208 -#define TARGET_NR_getresuid 209 -#define TARGET_NR_setresgid 210 -#define TARGET_NR_getresgid 211 -#define TARGET_NR_chown 212 -#define TARGET_NR_setuid 213 -#define TARGET_NR_setgid 214 -#define TARGET_NR_setfsuid 215 -#define TARGET_NR_setfsgid 216 -#define TARGET_NR_pivot_root 217 -#define TARGET_NR_mincore 218 -#define TARGET_NR_madvise 219 -#define TARGET_NR_getdents64 220 -#define TARGET_NR_readahead 222 -#define TARGET_NR_setxattr 224 -#define TARGET_NR_lsetxattr 225 -#define TARGET_NR_fsetxattr 226 -#define TARGET_NR_getxattr 227 -#define TARGET_NR_lgetxattr 228 -#define TARGET_NR_fgetxattr 229 -#define TARGET_NR_listxattr 230 -#define TARGET_NR_llistxattr 231 -#define TARGET_NR_flistxattr 232 -#define TARGET_NR_removexattr 233 -#define TARGET_NR_lremovexattr 234 -#define TARGET_NR_fremovexattr 235 -#define TARGET_NR_gettid 236 -#define TARGET_NR_tkill 237 -#define TARGET_NR_futex 238 -#define TARGET_NR_sched_setaffinity 239 -#define TARGET_NR_sched_getaffinity 240 -#define TARGET_NR_tgkill 241 -/* Number 242 is reserved for tux */ -#define TARGET_NR_io_setup 243 -#define TARGET_NR_io_destroy 244 -#define TARGET_NR_io_getevents 245 -#define TARGET_NR_io_submit 246 -#define TARGET_NR_io_cancel 247 -#define TARGET_NR_exit_group 248 -#define TARGET_NR_epoll_create 249 -#define TARGET_NR_epoll_ctl 250 -#define TARGET_NR_epoll_wait 251 -#define TARGET_NR_set_tid_address 252 -#define TARGET_NR_fadvise64 253 -#define TARGET_NR_timer_create 254 -#define TARGET_NR_timer_settime (TARGET_NR_timer_create + 1) -#define TARGET_NR_timer_gettime (TARGET_NR_timer_create + 2) -#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create + 3) -#define TARGET_NR_timer_delete (TARGET_NR_timer_create + 4) -#define TARGET_NR_clock_settime (TARGET_NR_timer_create + 5) -#define TARGET_NR_clock_gettime (TARGET_NR_timer_create + 6) -#define TARGET_NR_clock_getres (TARGET_NR_timer_create + 7) -#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create + 8) -/* Number 263 is reserved for vserver */ -#define TARGET_NR_statfs64 265 -#define TARGET_NR_fstatfs64 266 -#define TARGET_NR_remap_file_pages 267 -/* Number 268 is reserved for new sys_mbind */ -/* Number 269 is reserved for new sys_get_mempolicy */ -/* Number 270 is reserved for new sys_set_mempolicy */ -#define TARGET_NR_mq_open 271 -#define TARGET_NR_mq_unlink 272 -#define TARGET_NR_mq_timedsend 273 -#define TARGET_NR_mq_timedreceive 274 -#define TARGET_NR_mq_notify 275 -#define TARGET_NR_mq_getsetattr 276 -#define TARGET_NR_kexec_load 277 -#define TARGET_NR_add_key 278 -#define TARGET_NR_request_key 279 -#define TARGET_NR_keyctl 280 -#define TARGET_NR_waitid 281 -#define TARGET_NR_ioprio_set 282 -#define TARGET_NR_ioprio_get 283 -#define TARGET_NR_inotify_init 284 -#define TARGET_NR_inotify_add_watch 285 -#define TARGET_NR_inotify_rm_watch 286 -/* Number 287 is reserved for new sys_migrate_pages */ -#define TARGET_NR_openat 288 -#define TARGET_NR_mkdirat 289 -#define TARGET_NR_mknodat 290 -#define TARGET_NR_fchownat 291 -#define TARGET_NR_futimesat 292 -#define TARGET_NR_newfstatat 293 -#define TARGET_NR_unlinkat 294 -#define TARGET_NR_renameat 295 -#define TARGET_NR_linkat 296 -#define TARGET_NR_symlinkat 297 -#define TARGET_NR_readlinkat 298 -#define TARGET_NR_fchmodat 299 -#define TARGET_NR_faccessat 300 -#define TARGET_NR_pselect6 301 -#define TARGET_NR_ppoll 302 -#define TARGET_NR_unshare 303 -#define TARGET_NR_set_robust_list 304 -#define TARGET_NR_get_robust_list 305 -#define TARGET_NR_splice 306 -#define TARGET_NR_sync_file_range 307 -#define TARGET_NR_tee 308 -#define TARGET_NR_vmsplice 309 -/* Number 310 is reserved for new sys_move_pages */ -#define TARGET_NR_getcpu 311 -#define TARGET_NR_epoll_pwait 312 -#define TARGET_NR_utimes 313 -#define TARGET_NR_fallocate 314 -#define TARGET_NR_utimensat 315 -#define TARGET_NR_signalfd 316 -#define TARGET_NR_timerfd 317 -#define TARGET_NR_eventfd 318 -#define TARGET_NR_timerfd_create 319 -#define TARGET_NR_timerfd_settime 320 -#define TARGET_NR_timerfd_gettime 321 -#define TARGET_NR_signalfd4 322 -#define TARGET_NR_eventfd2 323 -#define TARGET_NR_inotify_init1 324 -#define TARGET_NR_pipe2 325 -#define TARGET_NR_dup3 326 -#define TARGET_NR_epoll_create1 327 -#define TARGET_NR_preadv 328 -#define TARGET_NR_pwritev 329 -#define TARGET_NR_rt_tgsigqueueinfo 330 -#define TARGET_NR_perf_event_open 331 -#define TARGET_NR_fanotify_init 332 -#define TARGET_NR_fanotify_mark 333 -#define TARGET_NR_prlimit64 334 -#define TARGET_NR_name_to_handle_at 335 -#define TARGET_NR_open_by_handle_at 336 -#define TARGET_NR_clock_adjtime 337 -#define TARGET_NR_syncfs 338 -#define TARGET_NR_setns 339 -#define TARGET_NR_process_vm_readv 340 -#define TARGET_NR_process_vm_writev 341 -#define TARGET_NR_s390_runtime_instr 342 -#define TARGET_NR_kcmp 343 -#define TARGET_NR_finit_module 344 -#define TARGET_NR_sched_setattr 345 -#define TARGET_NR_sched_getattr 346 -#define TARGET_NR_renameat2 347 -#define TARGET_NR_seccomp 348 -#define TARGET_NR_getrandom 349 -#define TARGET_NR_memfd_create 350 -#define TARGET_NR_bpf 351 -#define TARGET_NR_s390_pci_mmio_write 352 -#define TARGET_NR_s390_pci_mmio_read 353 -#define TARGET_NR_execveat 354 -#define TARGET_NR_userfaultfd 355 -#define TARGET_NR_membarrier 356 -#define TARGET_NR_recvmmsg 357 -#define TARGET_NR_sendmmsg 358 -#define TARGET_NR_socket 359 -#define TARGET_NR_socketpair 360 -#define TARGET_NR_bind 361 -#define TARGET_NR_connect 362 -#define TARGET_NR_listen 363 -#define TARGET_NR_accept4 364 -#define TARGET_NR_getsockopt 365 -#define TARGET_NR_setsockopt 366 -#define TARGET_NR_getsockname 367 -#define TARGET_NR_getpeername 368 -#define TARGET_NR_sendto 369 -#define TARGET_NR_sendmsg 370 -#define TARGET_NR_recvfrom 371 -#define TARGET_NR_recvmsg 372 -#define TARGET_NR_shutdown 373 -#define TARGET_NR_mlock2 374 - - -#endif diff --git a/linux-user/s390x/syscallhdr.sh b/linux-user/s390x/syscallhdr.sh new file mode 100755 index 0000000000..85a99c48de --- /dev/null +++ b/linux-user/s390x/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_S390X_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */\n" "${fileguard}" +) > "$out" From bb0cdc03673d8c7e7d4d0f8a9693bc11d531b6cd Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:54 +0100 Subject: [PATCH 19/32] linux-user, sparc, sparc64: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/sparc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-13-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 6 +- linux-user/Makefile.objs | 2 + linux-user/sparc/Makefile.objs | 5 + linux-user/sparc/syscall.tbl | 483 +++++++++++++++++++++++++++++++ linux-user/sparc/syscall_nr.h | 363 ----------------------- linux-user/sparc/syscallhdr.sh | 32 ++ linux-user/sparc64/Makefile.objs | 5 + linux-user/sparc64/syscall.tbl | 483 +++++++++++++++++++++++++++++++ linux-user/sparc64/syscall_nr.h | 366 ----------------------- linux-user/sparc64/syscallhdr.sh | 32 ++ 10 files changed, 1047 insertions(+), 730 deletions(-) create mode 100644 linux-user/sparc/Makefile.objs create mode 100644 linux-user/sparc/syscall.tbl delete mode 100644 linux-user/sparc/syscall_nr.h create mode 100644 linux-user/sparc/syscallhdr.sh create mode 100644 linux-user/sparc64/Makefile.objs create mode 100644 linux-user/sparc64/syscall.tbl delete mode 100644 linux-user/sparc64/syscall_nr.h create mode 100644 linux-user/sparc64/syscallhdr.sh diff --git a/configure b/configure index 8805fab482..0f063c368f 100755 --- a/configure +++ b/configure @@ -1889,7 +1889,8 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory -for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x ; do +for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ + ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7901,14 +7902,17 @@ case "$target_name" in bflt="yes" ;; sparc) + TARGET_SYSTBL_ABI=common,32 ;; sparc64) TARGET_BASE_ARCH=sparc + TARGET_SYSTBL_ABI=common,64 ;; sparc32plus) TARGET_ARCH=sparc64 TARGET_BASE_ARCH=sparc TARGET_ABI_DIR=sparc + TARGET_SYSTBL_ABI=common,32 echo "TARGET_ABI32=y" >> $config_target_mak ;; s390x) diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index f4e666e74c..36f20cad79 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -16,4 +16,6 @@ obj-$(TARGET_PPC) += ppc/ obj-$(TARGET_PPC64) += ppc/ obj-$(TARGET_S390X) += s390x/ obj-$(TARGET_SH4) += sh4/ +obj-$(TARGET_SPARC) += sparc/ +obj-$(TARGET_SPARC64) += $(TARGET_ABI_DIR)/ obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/sparc/Makefile.objs b/linux-user/sparc/Makefile.objs new file mode 100644 index 0000000000..29d3f066cb --- /dev/null +++ b/linux-user/sparc/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/sparc/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/sparc/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/sparc/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/sparc/syscall.tbl b/linux-user/sparc/syscall.tbl new file mode 100644 index 0000000000..8c8cc7537f --- /dev/null +++ b/linux-user/sparc/syscall.tbl @@ -0,0 +1,483 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for sparc +# +# The format is: +# +# +# The can be common, 64, or 32 for this file. +# +0 common restart_syscall sys_restart_syscall +1 32 exit sys_exit sparc_exit +1 64 exit sparc_exit +2 common fork sys_fork +3 common read sys_read +4 common write sys_write +5 common open sys_open compat_sys_open +6 common close sys_close +7 common wait4 sys_wait4 compat_sys_wait4 +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 32 execv sunos_execv +11 64 execv sys_nis_syscall +12 common chdir sys_chdir +13 32 chown sys_chown16 +13 64 chown sys_chown +14 common mknod sys_mknod +15 common chmod sys_chmod +16 32 lchown sys_lchown16 +16 64 lchown sys_lchown +17 common brk sys_brk +18 common perfctr sys_nis_syscall +19 common lseek sys_lseek compat_sys_lseek +20 common getpid sys_getpid +21 common capget sys_capget +22 common capset sys_capset +23 32 setuid sys_setuid16 +23 64 setuid sys_setuid +24 32 getuid sys_getuid16 +24 64 getuid sys_getuid +25 common vmsplice sys_vmsplice compat_sys_vmsplice +26 common ptrace sys_ptrace compat_sys_ptrace +27 common alarm sys_alarm +28 common sigaltstack sys_sigaltstack compat_sys_sigaltstack +29 32 pause sys_pause +29 64 pause sys_nis_syscall +30 32 utime sys_utime32 +30 64 utime sys_utime +31 32 lchown32 sys_lchown +32 32 fchown32 sys_fchown +33 common access sys_access +34 common nice sys_nice +35 32 chown32 sys_chown +36 common sync sys_sync +37 common kill sys_kill +38 common stat sys_newstat compat_sys_newstat +39 32 sendfile sys_sendfile compat_sys_sendfile +39 64 sendfile sys_sendfile64 +40 common lstat sys_newlstat compat_sys_newlstat +41 common dup sys_dup +42 common pipe sys_sparc_pipe +43 common times sys_times compat_sys_times +44 32 getuid32 sys_getuid +45 common umount2 sys_umount +46 32 setgid sys_setgid16 +46 64 setgid sys_setgid +47 32 getgid sys_getgid16 +47 64 getgid sys_getgid +48 common signal sys_signal +49 32 geteuid sys_geteuid16 +49 64 geteuid sys_geteuid +50 32 getegid sys_getegid16 +50 64 getegid sys_getegid +51 common acct sys_acct +52 64 memory_ordering sys_memory_ordering +53 32 getgid32 sys_getgid +54 common ioctl sys_ioctl compat_sys_ioctl +55 common reboot sys_reboot +56 32 mmap2 sys_mmap2 sys32_mmap2 +57 common symlink sys_symlink +58 common readlink sys_readlink +59 32 execve sys_execve sys32_execve +59 64 execve sys64_execve +60 common umask sys_umask +61 common chroot sys_chroot +62 common fstat sys_newfstat compat_sys_newfstat +63 common fstat64 sys_fstat64 compat_sys_fstat64 +64 common getpagesize sys_getpagesize +65 common msync sys_msync +66 common vfork sys_vfork +67 common pread64 sys_pread64 compat_sys_pread64 +68 common pwrite64 sys_pwrite64 compat_sys_pwrite64 +69 32 geteuid32 sys_geteuid +70 32 getegid32 sys_getegid +71 common mmap sys_mmap +72 32 setreuid32 sys_setreuid +73 32 munmap sys_munmap +73 64 munmap sys_64_munmap +74 common mprotect sys_mprotect +75 common madvise sys_madvise +76 common vhangup sys_vhangup +77 32 truncate64 sys_truncate64 compat_sys_truncate64 +78 common mincore sys_mincore +79 32 getgroups sys_getgroups16 +79 64 getgroups sys_getgroups +80 32 setgroups sys_setgroups16 +80 64 setgroups sys_setgroups +81 common getpgrp sys_getpgrp +82 32 setgroups32 sys_setgroups +83 common setitimer sys_setitimer compat_sys_setitimer +84 32 ftruncate64 sys_ftruncate64 compat_sys_ftruncate64 +85 common swapon sys_swapon +86 common getitimer sys_getitimer compat_sys_getitimer +87 32 setuid32 sys_setuid +88 common sethostname sys_sethostname +89 32 setgid32 sys_setgid +90 common dup2 sys_dup2 +91 32 setfsuid32 sys_setfsuid +92 common fcntl sys_fcntl compat_sys_fcntl +93 common select sys_select +94 32 setfsgid32 sys_setfsgid +95 common fsync sys_fsync +96 common setpriority sys_setpriority +97 common socket sys_socket +98 common connect sys_connect +99 common accept sys_accept +100 common getpriority sys_getpriority +101 common rt_sigreturn sys_rt_sigreturn sys32_rt_sigreturn +102 common rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction +103 common rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask +104 common rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending +105 32 rt_sigtimedwait sys_rt_sigtimedwait_time32 compat_sys_rt_sigtimedwait_time32 +105 64 rt_sigtimedwait sys_rt_sigtimedwait +106 common rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo +107 common rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend +108 32 setresuid32 sys_setresuid +108 64 setresuid sys_setresuid +109 32 getresuid32 sys_getresuid +109 64 getresuid sys_getresuid +110 32 setresgid32 sys_setresgid +110 64 setresgid sys_setresgid +111 32 getresgid32 sys_getresgid +111 64 getresgid sys_getresgid +112 32 setregid32 sys_setregid +113 common recvmsg sys_recvmsg compat_sys_recvmsg +114 common sendmsg sys_sendmsg compat_sys_sendmsg +115 32 getgroups32 sys_getgroups +116 common gettimeofday sys_gettimeofday compat_sys_gettimeofday +117 common getrusage sys_getrusage compat_sys_getrusage +118 common getsockopt sys_getsockopt compat_sys_getsockopt +119 common getcwd sys_getcwd +120 common readv sys_readv compat_sys_readv +121 common writev sys_writev compat_sys_writev +122 common settimeofday sys_settimeofday compat_sys_settimeofday +123 32 fchown sys_fchown16 +123 64 fchown sys_fchown +124 common fchmod sys_fchmod +125 common recvfrom sys_recvfrom +126 32 setreuid sys_setreuid16 +126 64 setreuid sys_setreuid +127 32 setregid sys_setregid16 +127 64 setregid sys_setregid +128 common rename sys_rename +129 common truncate sys_truncate compat_sys_truncate +130 common ftruncate sys_ftruncate compat_sys_ftruncate +131 common flock sys_flock +132 common lstat64 sys_lstat64 compat_sys_lstat64 +133 common sendto sys_sendto +134 common shutdown sys_shutdown +135 common socketpair sys_socketpair +136 common mkdir sys_mkdir +137 common rmdir sys_rmdir +138 32 utimes sys_utimes_time32 +138 64 utimes sys_utimes +139 common stat64 sys_stat64 compat_sys_stat64 +140 common sendfile64 sys_sendfile64 +141 common getpeername sys_getpeername +142 32 futex sys_futex_time32 +142 64 futex sys_futex +143 common gettid sys_gettid +144 common getrlimit sys_getrlimit compat_sys_getrlimit +145 common setrlimit sys_setrlimit compat_sys_setrlimit +146 common pivot_root sys_pivot_root +147 common prctl sys_prctl +148 common pciconfig_read sys_pciconfig_read +149 common pciconfig_write sys_pciconfig_write +150 common getsockname sys_getsockname +151 common inotify_init sys_inotify_init +152 common inotify_add_watch sys_inotify_add_watch +153 common poll sys_poll +154 common getdents64 sys_getdents64 +155 32 fcntl64 sys_fcntl64 compat_sys_fcntl64 +156 common inotify_rm_watch sys_inotify_rm_watch +157 common statfs sys_statfs compat_sys_statfs +158 common fstatfs sys_fstatfs compat_sys_fstatfs +159 common umount sys_oldumount +160 common sched_set_affinity sys_sched_setaffinity compat_sys_sched_setaffinity +161 common sched_get_affinity sys_sched_getaffinity compat_sys_sched_getaffinity +162 common getdomainname sys_getdomainname +163 common setdomainname sys_setdomainname +164 64 utrap_install sys_utrap_install +165 common quotactl sys_quotactl +166 common set_tid_address sys_set_tid_address +167 common mount sys_mount compat_sys_mount +168 common ustat sys_ustat compat_sys_ustat +169 common setxattr sys_setxattr +170 common lsetxattr sys_lsetxattr +171 common fsetxattr sys_fsetxattr +172 common getxattr sys_getxattr +173 common lgetxattr sys_lgetxattr +174 common getdents sys_getdents compat_sys_getdents +175 common setsid sys_setsid +176 common fchdir sys_fchdir +177 common fgetxattr sys_fgetxattr +178 common listxattr sys_listxattr +179 common llistxattr sys_llistxattr +180 common flistxattr sys_flistxattr +181 common removexattr sys_removexattr +182 common lremovexattr sys_lremovexattr +183 32 sigpending sys_sigpending compat_sys_sigpending +183 64 sigpending sys_nis_syscall +184 common query_module sys_ni_syscall +185 common setpgid sys_setpgid +186 common fremovexattr sys_fremovexattr +187 common tkill sys_tkill +188 32 exit_group sys_exit_group sparc_exit_group +188 64 exit_group sparc_exit_group +189 common uname sys_newuname +190 common init_module sys_init_module +191 32 personality sys_personality sys_sparc64_personality +191 64 personality sys_sparc64_personality +192 32 remap_file_pages sys_sparc_remap_file_pages sys_remap_file_pages +192 64 remap_file_pages sys_remap_file_pages +193 common epoll_create sys_epoll_create +194 common epoll_ctl sys_epoll_ctl +195 common epoll_wait sys_epoll_wait +196 common ioprio_set sys_ioprio_set +197 common getppid sys_getppid +198 32 sigaction sys_sparc_sigaction compat_sys_sparc_sigaction +198 64 sigaction sys_nis_syscall +199 common sgetmask sys_sgetmask +200 common ssetmask sys_ssetmask +201 32 sigsuspend sys_sigsuspend +201 64 sigsuspend sys_nis_syscall +202 common oldlstat sys_newlstat compat_sys_newlstat +203 common uselib sys_uselib +204 32 readdir sys_old_readdir compat_sys_old_readdir +204 64 readdir sys_nis_syscall +205 common readahead sys_readahead compat_sys_readahead +206 common socketcall sys_socketcall sys32_socketcall +207 common syslog sys_syslog +208 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie +209 common fadvise64 sys_fadvise64 compat_sys_fadvise64 +210 common fadvise64_64 sys_fadvise64_64 compat_sys_fadvise64_64 +211 common tgkill sys_tgkill +212 common waitpid sys_waitpid +213 common swapoff sys_swapoff +214 common sysinfo sys_sysinfo compat_sys_sysinfo +215 32 ipc sys_ipc compat_sys_ipc +215 64 ipc sys_sparc_ipc +216 32 sigreturn sys_sigreturn sys32_sigreturn +216 64 sigreturn sys_nis_syscall +217 common clone sys_clone +218 common ioprio_get sys_ioprio_get +219 32 adjtimex sys_adjtimex_time32 +219 64 adjtimex sys_sparc_adjtimex +220 32 sigprocmask sys_sigprocmask compat_sys_sigprocmask +220 64 sigprocmask sys_nis_syscall +221 common create_module sys_ni_syscall +222 common delete_module sys_delete_module +223 common get_kernel_syms sys_ni_syscall +224 common getpgid sys_getpgid +225 common bdflush sys_bdflush +226 common sysfs sys_sysfs +227 common afs_syscall sys_nis_syscall +228 common setfsuid sys_setfsuid16 +229 common setfsgid sys_setfsgid16 +230 common _newselect sys_select compat_sys_select +231 32 time sys_time32 +232 common splice sys_splice +233 32 stime sys_stime32 +233 64 stime sys_stime +234 common statfs64 sys_statfs64 compat_sys_statfs64 +235 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 +236 common _llseek sys_llseek +237 common mlock sys_mlock +238 common munlock sys_munlock +239 common mlockall sys_mlockall +240 common munlockall sys_munlockall +241 common sched_setparam sys_sched_setparam +242 common sched_getparam sys_sched_getparam +243 common sched_setscheduler sys_sched_setscheduler +244 common sched_getscheduler sys_sched_getscheduler +245 common sched_yield sys_sched_yield +246 common sched_get_priority_max sys_sched_get_priority_max +247 common sched_get_priority_min sys_sched_get_priority_min +248 32 sched_rr_get_interval sys_sched_rr_get_interval_time32 +248 64 sched_rr_get_interval sys_sched_rr_get_interval +249 32 nanosleep sys_nanosleep_time32 +249 64 nanosleep sys_nanosleep +250 32 mremap sys_mremap +250 64 mremap sys_64_mremap +251 common _sysctl sys_sysctl compat_sys_sysctl +252 common getsid sys_getsid +253 common fdatasync sys_fdatasync +254 32 nfsservctl sys_ni_syscall sys_nis_syscall +254 64 nfsservctl sys_nis_syscall +255 common sync_file_range sys_sync_file_range compat_sys_sync_file_range +256 32 clock_settime sys_clock_settime32 +256 64 clock_settime sys_clock_settime +257 32 clock_gettime sys_clock_gettime32 +257 64 clock_gettime sys_clock_gettime +258 32 clock_getres sys_clock_getres_time32 +258 64 clock_getres sys_clock_getres +259 32 clock_nanosleep sys_clock_nanosleep_time32 +259 64 clock_nanosleep sys_clock_nanosleep +260 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity +261 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity +262 32 timer_settime sys_timer_settime32 +262 64 timer_settime sys_timer_settime +263 32 timer_gettime sys_timer_gettime32 +263 64 timer_gettime sys_timer_gettime +264 common timer_getoverrun sys_timer_getoverrun +265 common timer_delete sys_timer_delete +266 common timer_create sys_timer_create compat_sys_timer_create +# 267 was vserver +267 common vserver sys_nis_syscall +268 common io_setup sys_io_setup compat_sys_io_setup +269 common io_destroy sys_io_destroy +270 common io_submit sys_io_submit compat_sys_io_submit +271 common io_cancel sys_io_cancel +272 32 io_getevents sys_io_getevents_time32 +272 64 io_getevents sys_io_getevents +273 common mq_open sys_mq_open compat_sys_mq_open +274 common mq_unlink sys_mq_unlink +275 32 mq_timedsend sys_mq_timedsend_time32 +275 64 mq_timedsend sys_mq_timedsend +276 32 mq_timedreceive sys_mq_timedreceive_time32 +276 64 mq_timedreceive sys_mq_timedreceive +277 common mq_notify sys_mq_notify compat_sys_mq_notify +278 common mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr +279 common waitid sys_waitid compat_sys_waitid +280 common tee sys_tee +281 common add_key sys_add_key +282 common request_key sys_request_key +283 common keyctl sys_keyctl compat_sys_keyctl +284 common openat sys_openat compat_sys_openat +285 common mkdirat sys_mkdirat +286 common mknodat sys_mknodat +287 common fchownat sys_fchownat +288 32 futimesat sys_futimesat_time32 +288 64 futimesat sys_futimesat +289 common fstatat64 sys_fstatat64 compat_sys_fstatat64 +290 common unlinkat sys_unlinkat +291 common renameat sys_renameat +292 common linkat sys_linkat +293 common symlinkat sys_symlinkat +294 common readlinkat sys_readlinkat +295 common fchmodat sys_fchmodat +296 common faccessat sys_faccessat +297 32 pselect6 sys_pselect6_time32 compat_sys_pselect6_time32 +297 64 pselect6 sys_pselect6 +298 32 ppoll sys_ppoll_time32 compat_sys_ppoll_time32 +298 64 ppoll sys_ppoll +299 common unshare sys_unshare +300 common set_robust_list sys_set_robust_list compat_sys_set_robust_list +301 common get_robust_list sys_get_robust_list compat_sys_get_robust_list +302 common migrate_pages sys_migrate_pages compat_sys_migrate_pages +303 common mbind sys_mbind compat_sys_mbind +304 common get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy +305 common set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy +306 common kexec_load sys_kexec_load compat_sys_kexec_load +307 common move_pages sys_move_pages compat_sys_move_pages +308 common getcpu sys_getcpu +309 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait +310 32 utimensat sys_utimensat_time32 +310 64 utimensat sys_utimensat +311 common signalfd sys_signalfd compat_sys_signalfd +312 common timerfd_create sys_timerfd_create +313 common eventfd sys_eventfd +314 common fallocate sys_fallocate compat_sys_fallocate +315 32 timerfd_settime sys_timerfd_settime32 +315 64 timerfd_settime sys_timerfd_settime +316 32 timerfd_gettime sys_timerfd_gettime32 +316 64 timerfd_gettime sys_timerfd_gettime +317 common signalfd4 sys_signalfd4 compat_sys_signalfd4 +318 common eventfd2 sys_eventfd2 +319 common epoll_create1 sys_epoll_create1 +320 common dup3 sys_dup3 +321 common pipe2 sys_pipe2 +322 common inotify_init1 sys_inotify_init1 +323 common accept4 sys_accept4 +324 common preadv sys_preadv compat_sys_preadv +325 common pwritev sys_pwritev compat_sys_pwritev +326 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo +327 common perf_event_open sys_perf_event_open +328 32 recvmmsg sys_recvmmsg_time32 compat_sys_recvmmsg_time32 +328 64 recvmmsg sys_recvmmsg +329 common fanotify_init sys_fanotify_init +330 common fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark +331 common prlimit64 sys_prlimit64 +332 common name_to_handle_at sys_name_to_handle_at +333 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at +334 32 clock_adjtime sys_clock_adjtime32 +334 64 clock_adjtime sys_sparc_clock_adjtime +335 common syncfs sys_syncfs +336 common sendmmsg sys_sendmmsg compat_sys_sendmmsg +337 common setns sys_setns +338 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv +339 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +340 32 kern_features sys_ni_syscall sys_kern_features +340 64 kern_features sys_kern_features +341 common kcmp sys_kcmp +342 common finit_module sys_finit_module +343 common sched_setattr sys_sched_setattr +344 common sched_getattr sys_sched_getattr +345 common renameat2 sys_renameat2 +346 common seccomp sys_seccomp +347 common getrandom sys_getrandom +348 common memfd_create sys_memfd_create +349 common bpf sys_bpf +350 32 execveat sys_execveat sys32_execveat +350 64 execveat sys64_execveat +351 common membarrier sys_membarrier +352 common userfaultfd sys_userfaultfd +353 common bind sys_bind +354 common listen sys_listen +355 common setsockopt sys_setsockopt compat_sys_setsockopt +356 common mlock2 sys_mlock2 +357 common copy_file_range sys_copy_file_range +358 common preadv2 sys_preadv2 compat_sys_preadv2 +359 common pwritev2 sys_pwritev2 compat_sys_pwritev2 +360 common statx sys_statx +361 32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents +361 64 io_pgetevents sys_io_pgetevents +362 common pkey_mprotect sys_pkey_mprotect +363 common pkey_alloc sys_pkey_alloc +364 common pkey_free sys_pkey_free +365 common rseq sys_rseq +# room for arch specific syscalls +392 64 semtimedop sys_semtimedop +393 common semget sys_semget +394 common semctl sys_semctl compat_sys_semctl +395 common shmget sys_shmget +396 common shmctl sys_shmctl compat_sys_shmctl +397 common shmat sys_shmat compat_sys_shmat +398 common shmdt sys_shmdt +399 common msgget sys_msgget +400 common msgsnd sys_msgsnd compat_sys_msgsnd +401 common msgrcv sys_msgrcv compat_sys_msgrcv +402 common msgctl sys_msgctl compat_sys_msgctl +403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime +404 32 clock_settime64 sys_clock_settime sys_clock_settime +405 32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime +406 32 clock_getres_time64 sys_clock_getres sys_clock_getres +407 32 clock_nanosleep_time64 sys_clock_nanosleep sys_clock_nanosleep +408 32 timer_gettime64 sys_timer_gettime sys_timer_gettime +409 32 timer_settime64 sys_timer_settime sys_timer_settime +410 32 timerfd_gettime64 sys_timerfd_gettime sys_timerfd_gettime +411 32 timerfd_settime64 sys_timerfd_settime sys_timerfd_settime +412 32 utimensat_time64 sys_utimensat sys_utimensat +413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 +414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 +416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents +417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 +418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend +419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive +420 32 semtimedop_time64 sys_semtimedop sys_semtimedop +421 32 rt_sigtimedwait_time64 sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time64 +422 32 futex_time64 sys_futex sys_futex +423 32 sched_rr_get_interval_time64 sys_sched_rr_get_interval sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +# 435 reserved for clone3 diff --git a/linux-user/sparc/syscall_nr.h b/linux-user/sparc/syscall_nr.h deleted file mode 100644 index 162099f9ce..0000000000 --- a/linux-user/sparc/syscall_nr.h +++ /dev/null @@ -1,363 +0,0 @@ -#ifndef LINUX_USER_SPARC_SYSCALL_NR_H -#define LINUX_USER_SPARC_SYSCALL_NR_H - -#define TARGET_NR_exit 1 /* Common */ -#define TARGET_NR_fork 2 /* Common */ -#define TARGET_NR_read 3 /* Common */ -#define TARGET_NR_write 4 /* Common */ -#define TARGET_NR_open 5 /* Common */ -#define TARGET_NR_close 6 /* Common */ -#define TARGET_NR_wait4 7 /* Common */ -#define TARGET_NR_creat 8 /* Common */ -#define TARGET_NR_link 9 /* Common */ -#define TARGET_NR_unlink 10 /* Common */ -#define TARGET_NR_execv 11 /* SunOS Specific */ -#define TARGET_NR_chdir 12 /* Common */ -#define TARGET_NR_chown 13 /* Common */ -#define TARGET_NR_mknod 14 /* Common */ -#define TARGET_NR_chmod 15 /* Common */ -#define TARGET_NR_lchown 16 /* Common */ -#define TARGET_NR_brk 17 /* Common */ -#define TARGET_NR_perfctr 18 /* Performance counter operations */ -#define TARGET_NR_lseek 19 /* Common */ -#define TARGET_NR_getpid 20 /* Common */ -#define TARGET_NR_capget 21 /* Linux Specific */ -#define TARGET_NR_capset 22 /* Linux Specific */ -#define TARGET_NR_setuid 23 /* Implemented via setreuid in SunOS */ -#define TARGET_NR_getuid 24 /* Common */ -#define TARGET_NR_vmsplice 25 -#define TARGET_NR_ptrace 26 /* Common */ -#define TARGET_NR_alarm 27 /* Implemented via setitimer in SunOS */ -#define TARGET_NR_sigaltstack 28 /* Common */ -#define TARGET_NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */ -#define TARGET_NR_utime 30 /* Implemented via utimes() under SunOS */ -#define TARGET_NR_lchown32 31 /* Linux sparc32 specific */ -#define TARGET_NR_fchown32 32 /* Linux sparc32 specific */ -#define TARGET_NR_access 33 /* Common */ -#define TARGET_NR_nice 34 /* Implemented via get/setpriority() in SunOS */ -#define TARGET_NR_chown32 35 /* Linux sparc32 specific */ -#define TARGET_NR_sync 36 /* Common */ -#define TARGET_NR_kill 37 /* Common */ -#define TARGET_NR_stat 38 /* Common */ -#define TARGET_NR_sendfile 39 /* Linux Specific */ -#define TARGET_NR_lstat 40 /* Common */ -#define TARGET_NR_dup 41 /* Common */ -#define TARGET_NR_pipe 42 /* Common */ -#define TARGET_NR_times 43 /* Implemented via getrusage() in SunOS */ -#define TARGET_NR_getuid32 44 /* Linux sparc32 specific */ -#define TARGET_NR_umount2 45 /* Linux Specific */ -#define TARGET_NR_setgid 46 /* Implemented via setregid() in SunOS */ -#define TARGET_NR_getgid 47 /* Common */ -#define TARGET_NR_signal 48 /* Implemented via sigvec() in SunOS */ -#define TARGET_NR_geteuid 49 /* SunOS calls getuid() */ -#define TARGET_NR_getegid 50 /* SunOS calls getgid() */ -#define TARGET_NR_acct 51 /* Common */ -#define TARGET_NR_getgid32 53 /* Linux sparc32 specific */ -#define TARGET_NR_ioctl 54 /* Common */ -#define TARGET_NR_reboot 55 /* Common */ -#define TARGET_NR_mmap2 56 /* Linux sparc32 Specific */ -#define TARGET_NR_symlink 57 /* Common */ -#define TARGET_NR_readlink 58 /* Common */ -#define TARGET_NR_execve 59 /* Common */ -#define TARGET_NR_umask 60 /* Common */ -#define TARGET_NR_chroot 61 /* Common */ -#define TARGET_NR_fstat 62 /* Common */ -#define TARGET_NR_fstat64 63 /* Linux sparc32 Specific */ -#define TARGET_NR_getpagesize 64 /* Common */ -#define TARGET_NR_msync 65 /* Common in newer 1.3.x revs... */ -#define TARGET_NR_vfork 66 /* Common */ -#define TARGET_NR_pread64 67 /* Linux Specific */ -#define TARGET_NR_pwrite64 68 /* Linux Specific */ -#define TARGET_NR_geteuid32 69 /* Linux sparc32, sbrk under SunOS */ -#define TARGET_NR_getegid32 70 /* Linux sparc32, sstk under SunOS */ -#define TARGET_NR_mmap 71 /* Common */ -#define TARGET_NR_setreuid32 72 /* Linux sparc32, vadvise under SunOS */ -#define TARGET_NR_munmap 73 /* Common */ -#define TARGET_NR_mprotect 74 /* Common */ -#define TARGET_NR_madvise 75 /* Common */ -#define TARGET_NR_vhangup 76 /* Common */ -#define TARGET_NR_truncate64 77 /* Linux sparc32 Specific */ -#define TARGET_NR_mincore 78 /* Common */ -#define TARGET_NR_getgroups 79 /* Common */ -#define TARGET_NR_setgroups 80 /* Common */ -#define TARGET_NR_getpgrp 81 /* Common */ -#define TARGET_NR_setgroups32 82 /* Linux sparc32, setpgrp under SunOS */ -#define TARGET_NR_setitimer 83 /* Common */ -#define TARGET_NR_ftruncate64 84 /* Linux sparc32 Specific */ -#define TARGET_NR_swapon 85 /* Common */ -#define TARGET_NR_getitimer 86 /* Common */ -#define TARGET_NR_setuid32 87 /* Linux sparc32, gethostname under SunOS */ -#define TARGET_NR_sethostname 88 /* Common */ -#define TARGET_NR_setgid32 89 /* Linux sparc32, getdtablesize under SunOS */ -#define TARGET_NR_dup2 90 /* Common */ -#define TARGET_NR_setfsuid32 91 /* Linux sparc32, getdopt under SunOS */ -#define TARGET_NR_fcntl 92 /* Common */ -#define TARGET_NR_select 93 /* Common */ -#define TARGET_NR_setfsgid32 94 /* Linux sparc32, setdopt under SunOS */ -#define TARGET_NR_fsync 95 /* Common */ -#define TARGET_NR_setpriority 96 /* Common */ -#define TARGET_NR_socket 97 /* Common */ -#define TARGET_NR_connect 98 /* Common */ -#define TARGET_NR_accept 99 /* Common */ -#define TARGET_NR_getpriority 100 /* Common */ -#define TARGET_NR_rt_sigreturn 101 /* Linux Specific */ -#define TARGET_NR_rt_sigaction 102 /* Linux Specific */ -#define TARGET_NR_rt_sigprocmask 103 /* Linux Specific */ -#define TARGET_NR_rt_sigpending 104 /* Linux Specific */ -#define TARGET_NR_rt_sigtimedwait 105 /* Linux Specific */ -#define TARGET_NR_rt_sigqueueinfo 106 /* Linux Specific */ -#define TARGET_NR_rt_sigsuspend 107 /* Linux Specific */ -#define TARGET_NR_setresuid32 108 /* Linux Specific, sigvec under SunOS */ -#define TARGET_NR_getresuid32 109 /* Linux Specific, sigblock under SunOS */ -#define TARGET_NR_setresgid32 110 /* Linux Specific, sigsetmask under SunOS */ -#define TARGET_NR_getresgid32 111 /* Linux Specific, sigpause under SunOS */ -#define TARGET_NR_setregid32 112 /* Linux sparc32, sigstack under SunOS */ -#define TARGET_NR_recvmsg 113 /* Common */ -#define TARGET_NR_sendmsg 114 /* Common */ -#define TARGET_NR_getgroups32 115 /* Linux sparc32, vtrace under SunOS */ -#define TARGET_NR_gettimeofday 116 /* Common */ -#define TARGET_NR_getrusage 117 /* Common */ -#define TARGET_NR_getsockopt 118 /* Common */ -#define TARGET_NR_getcwd 119 /* Linux Specific */ -#define TARGET_NR_readv 120 /* Common */ -#define TARGET_NR_writev 121 /* Common */ -#define TARGET_NR_settimeofday 122 /* Common */ -#define TARGET_NR_fchown 123 /* Common */ -#define TARGET_NR_fchmod 124 /* Common */ -#define TARGET_NR_recvfrom 125 /* Common */ -#define TARGET_NR_setreuid 126 /* Common */ -#define TARGET_NR_setregid 127 /* Common */ -#define TARGET_NR_rename 128 /* Common */ -#define TARGET_NR_truncate 129 /* Common */ -#define TARGET_NR_ftruncate 130 /* Common */ -#define TARGET_NR_flock 131 /* Common */ -#define TARGET_NR_lstat64 132 /* Linux sparc32 Specific */ -#define TARGET_NR_sendto 133 /* Common */ -#define TARGET_NR_shutdown 134 /* Common */ -#define TARGET_NR_socketpair 135 /* Common */ -#define TARGET_NR_mkdir 136 /* Common */ -#define TARGET_NR_rmdir 137 /* Common */ -#define TARGET_NR_utimes 138 /* SunOS Specific */ -#define TARGET_NR_stat64 139 /* Linux sparc32 Specific */ -#define TARGET_NR_sendfile64 140 -#define TARGET_NR_getpeername 141 /* Common */ -#define TARGET_NR_futex 142 /* gethostid under SunOS */ -#define TARGET_NR_gettid 143 /* ENOSYS under SunOS */ -#define TARGET_NR_getrlimit 144 /* Common */ -#define TARGET_NR_setrlimit 145 /* Common */ -#define TARGET_NR_pivot_root 146 /* Linux Specific, killpg under SunOS */ -#define TARGET_NR_prctl 147 /* ENOSYS under SunOS */ -#define TARGET_NR_pciconfig_read 148 /* ENOSYS under SunOS */ -#define TARGET_NR_pciconfig_write 149 /* ENOSYS under SunOS */ -#define TARGET_NR_getsockname 150 /* Common */ -#define TARGET_NR_inotify_init 151 -#define TARGET_NR_inotify_add_watch 152 -#define TARGET_NR_poll 153 /* Common */ -#define TARGET_NR_getdents64 154 /* Linux specific */ -#define TARGET_NR_fcntl64 155 /* Linux sparc32 Specific */ -#define TARGET_NR_inotify_rm_watch 156 -#define TARGET_NR_statfs 157 /* Common */ -#define TARGET_NR_fstatfs 158 /* Common */ -#define TARGET_NR_umount 159 /* Common */ -#define TARGET_NR_sched_set_affinity 160 -#define TARGET_NR_sched_get_affinity 161 -#define TARGET_NR_getdomainname 162 /* SunOS Specific */ -#define TARGET_NR_setdomainname 163 /* Common */ -#define TARGET_NR_quotactl 165 /* Common */ -#define TARGET_NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ -#define TARGET_NR_mount 167 /* Common */ -#define TARGET_NR_ustat 168 /* Common */ -#define TARGET_NR_setxattr 169 -#define TARGET_NR_lsetxattr 170 -#define TARGET_NR_fsetxattr 171 -#define TARGET_NR_getxattr 172 -#define TARGET_NR_lgetxattr 173 -#define TARGET_NR_getdents 174 /* Common */ -#define TARGET_NR_setsid 175 /* Common */ -#define TARGET_NR_fchdir 176 /* Common */ -#define TARGET_NR_fgetxattr 177 -#define TARGET_NR_listxattr 178 -#define TARGET_NR_llistxattr 179 -#define TARGET_NR_flistxattr 180 -#define TARGET_NR_removexattr 181 -#define TARGET_NR_lremovexattr 182 -#define TARGET_NR_sigpending 183 /* Common */ -#define TARGET_NR_query_module 184 /* Linux Specific */ -#define TARGET_NR_setpgid 185 /* Common */ -#define TARGET_NR_fremovexattr 186 -#define TARGET_NR_tkill 187 /* SunOS: fpathconf */ -#define TARGET_NR_exit_group 188 /* Linux specific, sysconf undef SunOS */ -#define TARGET_NR_uname 189 /* Linux Specific */ -#define TARGET_NR_init_module 190 /* Linux Specific */ -#define TARGET_NR_personality 191 /* Linux Specific */ -#define TARGET_NR_remap_file_pages 192 -#define TARGET_NR_epoll_create 193 -#define TARGET_NR_epoll_ctl 194 -#define TARGET_NR_epoll_wait 195 -#define TARGET_NR_ioprio_set 196 -#define TARGET_NR_getppid 197 /* Linux Specific */ -#define TARGET_NR_sigaction 198 /* Linux Specific */ -#define TARGET_NR_sgetmask 199 /* Linux Specific */ -#define TARGET_NR_ssetmask 200 /* Linux Specific */ -#define TARGET_NR_sigsuspend 201 /* Linux Specific */ -#define TARGET_NR_oldlstat 202 /* Linux Specific */ -#define TARGET_NR_uselib 203 /* Linux Specific */ -#define TARGET_NR_readdir 204 /* Linux Specific */ -#define TARGET_NR_readahead 205 /* Linux Specific */ -#define TARGET_NR_socketcall 206 /* Linux Specific */ -#define TARGET_NR_syslog 207 /* Linux Specific */ -#define TARGET_NR_lookup_dcookie 208 /* Linux Specific */ -#define TARGET_NR_fadvise64 209 /* Linux Specific */ -#define TARGET_NR_fadvise64_64 210 /* Linux Specific */ -#define TARGET_NR_tgkill 211 /* Linux Specific */ -#define TARGET_NR_waitpid 212 /* Linux Specific */ -#define TARGET_NR_swapoff 213 /* Linux Specific */ -#define TARGET_NR_sysinfo 214 /* Linux Specific */ -#define TARGET_NR_ipc 215 /* Linux Specific */ -#define TARGET_NR_sigreturn 216 /* Linux Specific */ -#define TARGET_NR_clone 217 /* Linux Specific */ -#define TARGET_NR_ioprio_get 218 -#define TARGET_NR_adjtimex 219 /* Linux Specific */ -#define TARGET_NR_sigprocmask 220 /* Linux Specific */ -#define TARGET_NR_create_module 221 /* Linux Specific */ -#define TARGET_NR_delete_module 222 /* Linux Specific */ -#define TARGET_NR_get_kernel_syms 223 /* Linux Specific */ -#define TARGET_NR_getpgid 224 /* Linux Specific */ -#define TARGET_NR_bdflush 225 /* Linux Specific */ -#define TARGET_NR_sysfs 226 /* Linux Specific */ -#define TARGET_NR_afs_syscall 227 /* Linux Specific */ -#define TARGET_NR_setfsuid 228 /* Linux Specific */ -#define TARGET_NR_setfsgid 229 /* Linux Specific */ -#define TARGET_NR__newselect 230 /* Linux Specific */ -#define TARGET_NR_time 231 /* Linux Specific */ -#define TARGET_NR_splice 232 -#define TARGET_NR_stime 233 /* Linux Specific */ -#define TARGET_NR_statfs64 234 /* Linux Specific */ -#define TARGET_NR_fstatfs64 235 /* Linux Specific */ -#define TARGET_NR__llseek 236 /* Linux Specific */ -#define TARGET_NR_mlock 237 -#define TARGET_NR_munlock 238 -#define TARGET_NR_mlockall 239 -#define TARGET_NR_munlockall 240 -#define TARGET_NR_sched_setparam 241 -#define TARGET_NR_sched_getparam 242 -#define TARGET_NR_sched_setscheduler 243 -#define TARGET_NR_sched_getscheduler 244 -#define TARGET_NR_sched_yield 245 -#define TARGET_NR_sched_get_priority_max 246 -#define TARGET_NR_sched_get_priority_min 247 -#define TARGET_NR_sched_rr_get_interval 248 -#define TARGET_NR_nanosleep 249 -#define TARGET_NR_mremap 250 -#define TARGET_NR__sysctl 251 -#define TARGET_NR_getsid 252 -#define TARGET_NR_fdatasync 253 -#define TARGET_NR_nfsservctl 254 -#define TARGET_NR_sync_file_range 255 -#define TARGET_NR_clock_settime 256 -#define TARGET_NR_clock_gettime 257 -#define TARGET_NR_clock_getres 258 -#define TARGET_NR_clock_nanosleep 259 -#define TARGET_NR_sched_getaffinity 260 -#define TARGET_NR_sched_setaffinity 261 -#define TARGET_NR_timer_settime 262 -#define TARGET_NR_timer_gettime 263 -#define TARGET_NR_timer_getoverrun 264 -#define TARGET_NR_timer_delete 265 -#define TARGET_NR_timer_create 266 -/* #define TARGET_NR_vserver 267 Reserved for VSERVER */ -#define TARGET_NR_io_setup 268 -#define TARGET_NR_io_destroy 269 -#define TARGET_NR_io_submit 270 -#define TARGET_NR_io_cancel 271 -#define TARGET_NR_io_getevents 272 -#define TARGET_NR_mq_open 273 -#define TARGET_NR_mq_unlink 274 -#define TARGET_NR_mq_timedsend 275 -#define TARGET_NR_mq_timedreceive 276 -#define TARGET_NR_mq_notify 277 -#define TARGET_NR_mq_getsetattr 278 -#define TARGET_NR_waitid 279 -#define TARGET_NR_tee 280 -#define TARGET_NR_add_key 281 -#define TARGET_NR_request_key 282 -#define TARGET_NR_keyctl 283 -#define TARGET_NR_openat 284 -#define TARGET_NR_mkdirat 285 -#define TARGET_NR_mknodat 286 -#define TARGET_NR_fchownat 287 -#define TARGET_NR_futimesat 288 -#define TARGET_NR_fstatat64 289 -#define TARGET_NR_unlinkat 290 -#define TARGET_NR_renameat 291 -#define TARGET_NR_linkat 292 -#define TARGET_NR_symlinkat 293 -#define TARGET_NR_readlinkat 294 -#define TARGET_NR_fchmodat 295 -#define TARGET_NR_faccessat 296 -#define TARGET_NR_pselect6 297 -#define TARGET_NR_ppoll 298 -#define TARGET_NR_unshare 299 -#define TARGET_NR_set_robust_list 300 -#define TARGET_NR_get_robust_list 301 -#define TARGET_NR_migrate_pages 302 -#define TARGET_NR_mbind 303 -#define TARGET_NR_get_mempolicy 304 -#define TARGET_NR_set_mempolicy 305 -#define TARGET_NR_kexec_load 306 -#define TARGET_NR_move_pages 307 -#define TARGET_NR_getcpu 308 -#define TARGET_NR_epoll_pwait 309 -#define TARGET_NR_utimensat 310 -#define TARGET_NR_signalfd 311 -#define TARGET_NR_timerfd_create 312 -#define TARGET_NR_eventfd 313 -#define TARGET_NR_fallocate 314 -#define TARGET_NR_timerfd_settime 315 -#define TARGET_NR_timerfd_gettime 316 -#define TARGET_NR_signalfd4 317 -#define TARGET_NR_eventfd2 318 -#define TARGET_NR_epoll_create1 319 -#define TARGET_NR_dup3 320 -#define TARGET_NR_pipe2 321 -#define TARGET_NR_inotify_init1 322 -#define TARGET_NR_accept4 323 -#define TARGET_NR_preadv 324 -#define TARGET_NR_pwritev 325 -#define TARGET_NR_rt_tgsigqueueinfo 326 -#define TARGET_NR_perf_event_open 327 -#define TARGET_NR_recvmmsg 328 -#define TARGET_NR_fanotify_init 329 -#define TARGET_NR_fanotify_mark 330 -#define TARGET_NR_prlimit64 331 -#define TARGET_NR_name_to_handle_at 332 -#define TARGET_NR_open_by_handle_at 333 -#define TARGET_NR_clock_adjtime 334 -#define TARGET_NR_syncfs 335 -#define TARGET_NR_sendmmsg 336 -#define TARGET_NR_setns 337 -#define TARGET_NR_process_vm_readv 338 -#define TARGET_NR_process_vm_writev 339 -#define TARGET_NR_kern_features 340 -#define TARGET_NR_kcmp 341 -#define TARGET_NR_finit_module 342 -#define TARGET_NR_sched_setattr 343 -#define TARGET_NR_sched_getattr 344 -#define TARGET_NR_renameat2 345 -#define TARGET_NR_seccomp 346 -#define TARGET_NR_getrandom 347 -#define TARGET_NR_memfd_create 348 -#define TARGET_NR_bpf 349 -#define TARGET_NR_execveat 350 -#define TARGET_NR_membarrier 351 -#define TARGET_NR_userfaultfd 352 -#define TARGET_NR_bind 353 -#define TARGET_NR_listen 354 -#define TARGET_NR_setsockopt 355 -#define TARGET_NR_mlock2 356 -#define TARGET_NR_copy_file_range 357 -#define TARGET_NR_preadv2 358 -#define TARGET_NR_pwritev2 359 -#define TARGET_NR_statx 360 - -#endif diff --git a/linux-user/sparc/syscallhdr.sh b/linux-user/sparc/syscallhdr.sh new file mode 100644 index 0000000000..34a99dc832 --- /dev/null +++ b/linux-user/sparc/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_SPARC_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry compat ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" +) > "$out" diff --git a/linux-user/sparc64/Makefile.objs b/linux-user/sparc64/Makefile.objs new file mode 100644 index 0000000000..afcd535bc4 --- /dev/null +++ b/linux-user/sparc64/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/sparc64/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/sparc64/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/sparc/syscall.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/sparc64/syscall.tbl b/linux-user/sparc64/syscall.tbl new file mode 100644 index 0000000000..8c8cc7537f --- /dev/null +++ b/linux-user/sparc64/syscall.tbl @@ -0,0 +1,483 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for sparc +# +# The format is: +# +# +# The can be common, 64, or 32 for this file. +# +0 common restart_syscall sys_restart_syscall +1 32 exit sys_exit sparc_exit +1 64 exit sparc_exit +2 common fork sys_fork +3 common read sys_read +4 common write sys_write +5 common open sys_open compat_sys_open +6 common close sys_close +7 common wait4 sys_wait4 compat_sys_wait4 +8 common creat sys_creat +9 common link sys_link +10 common unlink sys_unlink +11 32 execv sunos_execv +11 64 execv sys_nis_syscall +12 common chdir sys_chdir +13 32 chown sys_chown16 +13 64 chown sys_chown +14 common mknod sys_mknod +15 common chmod sys_chmod +16 32 lchown sys_lchown16 +16 64 lchown sys_lchown +17 common brk sys_brk +18 common perfctr sys_nis_syscall +19 common lseek sys_lseek compat_sys_lseek +20 common getpid sys_getpid +21 common capget sys_capget +22 common capset sys_capset +23 32 setuid sys_setuid16 +23 64 setuid sys_setuid +24 32 getuid sys_getuid16 +24 64 getuid sys_getuid +25 common vmsplice sys_vmsplice compat_sys_vmsplice +26 common ptrace sys_ptrace compat_sys_ptrace +27 common alarm sys_alarm +28 common sigaltstack sys_sigaltstack compat_sys_sigaltstack +29 32 pause sys_pause +29 64 pause sys_nis_syscall +30 32 utime sys_utime32 +30 64 utime sys_utime +31 32 lchown32 sys_lchown +32 32 fchown32 sys_fchown +33 common access sys_access +34 common nice sys_nice +35 32 chown32 sys_chown +36 common sync sys_sync +37 common kill sys_kill +38 common stat sys_newstat compat_sys_newstat +39 32 sendfile sys_sendfile compat_sys_sendfile +39 64 sendfile sys_sendfile64 +40 common lstat sys_newlstat compat_sys_newlstat +41 common dup sys_dup +42 common pipe sys_sparc_pipe +43 common times sys_times compat_sys_times +44 32 getuid32 sys_getuid +45 common umount2 sys_umount +46 32 setgid sys_setgid16 +46 64 setgid sys_setgid +47 32 getgid sys_getgid16 +47 64 getgid sys_getgid +48 common signal sys_signal +49 32 geteuid sys_geteuid16 +49 64 geteuid sys_geteuid +50 32 getegid sys_getegid16 +50 64 getegid sys_getegid +51 common acct sys_acct +52 64 memory_ordering sys_memory_ordering +53 32 getgid32 sys_getgid +54 common ioctl sys_ioctl compat_sys_ioctl +55 common reboot sys_reboot +56 32 mmap2 sys_mmap2 sys32_mmap2 +57 common symlink sys_symlink +58 common readlink sys_readlink +59 32 execve sys_execve sys32_execve +59 64 execve sys64_execve +60 common umask sys_umask +61 common chroot sys_chroot +62 common fstat sys_newfstat compat_sys_newfstat +63 common fstat64 sys_fstat64 compat_sys_fstat64 +64 common getpagesize sys_getpagesize +65 common msync sys_msync +66 common vfork sys_vfork +67 common pread64 sys_pread64 compat_sys_pread64 +68 common pwrite64 sys_pwrite64 compat_sys_pwrite64 +69 32 geteuid32 sys_geteuid +70 32 getegid32 sys_getegid +71 common mmap sys_mmap +72 32 setreuid32 sys_setreuid +73 32 munmap sys_munmap +73 64 munmap sys_64_munmap +74 common mprotect sys_mprotect +75 common madvise sys_madvise +76 common vhangup sys_vhangup +77 32 truncate64 sys_truncate64 compat_sys_truncate64 +78 common mincore sys_mincore +79 32 getgroups sys_getgroups16 +79 64 getgroups sys_getgroups +80 32 setgroups sys_setgroups16 +80 64 setgroups sys_setgroups +81 common getpgrp sys_getpgrp +82 32 setgroups32 sys_setgroups +83 common setitimer sys_setitimer compat_sys_setitimer +84 32 ftruncate64 sys_ftruncate64 compat_sys_ftruncate64 +85 common swapon sys_swapon +86 common getitimer sys_getitimer compat_sys_getitimer +87 32 setuid32 sys_setuid +88 common sethostname sys_sethostname +89 32 setgid32 sys_setgid +90 common dup2 sys_dup2 +91 32 setfsuid32 sys_setfsuid +92 common fcntl sys_fcntl compat_sys_fcntl +93 common select sys_select +94 32 setfsgid32 sys_setfsgid +95 common fsync sys_fsync +96 common setpriority sys_setpriority +97 common socket sys_socket +98 common connect sys_connect +99 common accept sys_accept +100 common getpriority sys_getpriority +101 common rt_sigreturn sys_rt_sigreturn sys32_rt_sigreturn +102 common rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction +103 common rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask +104 common rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending +105 32 rt_sigtimedwait sys_rt_sigtimedwait_time32 compat_sys_rt_sigtimedwait_time32 +105 64 rt_sigtimedwait sys_rt_sigtimedwait +106 common rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo +107 common rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend +108 32 setresuid32 sys_setresuid +108 64 setresuid sys_setresuid +109 32 getresuid32 sys_getresuid +109 64 getresuid sys_getresuid +110 32 setresgid32 sys_setresgid +110 64 setresgid sys_setresgid +111 32 getresgid32 sys_getresgid +111 64 getresgid sys_getresgid +112 32 setregid32 sys_setregid +113 common recvmsg sys_recvmsg compat_sys_recvmsg +114 common sendmsg sys_sendmsg compat_sys_sendmsg +115 32 getgroups32 sys_getgroups +116 common gettimeofday sys_gettimeofday compat_sys_gettimeofday +117 common getrusage sys_getrusage compat_sys_getrusage +118 common getsockopt sys_getsockopt compat_sys_getsockopt +119 common getcwd sys_getcwd +120 common readv sys_readv compat_sys_readv +121 common writev sys_writev compat_sys_writev +122 common settimeofday sys_settimeofday compat_sys_settimeofday +123 32 fchown sys_fchown16 +123 64 fchown sys_fchown +124 common fchmod sys_fchmod +125 common recvfrom sys_recvfrom +126 32 setreuid sys_setreuid16 +126 64 setreuid sys_setreuid +127 32 setregid sys_setregid16 +127 64 setregid sys_setregid +128 common rename sys_rename +129 common truncate sys_truncate compat_sys_truncate +130 common ftruncate sys_ftruncate compat_sys_ftruncate +131 common flock sys_flock +132 common lstat64 sys_lstat64 compat_sys_lstat64 +133 common sendto sys_sendto +134 common shutdown sys_shutdown +135 common socketpair sys_socketpair +136 common mkdir sys_mkdir +137 common rmdir sys_rmdir +138 32 utimes sys_utimes_time32 +138 64 utimes sys_utimes +139 common stat64 sys_stat64 compat_sys_stat64 +140 common sendfile64 sys_sendfile64 +141 common getpeername sys_getpeername +142 32 futex sys_futex_time32 +142 64 futex sys_futex +143 common gettid sys_gettid +144 common getrlimit sys_getrlimit compat_sys_getrlimit +145 common setrlimit sys_setrlimit compat_sys_setrlimit +146 common pivot_root sys_pivot_root +147 common prctl sys_prctl +148 common pciconfig_read sys_pciconfig_read +149 common pciconfig_write sys_pciconfig_write +150 common getsockname sys_getsockname +151 common inotify_init sys_inotify_init +152 common inotify_add_watch sys_inotify_add_watch +153 common poll sys_poll +154 common getdents64 sys_getdents64 +155 32 fcntl64 sys_fcntl64 compat_sys_fcntl64 +156 common inotify_rm_watch sys_inotify_rm_watch +157 common statfs sys_statfs compat_sys_statfs +158 common fstatfs sys_fstatfs compat_sys_fstatfs +159 common umount sys_oldumount +160 common sched_set_affinity sys_sched_setaffinity compat_sys_sched_setaffinity +161 common sched_get_affinity sys_sched_getaffinity compat_sys_sched_getaffinity +162 common getdomainname sys_getdomainname +163 common setdomainname sys_setdomainname +164 64 utrap_install sys_utrap_install +165 common quotactl sys_quotactl +166 common set_tid_address sys_set_tid_address +167 common mount sys_mount compat_sys_mount +168 common ustat sys_ustat compat_sys_ustat +169 common setxattr sys_setxattr +170 common lsetxattr sys_lsetxattr +171 common fsetxattr sys_fsetxattr +172 common getxattr sys_getxattr +173 common lgetxattr sys_lgetxattr +174 common getdents sys_getdents compat_sys_getdents +175 common setsid sys_setsid +176 common fchdir sys_fchdir +177 common fgetxattr sys_fgetxattr +178 common listxattr sys_listxattr +179 common llistxattr sys_llistxattr +180 common flistxattr sys_flistxattr +181 common removexattr sys_removexattr +182 common lremovexattr sys_lremovexattr +183 32 sigpending sys_sigpending compat_sys_sigpending +183 64 sigpending sys_nis_syscall +184 common query_module sys_ni_syscall +185 common setpgid sys_setpgid +186 common fremovexattr sys_fremovexattr +187 common tkill sys_tkill +188 32 exit_group sys_exit_group sparc_exit_group +188 64 exit_group sparc_exit_group +189 common uname sys_newuname +190 common init_module sys_init_module +191 32 personality sys_personality sys_sparc64_personality +191 64 personality sys_sparc64_personality +192 32 remap_file_pages sys_sparc_remap_file_pages sys_remap_file_pages +192 64 remap_file_pages sys_remap_file_pages +193 common epoll_create sys_epoll_create +194 common epoll_ctl sys_epoll_ctl +195 common epoll_wait sys_epoll_wait +196 common ioprio_set sys_ioprio_set +197 common getppid sys_getppid +198 32 sigaction sys_sparc_sigaction compat_sys_sparc_sigaction +198 64 sigaction sys_nis_syscall +199 common sgetmask sys_sgetmask +200 common ssetmask sys_ssetmask +201 32 sigsuspend sys_sigsuspend +201 64 sigsuspend sys_nis_syscall +202 common oldlstat sys_newlstat compat_sys_newlstat +203 common uselib sys_uselib +204 32 readdir sys_old_readdir compat_sys_old_readdir +204 64 readdir sys_nis_syscall +205 common readahead sys_readahead compat_sys_readahead +206 common socketcall sys_socketcall sys32_socketcall +207 common syslog sys_syslog +208 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie +209 common fadvise64 sys_fadvise64 compat_sys_fadvise64 +210 common fadvise64_64 sys_fadvise64_64 compat_sys_fadvise64_64 +211 common tgkill sys_tgkill +212 common waitpid sys_waitpid +213 common swapoff sys_swapoff +214 common sysinfo sys_sysinfo compat_sys_sysinfo +215 32 ipc sys_ipc compat_sys_ipc +215 64 ipc sys_sparc_ipc +216 32 sigreturn sys_sigreturn sys32_sigreturn +216 64 sigreturn sys_nis_syscall +217 common clone sys_clone +218 common ioprio_get sys_ioprio_get +219 32 adjtimex sys_adjtimex_time32 +219 64 adjtimex sys_sparc_adjtimex +220 32 sigprocmask sys_sigprocmask compat_sys_sigprocmask +220 64 sigprocmask sys_nis_syscall +221 common create_module sys_ni_syscall +222 common delete_module sys_delete_module +223 common get_kernel_syms sys_ni_syscall +224 common getpgid sys_getpgid +225 common bdflush sys_bdflush +226 common sysfs sys_sysfs +227 common afs_syscall sys_nis_syscall +228 common setfsuid sys_setfsuid16 +229 common setfsgid sys_setfsgid16 +230 common _newselect sys_select compat_sys_select +231 32 time sys_time32 +232 common splice sys_splice +233 32 stime sys_stime32 +233 64 stime sys_stime +234 common statfs64 sys_statfs64 compat_sys_statfs64 +235 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 +236 common _llseek sys_llseek +237 common mlock sys_mlock +238 common munlock sys_munlock +239 common mlockall sys_mlockall +240 common munlockall sys_munlockall +241 common sched_setparam sys_sched_setparam +242 common sched_getparam sys_sched_getparam +243 common sched_setscheduler sys_sched_setscheduler +244 common sched_getscheduler sys_sched_getscheduler +245 common sched_yield sys_sched_yield +246 common sched_get_priority_max sys_sched_get_priority_max +247 common sched_get_priority_min sys_sched_get_priority_min +248 32 sched_rr_get_interval sys_sched_rr_get_interval_time32 +248 64 sched_rr_get_interval sys_sched_rr_get_interval +249 32 nanosleep sys_nanosleep_time32 +249 64 nanosleep sys_nanosleep +250 32 mremap sys_mremap +250 64 mremap sys_64_mremap +251 common _sysctl sys_sysctl compat_sys_sysctl +252 common getsid sys_getsid +253 common fdatasync sys_fdatasync +254 32 nfsservctl sys_ni_syscall sys_nis_syscall +254 64 nfsservctl sys_nis_syscall +255 common sync_file_range sys_sync_file_range compat_sys_sync_file_range +256 32 clock_settime sys_clock_settime32 +256 64 clock_settime sys_clock_settime +257 32 clock_gettime sys_clock_gettime32 +257 64 clock_gettime sys_clock_gettime +258 32 clock_getres sys_clock_getres_time32 +258 64 clock_getres sys_clock_getres +259 32 clock_nanosleep sys_clock_nanosleep_time32 +259 64 clock_nanosleep sys_clock_nanosleep +260 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity +261 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity +262 32 timer_settime sys_timer_settime32 +262 64 timer_settime sys_timer_settime +263 32 timer_gettime sys_timer_gettime32 +263 64 timer_gettime sys_timer_gettime +264 common timer_getoverrun sys_timer_getoverrun +265 common timer_delete sys_timer_delete +266 common timer_create sys_timer_create compat_sys_timer_create +# 267 was vserver +267 common vserver sys_nis_syscall +268 common io_setup sys_io_setup compat_sys_io_setup +269 common io_destroy sys_io_destroy +270 common io_submit sys_io_submit compat_sys_io_submit +271 common io_cancel sys_io_cancel +272 32 io_getevents sys_io_getevents_time32 +272 64 io_getevents sys_io_getevents +273 common mq_open sys_mq_open compat_sys_mq_open +274 common mq_unlink sys_mq_unlink +275 32 mq_timedsend sys_mq_timedsend_time32 +275 64 mq_timedsend sys_mq_timedsend +276 32 mq_timedreceive sys_mq_timedreceive_time32 +276 64 mq_timedreceive sys_mq_timedreceive +277 common mq_notify sys_mq_notify compat_sys_mq_notify +278 common mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr +279 common waitid sys_waitid compat_sys_waitid +280 common tee sys_tee +281 common add_key sys_add_key +282 common request_key sys_request_key +283 common keyctl sys_keyctl compat_sys_keyctl +284 common openat sys_openat compat_sys_openat +285 common mkdirat sys_mkdirat +286 common mknodat sys_mknodat +287 common fchownat sys_fchownat +288 32 futimesat sys_futimesat_time32 +288 64 futimesat sys_futimesat +289 common fstatat64 sys_fstatat64 compat_sys_fstatat64 +290 common unlinkat sys_unlinkat +291 common renameat sys_renameat +292 common linkat sys_linkat +293 common symlinkat sys_symlinkat +294 common readlinkat sys_readlinkat +295 common fchmodat sys_fchmodat +296 common faccessat sys_faccessat +297 32 pselect6 sys_pselect6_time32 compat_sys_pselect6_time32 +297 64 pselect6 sys_pselect6 +298 32 ppoll sys_ppoll_time32 compat_sys_ppoll_time32 +298 64 ppoll sys_ppoll +299 common unshare sys_unshare +300 common set_robust_list sys_set_robust_list compat_sys_set_robust_list +301 common get_robust_list sys_get_robust_list compat_sys_get_robust_list +302 common migrate_pages sys_migrate_pages compat_sys_migrate_pages +303 common mbind sys_mbind compat_sys_mbind +304 common get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy +305 common set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy +306 common kexec_load sys_kexec_load compat_sys_kexec_load +307 common move_pages sys_move_pages compat_sys_move_pages +308 common getcpu sys_getcpu +309 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait +310 32 utimensat sys_utimensat_time32 +310 64 utimensat sys_utimensat +311 common signalfd sys_signalfd compat_sys_signalfd +312 common timerfd_create sys_timerfd_create +313 common eventfd sys_eventfd +314 common fallocate sys_fallocate compat_sys_fallocate +315 32 timerfd_settime sys_timerfd_settime32 +315 64 timerfd_settime sys_timerfd_settime +316 32 timerfd_gettime sys_timerfd_gettime32 +316 64 timerfd_gettime sys_timerfd_gettime +317 common signalfd4 sys_signalfd4 compat_sys_signalfd4 +318 common eventfd2 sys_eventfd2 +319 common epoll_create1 sys_epoll_create1 +320 common dup3 sys_dup3 +321 common pipe2 sys_pipe2 +322 common inotify_init1 sys_inotify_init1 +323 common accept4 sys_accept4 +324 common preadv sys_preadv compat_sys_preadv +325 common pwritev sys_pwritev compat_sys_pwritev +326 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo +327 common perf_event_open sys_perf_event_open +328 32 recvmmsg sys_recvmmsg_time32 compat_sys_recvmmsg_time32 +328 64 recvmmsg sys_recvmmsg +329 common fanotify_init sys_fanotify_init +330 common fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark +331 common prlimit64 sys_prlimit64 +332 common name_to_handle_at sys_name_to_handle_at +333 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at +334 32 clock_adjtime sys_clock_adjtime32 +334 64 clock_adjtime sys_sparc_clock_adjtime +335 common syncfs sys_syncfs +336 common sendmmsg sys_sendmmsg compat_sys_sendmmsg +337 common setns sys_setns +338 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv +339 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +340 32 kern_features sys_ni_syscall sys_kern_features +340 64 kern_features sys_kern_features +341 common kcmp sys_kcmp +342 common finit_module sys_finit_module +343 common sched_setattr sys_sched_setattr +344 common sched_getattr sys_sched_getattr +345 common renameat2 sys_renameat2 +346 common seccomp sys_seccomp +347 common getrandom sys_getrandom +348 common memfd_create sys_memfd_create +349 common bpf sys_bpf +350 32 execveat sys_execveat sys32_execveat +350 64 execveat sys64_execveat +351 common membarrier sys_membarrier +352 common userfaultfd sys_userfaultfd +353 common bind sys_bind +354 common listen sys_listen +355 common setsockopt sys_setsockopt compat_sys_setsockopt +356 common mlock2 sys_mlock2 +357 common copy_file_range sys_copy_file_range +358 common preadv2 sys_preadv2 compat_sys_preadv2 +359 common pwritev2 sys_pwritev2 compat_sys_pwritev2 +360 common statx sys_statx +361 32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents +361 64 io_pgetevents sys_io_pgetevents +362 common pkey_mprotect sys_pkey_mprotect +363 common pkey_alloc sys_pkey_alloc +364 common pkey_free sys_pkey_free +365 common rseq sys_rseq +# room for arch specific syscalls +392 64 semtimedop sys_semtimedop +393 common semget sys_semget +394 common semctl sys_semctl compat_sys_semctl +395 common shmget sys_shmget +396 common shmctl sys_shmctl compat_sys_shmctl +397 common shmat sys_shmat compat_sys_shmat +398 common shmdt sys_shmdt +399 common msgget sys_msgget +400 common msgsnd sys_msgsnd compat_sys_msgsnd +401 common msgrcv sys_msgrcv compat_sys_msgrcv +402 common msgctl sys_msgctl compat_sys_msgctl +403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime +404 32 clock_settime64 sys_clock_settime sys_clock_settime +405 32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime +406 32 clock_getres_time64 sys_clock_getres sys_clock_getres +407 32 clock_nanosleep_time64 sys_clock_nanosleep sys_clock_nanosleep +408 32 timer_gettime64 sys_timer_gettime sys_timer_gettime +409 32 timer_settime64 sys_timer_settime sys_timer_settime +410 32 timerfd_gettime64 sys_timerfd_gettime sys_timerfd_gettime +411 32 timerfd_settime64 sys_timerfd_settime sys_timerfd_settime +412 32 utimensat_time64 sys_utimensat sys_utimensat +413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 +414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 +416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents +417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 +418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend +419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive +420 32 semtimedop_time64 sys_semtimedop sys_semtimedop +421 32 rt_sigtimedwait_time64 sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time64 +422 32 futex_time64 sys_futex sys_futex +423 32 sched_rr_get_interval_time64 sys_sched_rr_get_interval sys_sched_rr_get_interval +424 common pidfd_send_signal sys_pidfd_send_signal +425 common io_uring_setup sys_io_uring_setup +426 common io_uring_enter sys_io_uring_enter +427 common io_uring_register sys_io_uring_register +428 common open_tree sys_open_tree +429 common move_mount sys_move_mount +430 common fsopen sys_fsopen +431 common fsconfig sys_fsconfig +432 common fsmount sys_fsmount +433 common fspick sys_fspick +434 common pidfd_open sys_pidfd_open +# 435 reserved for clone3 diff --git a/linux-user/sparc64/syscall_nr.h b/linux-user/sparc64/syscall_nr.h deleted file mode 100644 index 6b088c9862..0000000000 --- a/linux-user/sparc64/syscall_nr.h +++ /dev/null @@ -1,366 +0,0 @@ -#ifndef LINUX_USER_SPARC64_SYSCALL_NR_H -#define LINUX_USER_SPARC64_SYSCALL_NR_H - -#define TARGET_NR_restart_syscall 0 /* Linux Specific */ -#define TARGET_NR_exit 1 /* Common */ -#define TARGET_NR_fork 2 /* Common */ -#define TARGET_NR_read 3 /* Common */ -#define TARGET_NR_write 4 /* Common */ -#define TARGET_NR_open 5 /* Common */ -#define TARGET_NR_close 6 /* Common */ -#define TARGET_NR_wait4 7 /* Common */ -#define TARGET_NR_creat 8 /* Common */ -#define TARGET_NR_link 9 /* Common */ -#define TARGET_NR_unlink 10 /* Common */ -#define TARGET_NR_execv 11 /* SunOS Specific */ -#define TARGET_NR_chdir 12 /* Common */ -#define TARGET_NR_chown 13 /* Common */ -#define TARGET_NR_mknod 14 /* Common */ -#define TARGET_NR_chmod 15 /* Common */ -#define TARGET_NR_lchown 16 /* Common */ -#define TARGET_NR_brk 17 /* Common */ -#define TARGET_NR_perfctr 18 /* Performance counter operations */ -#define TARGET_NR_lseek 19 /* Common */ -#define TARGET_NR_getpid 20 /* Common */ -#define TARGET_NR_capget 21 /* Linux Specific */ -#define TARGET_NR_capset 22 /* Linux Specific */ -#define TARGET_NR_setuid 23 /* Implemented via setreuid in SunOS */ -#define TARGET_NR_getuid 24 /* Common */ -#define TARGET_NR_vmsplice 25 -#define TARGET_NR_ptrace 26 /* Common */ -#define TARGET_NR_alarm 27 /* Implemented via setitimer in SunOS */ -#define TARGET_NR_sigaltstack 28 /* Common */ -#define TARGET_NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */ -#define TARGET_NR_utime 30 /* Implemented via utimes() under SunOS */ -#define TARGET_NR_lchown32 31 /* Linux sparc32 specific */ -#define TARGET_NR_fchown32 32 /* Linux sparc32 specific */ -#define TARGET_NR_access 33 /* Common */ -#define TARGET_NR_nice 34 /* Implemented via get/setpriority() in SunOS */ -#define TARGET_NR_chown32 35 /* Linux sparc32 specific */ -#define TARGET_NR_sync 36 /* Common */ -#define TARGET_NR_kill 37 /* Common */ -#define TARGET_NR_stat 38 /* Common */ -#define TARGET_NR_sendfile 39 /* Linux Specific */ -#define TARGET_NR_lstat 40 /* Common */ -#define TARGET_NR_dup 41 /* Common */ -#define TARGET_NR_pipe 42 /* Common */ -#define TARGET_NR_times 43 /* Implemented via getrusage() in SunOS */ -#define TARGET_NR_getuid32 44 /* Linux sparc32 specific */ -#define TARGET_NR_umount2 45 /* Linux Specific */ -#define TARGET_NR_setgid 46 /* Implemented via setregid() in SunOS */ -#define TARGET_NR_getgid 47 /* Common */ -#define TARGET_NR_signal 48 /* Implemented via sigvec() in SunOS */ -#define TARGET_NR_geteuid 49 /* SunOS calls getuid() */ -#define TARGET_NR_getegid 50 /* SunOS calls getgid() */ -#define TARGET_NR_acct 51 /* Common */ -#define TARGET_NR_memory_ordering 52 /* Linux Specific */ -#define TARGET_NR_getgid32 53 /* Linux sparc32 specific */ -#define TARGET_NR_ioctl 54 /* Common */ -#define TARGET_NR_reboot 55 /* Common */ -#define TARGET_NR_mmap2 56 /* Linux sparc32 Specific */ -#define TARGET_NR_symlink 57 /* Common */ -#define TARGET_NR_readlink 58 /* Common */ -#define TARGET_NR_execve 59 /* Common */ -#define TARGET_NR_umask 60 /* Common */ -#define TARGET_NR_chroot 61 /* Common */ -#define TARGET_NR_fstat 62 /* Common */ -#define TARGET_NR_fstat64 63 /* Linux sparc32 Specific */ -#define TARGET_NR_getpagesize 64 /* Common */ -#define TARGET_NR_msync 65 /* Common in newer 1.3.x revs... */ -#define TARGET_NR_vfork 66 /* Common */ -#define TARGET_NR_pread64 67 /* Linux Specific */ -#define TARGET_NR_pwrite64 68 /* Linux Specific */ -#define TARGET_NR_geteuid32 69 /* Linux sparc32, sbrk under SunOS */ -#define TARGET_NR_getegid32 70 /* Linux sparc32, sstk under SunOS */ -#define TARGET_NR_mmap 71 /* Common */ -#define TARGET_NR_setreuid32 72 /* Linux sparc32, vadvise under SunOS */ -#define TARGET_NR_munmap 73 /* Common */ -#define TARGET_NR_mprotect 74 /* Common */ -#define TARGET_NR_madvise 75 /* Common */ -#define TARGET_NR_vhangup 76 /* Common */ -#define TARGET_NR_truncate64 77 /* Linux sparc32 Specific */ -#define TARGET_NR_mincore 78 /* Common */ -#define TARGET_NR_getgroups 79 /* Common */ -#define TARGET_NR_setgroups 80 /* Common */ -#define TARGET_NR_getpgrp 81 /* Common */ -#define TARGET_NR_setgroups32 82 /* Linux sparc32, setpgrp under SunOS */ -#define TARGET_NR_setitimer 83 /* Common */ -#define TARGET_NR_ftruncate64 84 /* Linux sparc32 Specific */ -#define TARGET_NR_swapon 85 /* Common */ -#define TARGET_NR_getitimer 86 /* Common */ -#define TARGET_NR_setuid32 87 /* Linux sparc32, gethostname under SunOS */ -#define TARGET_NR_sethostname 88 /* Common */ -#define TARGET_NR_setgid32 89 /* Linux sparc32, getdtablesize under SunOS */ -#define TARGET_NR_dup2 90 /* Common */ -#define TARGET_NR_setfsuid32 91 /* Linux sparc32, getdopt under SunOS */ -#define TARGET_NR_fcntl 92 /* Common */ -#define TARGET_NR_select 93 /* Common */ -#define TARGET_NR_setfsgid32 94 /* Linux sparc32, setdopt under SunOS */ -#define TARGET_NR_fsync 95 /* Common */ -#define TARGET_NR_setpriority 96 /* Common */ -#define TARGET_NR_socket 97 /* Common */ -#define TARGET_NR_connect 98 /* Common */ -#define TARGET_NR_accept 99 /* Common */ -#define TARGET_NR_getpriority 100 /* Common */ -#define TARGET_NR_rt_sigreturn 101 /* Linux Specific */ -#define TARGET_NR_rt_sigaction 102 /* Linux Specific */ -#define TARGET_NR_rt_sigprocmask 103 /* Linux Specific */ -#define TARGET_NR_rt_sigpending 104 /* Linux Specific */ -#define TARGET_NR_rt_sigtimedwait 105 /* Linux Specific */ -#define TARGET_NR_rt_sigqueueinfo 106 /* Linux Specific */ -#define TARGET_NR_rt_sigsuspend 107 /* Linux Specific */ -#define TARGET_NR_setresuid 108 /* Linux Specific, sigvec under SunOS */ -#define TARGET_NR_getresuid 109 /* Linux Specific, sigblock under SunOS */ -#define TARGET_NR_setresgid 110 /* Linux Specific, sigsetmask under SunOS */ -#define TARGET_NR_getresgid 111 /* Linux Specific, sigpause under SunOS */ -/* #define TARGET_NR_setregid32 75 Linux sparc32, sigstack under SunOS */ -#define TARGET_NR_recvmsg 113 /* Common */ -#define TARGET_NR_sendmsg 114 /* Common */ -#define TARGET_NR_getgroups32 115 /* Linux sparc32, vtrace under SunOS */ -#define TARGET_NR_gettimeofday 116 /* Common */ -#define TARGET_NR_getrusage 117 /* Common */ -#define TARGET_NR_getsockopt 118 /* Common */ -#define TARGET_NR_getcwd 119 /* Linux Specific */ -#define TARGET_NR_readv 120 /* Common */ -#define TARGET_NR_writev 121 /* Common */ -#define TARGET_NR_settimeofday 122 /* Common */ -#define TARGET_NR_fchown 123 /* Common */ -#define TARGET_NR_fchmod 124 /* Common */ -#define TARGET_NR_recvfrom 125 /* Common */ -#define TARGET_NR_setreuid 126 /* Common */ -#define TARGET_NR_setregid 127 /* Common */ -#define TARGET_NR_rename 128 /* Common */ -#define TARGET_NR_truncate 129 /* Common */ -#define TARGET_NR_ftruncate 130 /* Common */ -#define TARGET_NR_flock 131 /* Common */ -#define TARGET_NR_lstat64 132 /* Linux sparc32 Specific */ -#define TARGET_NR_sendto 133 /* Common */ -#define TARGET_NR_shutdown 134 /* Common */ -#define TARGET_NR_socketpair 135 /* Common */ -#define TARGET_NR_mkdir 136 /* Common */ -#define TARGET_NR_rmdir 137 /* Common */ -#define TARGET_NR_utimes 138 /* SunOS Specific */ -#define TARGET_NR_stat64 139 /* Linux sparc32 Specific */ -#define TARGET_NR_sendfile64 140 /* adjtime under SunOS */ -#define TARGET_NR_getpeername 141 /* Common */ -#define TARGET_NR_futex 142 /* gethostid under SunOS */ -#define TARGET_NR_gettid 143 /* ENOSYS under SunOS */ -#define TARGET_NR_getrlimit 144 /* Common */ -#define TARGET_NR_setrlimit 145 /* Common */ -#define TARGET_NR_pivot_root 146 /* Linux Specific, killpg under SunOS */ -#define TARGET_NR_prctl 147 /* ENOSYS under SunOS */ -#define TARGET_NR_pciconfig_read 148 /* ENOSYS under SunOS */ -#define TARGET_NR_pciconfig_write 149 /* ENOSYS under SunOS */ -#define TARGET_NR_getsockname 150 /* Common */ -#define TARGET_NR_inotify_init 151 -#define TARGET_NR_inotify_add_watch 152 -#define TARGET_NR_poll 153 /* Common */ -#define TARGET_NR_getdents64 154 /* Linux specific */ -#define TARGET_NR_fcntl64 155 /* Linux sparc32 Specific */ -#define TARGET_NR_inotify_rm_watch 156 /* Linux specific */ -#define TARGET_NR_statfs 157 /* Common */ -#define TARGET_NR_fstatfs 158 /* Common */ -#define TARGET_NR_umount 159 /* Common */ -#define TARGET_NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS */ -#define TARGET_NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ -#define TARGET_NR_getdomainname 162 /* SunOS Specific */ -#define TARGET_NR_setdomainname 163 /* Common */ -#define TARGET_NR_utrap_install 164 /* SYSV ABI/v9 required */ -#define TARGET_NR_quotactl 165 /* Common */ -#define TARGET_NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ -#define TARGET_NR_mount 167 /* Common */ -#define TARGET_NR_ustat 168 /* Common */ -#define TARGET_NR_setxattr 169 /* SunOS: semsys */ -#define TARGET_NR_lsetxattr 170 /* SunOS: msgsys */ -#define TARGET_NR_fsetxattr 171 /* SunOS: shmsys */ -#define TARGET_NR_getxattr 172 /* SunOS: auditsys */ -#define TARGET_NR_lgetxattr 173 /* SunOS: rfssys */ -#define TARGET_NR_getdents 174 /* Common */ -#define TARGET_NR_setsid 175 /* Common */ -#define TARGET_NR_fchdir 176 /* Common */ -#define TARGET_NR_fgetxattr 177 /* SunOS: fchroot */ -#define TARGET_NR_listxattr 178 /* SunOS: vpixsys */ -#define TARGET_NR_llistxattr 179 /* SunOS: aioread */ -#define TARGET_NR_flistxattr 180 /* SunOS: aiowrite */ -#define TARGET_NR_removexattr 181 /* SunOS: aiowait */ -#define TARGET_NR_lremovexattr 182 /* SunOS: aiocancel */ -#define TARGET_NR_sigpending 183 /* Common */ -#define TARGET_NR_query_module 184 /* Linux Specific */ -#define TARGET_NR_setpgid 185 /* Common */ -#define TARGET_NR_fremovexattr 186 /* SunOS: pathconf */ -#define TARGET_NR_tkill 187 /* SunOS: fpathconf */ -#define TARGET_NR_exit_group 188 /* Linux specific, sysconf undef SunOS */ -#define TARGET_NR_uname 189 /* Linux Specific */ -#define TARGET_NR_init_module 190 /* Linux Specific */ -#define TARGET_NR_personality 191 /* Linux Specific */ -#define TARGET_NR_remap_file_pages 192 /* Linux Specific */ -#define TARGET_NR_epoll_create 193 /* Linux Specific */ -#define TARGET_NR_epoll_ctl 194 /* Linux Specific */ -#define TARGET_NR_epoll_wait 195 /* Linux Specific */ -#define TARGET_NR_ioprio_set 196 -#define TARGET_NR_getppid 197 /* Linux Specific */ -#define TARGET_NR_sigaction 198 /* Linux Specific */ -#define TARGET_NR_sgetmask 199 /* Linux Specific */ -#define TARGET_NR_ssetmask 200 /* Linux Specific */ -#define TARGET_NR_sigsuspend 201 /* Linux Specific */ -#define TARGET_NR_oldlstat 202 /* Linux Specific */ -#define TARGET_NR_uselib 203 /* Linux Specific */ -#define TARGET_NR_readdir 204 /* Linux Specific */ -#define TARGET_NR_readahead 205 /* Linux Specific */ -#define TARGET_NR_socketcall 206 /* Linux Specific */ -#define TARGET_NR_syslog 207 /* Linux Specific */ -#define TARGET_NR_lookup_dcookie 208 /* Linux Specific */ -#define TARGET_NR_fadvise64 209 /* Linux Specific */ -#define TARGET_NR_fadvise64_64 210 /* Linux Specific */ -#define TARGET_NR_tgkill 211 /* Linux Specific */ -#define TARGET_NR_waitpid 212 /* Linux Specific */ -#define TARGET_NR_swapoff 213 /* Linux Specific */ -#define TARGET_NR_sysinfo 214 /* Linux Specific */ -#define TARGET_NR_ipc 215 /* Linux Specific */ -#define TARGET_NR_sigreturn 216 /* Linux Specific */ -#define TARGET_NR_clone 217 /* Linux Specific */ -#define TARGET_NR_ioprio_get 218 -#define TARGET_NR_adjtimex 219 /* Linux Specific */ -#define TARGET_NR_sigprocmask 220 /* Linux Specific */ -#define TARGET_NR_create_module 221 /* Linux Specific */ -#define TARGET_NR_delete_module 222 /* Linux Specific */ -#define TARGET_NR_get_kernel_syms 223 /* Linux Specific */ -#define TARGET_NR_getpgid 224 /* Linux Specific */ -#define TARGET_NR_bdflush 225 /* Linux Specific */ -#define TARGET_NR_sysfs 226 /* Linux Specific */ -#define TARGET_NR_afs_syscall 227 /* Linux Specific */ -#define TARGET_NR_setfsuid 228 /* Linux Specific */ -#define TARGET_NR_setfsgid 229 /* Linux Specific */ -#define TARGET_NR__newselect 230 /* Linux Specific */ -#define TARGET_NR_time 231 /* Linux sparc32 */ -#define TARGET_NR_splice 232 -#define TARGET_NR_stime 233 /* Linux Specific */ -#define TARGET_NR_statfs64 234 /* Linux Specific */ -#define TARGET_NR_fstatfs64 235 /* Linux Specific */ -#define TARGET_NR__llseek 236 /* Linux Specific */ -#define TARGET_NR_mlock 237 -#define TARGET_NR_munlock 238 -#define TARGET_NR_mlockall 239 -#define TARGET_NR_munlockall 240 -#define TARGET_NR_sched_setparam 241 -#define TARGET_NR_sched_getparam 242 -#define TARGET_NR_sched_setscheduler 243 -#define TARGET_NR_sched_getscheduler 244 -#define TARGET_NR_sched_yield 245 -#define TARGET_NR_sched_get_priority_max 246 -#define TARGET_NR_sched_get_priority_min 247 -#define TARGET_NR_sched_rr_get_interval 248 -#define TARGET_NR_nanosleep 249 -#define TARGET_NR_mremap 250 -#define TARGET_NR__sysctl 251 -#define TARGET_NR_getsid 252 -#define TARGET_NR_fdatasync 253 -#define TARGET_NR_nfsservctl 254 -#define TARGET_NR_sync_file_range 255 -#define TARGET_NR_clock_settime 256 -#define TARGET_NR_clock_gettime 257 -#define TARGET_NR_clock_getres 258 -#define TARGET_NR_clock_nanosleep 259 -#define TARGET_NR_sched_getaffinity 260 -#define TARGET_NR_sched_setaffinity 261 -#define TARGET_NR_timer_settime 262 -#define TARGET_NR_timer_gettime 263 -#define TARGET_NR_timer_getoverrun 264 -#define TARGET_NR_timer_delete 265 -#define TARGET_NR_timer_create 266 -/* #define TARGET_NR_vserver 267 Reserved for VSERVER */ -#define TARGET_NR_io_setup 268 -#define TARGET_NR_io_destroy 269 -#define TARGET_NR_io_submit 270 -#define TARGET_NR_io_cancel 271 -#define TARGET_NR_io_getevents 272 -#define TARGET_NR_mq_open 273 -#define TARGET_NR_mq_unlink 274 -#define TARGET_NR_mq_timedsend 275 -#define TARGET_NR_mq_timedreceive 276 -#define TARGET_NR_mq_notify 277 -#define TARGET_NR_mq_getsetattr 278 -#define TARGET_NR_waitid 279 -#define TARGET_NR_tee 280 -#define TARGET_NR_add_key 281 -#define TARGET_NR_request_key 282 -#define TARGET_NR_keyctl 283 -#define TARGET_NR_openat 284 -#define TARGET_NR_mkdirat 285 -#define TARGET_NR_mknodat 286 -#define TARGET_NR_fchownat 287 -#define TARGET_NR_futimesat 288 -#define TARGET_NR_fstatat64 289 -#define TARGET_NR_unlinkat 290 -#define TARGET_NR_renameat 291 -#define TARGET_NR_linkat 292 -#define TARGET_NR_symlinkat 293 -#define TARGET_NR_readlinkat 294 -#define TARGET_NR_fchmodat 295 -#define TARGET_NR_faccessat 296 -#define TARGET_NR_pselect6 297 -#define TARGET_NR_ppoll 298 -#define TARGET_NR_unshare 299 -#define TARGET_NR_set_robust_list 300 -#define TARGET_NR_get_robust_list 301 -#define TARGET_NR_migrate_pages 302 -#define TARGET_NR_mbind 303 -#define TARGET_NR_get_mempolicy 304 -#define TARGET_NR_set_mempolicy 305 -#define TARGET_NR_kexec_load 306 -#define TARGET_NR_move_pages 307 -#define TARGET_NR_getcpu 308 -#define TARGET_NR_epoll_pwait 309 -#define TARGET_NR_utimensat 310 -#define TARGET_NR_signalfd 311 -#define TARGET_NR_timerfd_create 312 -#define TARGET_NR_eventfd 313 -#define TARGET_NR_fallocate 314 -#define TARGET_NR_timerfd_settime 315 -#define TARGET_NR_timerfd_gettime 316 -#define TARGET_NR_signalfd4 317 -#define TARGET_NR_eventfd2 318 -#define TARGET_NR_epoll_create1 319 -#define TARGET_NR_dup3 320 -#define TARGET_NR_pipe2 321 -#define TARGET_NR_inotify_init1 322 -#define TARGET_NR_accept4 323 -#define TARGET_NR_preadv 324 -#define TARGET_NR_pwritev 325 -#define TARGET_NR_rt_tgsigqueueinfo 326 -#define TARGET_NR_perf_event_open 327 -#define TARGET_NR_recvmmsg 328 -#define TARGET_NR_fanotify_init 329 -#define TARGET_NR_fanotify_mark 330 -#define TARGET_NR_prlimit64 331 -#define TARGET_NR_name_to_handle_at 332 -#define TARGET_NR_open_by_handle_at 333 -#define TARGET_NR_clock_adjtime 334 -#define TARGET_NR_syncfs 335 -#define TARGET_NR_sendmmsg 336 -#define TARGET_NR_setns 337 -#define TARGET_NR_process_vm_readv 338 -#define TARGET_NR_process_vm_writev 339 -#define TARGET_NR_kern_features 340 -#define TARGET_NR_kcmp 341 -#define TARGET_NR_finit_module 342 -#define TARGET_NR_sched_setattr 343 -#define TARGET_NR_sched_getattr 344 -#define TARGET_NR_renameat2 345 -#define TARGET_NR_seccomp 346 -#define TARGET_NR_getrandom 347 -#define TARGET_NR_memfd_create 348 -#define TARGET_NR_bpf 349 -#define TARGET_NR_execveat 350 -#define TARGET_NR_membarrier 351 -#define TARGET_NR_userfaultfd 352 -#define TARGET_NR_bind 353 -#define TARGET_NR_listen 354 -#define TARGET_NR_setsockopt 355 -#define TARGET_NR_mlock2 356 -#define TARGET_NR_copy_file_range 357 -#define TARGET_NR_preadv2 358 -#define TARGET_NR_pwritev2 359 -#define TARGET_NR_statx 360 - -#endif diff --git a/linux-user/sparc64/syscallhdr.sh b/linux-user/sparc64/syscallhdr.sh new file mode 100644 index 0000000000..08c7e39bb3 --- /dev/null +++ b/linux-user/sparc64/syscallhdr.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_SPARC64_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry compat ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" +) > "$out" From 9d12f79daa1459c0c63d5f923e6cbd270f57ff4c Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:55 +0100 Subject: [PATCH 20/32] linux-user, x86_64, i386: cleanup TARGET_NR_arch_prctl Define do_arch_prctl() for i386 and x86_64, but return -TARGET_ENOSYS for i386. Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-14-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/i386/target_cpu.h | 4 ++-- linux-user/syscall.c | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/linux-user/i386/target_cpu.h b/linux-user/i386/target_cpu.h index 0b44530854..2207d24c2e 100644 --- a/linux-user/i386/target_cpu.h +++ b/linux-user/i386/target_cpu.h @@ -33,6 +33,8 @@ static inline void cpu_clone_regs_parent(CPUX86State *env, unsigned flags) { } +abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr); + #if defined(TARGET_ABI32) abi_long do_set_thread_area(CPUX86State *env, abi_ulong ptr); @@ -42,8 +44,6 @@ static inline void cpu_set_tls(CPUX86State *env, target_ulong newtls) cpu_x86_load_seg(env, R_GS, env->segs[R_GS].selector); } #else -abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr); - static inline void cpu_set_tls(CPUX86State *env, target_ulong newtls) { do_arch_prctl(env, TARGET_ARCH_SET_FS, newtls); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 61078342f7..35f4146662 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5545,6 +5545,10 @@ static bitmask_transtbl mmap_flags_tbl[] = { { 0, 0, 0, 0 } }; +/* + * NOTE: TARGET_ABI32 is defined for TARGET_I386 (but not for TARGET_X86_64) + * TARGET_I386 is defined if TARGET_X86_64 is defined + */ #if defined(TARGET_I386) /* NOTE: there is really one LDT for all the threads */ @@ -5684,7 +5688,7 @@ static abi_long do_modify_ldt(CPUX86State *env, int func, abi_ulong ptr, return ret; } -#if defined(TARGET_I386) && defined(TARGET_ABI32) +#if defined(TARGET_ABI32) abi_long do_set_thread_area(CPUX86State *env, abi_ulong ptr) { uint64_t *gdt_table = g2h(env->gdt.base); @@ -5816,9 +5820,12 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) unlock_user_struct(target_ldt_info, ptr, 1); return 0; } -#endif /* TARGET_I386 && TARGET_ABI32 */ -#ifndef TARGET_ABI32 +abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) +{ + return -ENOSYS; +} +#else abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) { abi_long ret = 0; @@ -5851,7 +5858,7 @@ abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) } return ret; } -#endif +#endif /* defined(TARGET_ABI32 */ #endif /* defined(TARGET_I386) */ @@ -10321,11 +10328,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, break; #ifdef TARGET_NR_arch_prctl case TARGET_NR_arch_prctl: -#if defined(TARGET_I386) && !defined(TARGET_ABI32) return do_arch_prctl(cpu_env, arg1, arg2); -#else -#error unreachable -#endif #endif #ifdef TARGET_NR_pread64 case TARGET_NR_pread64: From 289881175d05f1c35e8cf86b9de2757ef6410a69 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:56 +0100 Subject: [PATCH 21/32] linux-user, i386: add syscall table generation support Copy syscall_32.tbl and syscallhdr.sh from linux/arch/x86/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-15-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/i386/Makefile.objs | 5 + linux-user/i386/syscall_32.tbl | 442 +++++++++++++++++++++++++++++++++ linux-user/i386/syscall_nr.h | 387 ----------------------------- linux-user/i386/syscallhdr.sh | 28 +++ 6 files changed, 478 insertions(+), 388 deletions(-) create mode 100644 linux-user/i386/Makefile.objs create mode 100644 linux-user/i386/syscall_32.tbl delete mode 100644 linux-user/i386/syscall_nr.h create mode 100644 linux-user/i386/syscallhdr.sh diff --git a/configure b/configure index 0f063c368f..84bedad04b 100755 --- a/configure +++ b/configure @@ -1890,7 +1890,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ - ; do + i386 ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7788,6 +7788,7 @@ case "$target_name" in i386) mttcg="yes" gdb_xml_files="i386-32bit.xml" + TARGET_SYSTBL_ABI=i386 ;; x86_64) TARGET_BASE_ARCH=i386 diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 36f20cad79..720d9773b8 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -10,6 +10,7 @@ obj-$(TARGET_AARCH64) += arm/semihost.o obj-$(TARGET_ALPHA) += alpha/ obj-$(TARGET_ARM) += arm/ obj-$(TARGET_HPPA) += hppa/ +obj-$(TARGET_I386) += i386/ obj-$(TARGET_M68K) += m68k/ obj-$(TARGET_MICROBLAZE) += microblaze/ obj-$(TARGET_PPC) += ppc/ diff --git a/linux-user/i386/Makefile.objs b/linux-user/i386/Makefile.objs new file mode 100644 index 0000000000..c25cf17bfb --- /dev/null +++ b/linux-user/i386/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/i386/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/i386/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/i386/syscall_32.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/i386/syscall_32.tbl b/linux-user/i386/syscall_32.tbl new file mode 100644 index 0000000000..15908eb9b1 --- /dev/null +++ b/linux-user/i386/syscall_32.tbl @@ -0,0 +1,442 @@ +# +# 32-bit system call numbers and entry vectors +# +# The format is: +# +# +# The __ia32_sys and __ia32_compat_sys stubs are created on-the-fly for +# sys_*() system calls and compat_sys_*() compat system calls if +# IA32_EMULATION is defined, and expect struct pt_regs *regs as their only +# parameter. +# +# The abi is always "i386" for this file. +# +0 i386 restart_syscall sys_restart_syscall __ia32_sys_restart_syscall +1 i386 exit sys_exit __ia32_sys_exit +2 i386 fork sys_fork __ia32_sys_fork +3 i386 read sys_read __ia32_sys_read +4 i386 write sys_write __ia32_sys_write +5 i386 open sys_open __ia32_compat_sys_open +6 i386 close sys_close __ia32_sys_close +7 i386 waitpid sys_waitpid __ia32_sys_waitpid +8 i386 creat sys_creat __ia32_sys_creat +9 i386 link sys_link __ia32_sys_link +10 i386 unlink sys_unlink __ia32_sys_unlink +11 i386 execve sys_execve __ia32_compat_sys_execve +12 i386 chdir sys_chdir __ia32_sys_chdir +13 i386 time sys_time32 __ia32_sys_time32 +14 i386 mknod sys_mknod __ia32_sys_mknod +15 i386 chmod sys_chmod __ia32_sys_chmod +16 i386 lchown sys_lchown16 __ia32_sys_lchown16 +17 i386 break +18 i386 oldstat sys_stat __ia32_sys_stat +19 i386 lseek sys_lseek __ia32_compat_sys_lseek +20 i386 getpid sys_getpid __ia32_sys_getpid +21 i386 mount sys_mount __ia32_compat_sys_mount +22 i386 umount sys_oldumount __ia32_sys_oldumount +23 i386 setuid sys_setuid16 __ia32_sys_setuid16 +24 i386 getuid sys_getuid16 __ia32_sys_getuid16 +25 i386 stime sys_stime32 __ia32_sys_stime32 +26 i386 ptrace sys_ptrace __ia32_compat_sys_ptrace +27 i386 alarm sys_alarm __ia32_sys_alarm +28 i386 oldfstat sys_fstat __ia32_sys_fstat +29 i386 pause sys_pause __ia32_sys_pause +30 i386 utime sys_utime32 __ia32_sys_utime32 +31 i386 stty +32 i386 gtty +33 i386 access sys_access __ia32_sys_access +34 i386 nice sys_nice __ia32_sys_nice +35 i386 ftime +36 i386 sync sys_sync __ia32_sys_sync +37 i386 kill sys_kill __ia32_sys_kill +38 i386 rename sys_rename __ia32_sys_rename +39 i386 mkdir sys_mkdir __ia32_sys_mkdir +40 i386 rmdir sys_rmdir __ia32_sys_rmdir +41 i386 dup sys_dup __ia32_sys_dup +42 i386 pipe sys_pipe __ia32_sys_pipe +43 i386 times sys_times __ia32_compat_sys_times +44 i386 prof +45 i386 brk sys_brk __ia32_sys_brk +46 i386 setgid sys_setgid16 __ia32_sys_setgid16 +47 i386 getgid sys_getgid16 __ia32_sys_getgid16 +48 i386 signal sys_signal __ia32_sys_signal +49 i386 geteuid sys_geteuid16 __ia32_sys_geteuid16 +50 i386 getegid sys_getegid16 __ia32_sys_getegid16 +51 i386 acct sys_acct __ia32_sys_acct +52 i386 umount2 sys_umount __ia32_sys_umount +53 i386 lock +54 i386 ioctl sys_ioctl __ia32_compat_sys_ioctl +55 i386 fcntl sys_fcntl __ia32_compat_sys_fcntl64 +56 i386 mpx +57 i386 setpgid sys_setpgid __ia32_sys_setpgid +58 i386 ulimit +59 i386 oldolduname sys_olduname __ia32_sys_olduname +60 i386 umask sys_umask __ia32_sys_umask +61 i386 chroot sys_chroot __ia32_sys_chroot +62 i386 ustat sys_ustat __ia32_compat_sys_ustat +63 i386 dup2 sys_dup2 __ia32_sys_dup2 +64 i386 getppid sys_getppid __ia32_sys_getppid +65 i386 getpgrp sys_getpgrp __ia32_sys_getpgrp +66 i386 setsid sys_setsid __ia32_sys_setsid +67 i386 sigaction sys_sigaction __ia32_compat_sys_sigaction +68 i386 sgetmask sys_sgetmask __ia32_sys_sgetmask +69 i386 ssetmask sys_ssetmask __ia32_sys_ssetmask +70 i386 setreuid sys_setreuid16 __ia32_sys_setreuid16 +71 i386 setregid sys_setregid16 __ia32_sys_setregid16 +72 i386 sigsuspend sys_sigsuspend __ia32_sys_sigsuspend +73 i386 sigpending sys_sigpending __ia32_compat_sys_sigpending +74 i386 sethostname sys_sethostname __ia32_sys_sethostname +75 i386 setrlimit sys_setrlimit __ia32_compat_sys_setrlimit +76 i386 getrlimit sys_old_getrlimit __ia32_compat_sys_old_getrlimit +77 i386 getrusage sys_getrusage __ia32_compat_sys_getrusage +78 i386 gettimeofday sys_gettimeofday __ia32_compat_sys_gettimeofday +79 i386 settimeofday sys_settimeofday __ia32_compat_sys_settimeofday +80 i386 getgroups sys_getgroups16 __ia32_sys_getgroups16 +81 i386 setgroups sys_setgroups16 __ia32_sys_setgroups16 +82 i386 select sys_old_select __ia32_compat_sys_old_select +83 i386 symlink sys_symlink __ia32_sys_symlink +84 i386 oldlstat sys_lstat __ia32_sys_lstat +85 i386 readlink sys_readlink __ia32_sys_readlink +86 i386 uselib sys_uselib __ia32_sys_uselib +87 i386 swapon sys_swapon __ia32_sys_swapon +88 i386 reboot sys_reboot __ia32_sys_reboot +89 i386 readdir sys_old_readdir __ia32_compat_sys_old_readdir +90 i386 mmap sys_old_mmap __ia32_compat_sys_x86_mmap +91 i386 munmap sys_munmap __ia32_sys_munmap +92 i386 truncate sys_truncate __ia32_compat_sys_truncate +93 i386 ftruncate sys_ftruncate __ia32_compat_sys_ftruncate +94 i386 fchmod sys_fchmod __ia32_sys_fchmod +95 i386 fchown sys_fchown16 __ia32_sys_fchown16 +96 i386 getpriority sys_getpriority __ia32_sys_getpriority +97 i386 setpriority sys_setpriority __ia32_sys_setpriority +98 i386 profil +99 i386 statfs sys_statfs __ia32_compat_sys_statfs +100 i386 fstatfs sys_fstatfs __ia32_compat_sys_fstatfs +101 i386 ioperm sys_ioperm __ia32_sys_ioperm +102 i386 socketcall sys_socketcall __ia32_compat_sys_socketcall +103 i386 syslog sys_syslog __ia32_sys_syslog +104 i386 setitimer sys_setitimer __ia32_compat_sys_setitimer +105 i386 getitimer sys_getitimer __ia32_compat_sys_getitimer +106 i386 stat sys_newstat __ia32_compat_sys_newstat +107 i386 lstat sys_newlstat __ia32_compat_sys_newlstat +108 i386 fstat sys_newfstat __ia32_compat_sys_newfstat +109 i386 olduname sys_uname __ia32_sys_uname +110 i386 iopl sys_iopl __ia32_sys_iopl +111 i386 vhangup sys_vhangup __ia32_sys_vhangup +112 i386 idle +113 i386 vm86old sys_vm86old __ia32_sys_ni_syscall +114 i386 wait4 sys_wait4 __ia32_compat_sys_wait4 +115 i386 swapoff sys_swapoff __ia32_sys_swapoff +116 i386 sysinfo sys_sysinfo __ia32_compat_sys_sysinfo +117 i386 ipc sys_ipc __ia32_compat_sys_ipc +118 i386 fsync sys_fsync __ia32_sys_fsync +119 i386 sigreturn sys_sigreturn __ia32_compat_sys_sigreturn +120 i386 clone sys_clone __ia32_compat_sys_x86_clone +121 i386 setdomainname sys_setdomainname __ia32_sys_setdomainname +122 i386 uname sys_newuname __ia32_sys_newuname +123 i386 modify_ldt sys_modify_ldt __ia32_sys_modify_ldt +124 i386 adjtimex sys_adjtimex_time32 __ia32_sys_adjtimex_time32 +125 i386 mprotect sys_mprotect __ia32_sys_mprotect +126 i386 sigprocmask sys_sigprocmask __ia32_compat_sys_sigprocmask +127 i386 create_module +128 i386 init_module sys_init_module __ia32_sys_init_module +129 i386 delete_module sys_delete_module __ia32_sys_delete_module +130 i386 get_kernel_syms +131 i386 quotactl sys_quotactl __ia32_compat_sys_quotactl32 +132 i386 getpgid sys_getpgid __ia32_sys_getpgid +133 i386 fchdir sys_fchdir __ia32_sys_fchdir +134 i386 bdflush sys_bdflush __ia32_sys_bdflush +135 i386 sysfs sys_sysfs __ia32_sys_sysfs +136 i386 personality sys_personality __ia32_sys_personality +137 i386 afs_syscall +138 i386 setfsuid sys_setfsuid16 __ia32_sys_setfsuid16 +139 i386 setfsgid sys_setfsgid16 __ia32_sys_setfsgid16 +140 i386 _llseek sys_llseek __ia32_sys_llseek +141 i386 getdents sys_getdents __ia32_compat_sys_getdents +142 i386 _newselect sys_select __ia32_compat_sys_select +143 i386 flock sys_flock __ia32_sys_flock +144 i386 msync sys_msync __ia32_sys_msync +145 i386 readv sys_readv __ia32_compat_sys_readv +146 i386 writev sys_writev __ia32_compat_sys_writev +147 i386 getsid sys_getsid __ia32_sys_getsid +148 i386 fdatasync sys_fdatasync __ia32_sys_fdatasync +149 i386 _sysctl sys_sysctl __ia32_compat_sys_sysctl +150 i386 mlock sys_mlock __ia32_sys_mlock +151 i386 munlock sys_munlock __ia32_sys_munlock +152 i386 mlockall sys_mlockall __ia32_sys_mlockall +153 i386 munlockall sys_munlockall __ia32_sys_munlockall +154 i386 sched_setparam sys_sched_setparam __ia32_sys_sched_setparam +155 i386 sched_getparam sys_sched_getparam __ia32_sys_sched_getparam +156 i386 sched_setscheduler sys_sched_setscheduler __ia32_sys_sched_setscheduler +157 i386 sched_getscheduler sys_sched_getscheduler __ia32_sys_sched_getscheduler +158 i386 sched_yield sys_sched_yield __ia32_sys_sched_yield +159 i386 sched_get_priority_max sys_sched_get_priority_max __ia32_sys_sched_get_priority_max +160 i386 sched_get_priority_min sys_sched_get_priority_min __ia32_sys_sched_get_priority_min +161 i386 sched_rr_get_interval sys_sched_rr_get_interval_time32 __ia32_sys_sched_rr_get_interval_time32 +162 i386 nanosleep sys_nanosleep_time32 __ia32_sys_nanosleep_time32 +163 i386 mremap sys_mremap __ia32_sys_mremap +164 i386 setresuid sys_setresuid16 __ia32_sys_setresuid16 +165 i386 getresuid sys_getresuid16 __ia32_sys_getresuid16 +166 i386 vm86 sys_vm86 __ia32_sys_ni_syscall +167 i386 query_module +168 i386 poll sys_poll __ia32_sys_poll +169 i386 nfsservctl +170 i386 setresgid sys_setresgid16 __ia32_sys_setresgid16 +171 i386 getresgid sys_getresgid16 __ia32_sys_getresgid16 +172 i386 prctl sys_prctl __ia32_sys_prctl +173 i386 rt_sigreturn sys_rt_sigreturn __ia32_compat_sys_rt_sigreturn +174 i386 rt_sigaction sys_rt_sigaction __ia32_compat_sys_rt_sigaction +175 i386 rt_sigprocmask sys_rt_sigprocmask __ia32_compat_sys_rt_sigprocmask +176 i386 rt_sigpending sys_rt_sigpending __ia32_compat_sys_rt_sigpending +177 i386 rt_sigtimedwait sys_rt_sigtimedwait_time32 __ia32_compat_sys_rt_sigtimedwait_time32 +178 i386 rt_sigqueueinfo sys_rt_sigqueueinfo __ia32_compat_sys_rt_sigqueueinfo +179 i386 rt_sigsuspend sys_rt_sigsuspend __ia32_compat_sys_rt_sigsuspend +180 i386 pread64 sys_pread64 __ia32_compat_sys_x86_pread +181 i386 pwrite64 sys_pwrite64 __ia32_compat_sys_x86_pwrite +182 i386 chown sys_chown16 __ia32_sys_chown16 +183 i386 getcwd sys_getcwd __ia32_sys_getcwd +184 i386 capget sys_capget __ia32_sys_capget +185 i386 capset sys_capset __ia32_sys_capset +186 i386 sigaltstack sys_sigaltstack __ia32_compat_sys_sigaltstack +187 i386 sendfile sys_sendfile __ia32_compat_sys_sendfile +188 i386 getpmsg +189 i386 putpmsg +190 i386 vfork sys_vfork __ia32_sys_vfork +191 i386 ugetrlimit sys_getrlimit __ia32_compat_sys_getrlimit +192 i386 mmap2 sys_mmap_pgoff __ia32_sys_mmap_pgoff +193 i386 truncate64 sys_truncate64 __ia32_compat_sys_x86_truncate64 +194 i386 ftruncate64 sys_ftruncate64 __ia32_compat_sys_x86_ftruncate64 +195 i386 stat64 sys_stat64 __ia32_compat_sys_x86_stat64 +196 i386 lstat64 sys_lstat64 __ia32_compat_sys_x86_lstat64 +197 i386 fstat64 sys_fstat64 __ia32_compat_sys_x86_fstat64 +198 i386 lchown32 sys_lchown __ia32_sys_lchown +199 i386 getuid32 sys_getuid __ia32_sys_getuid +200 i386 getgid32 sys_getgid __ia32_sys_getgid +201 i386 geteuid32 sys_geteuid __ia32_sys_geteuid +202 i386 getegid32 sys_getegid __ia32_sys_getegid +203 i386 setreuid32 sys_setreuid __ia32_sys_setreuid +204 i386 setregid32 sys_setregid __ia32_sys_setregid +205 i386 getgroups32 sys_getgroups __ia32_sys_getgroups +206 i386 setgroups32 sys_setgroups __ia32_sys_setgroups +207 i386 fchown32 sys_fchown __ia32_sys_fchown +208 i386 setresuid32 sys_setresuid __ia32_sys_setresuid +209 i386 getresuid32 sys_getresuid __ia32_sys_getresuid +210 i386 setresgid32 sys_setresgid __ia32_sys_setresgid +211 i386 getresgid32 sys_getresgid __ia32_sys_getresgid +212 i386 chown32 sys_chown __ia32_sys_chown +213 i386 setuid32 sys_setuid __ia32_sys_setuid +214 i386 setgid32 sys_setgid __ia32_sys_setgid +215 i386 setfsuid32 sys_setfsuid __ia32_sys_setfsuid +216 i386 setfsgid32 sys_setfsgid __ia32_sys_setfsgid +217 i386 pivot_root sys_pivot_root __ia32_sys_pivot_root +218 i386 mincore sys_mincore __ia32_sys_mincore +219 i386 madvise sys_madvise __ia32_sys_madvise +220 i386 getdents64 sys_getdents64 __ia32_sys_getdents64 +221 i386 fcntl64 sys_fcntl64 __ia32_compat_sys_fcntl64 +# 222 is unused +# 223 is unused +224 i386 gettid sys_gettid __ia32_sys_gettid +225 i386 readahead sys_readahead __ia32_compat_sys_x86_readahead +226 i386 setxattr sys_setxattr __ia32_sys_setxattr +227 i386 lsetxattr sys_lsetxattr __ia32_sys_lsetxattr +228 i386 fsetxattr sys_fsetxattr __ia32_sys_fsetxattr +229 i386 getxattr sys_getxattr __ia32_sys_getxattr +230 i386 lgetxattr sys_lgetxattr __ia32_sys_lgetxattr +231 i386 fgetxattr sys_fgetxattr __ia32_sys_fgetxattr +232 i386 listxattr sys_listxattr __ia32_sys_listxattr +233 i386 llistxattr sys_llistxattr __ia32_sys_llistxattr +234 i386 flistxattr sys_flistxattr __ia32_sys_flistxattr +235 i386 removexattr sys_removexattr __ia32_sys_removexattr +236 i386 lremovexattr sys_lremovexattr __ia32_sys_lremovexattr +237 i386 fremovexattr sys_fremovexattr __ia32_sys_fremovexattr +238 i386 tkill sys_tkill __ia32_sys_tkill +239 i386 sendfile64 sys_sendfile64 __ia32_sys_sendfile64 +240 i386 futex sys_futex_time32 __ia32_sys_futex_time32 +241 i386 sched_setaffinity sys_sched_setaffinity __ia32_compat_sys_sched_setaffinity +242 i386 sched_getaffinity sys_sched_getaffinity __ia32_compat_sys_sched_getaffinity +243 i386 set_thread_area sys_set_thread_area __ia32_sys_set_thread_area +244 i386 get_thread_area sys_get_thread_area __ia32_sys_get_thread_area +245 i386 io_setup sys_io_setup __ia32_compat_sys_io_setup +246 i386 io_destroy sys_io_destroy __ia32_sys_io_destroy +247 i386 io_getevents sys_io_getevents_time32 __ia32_sys_io_getevents_time32 +248 i386 io_submit sys_io_submit __ia32_compat_sys_io_submit +249 i386 io_cancel sys_io_cancel __ia32_sys_io_cancel +250 i386 fadvise64 sys_fadvise64 __ia32_compat_sys_x86_fadvise64 +# 251 is available for reuse (was briefly sys_set_zone_reclaim) +252 i386 exit_group sys_exit_group __ia32_sys_exit_group +253 i386 lookup_dcookie sys_lookup_dcookie __ia32_compat_sys_lookup_dcookie +254 i386 epoll_create sys_epoll_create __ia32_sys_epoll_create +255 i386 epoll_ctl sys_epoll_ctl __ia32_sys_epoll_ctl +256 i386 epoll_wait sys_epoll_wait __ia32_sys_epoll_wait +257 i386 remap_file_pages sys_remap_file_pages __ia32_sys_remap_file_pages +258 i386 set_tid_address sys_set_tid_address __ia32_sys_set_tid_address +259 i386 timer_create sys_timer_create __ia32_compat_sys_timer_create +260 i386 timer_settime sys_timer_settime32 __ia32_sys_timer_settime32 +261 i386 timer_gettime sys_timer_gettime32 __ia32_sys_timer_gettime32 +262 i386 timer_getoverrun sys_timer_getoverrun __ia32_sys_timer_getoverrun +263 i386 timer_delete sys_timer_delete __ia32_sys_timer_delete +264 i386 clock_settime sys_clock_settime32 __ia32_sys_clock_settime32 +265 i386 clock_gettime sys_clock_gettime32 __ia32_sys_clock_gettime32 +266 i386 clock_getres sys_clock_getres_time32 __ia32_sys_clock_getres_time32 +267 i386 clock_nanosleep sys_clock_nanosleep_time32 __ia32_sys_clock_nanosleep_time32 +268 i386 statfs64 sys_statfs64 __ia32_compat_sys_statfs64 +269 i386 fstatfs64 sys_fstatfs64 __ia32_compat_sys_fstatfs64 +270 i386 tgkill sys_tgkill __ia32_sys_tgkill +271 i386 utimes sys_utimes_time32 __ia32_sys_utimes_time32 +272 i386 fadvise64_64 sys_fadvise64_64 __ia32_compat_sys_x86_fadvise64_64 +273 i386 vserver +274 i386 mbind sys_mbind __ia32_sys_mbind +275 i386 get_mempolicy sys_get_mempolicy __ia32_compat_sys_get_mempolicy +276 i386 set_mempolicy sys_set_mempolicy __ia32_sys_set_mempolicy +277 i386 mq_open sys_mq_open __ia32_compat_sys_mq_open +278 i386 mq_unlink sys_mq_unlink __ia32_sys_mq_unlink +279 i386 mq_timedsend sys_mq_timedsend_time32 __ia32_sys_mq_timedsend_time32 +280 i386 mq_timedreceive sys_mq_timedreceive_time32 __ia32_sys_mq_timedreceive_time32 +281 i386 mq_notify sys_mq_notify __ia32_compat_sys_mq_notify +282 i386 mq_getsetattr sys_mq_getsetattr __ia32_compat_sys_mq_getsetattr +283 i386 kexec_load sys_kexec_load __ia32_compat_sys_kexec_load +284 i386 waitid sys_waitid __ia32_compat_sys_waitid +# 285 sys_setaltroot +286 i386 add_key sys_add_key __ia32_sys_add_key +287 i386 request_key sys_request_key __ia32_sys_request_key +288 i386 keyctl sys_keyctl __ia32_compat_sys_keyctl +289 i386 ioprio_set sys_ioprio_set __ia32_sys_ioprio_set +290 i386 ioprio_get sys_ioprio_get __ia32_sys_ioprio_get +291 i386 inotify_init sys_inotify_init __ia32_sys_inotify_init +292 i386 inotify_add_watch sys_inotify_add_watch __ia32_sys_inotify_add_watch +293 i386 inotify_rm_watch sys_inotify_rm_watch __ia32_sys_inotify_rm_watch +294 i386 migrate_pages sys_migrate_pages __ia32_sys_migrate_pages +295 i386 openat sys_openat __ia32_compat_sys_openat +296 i386 mkdirat sys_mkdirat __ia32_sys_mkdirat +297 i386 mknodat sys_mknodat __ia32_sys_mknodat +298 i386 fchownat sys_fchownat __ia32_sys_fchownat +299 i386 futimesat sys_futimesat_time32 __ia32_sys_futimesat_time32 +300 i386 fstatat64 sys_fstatat64 __ia32_compat_sys_x86_fstatat +301 i386 unlinkat sys_unlinkat __ia32_sys_unlinkat +302 i386 renameat sys_renameat __ia32_sys_renameat +303 i386 linkat sys_linkat __ia32_sys_linkat +304 i386 symlinkat sys_symlinkat __ia32_sys_symlinkat +305 i386 readlinkat sys_readlinkat __ia32_sys_readlinkat +306 i386 fchmodat sys_fchmodat __ia32_sys_fchmodat +307 i386 faccessat sys_faccessat __ia32_sys_faccessat +308 i386 pselect6 sys_pselect6_time32 __ia32_compat_sys_pselect6_time32 +309 i386 ppoll sys_ppoll_time32 __ia32_compat_sys_ppoll_time32 +310 i386 unshare sys_unshare __ia32_sys_unshare +311 i386 set_robust_list sys_set_robust_list __ia32_compat_sys_set_robust_list +312 i386 get_robust_list sys_get_robust_list __ia32_compat_sys_get_robust_list +313 i386 splice sys_splice __ia32_sys_splice +314 i386 sync_file_range sys_sync_file_range __ia32_compat_sys_x86_sync_file_range +315 i386 tee sys_tee __ia32_sys_tee +316 i386 vmsplice sys_vmsplice __ia32_compat_sys_vmsplice +317 i386 move_pages sys_move_pages __ia32_compat_sys_move_pages +318 i386 getcpu sys_getcpu __ia32_sys_getcpu +319 i386 epoll_pwait sys_epoll_pwait __ia32_sys_epoll_pwait +320 i386 utimensat sys_utimensat_time32 __ia32_sys_utimensat_time32 +321 i386 signalfd sys_signalfd __ia32_compat_sys_signalfd +322 i386 timerfd_create sys_timerfd_create __ia32_sys_timerfd_create +323 i386 eventfd sys_eventfd __ia32_sys_eventfd +324 i386 fallocate sys_fallocate __ia32_compat_sys_x86_fallocate +325 i386 timerfd_settime sys_timerfd_settime32 __ia32_sys_timerfd_settime32 +326 i386 timerfd_gettime sys_timerfd_gettime32 __ia32_sys_timerfd_gettime32 +327 i386 signalfd4 sys_signalfd4 __ia32_compat_sys_signalfd4 +328 i386 eventfd2 sys_eventfd2 __ia32_sys_eventfd2 +329 i386 epoll_create1 sys_epoll_create1 __ia32_sys_epoll_create1 +330 i386 dup3 sys_dup3 __ia32_sys_dup3 +331 i386 pipe2 sys_pipe2 __ia32_sys_pipe2 +332 i386 inotify_init1 sys_inotify_init1 __ia32_sys_inotify_init1 +333 i386 preadv sys_preadv __ia32_compat_sys_preadv +334 i386 pwritev sys_pwritev __ia32_compat_sys_pwritev +335 i386 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo __ia32_compat_sys_rt_tgsigqueueinfo +336 i386 perf_event_open sys_perf_event_open __ia32_sys_perf_event_open +337 i386 recvmmsg sys_recvmmsg_time32 __ia32_compat_sys_recvmmsg_time32 +338 i386 fanotify_init sys_fanotify_init __ia32_sys_fanotify_init +339 i386 fanotify_mark sys_fanotify_mark __ia32_compat_sys_fanotify_mark +340 i386 prlimit64 sys_prlimit64 __ia32_sys_prlimit64 +341 i386 name_to_handle_at sys_name_to_handle_at __ia32_sys_name_to_handle_at +342 i386 open_by_handle_at sys_open_by_handle_at __ia32_compat_sys_open_by_handle_at +343 i386 clock_adjtime sys_clock_adjtime32 __ia32_sys_clock_adjtime32 +344 i386 syncfs sys_syncfs __ia32_sys_syncfs +345 i386 sendmmsg sys_sendmmsg __ia32_compat_sys_sendmmsg +346 i386 setns sys_setns __ia32_sys_setns +347 i386 process_vm_readv sys_process_vm_readv __ia32_compat_sys_process_vm_readv +348 i386 process_vm_writev sys_process_vm_writev __ia32_compat_sys_process_vm_writev +349 i386 kcmp sys_kcmp __ia32_sys_kcmp +350 i386 finit_module sys_finit_module __ia32_sys_finit_module +351 i386 sched_setattr sys_sched_setattr __ia32_sys_sched_setattr +352 i386 sched_getattr sys_sched_getattr __ia32_sys_sched_getattr +353 i386 renameat2 sys_renameat2 __ia32_sys_renameat2 +354 i386 seccomp sys_seccomp __ia32_sys_seccomp +355 i386 getrandom sys_getrandom __ia32_sys_getrandom +356 i386 memfd_create sys_memfd_create __ia32_sys_memfd_create +357 i386 bpf sys_bpf __ia32_sys_bpf +358 i386 execveat sys_execveat __ia32_compat_sys_execveat +359 i386 socket sys_socket __ia32_sys_socket +360 i386 socketpair sys_socketpair __ia32_sys_socketpair +361 i386 bind sys_bind __ia32_sys_bind +362 i386 connect sys_connect __ia32_sys_connect +363 i386 listen sys_listen __ia32_sys_listen +364 i386 accept4 sys_accept4 __ia32_sys_accept4 +365 i386 getsockopt sys_getsockopt __ia32_compat_sys_getsockopt +366 i386 setsockopt sys_setsockopt __ia32_compat_sys_setsockopt +367 i386 getsockname sys_getsockname __ia32_sys_getsockname +368 i386 getpeername sys_getpeername __ia32_sys_getpeername +369 i386 sendto sys_sendto __ia32_sys_sendto +370 i386 sendmsg sys_sendmsg __ia32_compat_sys_sendmsg +371 i386 recvfrom sys_recvfrom __ia32_compat_sys_recvfrom +372 i386 recvmsg sys_recvmsg __ia32_compat_sys_recvmsg +373 i386 shutdown sys_shutdown __ia32_sys_shutdown +374 i386 userfaultfd sys_userfaultfd __ia32_sys_userfaultfd +375 i386 membarrier sys_membarrier __ia32_sys_membarrier +376 i386 mlock2 sys_mlock2 __ia32_sys_mlock2 +377 i386 copy_file_range sys_copy_file_range __ia32_sys_copy_file_range +378 i386 preadv2 sys_preadv2 __ia32_compat_sys_preadv2 +379 i386 pwritev2 sys_pwritev2 __ia32_compat_sys_pwritev2 +380 i386 pkey_mprotect sys_pkey_mprotect __ia32_sys_pkey_mprotect +381 i386 pkey_alloc sys_pkey_alloc __ia32_sys_pkey_alloc +382 i386 pkey_free sys_pkey_free __ia32_sys_pkey_free +383 i386 statx sys_statx __ia32_sys_statx +384 i386 arch_prctl sys_arch_prctl __ia32_compat_sys_arch_prctl +385 i386 io_pgetevents sys_io_pgetevents_time32 __ia32_compat_sys_io_pgetevents +386 i386 rseq sys_rseq __ia32_sys_rseq +393 i386 semget sys_semget __ia32_sys_semget +394 i386 semctl sys_semctl __ia32_compat_sys_semctl +395 i386 shmget sys_shmget __ia32_sys_shmget +396 i386 shmctl sys_shmctl __ia32_compat_sys_shmctl +397 i386 shmat sys_shmat __ia32_compat_sys_shmat +398 i386 shmdt sys_shmdt __ia32_sys_shmdt +399 i386 msgget sys_msgget __ia32_sys_msgget +400 i386 msgsnd sys_msgsnd __ia32_compat_sys_msgsnd +401 i386 msgrcv sys_msgrcv __ia32_compat_sys_msgrcv +402 i386 msgctl sys_msgctl __ia32_compat_sys_msgctl +403 i386 clock_gettime64 sys_clock_gettime __ia32_sys_clock_gettime +404 i386 clock_settime64 sys_clock_settime __ia32_sys_clock_settime +405 i386 clock_adjtime64 sys_clock_adjtime __ia32_sys_clock_adjtime +406 i386 clock_getres_time64 sys_clock_getres __ia32_sys_clock_getres +407 i386 clock_nanosleep_time64 sys_clock_nanosleep __ia32_sys_clock_nanosleep +408 i386 timer_gettime64 sys_timer_gettime __ia32_sys_timer_gettime +409 i386 timer_settime64 sys_timer_settime __ia32_sys_timer_settime +410 i386 timerfd_gettime64 sys_timerfd_gettime __ia32_sys_timerfd_gettime +411 i386 timerfd_settime64 sys_timerfd_settime __ia32_sys_timerfd_settime +412 i386 utimensat_time64 sys_utimensat __ia32_sys_utimensat +413 i386 pselect6_time64 sys_pselect6 __ia32_compat_sys_pselect6_time64 +414 i386 ppoll_time64 sys_ppoll __ia32_compat_sys_ppoll_time64 +416 i386 io_pgetevents_time64 sys_io_pgetevents __ia32_sys_io_pgetevents +417 i386 recvmmsg_time64 sys_recvmmsg __ia32_compat_sys_recvmmsg_time64 +418 i386 mq_timedsend_time64 sys_mq_timedsend __ia32_sys_mq_timedsend +419 i386 mq_timedreceive_time64 sys_mq_timedreceive __ia32_sys_mq_timedreceive +420 i386 semtimedop_time64 sys_semtimedop __ia32_sys_semtimedop +421 i386 rt_sigtimedwait_time64 sys_rt_sigtimedwait __ia32_compat_sys_rt_sigtimedwait_time64 +422 i386 futex_time64 sys_futex __ia32_sys_futex +423 i386 sched_rr_get_interval_time64 sys_sched_rr_get_interval __ia32_sys_sched_rr_get_interval +424 i386 pidfd_send_signal sys_pidfd_send_signal __ia32_sys_pidfd_send_signal +425 i386 io_uring_setup sys_io_uring_setup __ia32_sys_io_uring_setup +426 i386 io_uring_enter sys_io_uring_enter __ia32_sys_io_uring_enter +427 i386 io_uring_register sys_io_uring_register __ia32_sys_io_uring_register +428 i386 open_tree sys_open_tree __ia32_sys_open_tree +429 i386 move_mount sys_move_mount __ia32_sys_move_mount +430 i386 fsopen sys_fsopen __ia32_sys_fsopen +431 i386 fsconfig sys_fsconfig __ia32_sys_fsconfig +432 i386 fsmount sys_fsmount __ia32_sys_fsmount +433 i386 fspick sys_fspick __ia32_sys_fspick +434 i386 pidfd_open sys_pidfd_open __ia32_sys_pidfd_open +435 i386 clone3 sys_clone3 __ia32_sys_clone3 diff --git a/linux-user/i386/syscall_nr.h b/linux-user/i386/syscall_nr.h deleted file mode 100644 index 3234ec21c6..0000000000 --- a/linux-user/i386/syscall_nr.h +++ /dev/null @@ -1,387 +0,0 @@ -/* - * This file contains the system call numbers. - */ - -#ifndef LINUX_USER_I386_SYSCALL_NR_H -#define LINUX_USER_I386_SYSCALL_NR_H - -#define TARGET_NR_restart_syscall 0 -#define TARGET_NR_exit 1 -#define TARGET_NR_fork 2 -#define TARGET_NR_read 3 -#define TARGET_NR_write 4 -#define TARGET_NR_open 5 -#define TARGET_NR_close 6 -#define TARGET_NR_waitpid 7 -#define TARGET_NR_creat 8 -#define TARGET_NR_link 9 -#define TARGET_NR_unlink 10 -#define TARGET_NR_execve 11 -#define TARGET_NR_chdir 12 -#define TARGET_NR_time 13 -#define TARGET_NR_mknod 14 -#define TARGET_NR_chmod 15 -#define TARGET_NR_lchown 16 -#define TARGET_NR_break 17 -#define TARGET_NR_oldstat 18 -#define TARGET_NR_lseek 19 -#define TARGET_NR_getpid 20 -#define TARGET_NR_mount 21 -#define TARGET_NR_umount 22 -#define TARGET_NR_setuid 23 -#define TARGET_NR_getuid 24 -#define TARGET_NR_stime 25 -#define TARGET_NR_ptrace 26 -#define TARGET_NR_alarm 27 -#define TARGET_NR_oldfstat 28 -#define TARGET_NR_pause 29 -#define TARGET_NR_utime 30 -#define TARGET_NR_stty 31 -#define TARGET_NR_gtty 32 -#define TARGET_NR_access 33 -#define TARGET_NR_nice 34 -#define TARGET_NR_ftime 35 -#define TARGET_NR_sync 36 -#define TARGET_NR_kill 37 -#define TARGET_NR_rename 38 -#define TARGET_NR_mkdir 39 -#define TARGET_NR_rmdir 40 -#define TARGET_NR_dup 41 -#define TARGET_NR_pipe 42 -#define TARGET_NR_times 43 -#define TARGET_NR_prof 44 -#define TARGET_NR_brk 45 -#define TARGET_NR_setgid 46 -#define TARGET_NR_getgid 47 -#define TARGET_NR_signal 48 -#define TARGET_NR_geteuid 49 -#define TARGET_NR_getegid 50 -#define TARGET_NR_acct 51 -#define TARGET_NR_umount2 52 -#define TARGET_NR_lock 53 -#define TARGET_NR_ioctl 54 -#define TARGET_NR_fcntl 55 -#define TARGET_NR_mpx 56 -#define TARGET_NR_setpgid 57 -#define TARGET_NR_ulimit 58 -#define TARGET_NR_oldolduname 59 -#define TARGET_NR_umask 60 -#define TARGET_NR_chroot 61 -#define TARGET_NR_ustat 62 -#define TARGET_NR_dup2 63 -#define TARGET_NR_getppid 64 -#define TARGET_NR_getpgrp 65 -#define TARGET_NR_setsid 66 -#define TARGET_NR_sigaction 67 -#define TARGET_NR_sgetmask 68 -#define TARGET_NR_ssetmask 69 -#define TARGET_NR_setreuid 70 -#define TARGET_NR_setregid 71 -#define TARGET_NR_sigsuspend 72 -#define TARGET_NR_sigpending 73 -#define TARGET_NR_sethostname 74 -#define TARGET_NR_setrlimit 75 -#define TARGET_NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ -#define TARGET_NR_getrusage 77 -#define TARGET_NR_gettimeofday 78 -#define TARGET_NR_settimeofday 79 -#define TARGET_NR_getgroups 80 -#define TARGET_NR_setgroups 81 -#define TARGET_NR_select 82 -#define TARGET_NR_symlink 83 -#define TARGET_NR_oldlstat 84 -#define TARGET_NR_readlink 85 -#define TARGET_NR_uselib 86 -#define TARGET_NR_swapon 87 -#define TARGET_NR_reboot 88 -#define TARGET_NR_readdir 89 -#define TARGET_NR_mmap 90 -#define TARGET_NR_munmap 91 -#define TARGET_NR_truncate 92 -#define TARGET_NR_ftruncate 93 -#define TARGET_NR_fchmod 94 -#define TARGET_NR_fchown 95 -#define TARGET_NR_getpriority 96 -#define TARGET_NR_setpriority 97 -#define TARGET_NR_profil 98 -#define TARGET_NR_statfs 99 -#define TARGET_NR_fstatfs 100 -#define TARGET_NR_ioperm 101 -#define TARGET_NR_socketcall 102 -#define TARGET_NR_syslog 103 -#define TARGET_NR_setitimer 104 -#define TARGET_NR_getitimer 105 -#define TARGET_NR_stat 106 -#define TARGET_NR_lstat 107 -#define TARGET_NR_fstat 108 -#define TARGET_NR_olduname 109 -#define TARGET_NR_iopl 110 -#define TARGET_NR_vhangup 111 -#define TARGET_NR_idle 112 -#define TARGET_NR_vm86old 113 -#define TARGET_NR_wait4 114 -#define TARGET_NR_swapoff 115 -#define TARGET_NR_sysinfo 116 -#define TARGET_NR_ipc 117 -#define TARGET_NR_fsync 118 -#define TARGET_NR_sigreturn 119 -#define TARGET_NR_clone 120 -#define TARGET_NR_setdomainname 121 -#define TARGET_NR_uname 122 -#define TARGET_NR_modify_ldt 123 -#define TARGET_NR_adjtimex 124 -#define TARGET_NR_mprotect 125 -#define TARGET_NR_sigprocmask 126 -#define TARGET_NR_create_module 127 -#define TARGET_NR_init_module 128 -#define TARGET_NR_delete_module 129 -#define TARGET_NR_get_kernel_syms 130 -#define TARGET_NR_quotactl 131 -#define TARGET_NR_getpgid 132 -#define TARGET_NR_fchdir 133 -#define TARGET_NR_bdflush 134 -#define TARGET_NR_sysfs 135 -#define TARGET_NR_personality 136 -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid 138 -#define TARGET_NR_setfsgid 139 -#define TARGET_NR__llseek 140 -#define TARGET_NR_getdents 141 -#define TARGET_NR__newselect 142 -#define TARGET_NR_flock 143 -#define TARGET_NR_msync 144 -#define TARGET_NR_readv 145 -#define TARGET_NR_writev 146 -#define TARGET_NR_getsid 147 -#define TARGET_NR_fdatasync 148 -#define TARGET_NR__sysctl 149 -#define TARGET_NR_mlock 150 -#define TARGET_NR_munlock 151 -#define TARGET_NR_mlockall 152 -#define TARGET_NR_munlockall 153 -#define TARGET_NR_sched_setparam 154 -#define TARGET_NR_sched_getparam 155 -#define TARGET_NR_sched_setscheduler 156 -#define TARGET_NR_sched_getscheduler 157 -#define TARGET_NR_sched_yield 158 -#define TARGET_NR_sched_get_priority_max 159 -#define TARGET_NR_sched_get_priority_min 160 -#define TARGET_NR_sched_rr_get_interval 161 -#define TARGET_NR_nanosleep 162 -#define TARGET_NR_mremap 163 -#define TARGET_NR_setresuid 164 -#define TARGET_NR_getresuid 165 -#define TARGET_NR_vm86 166 -#define TARGET_NR_query_module 167 -#define TARGET_NR_poll 168 -#define TARGET_NR_nfsservctl 169 -#define TARGET_NR_setresgid 170 -#define TARGET_NR_getresgid 171 -#define TARGET_NR_prctl 172 -#define TARGET_NR_rt_sigreturn 173 -#define TARGET_NR_rt_sigaction 174 -#define TARGET_NR_rt_sigprocmask 175 -#define TARGET_NR_rt_sigpending 176 -#define TARGET_NR_rt_sigtimedwait 177 -#define TARGET_NR_rt_sigqueueinfo 178 -#define TARGET_NR_rt_sigsuspend 179 -#define TARGET_NR_pread64 180 -#define TARGET_NR_pwrite64 181 -#define TARGET_NR_chown 182 -#define TARGET_NR_getcwd 183 -#define TARGET_NR_capget 184 -#define TARGET_NR_capset 185 -#define TARGET_NR_sigaltstack 186 -#define TARGET_NR_sendfile 187 -#define TARGET_NR_getpmsg 188 /* some people actually want streams */ -#define TARGET_NR_putpmsg 189 /* some people actually want streams */ -#define TARGET_NR_vfork 190 -#define TARGET_NR_ugetrlimit 191 /* SuS compliant getrlimit */ -#define TARGET_NR_mmap2 192 -#define TARGET_NR_truncate64 193 -#define TARGET_NR_ftruncate64 194 -#define TARGET_NR_stat64 195 -#define TARGET_NR_lstat64 196 -#define TARGET_NR_fstat64 197 -#define TARGET_NR_lchown32 198 -#define TARGET_NR_getuid32 199 -#define TARGET_NR_getgid32 200 -#define TARGET_NR_geteuid32 201 -#define TARGET_NR_getegid32 202 -#define TARGET_NR_setreuid32 203 -#define TARGET_NR_setregid32 204 -#define TARGET_NR_getgroups32 205 -#define TARGET_NR_setgroups32 206 -#define TARGET_NR_fchown32 207 -#define TARGET_NR_setresuid32 208 -#define TARGET_NR_getresuid32 209 -#define TARGET_NR_setresgid32 210 -#define TARGET_NR_getresgid32 211 -#define TARGET_NR_chown32 212 -#define TARGET_NR_setuid32 213 -#define TARGET_NR_setgid32 214 -#define TARGET_NR_setfsuid32 215 -#define TARGET_NR_setfsgid32 216 -#define TARGET_NR_pivot_root 217 -#define TARGET_NR_mincore 218 -#define TARGET_NR_madvise 219 -#define TARGET_NR_madvise1 219 /* delete when C lib stub is removed */ -#define TARGET_NR_getdents64 220 -#define TARGET_NR_fcntl64 221 -/* 223 is unused */ -#define TARGET_NR_gettid 224 -#define TARGET_NR_readahead 225 -#define TARGET_NR_setxattr 226 -#define TARGET_NR_lsetxattr 227 -#define TARGET_NR_fsetxattr 228 -#define TARGET_NR_getxattr 229 -#define TARGET_NR_lgetxattr 230 -#define TARGET_NR_fgetxattr 231 -#define TARGET_NR_listxattr 232 -#define TARGET_NR_llistxattr 233 -#define TARGET_NR_flistxattr 234 -#define TARGET_NR_removexattr 235 -#define TARGET_NR_lremovexattr 236 -#define TARGET_NR_fremovexattr 237 -#define TARGET_NR_tkill 238 -#define TARGET_NR_sendfile64 239 -#define TARGET_NR_futex 240 -#define TARGET_NR_sched_setaffinity 241 -#define TARGET_NR_sched_getaffinity 242 -#define TARGET_NR_set_thread_area 243 -#define TARGET_NR_get_thread_area 244 -#define TARGET_NR_io_setup 245 -#define TARGET_NR_io_destroy 246 -#define TARGET_NR_io_getevents 247 -#define TARGET_NR_io_submit 248 -#define TARGET_NR_io_cancel 249 -#define TARGET_NR_fadvise64 250 -/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ -#define TARGET_NR_exit_group 252 -#define TARGET_NR_lookup_dcookie 253 -#define TARGET_NR_epoll_create 254 -#define TARGET_NR_epoll_ctl 255 -#define TARGET_NR_epoll_wait 256 -#define TARGET_NR_remap_file_pages 257 -#define TARGET_NR_set_tid_address 258 -#define TARGET_NR_timer_create 259 -#define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) -#define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) -#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) -#define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) -#define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) -#define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) -#define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) -#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) -#define TARGET_NR_statfs64 268 -#define TARGET_NR_fstatfs64 269 -#define TARGET_NR_tgkill 270 -#define TARGET_NR_utimes 271 -#define TARGET_NR_fadvise64_64 272 -#define TARGET_NR_vserver 273 -#define TARGET_NR_mbind 274 -#define TARGET_NR_get_mempolicy 275 -#define TARGET_NR_set_mempolicy 276 -#define TARGET_NR_mq_open 277 -#define TARGET_NR_mq_unlink (TARGET_NR_mq_open+1) -#define TARGET_NR_mq_timedsend (TARGET_NR_mq_open+2) -#define TARGET_NR_mq_timedreceive (TARGET_NR_mq_open+3) -#define TARGET_NR_mq_notify (TARGET_NR_mq_open+4) -#define TARGET_NR_mq_getsetattr (TARGET_NR_mq_open+5) -#define TARGET_NR_kexec_load 283 -#define TARGET_NR_waitid 284 -/* #define TARGET_NR_sys_setaltroot 285 */ -#define TARGET_NR_add_key 286 -#define TARGET_NR_request_key 287 -#define TARGET_NR_keyctl 288 -#define TARGET_NR_ioprio_set 289 -#define TARGET_NR_ioprio_get 290 -#define TARGET_NR_inotify_init 291 -#define TARGET_NR_inotify_add_watch 292 -#define TARGET_NR_inotify_rm_watch 293 -#define TARGET_NR_migrate_pages 294 -#define TARGET_NR_openat 295 -#define TARGET_NR_mkdirat 296 -#define TARGET_NR_mknodat 297 -#define TARGET_NR_fchownat 298 -#define TARGET_NR_futimesat 299 -#define TARGET_NR_fstatat64 300 -#define TARGET_NR_unlinkat 301 -#define TARGET_NR_renameat 302 -#define TARGET_NR_linkat 303 -#define TARGET_NR_symlinkat 304 -#define TARGET_NR_readlinkat 305 -#define TARGET_NR_fchmodat 306 -#define TARGET_NR_faccessat 307 -#define TARGET_NR_pselect6 308 -#define TARGET_NR_ppoll 309 -#define TARGET_NR_unshare 310 -#define TARGET_NR_set_robust_list 311 -#define TARGET_NR_get_robust_list 312 -#define TARGET_NR_splice 313 -#define TARGET_NR_sync_file_range 314 -#define TARGET_NR_tee 315 -#define TARGET_NR_vmsplice 316 -#define TARGET_NR_move_pages 317 -#define TARGET_NR_getcpu 318 -#define TARGET_NR_epoll_pwait 319 -#define TARGET_NR_utimensat 320 -#define TARGET_NR_signalfd 321 -#define TARGET_NR_timerfd_create 322 -#define TARGET_NR_eventfd 323 -#define TARGET_NR_fallocate 324 -#define TARGET_NR_timerfd_settime 325 -#define TARGET_NR_timerfd_gettime 326 -#define TARGET_NR_signalfd4 327 -#define TARGET_NR_eventfd2 328 -#define TARGET_NR_epoll_create1 329 -#define TARGET_NR_dup3 330 -#define TARGET_NR_pipe2 331 -#define TARGET_NR_inotify_init1 332 -#define TARGET_NR_preadv 333 -#define TARGET_NR_pwritev 334 -#define TARGET_NR_rt_tgsigqueueinfo 335 -#define TARGET_NR_perf_event_open 336 -#define TARGET_NR_recvmmsg 337 -#define TARGET_NR_fanotify_init 338 -#define TARGET_NR_fanotify_mark 339 -#define TARGET_NR_prlimit64 340 -#define TARGET_NR_name_to_handle_at 341 -#define TARGET_NR_open_by_handle_at 342 -#define TARGET_NR_clock_adjtime 343 -#define TARGET_NR_syncfs 344 -#define TARGET_NR_sendmmsg 345 -#define TARGET_NR_setns 346 -#define TARGET_NR_process_vm_readv 347 -#define TARGET_NR_process_vm_writev 348 -#define TARGET_NR_kcmp 349 -#define TARGET_NR_finit_module 350 -#define TARGET_NR_sched_setattr 351 -#define TARGET_NR_sched_getattr 352 -#define TARGET_NR_renameat2 353 -#define TARGET_NR_seccomp 354 -#define TARGET_NR_getrandom 355 -#define TARGET_NR_memfd_create 356 -#define TARGET_NR_bpf 357 -#define TARGET_NR_execveat 358 -#define TARGET_NR_socket 359 -#define TARGET_NR_socketpair 360 -#define TARGET_NR_bind 361 -#define TARGET_NR_connect 362 -#define TARGET_NR_listen 363 -#define TARGET_NR_accept4 364 -#define TARGET_NR_getsockopt 365 -#define TARGET_NR_setsockopt 366 -#define TARGET_NR_getsockname 367 -#define TARGET_NR_getpeername 368 -#define TARGET_NR_sendto 369 -#define TARGET_NR_sendmsg 370 -#define TARGET_NR_recvfrom 371 -#define TARGET_NR_recvmsg 372 -#define TARGET_NR_shutdown 373 -#define TARGET_NR_userfaultfd 374 -#define TARGET_NR_membarrier 375 -#define TARGET_NR_mlock2 376 -#define TARGET_NR_copy_file_range 377 - -#endif diff --git a/linux-user/i386/syscallhdr.sh b/linux-user/i386/syscallhdr.sh new file mode 100644 index 0000000000..b2eca96db7 --- /dev/null +++ b/linux-user/i386/syscallhdr.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_I386_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + echo "#ifndef ${fileguard}" + echo "#define ${fileguard} 1" + echo "" + + while read nr abi name entry ; do + if [ -z "$offset" ]; then + echo "#define TARGET_NR_${prefix}${name} $nr" + else + echo "#define TARGET_NR_${prefix}${name} ($offset + $nr)" + fi + done + + echo "" + echo "#endif /* ${fileguard} */" +) > "$out" From 8d62f35ad26ec1331c71b3992b2d208acf1754f8 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:57 +0100 Subject: [PATCH 22/32] linux-user, x86_64: add syscall table generation support Copy syscall_64.tbl and syscallhdr.sh from linux/arch/x86/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-16-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/x86_64/Makefile.objs | 5 + linux-user/x86_64/syscall_64.tbl | 402 +++++++++++++++++++++++++++++++ linux-user/x86_64/syscall_nr.h | 356 --------------------------- linux-user/x86_64/syscallhdr.sh | 28 +++ 6 files changed, 438 insertions(+), 357 deletions(-) create mode 100644 linux-user/x86_64/Makefile.objs create mode 100644 linux-user/x86_64/syscall_64.tbl delete mode 100644 linux-user/x86_64/syscall_nr.h create mode 100644 linux-user/x86_64/syscallhdr.sh diff --git a/configure b/configure index 84bedad04b..eda37fd476 100755 --- a/configure +++ b/configure @@ -1890,7 +1890,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ - i386 ; do + i386 x86_64 ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7792,6 +7792,7 @@ case "$target_name" in ;; x86_64) TARGET_BASE_ARCH=i386 + TARGET_SYSTBL_ABI=common,64 mttcg="yes" gdb_xml_files="i386-64bit.xml" ;; diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 720d9773b8..1791bc48cd 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -19,4 +19,5 @@ obj-$(TARGET_S390X) += s390x/ obj-$(TARGET_SH4) += sh4/ obj-$(TARGET_SPARC) += sparc/ obj-$(TARGET_SPARC64) += $(TARGET_ABI_DIR)/ +obj-$(TARGET_X86_64) += x86_64/ obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/x86_64/Makefile.objs b/linux-user/x86_64/Makefile.objs new file mode 100644 index 0000000000..2cef1d48be --- /dev/null +++ b/linux-user/x86_64/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/x86_64/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/x86_64/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/x86_64/syscall_64.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/x86_64/syscall_64.tbl b/linux-user/x86_64/syscall_64.tbl new file mode 100644 index 0000000000..c29976eca4 --- /dev/null +++ b/linux-user/x86_64/syscall_64.tbl @@ -0,0 +1,402 @@ +# +# 64-bit system call numbers and entry vectors +# +# The format is: +# +# +# The __x64_sys_*() stubs are created on-the-fly for sys_*() system calls +# +# The abi is "common", "64" or "x32" for this file. +# +0 common read __x64_sys_read +1 common write __x64_sys_write +2 common open __x64_sys_open +3 common close __x64_sys_close +4 common stat __x64_sys_newstat +5 common fstat __x64_sys_newfstat +6 common lstat __x64_sys_newlstat +7 common poll __x64_sys_poll +8 common lseek __x64_sys_lseek +9 common mmap __x64_sys_mmap +10 common mprotect __x64_sys_mprotect +11 common munmap __x64_sys_munmap +12 common brk __x64_sys_brk +13 64 rt_sigaction __x64_sys_rt_sigaction +14 common rt_sigprocmask __x64_sys_rt_sigprocmask +15 64 rt_sigreturn __x64_sys_rt_sigreturn/ptregs +16 64 ioctl __x64_sys_ioctl +17 common pread64 __x64_sys_pread64 +18 common pwrite64 __x64_sys_pwrite64 +19 64 readv __x64_sys_readv +20 64 writev __x64_sys_writev +21 common access __x64_sys_access +22 common pipe __x64_sys_pipe +23 common select __x64_sys_select +24 common sched_yield __x64_sys_sched_yield +25 common mremap __x64_sys_mremap +26 common msync __x64_sys_msync +27 common mincore __x64_sys_mincore +28 common madvise __x64_sys_madvise +29 common shmget __x64_sys_shmget +30 common shmat __x64_sys_shmat +31 common shmctl __x64_sys_shmctl +32 common dup __x64_sys_dup +33 common dup2 __x64_sys_dup2 +34 common pause __x64_sys_pause +35 common nanosleep __x64_sys_nanosleep +36 common getitimer __x64_sys_getitimer +37 common alarm __x64_sys_alarm +38 common setitimer __x64_sys_setitimer +39 common getpid __x64_sys_getpid +40 common sendfile __x64_sys_sendfile64 +41 common socket __x64_sys_socket +42 common connect __x64_sys_connect +43 common accept __x64_sys_accept +44 common sendto __x64_sys_sendto +45 64 recvfrom __x64_sys_recvfrom +46 64 sendmsg __x64_sys_sendmsg +47 64 recvmsg __x64_sys_recvmsg +48 common shutdown __x64_sys_shutdown +49 common bind __x64_sys_bind +50 common listen __x64_sys_listen +51 common getsockname __x64_sys_getsockname +52 common getpeername __x64_sys_getpeername +53 common socketpair __x64_sys_socketpair +54 64 setsockopt __x64_sys_setsockopt +55 64 getsockopt __x64_sys_getsockopt +56 common clone __x64_sys_clone/ptregs +57 common fork __x64_sys_fork/ptregs +58 common vfork __x64_sys_vfork/ptregs +59 64 execve __x64_sys_execve/ptregs +60 common exit __x64_sys_exit +61 common wait4 __x64_sys_wait4 +62 common kill __x64_sys_kill +63 common uname __x64_sys_newuname +64 common semget __x64_sys_semget +65 common semop __x64_sys_semop +66 common semctl __x64_sys_semctl +67 common shmdt __x64_sys_shmdt +68 common msgget __x64_sys_msgget +69 common msgsnd __x64_sys_msgsnd +70 common msgrcv __x64_sys_msgrcv +71 common msgctl __x64_sys_msgctl +72 common fcntl __x64_sys_fcntl +73 common flock __x64_sys_flock +74 common fsync __x64_sys_fsync +75 common fdatasync __x64_sys_fdatasync +76 common truncate __x64_sys_truncate +77 common ftruncate __x64_sys_ftruncate +78 common getdents __x64_sys_getdents +79 common getcwd __x64_sys_getcwd +80 common chdir __x64_sys_chdir +81 common fchdir __x64_sys_fchdir +82 common rename __x64_sys_rename +83 common mkdir __x64_sys_mkdir +84 common rmdir __x64_sys_rmdir +85 common creat __x64_sys_creat +86 common link __x64_sys_link +87 common unlink __x64_sys_unlink +88 common symlink __x64_sys_symlink +89 common readlink __x64_sys_readlink +90 common chmod __x64_sys_chmod +91 common fchmod __x64_sys_fchmod +92 common chown __x64_sys_chown +93 common fchown __x64_sys_fchown +94 common lchown __x64_sys_lchown +95 common umask __x64_sys_umask +96 common gettimeofday __x64_sys_gettimeofday +97 common getrlimit __x64_sys_getrlimit +98 common getrusage __x64_sys_getrusage +99 common sysinfo __x64_sys_sysinfo +100 common times __x64_sys_times +101 64 ptrace __x64_sys_ptrace +102 common getuid __x64_sys_getuid +103 common syslog __x64_sys_syslog +104 common getgid __x64_sys_getgid +105 common setuid __x64_sys_setuid +106 common setgid __x64_sys_setgid +107 common geteuid __x64_sys_geteuid +108 common getegid __x64_sys_getegid +109 common setpgid __x64_sys_setpgid +110 common getppid __x64_sys_getppid +111 common getpgrp __x64_sys_getpgrp +112 common setsid __x64_sys_setsid +113 common setreuid __x64_sys_setreuid +114 common setregid __x64_sys_setregid +115 common getgroups __x64_sys_getgroups +116 common setgroups __x64_sys_setgroups +117 common setresuid __x64_sys_setresuid +118 common getresuid __x64_sys_getresuid +119 common setresgid __x64_sys_setresgid +120 common getresgid __x64_sys_getresgid +121 common getpgid __x64_sys_getpgid +122 common setfsuid __x64_sys_setfsuid +123 common setfsgid __x64_sys_setfsgid +124 common getsid __x64_sys_getsid +125 common capget __x64_sys_capget +126 common capset __x64_sys_capset +127 64 rt_sigpending __x64_sys_rt_sigpending +128 64 rt_sigtimedwait __x64_sys_rt_sigtimedwait +129 64 rt_sigqueueinfo __x64_sys_rt_sigqueueinfo +130 common rt_sigsuspend __x64_sys_rt_sigsuspend +131 64 sigaltstack __x64_sys_sigaltstack +132 common utime __x64_sys_utime +133 common mknod __x64_sys_mknod +134 64 uselib +135 common personality __x64_sys_personality +136 common ustat __x64_sys_ustat +137 common statfs __x64_sys_statfs +138 common fstatfs __x64_sys_fstatfs +139 common sysfs __x64_sys_sysfs +140 common getpriority __x64_sys_getpriority +141 common setpriority __x64_sys_setpriority +142 common sched_setparam __x64_sys_sched_setparam +143 common sched_getparam __x64_sys_sched_getparam +144 common sched_setscheduler __x64_sys_sched_setscheduler +145 common sched_getscheduler __x64_sys_sched_getscheduler +146 common sched_get_priority_max __x64_sys_sched_get_priority_max +147 common sched_get_priority_min __x64_sys_sched_get_priority_min +148 common sched_rr_get_interval __x64_sys_sched_rr_get_interval +149 common mlock __x64_sys_mlock +150 common munlock __x64_sys_munlock +151 common mlockall __x64_sys_mlockall +152 common munlockall __x64_sys_munlockall +153 common vhangup __x64_sys_vhangup +154 common modify_ldt __x64_sys_modify_ldt +155 common pivot_root __x64_sys_pivot_root +156 64 _sysctl __x64_sys_sysctl +157 common prctl __x64_sys_prctl +158 common arch_prctl __x64_sys_arch_prctl +159 common adjtimex __x64_sys_adjtimex +160 common setrlimit __x64_sys_setrlimit +161 common chroot __x64_sys_chroot +162 common sync __x64_sys_sync +163 common acct __x64_sys_acct +164 common settimeofday __x64_sys_settimeofday +165 common mount __x64_sys_mount +166 common umount2 __x64_sys_umount +167 common swapon __x64_sys_swapon +168 common swapoff __x64_sys_swapoff +169 common reboot __x64_sys_reboot +170 common sethostname __x64_sys_sethostname +171 common setdomainname __x64_sys_setdomainname +172 common iopl __x64_sys_iopl/ptregs +173 common ioperm __x64_sys_ioperm +174 64 create_module +175 common init_module __x64_sys_init_module +176 common delete_module __x64_sys_delete_module +177 64 get_kernel_syms +178 64 query_module +179 common quotactl __x64_sys_quotactl +180 64 nfsservctl +181 common getpmsg +182 common putpmsg +183 common afs_syscall +184 common tuxcall +185 common security +186 common gettid __x64_sys_gettid +187 common readahead __x64_sys_readahead +188 common setxattr __x64_sys_setxattr +189 common lsetxattr __x64_sys_lsetxattr +190 common fsetxattr __x64_sys_fsetxattr +191 common getxattr __x64_sys_getxattr +192 common lgetxattr __x64_sys_lgetxattr +193 common fgetxattr __x64_sys_fgetxattr +194 common listxattr __x64_sys_listxattr +195 common llistxattr __x64_sys_llistxattr +196 common flistxattr __x64_sys_flistxattr +197 common removexattr __x64_sys_removexattr +198 common lremovexattr __x64_sys_lremovexattr +199 common fremovexattr __x64_sys_fremovexattr +200 common tkill __x64_sys_tkill +201 common time __x64_sys_time +202 common futex __x64_sys_futex +203 common sched_setaffinity __x64_sys_sched_setaffinity +204 common sched_getaffinity __x64_sys_sched_getaffinity +205 64 set_thread_area +206 64 io_setup __x64_sys_io_setup +207 common io_destroy __x64_sys_io_destroy +208 common io_getevents __x64_sys_io_getevents +209 64 io_submit __x64_sys_io_submit +210 common io_cancel __x64_sys_io_cancel +211 64 get_thread_area +212 common lookup_dcookie __x64_sys_lookup_dcookie +213 common epoll_create __x64_sys_epoll_create +214 64 epoll_ctl_old +215 64 epoll_wait_old +216 common remap_file_pages __x64_sys_remap_file_pages +217 common getdents64 __x64_sys_getdents64 +218 common set_tid_address __x64_sys_set_tid_address +219 common restart_syscall __x64_sys_restart_syscall +220 common semtimedop __x64_sys_semtimedop +221 common fadvise64 __x64_sys_fadvise64 +222 64 timer_create __x64_sys_timer_create +223 common timer_settime __x64_sys_timer_settime +224 common timer_gettime __x64_sys_timer_gettime +225 common timer_getoverrun __x64_sys_timer_getoverrun +226 common timer_delete __x64_sys_timer_delete +227 common clock_settime __x64_sys_clock_settime +228 common clock_gettime __x64_sys_clock_gettime +229 common clock_getres __x64_sys_clock_getres +230 common clock_nanosleep __x64_sys_clock_nanosleep +231 common exit_group __x64_sys_exit_group +232 common epoll_wait __x64_sys_epoll_wait +233 common epoll_ctl __x64_sys_epoll_ctl +234 common tgkill __x64_sys_tgkill +235 common utimes __x64_sys_utimes +236 64 vserver +237 common mbind __x64_sys_mbind +238 common set_mempolicy __x64_sys_set_mempolicy +239 common get_mempolicy __x64_sys_get_mempolicy +240 common mq_open __x64_sys_mq_open +241 common mq_unlink __x64_sys_mq_unlink +242 common mq_timedsend __x64_sys_mq_timedsend +243 common mq_timedreceive __x64_sys_mq_timedreceive +244 64 mq_notify __x64_sys_mq_notify +245 common mq_getsetattr __x64_sys_mq_getsetattr +246 64 kexec_load __x64_sys_kexec_load +247 64 waitid __x64_sys_waitid +248 common add_key __x64_sys_add_key +249 common request_key __x64_sys_request_key +250 common keyctl __x64_sys_keyctl +251 common ioprio_set __x64_sys_ioprio_set +252 common ioprio_get __x64_sys_ioprio_get +253 common inotify_init __x64_sys_inotify_init +254 common inotify_add_watch __x64_sys_inotify_add_watch +255 common inotify_rm_watch __x64_sys_inotify_rm_watch +256 common migrate_pages __x64_sys_migrate_pages +257 common openat __x64_sys_openat +258 common mkdirat __x64_sys_mkdirat +259 common mknodat __x64_sys_mknodat +260 common fchownat __x64_sys_fchownat +261 common futimesat __x64_sys_futimesat +262 common newfstatat __x64_sys_newfstatat +263 common unlinkat __x64_sys_unlinkat +264 common renameat __x64_sys_renameat +265 common linkat __x64_sys_linkat +266 common symlinkat __x64_sys_symlinkat +267 common readlinkat __x64_sys_readlinkat +268 common fchmodat __x64_sys_fchmodat +269 common faccessat __x64_sys_faccessat +270 common pselect6 __x64_sys_pselect6 +271 common ppoll __x64_sys_ppoll +272 common unshare __x64_sys_unshare +273 64 set_robust_list __x64_sys_set_robust_list +274 64 get_robust_list __x64_sys_get_robust_list +275 common splice __x64_sys_splice +276 common tee __x64_sys_tee +277 common sync_file_range __x64_sys_sync_file_range +278 64 vmsplice __x64_sys_vmsplice +279 64 move_pages __x64_sys_move_pages +280 common utimensat __x64_sys_utimensat +281 common epoll_pwait __x64_sys_epoll_pwait +282 common signalfd __x64_sys_signalfd +283 common timerfd_create __x64_sys_timerfd_create +284 common eventfd __x64_sys_eventfd +285 common fallocate __x64_sys_fallocate +286 common timerfd_settime __x64_sys_timerfd_settime +287 common timerfd_gettime __x64_sys_timerfd_gettime +288 common accept4 __x64_sys_accept4 +289 common signalfd4 __x64_sys_signalfd4 +290 common eventfd2 __x64_sys_eventfd2 +291 common epoll_create1 __x64_sys_epoll_create1 +292 common dup3 __x64_sys_dup3 +293 common pipe2 __x64_sys_pipe2 +294 common inotify_init1 __x64_sys_inotify_init1 +295 64 preadv __x64_sys_preadv +296 64 pwritev __x64_sys_pwritev +297 64 rt_tgsigqueueinfo __x64_sys_rt_tgsigqueueinfo +298 common perf_event_open __x64_sys_perf_event_open +299 64 recvmmsg __x64_sys_recvmmsg +300 common fanotify_init __x64_sys_fanotify_init +301 common fanotify_mark __x64_sys_fanotify_mark +302 common prlimit64 __x64_sys_prlimit64 +303 common name_to_handle_at __x64_sys_name_to_handle_at +304 common open_by_handle_at __x64_sys_open_by_handle_at +305 common clock_adjtime __x64_sys_clock_adjtime +306 common syncfs __x64_sys_syncfs +307 64 sendmmsg __x64_sys_sendmmsg +308 common setns __x64_sys_setns +309 common getcpu __x64_sys_getcpu +310 64 process_vm_readv __x64_sys_process_vm_readv +311 64 process_vm_writev __x64_sys_process_vm_writev +312 common kcmp __x64_sys_kcmp +313 common finit_module __x64_sys_finit_module +314 common sched_setattr __x64_sys_sched_setattr +315 common sched_getattr __x64_sys_sched_getattr +316 common renameat2 __x64_sys_renameat2 +317 common seccomp __x64_sys_seccomp +318 common getrandom __x64_sys_getrandom +319 common memfd_create __x64_sys_memfd_create +320 common kexec_file_load __x64_sys_kexec_file_load +321 common bpf __x64_sys_bpf +322 64 execveat __x64_sys_execveat/ptregs +323 common userfaultfd __x64_sys_userfaultfd +324 common membarrier __x64_sys_membarrier +325 common mlock2 __x64_sys_mlock2 +326 common copy_file_range __x64_sys_copy_file_range +327 64 preadv2 __x64_sys_preadv2 +328 64 pwritev2 __x64_sys_pwritev2 +329 common pkey_mprotect __x64_sys_pkey_mprotect +330 common pkey_alloc __x64_sys_pkey_alloc +331 common pkey_free __x64_sys_pkey_free +332 common statx __x64_sys_statx +333 common io_pgetevents __x64_sys_io_pgetevents +334 common rseq __x64_sys_rseq +# don't use numbers 387 through 423, add new calls after the last +# 'common' entry +424 common pidfd_send_signal __x64_sys_pidfd_send_signal +425 common io_uring_setup __x64_sys_io_uring_setup +426 common io_uring_enter __x64_sys_io_uring_enter +427 common io_uring_register __x64_sys_io_uring_register +428 common open_tree __x64_sys_open_tree +429 common move_mount __x64_sys_move_mount +430 common fsopen __x64_sys_fsopen +431 common fsconfig __x64_sys_fsconfig +432 common fsmount __x64_sys_fsmount +433 common fspick __x64_sys_fspick +434 common pidfd_open __x64_sys_pidfd_open +435 common clone3 __x64_sys_clone3/ptregs + +# +# x32-specific system call numbers start at 512 to avoid cache impact +# for native 64-bit operation. The __x32_compat_sys stubs are created +# on-the-fly for compat_sys_*() compatibility system calls if X86_X32 +# is defined. +# +512 x32 rt_sigaction __x32_compat_sys_rt_sigaction +513 x32 rt_sigreturn sys32_x32_rt_sigreturn +514 x32 ioctl __x32_compat_sys_ioctl +515 x32 readv __x32_compat_sys_readv +516 x32 writev __x32_compat_sys_writev +517 x32 recvfrom __x32_compat_sys_recvfrom +518 x32 sendmsg __x32_compat_sys_sendmsg +519 x32 recvmsg __x32_compat_sys_recvmsg +520 x32 execve __x32_compat_sys_execve/ptregs +521 x32 ptrace __x32_compat_sys_ptrace +522 x32 rt_sigpending __x32_compat_sys_rt_sigpending +523 x32 rt_sigtimedwait __x32_compat_sys_rt_sigtimedwait_time64 +524 x32 rt_sigqueueinfo __x32_compat_sys_rt_sigqueueinfo +525 x32 sigaltstack __x32_compat_sys_sigaltstack +526 x32 timer_create __x32_compat_sys_timer_create +527 x32 mq_notify __x32_compat_sys_mq_notify +528 x32 kexec_load __x32_compat_sys_kexec_load +529 x32 waitid __x32_compat_sys_waitid +530 x32 set_robust_list __x32_compat_sys_set_robust_list +531 x32 get_robust_list __x32_compat_sys_get_robust_list +532 x32 vmsplice __x32_compat_sys_vmsplice +533 x32 move_pages __x32_compat_sys_move_pages +534 x32 preadv __x32_compat_sys_preadv64 +535 x32 pwritev __x32_compat_sys_pwritev64 +536 x32 rt_tgsigqueueinfo __x32_compat_sys_rt_tgsigqueueinfo +537 x32 recvmmsg __x32_compat_sys_recvmmsg_time64 +538 x32 sendmmsg __x32_compat_sys_sendmmsg +539 x32 process_vm_readv __x32_compat_sys_process_vm_readv +540 x32 process_vm_writev __x32_compat_sys_process_vm_writev +541 x32 setsockopt __x32_compat_sys_setsockopt +542 x32 getsockopt __x32_compat_sys_getsockopt +543 x32 io_setup __x32_compat_sys_io_setup +544 x32 io_submit __x32_compat_sys_io_submit +545 x32 execveat __x32_compat_sys_execveat/ptregs +546 x32 preadv2 __x32_compat_sys_preadv64v2 +547 x32 pwritev2 __x32_compat_sys_pwritev64v2 diff --git a/linux-user/x86_64/syscall_nr.h b/linux-user/x86_64/syscall_nr.h deleted file mode 100644 index e5d14eca22..0000000000 --- a/linux-user/x86_64/syscall_nr.h +++ /dev/null @@ -1,356 +0,0 @@ -#ifndef LINUX_USER_X86_64_SYSCALL_NR_H -#define LINUX_USER_X86_64_SYSCALL_NR_H - -#define TARGET_NR_read 0 -#define TARGET_NR_write 1 -#define TARGET_NR_open 2 -#define TARGET_NR_close 3 -#define TARGET_NR_stat 4 -#define TARGET_NR_fstat 5 -#define TARGET_NR_lstat 6 -#define TARGET_NR_poll 7 -#define TARGET_NR_lseek 8 -#define TARGET_NR_mmap 9 -#define TARGET_NR_mprotect 10 -#define TARGET_NR_munmap 11 -#define TARGET_NR_brk 12 -#define TARGET_NR_rt_sigaction 13 -#define TARGET_NR_rt_sigprocmask 14 -#define TARGET_NR_rt_sigreturn 15 -#define TARGET_NR_ioctl 16 -#define TARGET_NR_pread64 17 -#define TARGET_NR_pwrite64 18 -#define TARGET_NR_readv 19 -#define TARGET_NR_writev 20 -#define TARGET_NR_access 21 -#define TARGET_NR_pipe 22 -#define TARGET_NR_select 23 -#define TARGET_NR_sched_yield 24 -#define TARGET_NR_mremap 25 -#define TARGET_NR_msync 26 -#define TARGET_NR_mincore 27 -#define TARGET_NR_madvise 28 -#define TARGET_NR_shmget 29 -#define TARGET_NR_shmat 30 -#define TARGET_NR_shmctl 31 -#define TARGET_NR_dup 32 -#define TARGET_NR_dup2 33 -#define TARGET_NR_pause 34 -#define TARGET_NR_nanosleep 35 -#define TARGET_NR_getitimer 36 -#define TARGET_NR_alarm 37 -#define TARGET_NR_setitimer 38 -#define TARGET_NR_getpid 39 -#define TARGET_NR_sendfile 40 -#define TARGET_NR_socket 41 -#define TARGET_NR_connect 42 -#define TARGET_NR_accept 43 -#define TARGET_NR_sendto 44 -#define TARGET_NR_recvfrom 45 -#define TARGET_NR_sendmsg 46 -#define TARGET_NR_recvmsg 47 -#define TARGET_NR_shutdown 48 -#define TARGET_NR_bind 49 -#define TARGET_NR_listen 50 -#define TARGET_NR_getsockname 51 -#define TARGET_NR_getpeername 52 -#define TARGET_NR_socketpair 53 -#define TARGET_NR_setsockopt 54 -#define TARGET_NR_getsockopt 55 -#define TARGET_NR_clone 56 -#define TARGET_NR_fork 57 -#define TARGET_NR_vfork 58 -#define TARGET_NR_execve 59 -#define TARGET_NR_exit 60 -#define TARGET_NR_wait4 61 -#define TARGET_NR_kill 62 -#define TARGET_NR_uname 63 -#define TARGET_NR_semget 64 -#define TARGET_NR_semop 65 -#define TARGET_NR_semctl 66 -#define TARGET_NR_shmdt 67 -#define TARGET_NR_msgget 68 -#define TARGET_NR_msgsnd 69 -#define TARGET_NR_msgrcv 70 -#define TARGET_NR_msgctl 71 -#define TARGET_NR_fcntl 72 -#define TARGET_NR_flock 73 -#define TARGET_NR_fsync 74 -#define TARGET_NR_fdatasync 75 -#define TARGET_NR_truncate 76 -#define TARGET_NR_ftruncate 77 -#define TARGET_NR_getdents 78 -#define TARGET_NR_getcwd 79 -#define TARGET_NR_chdir 80 -#define TARGET_NR_fchdir 81 -#define TARGET_NR_rename 82 -#define TARGET_NR_mkdir 83 -#define TARGET_NR_rmdir 84 -#define TARGET_NR_creat 85 -#define TARGET_NR_link 86 -#define TARGET_NR_unlink 87 -#define TARGET_NR_symlink 88 -#define TARGET_NR_readlink 89 -#define TARGET_NR_chmod 90 -#define TARGET_NR_fchmod 91 -#define TARGET_NR_chown 92 -#define TARGET_NR_fchown 93 -#define TARGET_NR_lchown 94 -#define TARGET_NR_umask 95 -#define TARGET_NR_gettimeofday 96 -#define TARGET_NR_getrlimit 97 -#define TARGET_NR_getrusage 98 -#define TARGET_NR_sysinfo 99 -#define TARGET_NR_times 100 -#define TARGET_NR_ptrace 101 -#define TARGET_NR_getuid 102 -#define TARGET_NR_syslog 103 -#define TARGET_NR_getgid 104 -#define TARGET_NR_setuid 105 -#define TARGET_NR_setgid 106 -#define TARGET_NR_geteuid 107 -#define TARGET_NR_getegid 108 -#define TARGET_NR_setpgid 109 -#define TARGET_NR_getppid 110 -#define TARGET_NR_getpgrp 111 -#define TARGET_NR_setsid 112 -#define TARGET_NR_setreuid 113 -#define TARGET_NR_setregid 114 -#define TARGET_NR_getgroups 115 -#define TARGET_NR_setgroups 116 -#define TARGET_NR_setresuid 117 -#define TARGET_NR_getresuid 118 -#define TARGET_NR_setresgid 119 -#define TARGET_NR_getresgid 120 -#define TARGET_NR_getpgid 121 -#define TARGET_NR_setfsuid 122 -#define TARGET_NR_setfsgid 123 -#define TARGET_NR_getsid 124 -#define TARGET_NR_capget 125 -#define TARGET_NR_capset 126 -#define TARGET_NR_rt_sigpending 127 -#define TARGET_NR_rt_sigtimedwait 128 -#define TARGET_NR_rt_sigqueueinfo 129 -#define TARGET_NR_rt_sigsuspend 130 -#define TARGET_NR_sigaltstack 131 -#define TARGET_NR_utime 132 -#define TARGET_NR_mknod 133 -#define TARGET_NR_uselib 134 -#define TARGET_NR_personality 135 -#define TARGET_NR_ustat 136 -#define TARGET_NR_statfs 137 -#define TARGET_NR_fstatfs 138 -#define TARGET_NR_sysfs 139 -#define TARGET_NR_getpriority 140 -#define TARGET_NR_setpriority 141 -#define TARGET_NR_sched_setparam 142 -#define TARGET_NR_sched_getparam 143 -#define TARGET_NR_sched_setscheduler 144 -#define TARGET_NR_sched_getscheduler 145 -#define TARGET_NR_sched_get_priority_max 146 -#define TARGET_NR_sched_get_priority_min 147 -#define TARGET_NR_sched_rr_get_interval 148 -#define TARGET_NR_mlock 149 -#define TARGET_NR_munlock 150 -#define TARGET_NR_mlockall 151 -#define TARGET_NR_munlockall 152 -#define TARGET_NR_vhangup 153 -#define TARGET_NR_modify_ldt 154 -#define TARGET_NR_pivot_root 155 -#define TARGET_NR__sysctl 156 -#define TARGET_NR_prctl 157 -#define TARGET_NR_arch_prctl 158 -#define TARGET_NR_adjtimex 159 -#define TARGET_NR_setrlimit 160 -#define TARGET_NR_chroot 161 -#define TARGET_NR_sync 162 -#define TARGET_NR_acct 163 -#define TARGET_NR_settimeofday 164 -#define TARGET_NR_mount 165 -#define TARGET_NR_umount2 166 -#define TARGET_NR_swapon 167 -#define TARGET_NR_swapoff 168 -#define TARGET_NR_reboot 169 -#define TARGET_NR_sethostname 170 -#define TARGET_NR_setdomainname 171 -#define TARGET_NR_iopl 172 -#define TARGET_NR_ioperm 173 -#define TARGET_NR_create_module 174 -#define TARGET_NR_init_module 175 -#define TARGET_NR_delete_module 176 -#define TARGET_NR_get_kernel_syms 177 -#define TARGET_NR_query_module 178 -#define TARGET_NR_quotactl 179 -#define TARGET_NR_nfsservctl 180 -#define TARGET_NR_getpmsg 181 /* reserved for LiS/STREAMS */ -#define TARGET_NR_putpmsg 182 /* reserved for LiS/STREAMS */ -#define TARGET_NR_afs_syscall 183 /* reserved for AFS */ -#define TARGET_NR_tuxcall 184 /* reserved for tux */ -#define TARGET_NR_security 185 -#define TARGET_NR_gettid 186 -#define TARGET_NR_readahead 187 -#define TARGET_NR_setxattr 188 -#define TARGET_NR_lsetxattr 189 -#define TARGET_NR_fsetxattr 190 -#define TARGET_NR_getxattr 191 -#define TARGET_NR_lgetxattr 192 -#define TARGET_NR_fgetxattr 193 -#define TARGET_NR_listxattr 194 -#define TARGET_NR_llistxattr 195 -#define TARGET_NR_flistxattr 196 -#define TARGET_NR_removexattr 197 -#define TARGET_NR_lremovexattr 198 -#define TARGET_NR_fremovexattr 199 -#define TARGET_NR_tkill 200 -#define TARGET_NR_time 201 -#define TARGET_NR_futex 202 -#define TARGET_NR_sched_setaffinity 203 -#define TARGET_NR_sched_getaffinity 204 -#define TARGET_NR_set_thread_area 205 -#define TARGET_NR_io_setup 206 -#define TARGET_NR_io_destroy 207 -#define TARGET_NR_io_getevents 208 -#define TARGET_NR_io_submit 209 -#define TARGET_NR_io_cancel 210 -#define TARGET_NR_get_thread_area 211 -#define TARGET_NR_lookup_dcookie 212 -#define TARGET_NR_epoll_create 213 -#define TARGET_NR_epoll_ctl_old 214 -#define TARGET_NR_epoll_wait_old 215 -#define TARGET_NR_remap_file_pages 216 -#define TARGET_NR_getdents64 217 -#define TARGET_NR_set_tid_address 218 -#define TARGET_NR_restart_syscall 219 -#define TARGET_NR_semtimedop 220 -#define TARGET_NR_fadvise64 221 -#define TARGET_NR_timer_create 222 -#define TARGET_NR_timer_settime 223 -#define TARGET_NR_timer_gettime 224 -#define TARGET_NR_timer_getoverrun 225 -#define TARGET_NR_timer_delete 226 -#define TARGET_NR_clock_settime 227 -#define TARGET_NR_clock_gettime 228 -#define TARGET_NR_clock_getres 229 -#define TARGET_NR_clock_nanosleep 230 -#define TARGET_NR_exit_group 231 -#define TARGET_NR_epoll_wait 232 -#define TARGET_NR_epoll_ctl 233 -#define TARGET_NR_tgkill 234 -#define TARGET_NR_utimes 235 -#define TARGET_NR_vserver 236 -#define TARGET_NR_mbind 237 -#define TARGET_NR_set_mempolicy 238 -#define TARGET_NR_get_mempolicy 239 -#define TARGET_NR_mq_open 240 -#define TARGET_NR_mq_unlink 241 -#define TARGET_NR_mq_timedsend 242 -#define TARGET_NR_mq_timedreceive 243 -#define TARGET_NR_mq_notify 244 -#define TARGET_NR_mq_getsetattr 245 -#define TARGET_NR_kexec_load 246 -#define TARGET_NR_waitid 247 -#define TARGET_NR_add_key 248 -#define TARGET_NR_request_key 249 -#define TARGET_NR_keyctl 250 -#define TARGET_NR_ioprio_set 251 -#define TARGET_NR_ioprio_get 252 -#define TARGET_NR_inotify_init 253 -#define TARGET_NR_inotify_add_watch 254 -#define TARGET_NR_inotify_rm_watch 255 -#define TARGET_NR_migrate_pages 256 -#define TARGET_NR_openat 257 -#define TARGET_NR_mkdirat 258 -#define TARGET_NR_mknodat 259 -#define TARGET_NR_fchownat 260 -#define TARGET_NR_futimesat 261 -#define TARGET_NR_newfstatat 262 -#define TARGET_NR_unlinkat 263 -#define TARGET_NR_renameat 264 -#define TARGET_NR_linkat 265 -#define TARGET_NR_symlinkat 266 -#define TARGET_NR_readlinkat 267 -#define TARGET_NR_fchmodat 268 -#define TARGET_NR_faccessat 269 -#define TARGET_NR_pselect6 270 -#define TARGET_NR_ppoll 271 -#define TARGET_NR_unshare 272 -#define TARGET_NR_set_robust_list 273 -#define TARGET_NR_get_robust_list 274 -#define TARGET_NR_splice 275 -#define TARGET_NR_tee 276 -#define TARGET_NR_sync_file_range 277 -#define TARGET_NR_vmsplice 278 -#define TARGET_NR_move_pages 279 -#define TARGET_NR_utimensat 280 -#define TARGET_NR_epoll_pwait 281 -#define TARGET_NR_signalfd 282 -#define TARGET_NR_timerfd_create 283 -#define TARGET_NR_eventfd 284 -#define TARGET_NR_fallocate 285 -#define TARGET_NR_timerfd_settime 286 -#define TARGET_NR_timerfd_gettime 287 -#define TARGET_NR_accept4 288 -#define TARGET_NR_signalfd4 289 -#define TARGET_NR_eventfd2 290 -#define TARGET_NR_epoll_create1 291 -#define TARGET_NR_dup3 292 -#define TARGET_NR_pipe2 293 -#define TARGET_NR_inotify_init1 294 -#define TARGET_NR_preadv 295 -#define TARGET_NR_pwritev 296 -#define TARGET_NR_rt_tgsigqueueinfo 297 -#define TARGET_NR_perf_event_open 298 -#define TARGET_NR_recvmmsg 299 -#define TARGET_NR_fanotify_init 300 -#define TARGET_NR_fanotify_mark 301 -#define TARGET_NR_prlimit64 302 -#define TARGET_NR_name_to_handle_at 303 -#define TARGET_NR_open_by_handle_at 304 -#define TARGET_NR_clock_adjtime 305 -#define TARGET_NR_syncfs 306 -#define TARGET_NR_sendmmsg 307 -#define TARGET_NR_setns 308 -#define TARGET_NR_getcpu 309 -#define TARGET_NR_process_vm_readv 310 -#define TARGET_NR_process_vm_writev 311 -#define TARGET_NR_kcmp 312 -#define TARGET_NR_finit_module 313 -#define TARGET_NR_sched_setattr 314 -#define TARGET_NR_sched_getattr 315 -#define TARGET_NR_renameat2 316 -#define TARGET_NR_seccomp 317 -#define TARGET_NR_getrandom 318 -#define TARGET_NR_memfd_create 319 -#define TARGET_NR_kexec_file_load 320 -#define TARGET_NR_bpf 321 -#define TARGET_NR_execveat 322 -#define TARGET_NR_userfaultfd 323 -#define TARGET_NR_membarrier 324 -#define TARGET_NR_mlock2 325 -#define TARGET_NR_copy_file_range 326 -#define TARGET_NR_preadv2 327 -#define TARGET_NR_pwritev2 328 -#define TARGET_NR_pkey_mprotect 329 -#define TARGET_NR_pkey_alloc 330 -#define TARGET_NR_pkey_free 331 -#define TARGET_NR_statx 332 -#define TARGET_NR_io_pgetevents 333 -#define TARGET_NR_rseq 334 -/* - * don't use numbers 387 through 423, add new calls after the last - * 'common' entry - */ -#define TARGET_NR_pidfd_send_signal 424 -#define TARGET_NR_io_uring_setup 425 -#define TARGET_NR_io_uring_enter 426 -#define TARGET_NR_io_uring_register 427 -#define TARGET_NR_open_tree 428 -#define TARGET_NR_move_mount 429 -#define TARGET_NR_fsopen 430 -#define TARGET_NR_fsconfig 431 -#define TARGET_NR_fsmount 432 -#define TARGET_NR_fspick 433 -#define TARGET_NR_pidfd_open 434 -#define TARGET_NR_clone3 435 - -#endif diff --git a/linux-user/x86_64/syscallhdr.sh b/linux-user/x86_64/syscallhdr.sh new file mode 100644 index 0000000000..182be52a74 --- /dev/null +++ b/linux-user/x86_64/syscallhdr.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_X86_64_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + echo "#ifndef ${fileguard}" + echo "#define ${fileguard} 1" + echo "" + + while read nr abi name entry ; do + if [ -z "$offset" ]; then + echo "#define TARGET_NR_${prefix}${name} $nr" + else + echo "#define TARGET_NR_${prefix}${name} ($offset + $nr)" + fi + done + + echo "" + echo "#endif /* ${fileguard} */" +) > "$out" From c59716fc5b62734052d26baa06b62467c0d3c125 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:58 +0100 Subject: [PATCH 23/32] linux-user, mips: add syscall table generation support Copy syscall.tbl and syscallhdr.sh from linux/arch/mips/kernel/syscalls/syscall_o32.tbl v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Move the offset (4000) from the file to the Makefile.objs to be passed to syscallhdr.sh Rename on the fly fadvise64 to fadvise64_64. Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-17-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/mips/Makefile.objs | 5 + linux-user/mips/syscall_nr.h | 425 -------------------------------- linux-user/mips/syscall_o32.tbl | 425 ++++++++++++++++++++++++++++++++ linux-user/mips/syscallhdr.sh | 36 +++ 6 files changed, 469 insertions(+), 426 deletions(-) create mode 100644 linux-user/mips/Makefile.objs delete mode 100644 linux-user/mips/syscall_nr.h create mode 100644 linux-user/mips/syscall_o32.tbl create mode 100644 linux-user/mips/syscallhdr.sh diff --git a/configure b/configure index eda37fd476..7432f955b8 100755 --- a/configure +++ b/configure @@ -1890,7 +1890,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ - i386 x86_64 ; do + i386 x86_64 mips ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7837,6 +7837,7 @@ case "$target_name" in mttcg="yes" TARGET_ARCH=mips echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak + TARGET_SYSTBL_ABI=o32 ;; mipsn32|mipsn32el) mttcg="yes" diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 1791bc48cd..0a0715e9e1 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -13,6 +13,7 @@ obj-$(TARGET_HPPA) += hppa/ obj-$(TARGET_I386) += i386/ obj-$(TARGET_M68K) += m68k/ obj-$(TARGET_MICROBLAZE) += microblaze/ +obj-$(TARGET_MIPS) += mips/ obj-$(TARGET_PPC) += ppc/ obj-$(TARGET_PPC64) += ppc/ obj-$(TARGET_S390X) += s390x/ diff --git a/linux-user/mips/Makefile.objs b/linux-user/mips/Makefile.objs new file mode 100644 index 0000000000..9be4de07d9 --- /dev/null +++ b/linux-user/mips/Makefile.objs @@ -0,0 +1,5 @@ +generated-files-y += linux-user/mips/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/mips/syscallhdr.sh +%/syscall_nr.h: $(SRC_PATH)/linux-user/mips/syscall_o32.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI) "" 4000,"GEN","$@") diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h deleted file mode 100644 index 0be3af1c84..0000000000 --- a/linux-user/mips/syscall_nr.h +++ /dev/null @@ -1,425 +0,0 @@ -/* - * Linux o32 style syscalls are in the range from 4000 to 4999. - */ - -#ifndef LINUX_USER_MIPS_SYSCALL_NR_H -#define LINUX_USER_MIPS_SYSCALL_NR_H - -#define TARGET_NR_Linux 4000 -#define TARGET_NR_syscall (TARGET_NR_Linux + 0) -#define TARGET_NR_exit (TARGET_NR_Linux + 1) -#define TARGET_NR_fork (TARGET_NR_Linux + 2) -#define TARGET_NR_read (TARGET_NR_Linux + 3) -#define TARGET_NR_write (TARGET_NR_Linux + 4) -#define TARGET_NR_open (TARGET_NR_Linux + 5) -#define TARGET_NR_close (TARGET_NR_Linux + 6) -#define TARGET_NR_waitpid (TARGET_NR_Linux + 7) -#define TARGET_NR_creat (TARGET_NR_Linux + 8) -#define TARGET_NR_link (TARGET_NR_Linux + 9) -#define TARGET_NR_unlink (TARGET_NR_Linux + 10) -#define TARGET_NR_execve (TARGET_NR_Linux + 11) -#define TARGET_NR_chdir (TARGET_NR_Linux + 12) -#define TARGET_NR_time (TARGET_NR_Linux + 13) -#define TARGET_NR_mknod (TARGET_NR_Linux + 14) -#define TARGET_NR_chmod (TARGET_NR_Linux + 15) -#define TARGET_NR_lchown (TARGET_NR_Linux + 16) -#define TARGET_NR_break (TARGET_NR_Linux + 17) -#define TARGET_NR_unused18 (TARGET_NR_Linux + 18) -#define TARGET_NR_lseek (TARGET_NR_Linux + 19) -#define TARGET_NR_getpid (TARGET_NR_Linux + 20) -#define TARGET_NR_mount (TARGET_NR_Linux + 21) -#define TARGET_NR_umount (TARGET_NR_Linux + 22) -#define TARGET_NR_setuid (TARGET_NR_Linux + 23) -#define TARGET_NR_getuid (TARGET_NR_Linux + 24) -#define TARGET_NR_stime (TARGET_NR_Linux + 25) -#define TARGET_NR_ptrace (TARGET_NR_Linux + 26) -#define TARGET_NR_alarm (TARGET_NR_Linux + 27) -#define TARGET_NR_unused28 (TARGET_NR_Linux + 28) -#define TARGET_NR_pause (TARGET_NR_Linux + 29) -#define TARGET_NR_utime (TARGET_NR_Linux + 30) -#define TARGET_NR_stty (TARGET_NR_Linux + 31) -#define TARGET_NR_gtty (TARGET_NR_Linux + 32) -#define TARGET_NR_access (TARGET_NR_Linux + 33) -#define TARGET_NR_nice (TARGET_NR_Linux + 34) -#define TARGET_NR_ftime (TARGET_NR_Linux + 35) -#define TARGET_NR_sync (TARGET_NR_Linux + 36) -#define TARGET_NR_kill (TARGET_NR_Linux + 37) -#define TARGET_NR_rename (TARGET_NR_Linux + 38) -#define TARGET_NR_mkdir (TARGET_NR_Linux + 39) -#define TARGET_NR_rmdir (TARGET_NR_Linux + 40) -#define TARGET_NR_dup (TARGET_NR_Linux + 41) -#define TARGET_NR_pipe (TARGET_NR_Linux + 42) -#define TARGET_NR_times (TARGET_NR_Linux + 43) -#define TARGET_NR_prof (TARGET_NR_Linux + 44) -#define TARGET_NR_brk (TARGET_NR_Linux + 45) -#define TARGET_NR_setgid (TARGET_NR_Linux + 46) -#define TARGET_NR_getgid (TARGET_NR_Linux + 47) -#define TARGET_NR_signal (TARGET_NR_Linux + 48) -#define TARGET_NR_geteuid (TARGET_NR_Linux + 49) -#define TARGET_NR_getegid (TARGET_NR_Linux + 50) -#define TARGET_NR_acct (TARGET_NR_Linux + 51) -#define TARGET_NR_umount2 (TARGET_NR_Linux + 52) -#define TARGET_NR_lock (TARGET_NR_Linux + 53) -#define TARGET_NR_ioctl (TARGET_NR_Linux + 54) -#define TARGET_NR_fcntl (TARGET_NR_Linux + 55) -#define TARGET_NR_mpx (TARGET_NR_Linux + 56) -#define TARGET_NR_setpgid (TARGET_NR_Linux + 57) -#define TARGET_NR_ulimit (TARGET_NR_Linux + 58) -#define TARGET_NR_unused59 (TARGET_NR_Linux + 59) -#define TARGET_NR_umask (TARGET_NR_Linux + 60) -#define TARGET_NR_chroot (TARGET_NR_Linux + 61) -#define TARGET_NR_ustat (TARGET_NR_Linux + 62) -#define TARGET_NR_dup2 (TARGET_NR_Linux + 63) -#define TARGET_NR_getppid (TARGET_NR_Linux + 64) -#define TARGET_NR_getpgrp (TARGET_NR_Linux + 65) -#define TARGET_NR_setsid (TARGET_NR_Linux + 66) -#define TARGET_NR_sigaction (TARGET_NR_Linux + 67) -#define TARGET_NR_sgetmask (TARGET_NR_Linux + 68) -#define TARGET_NR_ssetmask (TARGET_NR_Linux + 69) -#define TARGET_NR_setreuid (TARGET_NR_Linux + 70) -#define TARGET_NR_setregid (TARGET_NR_Linux + 71) -#define TARGET_NR_sigsuspend (TARGET_NR_Linux + 72) -#define TARGET_NR_sigpending (TARGET_NR_Linux + 73) -#define TARGET_NR_sethostname (TARGET_NR_Linux + 74) -#define TARGET_NR_setrlimit (TARGET_NR_Linux + 75) -#define TARGET_NR_getrlimit (TARGET_NR_Linux + 76) -#define TARGET_NR_getrusage (TARGET_NR_Linux + 77) -#define TARGET_NR_gettimeofday (TARGET_NR_Linux + 78) -#define TARGET_NR_settimeofday (TARGET_NR_Linux + 79) -#define TARGET_NR_getgroups (TARGET_NR_Linux + 80) -#define TARGET_NR_setgroups (TARGET_NR_Linux + 81) -#define TARGET_NR_reserved82 (TARGET_NR_Linux + 82) -#define TARGET_NR_symlink (TARGET_NR_Linux + 83) -#define TARGET_NR_unused84 (TARGET_NR_Linux + 84) -#define TARGET_NR_readlink (TARGET_NR_Linux + 85) -#define TARGET_NR_uselib (TARGET_NR_Linux + 86) -#define TARGET_NR_swapon (TARGET_NR_Linux + 87) -#define TARGET_NR_reboot (TARGET_NR_Linux + 88) -#define TARGET_NR_readdir (TARGET_NR_Linux + 89) -#define TARGET_NR_mmap (TARGET_NR_Linux + 90) -#define TARGET_NR_munmap (TARGET_NR_Linux + 91) -#define TARGET_NR_truncate (TARGET_NR_Linux + 92) -#define TARGET_NR_ftruncate (TARGET_NR_Linux + 93) -#define TARGET_NR_fchmod (TARGET_NR_Linux + 94) -#define TARGET_NR_fchown (TARGET_NR_Linux + 95) -#define TARGET_NR_getpriority (TARGET_NR_Linux + 96) -#define TARGET_NR_setpriority (TARGET_NR_Linux + 97) -#define TARGET_NR_profil (TARGET_NR_Linux + 98) -#define TARGET_NR_statfs (TARGET_NR_Linux + 99) -#define TARGET_NR_fstatfs (TARGET_NR_Linux + 100) -#define TARGET_NR_ioperm (TARGET_NR_Linux + 101) -#define TARGET_NR_socketcall (TARGET_NR_Linux + 102) -#define TARGET_NR_syslog (TARGET_NR_Linux + 103) -#define TARGET_NR_setitimer (TARGET_NR_Linux + 104) -#define TARGET_NR_getitimer (TARGET_NR_Linux + 105) -#define TARGET_NR_stat (TARGET_NR_Linux + 106) -#define TARGET_NR_lstat (TARGET_NR_Linux + 107) -#define TARGET_NR_fstat (TARGET_NR_Linux + 108) -#define TARGET_NR_unused109 (TARGET_NR_Linux + 109) -#define TARGET_NR_iopl (TARGET_NR_Linux + 110) -#define TARGET_NR_vhangup (TARGET_NR_Linux + 111) -#define TARGET_NR_idle (TARGET_NR_Linux + 112) -#define TARGET_NR_vm86 (TARGET_NR_Linux + 113) -#define TARGET_NR_wait4 (TARGET_NR_Linux + 114) -#define TARGET_NR_swapoff (TARGET_NR_Linux + 115) -#define TARGET_NR_sysinfo (TARGET_NR_Linux + 116) -#define TARGET_NR_ipc (TARGET_NR_Linux + 117) -#define TARGET_NR_fsync (TARGET_NR_Linux + 118) -#define TARGET_NR_sigreturn (TARGET_NR_Linux + 119) -#define TARGET_NR_clone (TARGET_NR_Linux + 120) -#define TARGET_NR_setdomainname (TARGET_NR_Linux + 121) -#define TARGET_NR_uname (TARGET_NR_Linux + 122) -#define TARGET_NR_modify_ldt (TARGET_NR_Linux + 123) -#define TARGET_NR_adjtimex (TARGET_NR_Linux + 124) -#define TARGET_NR_mprotect (TARGET_NR_Linux + 125) -#define TARGET_NR_sigprocmask (TARGET_NR_Linux + 126) -#define TARGET_NR_create_module (TARGET_NR_Linux + 127) -#define TARGET_NR_init_module (TARGET_NR_Linux + 128) -#define TARGET_NR_delete_module (TARGET_NR_Linux + 129) -#define TARGET_NR_get_kernel_syms (TARGET_NR_Linux + 130) -#define TARGET_NR_quotactl (TARGET_NR_Linux + 131) -#define TARGET_NR_getpgid (TARGET_NR_Linux + 132) -#define TARGET_NR_fchdir (TARGET_NR_Linux + 133) -#define TARGET_NR_bdflush (TARGET_NR_Linux + 134) -#define TARGET_NR_sysfs (TARGET_NR_Linux + 135) -#define TARGET_NR_personality (TARGET_NR_Linux + 136) -#define TARGET_NR_afs_syscall (TARGET_NR_Linux + 137) /* Syscall for Andrew File System */ -#define TARGET_NR_setfsuid (TARGET_NR_Linux + 138) -#define TARGET_NR_setfsgid (TARGET_NR_Linux + 139) -#define TARGET_NR__llseek (TARGET_NR_Linux + 140) -#define TARGET_NR_getdents (TARGET_NR_Linux + 141) -#define TARGET_NR__newselect (TARGET_NR_Linux + 142) -#define TARGET_NR_flock (TARGET_NR_Linux + 143) -#define TARGET_NR_msync (TARGET_NR_Linux + 144) -#define TARGET_NR_readv (TARGET_NR_Linux + 145) -#define TARGET_NR_writev (TARGET_NR_Linux + 146) -#define TARGET_NR_cacheflush (TARGET_NR_Linux + 147) -#define TARGET_NR_cachectl (TARGET_NR_Linux + 148) -#define TARGET_NR_sysmips (TARGET_NR_Linux + 149) -#define TARGET_NR_unused150 (TARGET_NR_Linux + 150) -#define TARGET_NR_getsid (TARGET_NR_Linux + 151) -#define TARGET_NR_fdatasync (TARGET_NR_Linux + 152) -#define TARGET_NR__sysctl (TARGET_NR_Linux + 153) -#define TARGET_NR_mlock (TARGET_NR_Linux + 154) -#define TARGET_NR_munlock (TARGET_NR_Linux + 155) -#define TARGET_NR_mlockall (TARGET_NR_Linux + 156) -#define TARGET_NR_munlockall (TARGET_NR_Linux + 157) -#define TARGET_NR_sched_setparam (TARGET_NR_Linux + 158) -#define TARGET_NR_sched_getparam (TARGET_NR_Linux + 159) -#define TARGET_NR_sched_setscheduler (TARGET_NR_Linux + 160) -#define TARGET_NR_sched_getscheduler (TARGET_NR_Linux + 161) -#define TARGET_NR_sched_yield (TARGET_NR_Linux + 162) -#define TARGET_NR_sched_get_priority_max (TARGET_NR_Linux + 163) -#define TARGET_NR_sched_get_priority_min (TARGET_NR_Linux + 164) -#define TARGET_NR_sched_rr_get_interval (TARGET_NR_Linux + 165) -#define TARGET_NR_nanosleep (TARGET_NR_Linux + 166) -#define TARGET_NR_mremap (TARGET_NR_Linux + 167) -#define TARGET_NR_accept (TARGET_NR_Linux + 168) -#define TARGET_NR_bind (TARGET_NR_Linux + 169) -#define TARGET_NR_connect (TARGET_NR_Linux + 170) -#define TARGET_NR_getpeername (TARGET_NR_Linux + 171) -#define TARGET_NR_getsockname (TARGET_NR_Linux + 172) -#define TARGET_NR_getsockopt (TARGET_NR_Linux + 173) -#define TARGET_NR_listen (TARGET_NR_Linux + 174) -#define TARGET_NR_recv (TARGET_NR_Linux + 175) -#define TARGET_NR_recvfrom (TARGET_NR_Linux + 176) -#define TARGET_NR_recvmsg (TARGET_NR_Linux + 177) -#define TARGET_NR_send (TARGET_NR_Linux + 178) -#define TARGET_NR_sendmsg (TARGET_NR_Linux + 179) -#define TARGET_NR_sendto (TARGET_NR_Linux + 180) -#define TARGET_NR_setsockopt (TARGET_NR_Linux + 181) -#define TARGET_NR_shutdown (TARGET_NR_Linux + 182) -#define TARGET_NR_socket (TARGET_NR_Linux + 183) -#define TARGET_NR_socketpair (TARGET_NR_Linux + 184) -#define TARGET_NR_setresuid (TARGET_NR_Linux + 185) -#define TARGET_NR_getresuid (TARGET_NR_Linux + 186) -#define TARGET_NR_query_module (TARGET_NR_Linux + 187) -#define TARGET_NR_poll (TARGET_NR_Linux + 188) -#define TARGET_NR_nfsservctl (TARGET_NR_Linux + 189) -#define TARGET_NR_setresgid (TARGET_NR_Linux + 190) -#define TARGET_NR_getresgid (TARGET_NR_Linux + 191) -#define TARGET_NR_prctl (TARGET_NR_Linux + 192) -#define TARGET_NR_rt_sigreturn (TARGET_NR_Linux + 193) -#define TARGET_NR_rt_sigaction (TARGET_NR_Linux + 194) -#define TARGET_NR_rt_sigprocmask (TARGET_NR_Linux + 195) -#define TARGET_NR_rt_sigpending (TARGET_NR_Linux + 196) -#define TARGET_NR_rt_sigtimedwait (TARGET_NR_Linux + 197) -#define TARGET_NR_rt_sigqueueinfo (TARGET_NR_Linux + 198) -#define TARGET_NR_rt_sigsuspend (TARGET_NR_Linux + 199) -#define TARGET_NR_pread64 (TARGET_NR_Linux + 200) -#define TARGET_NR_pwrite64 (TARGET_NR_Linux + 201) -#define TARGET_NR_chown (TARGET_NR_Linux + 202) -#define TARGET_NR_getcwd (TARGET_NR_Linux + 203) -#define TARGET_NR_capget (TARGET_NR_Linux + 204) -#define TARGET_NR_capset (TARGET_NR_Linux + 205) -#define TARGET_NR_sigaltstack (TARGET_NR_Linux + 206) -#define TARGET_NR_sendfile (TARGET_NR_Linux + 207) -#define TARGET_NR_getpmsg (TARGET_NR_Linux + 208) -#define TARGET_NR_putpmsg (TARGET_NR_Linux + 209) -#define TARGET_NR_mmap2 (TARGET_NR_Linux + 210) -#define TARGET_NR_truncate64 (TARGET_NR_Linux + 211) -#define TARGET_NR_ftruncate64 (TARGET_NR_Linux + 212) -#define TARGET_NR_stat64 (TARGET_NR_Linux + 213) -#define TARGET_NR_lstat64 (TARGET_NR_Linux + 214) -#define TARGET_NR_fstat64 (TARGET_NR_Linux + 215) -#define TARGET_NR_pivot_root (TARGET_NR_Linux + 216) -#define TARGET_NR_mincore (TARGET_NR_Linux + 217) -#define TARGET_NR_madvise (TARGET_NR_Linux + 218) -#define TARGET_NR_getdents64 (TARGET_NR_Linux + 219) -#define TARGET_NR_fcntl64 (TARGET_NR_Linux + 220) -#define TARGET_NR_reserved221 (TARGET_NR_Linux + 221) -#define TARGET_NR_gettid (TARGET_NR_Linux + 222) -#define TARGET_NR_readahead (TARGET_NR_Linux + 223) -#define TARGET_NR_setxattr (TARGET_NR_Linux + 224) -#define TARGET_NR_lsetxattr (TARGET_NR_Linux + 225) -#define TARGET_NR_fsetxattr (TARGET_NR_Linux + 226) -#define TARGET_NR_getxattr (TARGET_NR_Linux + 227) -#define TARGET_NR_lgetxattr (TARGET_NR_Linux + 228) -#define TARGET_NR_fgetxattr (TARGET_NR_Linux + 229) -#define TARGET_NR_listxattr (TARGET_NR_Linux + 230) -#define TARGET_NR_llistxattr (TARGET_NR_Linux + 231) -#define TARGET_NR_flistxattr (TARGET_NR_Linux + 232) -#define TARGET_NR_removexattr (TARGET_NR_Linux + 233) -#define TARGET_NR_lremovexattr (TARGET_NR_Linux + 234) -#define TARGET_NR_fremovexattr (TARGET_NR_Linux + 235) -#define TARGET_NR_tkill (TARGET_NR_Linux + 236) -#define TARGET_NR_sendfile64 (TARGET_NR_Linux + 237) -#define TARGET_NR_futex (TARGET_NR_Linux + 238) -#define TARGET_NR_sched_setaffinity (TARGET_NR_Linux + 239) -#define TARGET_NR_sched_getaffinity (TARGET_NR_Linux + 240) -#define TARGET_NR_io_setup (TARGET_NR_Linux + 241) -#define TARGET_NR_io_destroy (TARGET_NR_Linux + 242) -#define TARGET_NR_io_getevents (TARGET_NR_Linux + 243) -#define TARGET_NR_io_submit (TARGET_NR_Linux + 244) -#define TARGET_NR_io_cancel (TARGET_NR_Linux + 245) -#define TARGET_NR_exit_group (TARGET_NR_Linux + 246) -#define TARGET_NR_lookup_dcookie (TARGET_NR_Linux + 247) -#define TARGET_NR_epoll_create (TARGET_NR_Linux + 248) -#define TARGET_NR_epoll_ctl (TARGET_NR_Linux + 249) -#define TARGET_NR_epoll_wait (TARGET_NR_Linux + 250) -#define TARGET_NR_remap_file_pages (TARGET_NR_Linux + 251) -#define TARGET_NR_set_tid_address (TARGET_NR_Linux + 252) -#define TARGET_NR_restart_syscall (TARGET_NR_Linux + 253) -#define TARGET_NR_fadvise64_64 (TARGET_NR_Linux + 254) -#define TARGET_NR_statfs64 (TARGET_NR_Linux + 255) -#define TARGET_NR_fstatfs64 (TARGET_NR_Linux + 256) -#define TARGET_NR_timer_create (TARGET_NR_Linux + 257) -#define TARGET_NR_timer_settime (TARGET_NR_Linux + 258) -#define TARGET_NR_timer_gettime (TARGET_NR_Linux + 259) -#define TARGET_NR_timer_getoverrun (TARGET_NR_Linux + 260) -#define TARGET_NR_timer_delete (TARGET_NR_Linux + 261) -#define TARGET_NR_clock_settime (TARGET_NR_Linux + 262) -#define TARGET_NR_clock_gettime (TARGET_NR_Linux + 263) -#define TARGET_NR_clock_getres (TARGET_NR_Linux + 264) -#define TARGET_NR_clock_nanosleep (TARGET_NR_Linux + 265) -#define TARGET_NR_tgkill (TARGET_NR_Linux + 266) -#define TARGET_NR_utimes (TARGET_NR_Linux + 267) -#define TARGET_NR_mbind (TARGET_NR_Linux + 268) -#define TARGET_NR_get_mempolicy (TARGET_NR_Linux + 269) -#define TARGET_NR_set_mempolicy (TARGET_NR_Linux + 270) -#define TARGET_NR_mq_open (TARGET_NR_Linux + 271) -#define TARGET_NR_mq_unlink (TARGET_NR_Linux + 272) -#define TARGET_NR_mq_timedsend (TARGET_NR_Linux + 273) -#define TARGET_NR_mq_timedreceive (TARGET_NR_Linux + 274) -#define TARGET_NR_mq_notify (TARGET_NR_Linux + 275) -#define TARGET_NR_mq_getsetattr (TARGET_NR_Linux + 276) -#define TARGET_NR_vserver (TARGET_NR_Linux + 277) -#define TARGET_NR_waitid (TARGET_NR_Linux + 278) -/* #define TARGET_NR_sys_setaltroot (TARGET_NR_Linux + 279) */ -#define TARGET_NR_add_key (TARGET_NR_Linux + 280) -#define TARGET_NR_request_key (TARGET_NR_Linux + 281) -#define TARGET_NR_keyctl (TARGET_NR_Linux + 282) -#define TARGET_NR_set_thread_area (TARGET_NR_Linux + 283) -#define TARGET_NR_inotify_init (TARGET_NR_Linux + 284) -#define TARGET_NR_inotify_add_watch (TARGET_NR_Linux + 285) -#define TARGET_NR_inotify_rm_watch (TARGET_NR_Linux + 286) -#define TARGET_NR_migrate_pages (TARGET_NR_Linux + 287) -#define TARGET_NR_openat (TARGET_NR_Linux + 288) -#define TARGET_NR_mkdirat (TARGET_NR_Linux + 289) -#define TARGET_NR_mknodat (TARGET_NR_Linux + 290) -#define TARGET_NR_fchownat (TARGET_NR_Linux + 291) -#define TARGET_NR_futimesat (TARGET_NR_Linux + 292) -#define TARGET_NR_fstatat64 (TARGET_NR_Linux + 293) -#define TARGET_NR_unlinkat (TARGET_NR_Linux + 294) -#define TARGET_NR_renameat (TARGET_NR_Linux + 295) -#define TARGET_NR_linkat (TARGET_NR_Linux + 296) -#define TARGET_NR_symlinkat (TARGET_NR_Linux + 297) -#define TARGET_NR_readlinkat (TARGET_NR_Linux + 298) -#define TARGET_NR_fchmodat (TARGET_NR_Linux + 299) -#define TARGET_NR_faccessat (TARGET_NR_Linux + 300) -#define TARGET_NR_pselect6 (TARGET_NR_Linux + 301) -#define TARGET_NR_ppoll (TARGET_NR_Linux + 302) -#define TARGET_NR_unshare (TARGET_NR_Linux + 303) -#define TARGET_NR_splice (TARGET_NR_Linux + 304) -#define TARGET_NR_sync_file_range (TARGET_NR_Linux + 305) -#define TARGET_NR_tee (TARGET_NR_Linux + 306) -#define TARGET_NR_vmsplice (TARGET_NR_Linux + 307) -#define TARGET_NR_move_pages (TARGET_NR_Linux + 308) -#define TARGET_NR_set_robust_list (TARGET_NR_Linux + 309) -#define TARGET_NR_get_robust_list (TARGET_NR_Linux + 310) -#define TARGET_NR_kexec_load (TARGET_NR_Linux + 311) -#define TARGET_NR_getcpu (TARGET_NR_Linux + 312) -#define TARGET_NR_epoll_pwait (TARGET_NR_Linux + 313) -#define TARGET_NR_ioprio_set (TARGET_NR_Linux + 314) -#define TARGET_NR_ioprio_get (TARGET_NR_Linux + 315) -#define TARGET_NR_utimensat (TARGET_NR_Linux + 316) -#define TARGET_NR_signalfd (TARGET_NR_Linux + 317) -#define TARGET_NR_timerfd (TARGET_NR_Linux + 318) -#define TARGET_NR_eventfd (TARGET_NR_Linux + 319) -#define TARGET_NR_fallocate (TARGET_NR_Linux + 320) -#define TARGET_NR_timerfd_create (TARGET_NR_Linux + 321) -#define TARGET_NR_timerfd_gettime (TARGET_NR_Linux + 322) -#define TARGET_NR_timerfd_settime (TARGET_NR_Linux + 323) -#define TARGET_NR_signalfd4 (TARGET_NR_Linux + 324) -#define TARGET_NR_eventfd2 (TARGET_NR_Linux + 325) -#define TARGET_NR_epoll_create1 (TARGET_NR_Linux + 326) -#define TARGET_NR_dup3 (TARGET_NR_Linux + 327) -#define TARGET_NR_pipe2 (TARGET_NR_Linux + 328) -#define TARGET_NR_inotify_init1 (TARGET_NR_Linux + 329) -#define TARGET_NR_preadv (TARGET_NR_Linux + 330) -#define TARGET_NR_pwritev (TARGET_NR_Linux + 331) -#define TARGET_NR_rt_tgsigqueueinfo (TARGET_NR_Linux + 332) -#define TARGET_NR_perf_event_open (TARGET_NR_Linux + 333) -#define TARGET_NR_accept4 (TARGET_NR_Linux + 334) -#define TARGET_NR_recvmmsg (TARGET_NR_Linux + 335) -#define TARGET_NR_fanotify_init (TARGET_NR_Linux + 336) -#define TARGET_NR_fanotify_mark (TARGET_NR_Linux + 337) -#define TARGET_NR_prlimit64 (TARGET_NR_Linux + 338) -#define TARGET_NR_name_to_handle_at (TARGET_NR_Linux + 339) -#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 340) -#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 341) -#define TARGET_NR_syncfs (TARGET_NR_Linux + 342) -#define TARGET_NR_sendmmsg (TARGET_NR_Linux + 343) -#define TARGET_NR_setns (TARGET_NR_Linux + 344) -#define TARGET_NR_process_vm_readv (TARGET_NR_Linux + 345) -#define TARGET_NR_process_vm_writev (TARGET_NR_Linux + 346) -#define TARGET_NR_kcmp (TARGET_NR_Linux + 347) -#define TARGET_NR_finit_module (TARGET_NR_Linux + 348) - -#define TARGET_NR_sched_setattr (TARGET_NR_Linux + 349) -#define TARGET_NR_sched_getattr (TARGET_NR_Linux + 350) -#define TARGET_NR_renameat2 (TARGET_NR_Linux + 351) -#define TARGET_NR_seccomp (TARGET_NR_Linux + 352) -#define TARGET_NR_getrandom (TARGET_NR_Linux + 353) -#define TARGET_NR_memfd_create (TARGET_NR_Linux + 354) -#define TARGET_NR_bpf (TARGET_NR_Linux + 355) -#define TARGET_NR_execveat (TARGET_NR_Linux + 356) -#define TARGET_NR_userfaultfd (TARGET_NR_Linux + 357) -#define TARGET_NR_membarrier (TARGET_NR_Linux + 358) -#define TARGET_NR_mlock2 (TARGET_NR_Linux + 359) -#define TARGET_NR_copy_file_range (TARGET_NR_Linux + 360) -#define TARGET_NR_preadv2 (TARGET_NR_Linux + 361) -#define TARGET_NR_pwritev2 (TARGET_NR_Linux + 362) -#define TARGET_NR_pkey_mprotect (TARGET_NR_Linux + 363) -#define TARGET_NR_pkey_alloc (TARGET_NR_Linux + 364) -#define TARGET_NR_pkey_free (TARGET_NR_Linux + 365) -#define TARGET_NR_statx (TARGET_NR_Linux + 366) -#define TARGET_NR_rseq (TARGET_NR_Linux + 367) -#define TARGET_NR_io_pgetevents (TARGET_NR_Linux + 368) -/* room for arch specific calls */ -#define TARGET_NR_semget (TARGET_NR_Linux + 393) -#define TARGET_NR_semctl (TARGET_NR_Linux + 394) -#define TARGET_NR_shmget (TARGET_NR_Linux + 395) -#define TARGET_NR_shmctl (TARGET_NR_Linux + 396) -#define TARGET_NR_shmat (TARGET_NR_Linux + 397) -#define TARGET_NR_shmdt (TARGET_NR_Linux + 398) -#define TARGET_NR_msgget (TARGET_NR_Linux + 399) -#define TARGET_NR_msgsnd (TARGET_NR_Linux + 400) -#define TARGET_NR_msgrcv (TARGET_NR_Linux + 401) -#define TARGET_NR_msgctl (TARGET_NR_Linux + 402) -/* 403-423 common for 32-bit archs */ -#define TARGET_NR_clock_gettime64 (TARGET_NR_Linux + 403) -#define TARGET_NR_clock_settime64 (TARGET_NR_Linux + 404) -#define TARGET_NR_clock_adjtime64 (TARGET_NR_Linux + 405) -#define TARGET_NR_clock_getres_time64 (TARGET_NR_Linux + 406) -#define TARGET_NR_clock_nanosleep_time64 (TARGET_NR_Linux + 407) -#define TARGET_NR_timer_gettime64 (TARGET_NR_Linux + 408) -#define TARGET_NR_timer_settime64 (TARGET_NR_Linux + 409) -#define TARGET_NR_timerfd_gettime64 (TARGET_NR_Linux + 410) -#define TARGET_NR_timerfd_settime64 (TARGET_NR_Linux + 411) -#define TARGET_NR_utimensat_time64 (TARGET_NR_Linux + 412) -#define TARGET_NR_pselect6_time64 (TARGET_NR_Linux + 413) -#define TARGET_NR_ppoll_time64 (TARGET_NR_Linux + 414) -#define TARGET_NR_io_pgetevents_time64 (TARGET_NR_Linux + 416) -#define TARGET_NR_recvmmsg_time64 (TARGET_NR_Linux + 417) -#define TARGET_NR_mq_timedsend_time64 (TARGET_NR_Linux + 418) -#define TARGET_NR_mq_timedreceive_time64 (TARGET_NR_Linux + 419) -#define TARGET_NR_semtimedop_time64 (TARGET_NR_Linux + 420) -#define TARGET_NR_rt_sigtimedwait_time64 (TARGET_NR_Linux + 421) -#define TARGET_NR_futex_time64 (TARGET_NR_Linux + 422) -#define TARGET_NR_sched_rr_get_interval_time64 (TARGET_NR_Linux + 423) -/* 424 onwards common for all archs */ -#define TARGET_NR_pidfd_send_signal (TARGET_NR_Linux + 424) -#define TARGET_NR_io_uring_setup (TARGET_NR_Linux + 425) -#define TARGET_NR_io_uring_enter (TARGET_NR_Linux + 426) -#define TARGET_NR_io_uring_register (TARGET_NR_Linux + 427) -#define TARGET_NR_open_tree (TARGET_NR_Linux + 428) -#define TARGET_NR_move_mount (TARGET_NR_Linux + 429) -#define TARGET_NR_fsopen (TARGET_NR_Linux + 430) -#define TARGET_NR_fsconfig (TARGET_NR_Linux + 431) -#define TARGET_NR_fsmount (TARGET_NR_Linux + 432) -#define TARGET_NR_fspick (TARGET_NR_Linux + 433) -#define TARGET_NR_pidfd_open (TARGET_NR_Linux + 434) -#define TARGET_NR_clone3 (TARGET_NR_Linux + 435) - -#endif diff --git a/linux-user/mips/syscall_o32.tbl b/linux-user/mips/syscall_o32.tbl new file mode 100644 index 0000000000..353539ea41 --- /dev/null +++ b/linux-user/mips/syscall_o32.tbl @@ -0,0 +1,425 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for mips +# +# The format is: +# +# +# The is always "o32" for this file. +# +0 o32 syscall sys_syscall sys32_syscall +1 o32 exit sys_exit +2 o32 fork __sys_fork +3 o32 read sys_read +4 o32 write sys_write +5 o32 open sys_open compat_sys_open +6 o32 close sys_close +7 o32 waitpid sys_waitpid +8 o32 creat sys_creat +9 o32 link sys_link +10 o32 unlink sys_unlink +11 o32 execve sys_execve compat_sys_execve +12 o32 chdir sys_chdir +13 o32 time sys_time32 +14 o32 mknod sys_mknod +15 o32 chmod sys_chmod +16 o32 lchown sys_lchown +17 o32 break sys_ni_syscall +# 18 was sys_stat +18 o32 unused18 sys_ni_syscall +19 o32 lseek sys_lseek +20 o32 getpid sys_getpid +21 o32 mount sys_mount compat_sys_mount +22 o32 umount sys_oldumount +23 o32 setuid sys_setuid +24 o32 getuid sys_getuid +25 o32 stime sys_stime32 +26 o32 ptrace sys_ptrace compat_sys_ptrace +27 o32 alarm sys_alarm +# 28 was sys_fstat +28 o32 unused28 sys_ni_syscall +29 o32 pause sys_pause +30 o32 utime sys_utime32 +31 o32 stty sys_ni_syscall +32 o32 gtty sys_ni_syscall +33 o32 access sys_access +34 o32 nice sys_nice +35 o32 ftime sys_ni_syscall +36 o32 sync sys_sync +37 o32 kill sys_kill +38 o32 rename sys_rename +39 o32 mkdir sys_mkdir +40 o32 rmdir sys_rmdir +41 o32 dup sys_dup +42 o32 pipe sysm_pipe +43 o32 times sys_times compat_sys_times +44 o32 prof sys_ni_syscall +45 o32 brk sys_brk +46 o32 setgid sys_setgid +47 o32 getgid sys_getgid +48 o32 signal sys_ni_syscall +49 o32 geteuid sys_geteuid +50 o32 getegid sys_getegid +51 o32 acct sys_acct +52 o32 umount2 sys_umount +53 o32 lock sys_ni_syscall +54 o32 ioctl sys_ioctl compat_sys_ioctl +55 o32 fcntl sys_fcntl compat_sys_fcntl +56 o32 mpx sys_ni_syscall +57 o32 setpgid sys_setpgid +58 o32 ulimit sys_ni_syscall +59 o32 unused59 sys_olduname +60 o32 umask sys_umask +61 o32 chroot sys_chroot +62 o32 ustat sys_ustat compat_sys_ustat +63 o32 dup2 sys_dup2 +64 o32 getppid sys_getppid +65 o32 getpgrp sys_getpgrp +66 o32 setsid sys_setsid +67 o32 sigaction sys_sigaction sys_32_sigaction +68 o32 sgetmask sys_sgetmask +69 o32 ssetmask sys_ssetmask +70 o32 setreuid sys_setreuid +71 o32 setregid sys_setregid +72 o32 sigsuspend sys_sigsuspend sys32_sigsuspend +73 o32 sigpending sys_sigpending compat_sys_sigpending +74 o32 sethostname sys_sethostname +75 o32 setrlimit sys_setrlimit compat_sys_setrlimit +76 o32 getrlimit sys_getrlimit compat_sys_getrlimit +77 o32 getrusage sys_getrusage compat_sys_getrusage +78 o32 gettimeofday sys_gettimeofday compat_sys_gettimeofday +79 o32 settimeofday sys_settimeofday compat_sys_settimeofday +80 o32 getgroups sys_getgroups +81 o32 setgroups sys_setgroups +# 82 was old_select +82 o32 reserved82 sys_ni_syscall +83 o32 symlink sys_symlink +# 84 was sys_lstat +84 o32 unused84 sys_ni_syscall +85 o32 readlink sys_readlink +86 o32 uselib sys_uselib +87 o32 swapon sys_swapon +88 o32 reboot sys_reboot +89 o32 readdir sys_old_readdir compat_sys_old_readdir +90 o32 mmap sys_mips_mmap +91 o32 munmap sys_munmap +92 o32 truncate sys_truncate compat_sys_truncate +93 o32 ftruncate sys_ftruncate compat_sys_ftruncate +94 o32 fchmod sys_fchmod +95 o32 fchown sys_fchown +96 o32 getpriority sys_getpriority +97 o32 setpriority sys_setpriority +98 o32 profil sys_ni_syscall +99 o32 statfs sys_statfs compat_sys_statfs +100 o32 fstatfs sys_fstatfs compat_sys_fstatfs +101 o32 ioperm sys_ni_syscall +102 o32 socketcall sys_socketcall compat_sys_socketcall +103 o32 syslog sys_syslog +104 o32 setitimer sys_setitimer compat_sys_setitimer +105 o32 getitimer sys_getitimer compat_sys_getitimer +106 o32 stat sys_newstat compat_sys_newstat +107 o32 lstat sys_newlstat compat_sys_newlstat +108 o32 fstat sys_newfstat compat_sys_newfstat +109 o32 unused109 sys_uname +110 o32 iopl sys_ni_syscall +111 o32 vhangup sys_vhangup +112 o32 idle sys_ni_syscall +113 o32 vm86 sys_ni_syscall +114 o32 wait4 sys_wait4 compat_sys_wait4 +115 o32 swapoff sys_swapoff +116 o32 sysinfo sys_sysinfo compat_sys_sysinfo +117 o32 ipc sys_ipc compat_sys_ipc +118 o32 fsync sys_fsync +119 o32 sigreturn sys_sigreturn sys32_sigreturn +120 o32 clone __sys_clone +121 o32 setdomainname sys_setdomainname +122 o32 uname sys_newuname +123 o32 modify_ldt sys_ni_syscall +124 o32 adjtimex sys_adjtimex_time32 +125 o32 mprotect sys_mprotect +126 o32 sigprocmask sys_sigprocmask compat_sys_sigprocmask +127 o32 create_module sys_ni_syscall +128 o32 init_module sys_init_module +129 o32 delete_module sys_delete_module +130 o32 get_kernel_syms sys_ni_syscall +131 o32 quotactl sys_quotactl +132 o32 getpgid sys_getpgid +133 o32 fchdir sys_fchdir +134 o32 bdflush sys_bdflush +135 o32 sysfs sys_sysfs +136 o32 personality sys_personality sys_32_personality +137 o32 afs_syscall sys_ni_syscall +138 o32 setfsuid sys_setfsuid +139 o32 setfsgid sys_setfsgid +140 o32 _llseek sys_llseek sys_32_llseek +141 o32 getdents sys_getdents compat_sys_getdents +142 o32 _newselect sys_select compat_sys_select +143 o32 flock sys_flock +144 o32 msync sys_msync +145 o32 readv sys_readv compat_sys_readv +146 o32 writev sys_writev compat_sys_writev +147 o32 cacheflush sys_cacheflush +148 o32 cachectl sys_cachectl +149 o32 sysmips __sys_sysmips +150 o32 unused150 sys_ni_syscall +151 o32 getsid sys_getsid +152 o32 fdatasync sys_fdatasync +153 o32 _sysctl sys_sysctl compat_sys_sysctl +154 o32 mlock sys_mlock +155 o32 munlock sys_munlock +156 o32 mlockall sys_mlockall +157 o32 munlockall sys_munlockall +158 o32 sched_setparam sys_sched_setparam +159 o32 sched_getparam sys_sched_getparam +160 o32 sched_setscheduler sys_sched_setscheduler +161 o32 sched_getscheduler sys_sched_getscheduler +162 o32 sched_yield sys_sched_yield +163 o32 sched_get_priority_max sys_sched_get_priority_max +164 o32 sched_get_priority_min sys_sched_get_priority_min +165 o32 sched_rr_get_interval sys_sched_rr_get_interval_time32 +166 o32 nanosleep sys_nanosleep_time32 +167 o32 mremap sys_mremap +168 o32 accept sys_accept +169 o32 bind sys_bind +170 o32 connect sys_connect +171 o32 getpeername sys_getpeername +172 o32 getsockname sys_getsockname +173 o32 getsockopt sys_getsockopt compat_sys_getsockopt +174 o32 listen sys_listen +175 o32 recv sys_recv compat_sys_recv +176 o32 recvfrom sys_recvfrom compat_sys_recvfrom +177 o32 recvmsg sys_recvmsg compat_sys_recvmsg +178 o32 send sys_send +179 o32 sendmsg sys_sendmsg compat_sys_sendmsg +180 o32 sendto sys_sendto +181 o32 setsockopt sys_setsockopt compat_sys_setsockopt +182 o32 shutdown sys_shutdown +183 o32 socket sys_socket +184 o32 socketpair sys_socketpair +185 o32 setresuid sys_setresuid +186 o32 getresuid sys_getresuid +187 o32 query_module sys_ni_syscall +188 o32 poll sys_poll +189 o32 nfsservctl sys_ni_syscall +190 o32 setresgid sys_setresgid +191 o32 getresgid sys_getresgid +192 o32 prctl sys_prctl +193 o32 rt_sigreturn sys_rt_sigreturn sys32_rt_sigreturn +194 o32 rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction +195 o32 rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask +196 o32 rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending +197 o32 rt_sigtimedwait sys_rt_sigtimedwait_time32 compat_sys_rt_sigtimedwait_time32 +198 o32 rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo +199 o32 rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend +200 o32 pread64 sys_pread64 sys_32_pread +201 o32 pwrite64 sys_pwrite64 sys_32_pwrite +202 o32 chown sys_chown +203 o32 getcwd sys_getcwd +204 o32 capget sys_capget +205 o32 capset sys_capset +206 o32 sigaltstack sys_sigaltstack compat_sys_sigaltstack +207 o32 sendfile sys_sendfile compat_sys_sendfile +208 o32 getpmsg sys_ni_syscall +209 o32 putpmsg sys_ni_syscall +210 o32 mmap2 sys_mips_mmap2 +211 o32 truncate64 sys_truncate64 sys_32_truncate64 +212 o32 ftruncate64 sys_ftruncate64 sys_32_ftruncate64 +213 o32 stat64 sys_stat64 sys_newstat +214 o32 lstat64 sys_lstat64 sys_newlstat +215 o32 fstat64 sys_fstat64 sys_newfstat +216 o32 pivot_root sys_pivot_root +217 o32 mincore sys_mincore +218 o32 madvise sys_madvise +219 o32 getdents64 sys_getdents64 +220 o32 fcntl64 sys_fcntl64 compat_sys_fcntl64 +221 o32 reserved221 sys_ni_syscall +222 o32 gettid sys_gettid +223 o32 readahead sys_readahead sys32_readahead +224 o32 setxattr sys_setxattr +225 o32 lsetxattr sys_lsetxattr +226 o32 fsetxattr sys_fsetxattr +227 o32 getxattr sys_getxattr +228 o32 lgetxattr sys_lgetxattr +229 o32 fgetxattr sys_fgetxattr +230 o32 listxattr sys_listxattr +231 o32 llistxattr sys_llistxattr +232 o32 flistxattr sys_flistxattr +233 o32 removexattr sys_removexattr +234 o32 lremovexattr sys_lremovexattr +235 o32 fremovexattr sys_fremovexattr +236 o32 tkill sys_tkill +237 o32 sendfile64 sys_sendfile64 +238 o32 futex sys_futex_time32 +239 o32 sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity +240 o32 sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity +241 o32 io_setup sys_io_setup compat_sys_io_setup +242 o32 io_destroy sys_io_destroy +243 o32 io_getevents sys_io_getevents_time32 +244 o32 io_submit sys_io_submit compat_sys_io_submit +245 o32 io_cancel sys_io_cancel +246 o32 exit_group sys_exit_group +247 o32 lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie +248 o32 epoll_create sys_epoll_create +249 o32 epoll_ctl sys_epoll_ctl +250 o32 epoll_wait sys_epoll_wait +251 o32 remap_file_pages sys_remap_file_pages +252 o32 set_tid_address sys_set_tid_address +253 o32 restart_syscall sys_restart_syscall +254 o32 fadvise64 sys_fadvise64_64 sys32_fadvise64_64 +255 o32 statfs64 sys_statfs64 compat_sys_statfs64 +256 o32 fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 +257 o32 timer_create sys_timer_create compat_sys_timer_create +258 o32 timer_settime sys_timer_settime32 +259 o32 timer_gettime sys_timer_gettime32 +260 o32 timer_getoverrun sys_timer_getoverrun +261 o32 timer_delete sys_timer_delete +262 o32 clock_settime sys_clock_settime32 +263 o32 clock_gettime sys_clock_gettime32 +264 o32 clock_getres sys_clock_getres_time32 +265 o32 clock_nanosleep sys_clock_nanosleep_time32 +266 o32 tgkill sys_tgkill +267 o32 utimes sys_utimes_time32 +268 o32 mbind sys_mbind compat_sys_mbind +269 o32 get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy +270 o32 set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy +271 o32 mq_open sys_mq_open compat_sys_mq_open +272 o32 mq_unlink sys_mq_unlink +273 o32 mq_timedsend sys_mq_timedsend_time32 +274 o32 mq_timedreceive sys_mq_timedreceive_time32 +275 o32 mq_notify sys_mq_notify compat_sys_mq_notify +276 o32 mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr +277 o32 vserver sys_ni_syscall +278 o32 waitid sys_waitid compat_sys_waitid +# 279 was sys_setaltroot +280 o32 add_key sys_add_key +281 o32 request_key sys_request_key +282 o32 keyctl sys_keyctl compat_sys_keyctl +283 o32 set_thread_area sys_set_thread_area +284 o32 inotify_init sys_inotify_init +285 o32 inotify_add_watch sys_inotify_add_watch +286 o32 inotify_rm_watch sys_inotify_rm_watch +287 o32 migrate_pages sys_migrate_pages compat_sys_migrate_pages +288 o32 openat sys_openat compat_sys_openat +289 o32 mkdirat sys_mkdirat +290 o32 mknodat sys_mknodat +291 o32 fchownat sys_fchownat +292 o32 futimesat sys_futimesat_time32 +293 o32 fstatat64 sys_fstatat64 sys_newfstatat +294 o32 unlinkat sys_unlinkat +295 o32 renameat sys_renameat +296 o32 linkat sys_linkat +297 o32 symlinkat sys_symlinkat +298 o32 readlinkat sys_readlinkat +299 o32 fchmodat sys_fchmodat +300 o32 faccessat sys_faccessat +301 o32 pselect6 sys_pselect6_time32 compat_sys_pselect6_time32 +302 o32 ppoll sys_ppoll_time32 compat_sys_ppoll_time32 +303 o32 unshare sys_unshare +304 o32 splice sys_splice +305 o32 sync_file_range sys_sync_file_range sys32_sync_file_range +306 o32 tee sys_tee +307 o32 vmsplice sys_vmsplice compat_sys_vmsplice +308 o32 move_pages sys_move_pages compat_sys_move_pages +309 o32 set_robust_list sys_set_robust_list compat_sys_set_robust_list +310 o32 get_robust_list sys_get_robust_list compat_sys_get_robust_list +311 o32 kexec_load sys_kexec_load compat_sys_kexec_load +312 o32 getcpu sys_getcpu +313 o32 epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait +314 o32 ioprio_set sys_ioprio_set +315 o32 ioprio_get sys_ioprio_get +316 o32 utimensat sys_utimensat_time32 +317 o32 signalfd sys_signalfd compat_sys_signalfd +318 o32 timerfd sys_ni_syscall +319 o32 eventfd sys_eventfd +320 o32 fallocate sys_fallocate sys32_fallocate +321 o32 timerfd_create sys_timerfd_create +322 o32 timerfd_gettime sys_timerfd_gettime32 +323 o32 timerfd_settime sys_timerfd_settime32 +324 o32 signalfd4 sys_signalfd4 compat_sys_signalfd4 +325 o32 eventfd2 sys_eventfd2 +326 o32 epoll_create1 sys_epoll_create1 +327 o32 dup3 sys_dup3 +328 o32 pipe2 sys_pipe2 +329 o32 inotify_init1 sys_inotify_init1 +330 o32 preadv sys_preadv compat_sys_preadv +331 o32 pwritev sys_pwritev compat_sys_pwritev +332 o32 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo +333 o32 perf_event_open sys_perf_event_open +334 o32 accept4 sys_accept4 +335 o32 recvmmsg sys_recvmmsg_time32 compat_sys_recvmmsg_time32 +336 o32 fanotify_init sys_fanotify_init +337 o32 fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark +338 o32 prlimit64 sys_prlimit64 +339 o32 name_to_handle_at sys_name_to_handle_at +340 o32 open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at +341 o32 clock_adjtime sys_clock_adjtime32 +342 o32 syncfs sys_syncfs +343 o32 sendmmsg sys_sendmmsg compat_sys_sendmmsg +344 o32 setns sys_setns +345 o32 process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv +346 o32 process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +347 o32 kcmp sys_kcmp +348 o32 finit_module sys_finit_module +349 o32 sched_setattr sys_sched_setattr +350 o32 sched_getattr sys_sched_getattr +351 o32 renameat2 sys_renameat2 +352 o32 seccomp sys_seccomp +353 o32 getrandom sys_getrandom +354 o32 memfd_create sys_memfd_create +355 o32 bpf sys_bpf +356 o32 execveat sys_execveat compat_sys_execveat +357 o32 userfaultfd sys_userfaultfd +358 o32 membarrier sys_membarrier +359 o32 mlock2 sys_mlock2 +360 o32 copy_file_range sys_copy_file_range +361 o32 preadv2 sys_preadv2 compat_sys_preadv2 +362 o32 pwritev2 sys_pwritev2 compat_sys_pwritev2 +363 o32 pkey_mprotect sys_pkey_mprotect +364 o32 pkey_alloc sys_pkey_alloc +365 o32 pkey_free sys_pkey_free +366 o32 statx sys_statx +367 o32 rseq sys_rseq +368 o32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents +# room for arch specific calls +393 o32 semget sys_semget +394 o32 semctl sys_semctl compat_sys_semctl +395 o32 shmget sys_shmget +396 o32 shmctl sys_shmctl compat_sys_shmctl +397 o32 shmat sys_shmat compat_sys_shmat +398 o32 shmdt sys_shmdt +399 o32 msgget sys_msgget +400 o32 msgsnd sys_msgsnd compat_sys_msgsnd +401 o32 msgrcv sys_msgrcv compat_sys_msgrcv +402 o32 msgctl sys_msgctl compat_sys_msgctl +403 o32 clock_gettime64 sys_clock_gettime sys_clock_gettime +404 o32 clock_settime64 sys_clock_settime sys_clock_settime +405 o32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime +406 o32 clock_getres_time64 sys_clock_getres sys_clock_getres +407 o32 clock_nanosleep_time64 sys_clock_nanosleep sys_clock_nanosleep +408 o32 timer_gettime64 sys_timer_gettime sys_timer_gettime +409 o32 timer_settime64 sys_timer_settime sys_timer_settime +410 o32 timerfd_gettime64 sys_timerfd_gettime sys_timerfd_gettime +411 o32 timerfd_settime64 sys_timerfd_settime sys_timerfd_settime +412 o32 utimensat_time64 sys_utimensat sys_utimensat +413 o32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 +414 o32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 +416 o32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents +417 o32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 +418 o32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend +419 o32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive +420 o32 semtimedop_time64 sys_semtimedop sys_semtimedop +421 o32 rt_sigtimedwait_time64 sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time64 +422 o32 futex_time64 sys_futex sys_futex +423 o32 sched_rr_get_interval_time64 sys_sched_rr_get_interval sys_sched_rr_get_interval +424 o32 pidfd_send_signal sys_pidfd_send_signal +425 o32 io_uring_setup sys_io_uring_setup +426 o32 io_uring_enter sys_io_uring_enter +427 o32 io_uring_register sys_io_uring_register +428 o32 open_tree sys_open_tree +429 o32 move_mount sys_move_mount +430 o32 fsopen sys_fsopen +431 o32 fsconfig sys_fsconfig +432 o32 fsmount sys_fsmount +433 o32 fspick sys_fspick +434 o32 pidfd_open sys_pidfd_open +435 o32 clone3 __sys_clone3 diff --git a/linux-user/mips/syscallhdr.sh b/linux-user/mips/syscallhdr.sh new file mode 100644 index 0000000000..761e3e47dd --- /dev/null +++ b/linux-user/mips/syscallhdr.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_MIPS_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry compat ; do + if [ "$name" = "fadvise64" ] ; then + name="fadvise64_64" + fi + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" + printf "\n" +) > "$out" From 686a0fe4dbeb711eeed83d7a3e307c6506fdb8b3 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:33:59 +0100 Subject: [PATCH 24/32] linux-user, mips64: add syscall table generation support Copy syscall_n32.tbl, syscall_n64.tbl and syscallhdr.sh from linux/arch/parisc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Move the offsets (6000 for n32 and 5000 for n64) from the file to the Makefile.objs to be passed to syscallhdr.sh Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-18-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- configure | 4 +- linux-user/Makefile.objs | 1 + linux-user/mips64/Makefile.objs | 12 + linux-user/mips64/syscall_n32.tbl | 376 ++++++++++++++++ linux-user/mips64/syscall_n64.tbl | 352 +++++++++++++++ linux-user/mips64/syscall_nr.h | 725 ------------------------------ linux-user/mips64/syscallhdr.sh | 33 ++ 7 files changed, 777 insertions(+), 726 deletions(-) create mode 100644 linux-user/mips64/Makefile.objs create mode 100644 linux-user/mips64/syscall_n32.tbl create mode 100644 linux-user/mips64/syscall_n64.tbl delete mode 100644 linux-user/mips64/syscall_nr.h create mode 100644 linux-user/mips64/syscallhdr.sh diff --git a/configure b/configure index 7432f955b8..a60292db63 100755 --- a/configure +++ b/configure @@ -1890,7 +1890,7 @@ rm -f */config-devices.mak.d # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ - i386 x86_64 mips ; do + i386 x86_64 mips mips64 ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" # remove the dependency files @@ -7845,12 +7845,14 @@ case "$target_name" in TARGET_BASE_ARCH=mips echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak echo "TARGET_ABI32=y" >> $config_target_mak + TARGET_SYSTBL_ABI=n32 ;; mips64|mips64el) mttcg="yes" TARGET_ARCH=mips64 TARGET_BASE_ARCH=mips echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak + TARGET_SYSTBL_ABI=n64 ;; moxie) ;; diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 0a0715e9e1..1940910a73 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -14,6 +14,7 @@ obj-$(TARGET_I386) += i386/ obj-$(TARGET_M68K) += m68k/ obj-$(TARGET_MICROBLAZE) += microblaze/ obj-$(TARGET_MIPS) += mips/ +obj-$(TARGET_MIPS64) += mips64/ obj-$(TARGET_PPC) += ppc/ obj-$(TARGET_PPC64) += ppc/ obj-$(TARGET_S390X) += s390x/ diff --git a/linux-user/mips64/Makefile.objs b/linux-user/mips64/Makefile.objs new file mode 100644 index 0000000000..573448f956 --- /dev/null +++ b/linux-user/mips64/Makefile.objs @@ -0,0 +1,12 @@ +generated-files-y += linux-user/$(TARGET_ABI_DIR)/syscall_nr.h + +syshdr := $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscallhdr.sh + +ifeq ($(TARGET_SYSTBL_ABI),n32) +%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n32.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ n32 "" 6000,"GEN","$@") +endif +ifeq ($(TARGET_SYSTBL_ABI),n64) +%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n64.tbl $(syshdr) + $(call quiet-command, sh $(syshdr) $< $@ n64 "" 5000,"GEN","$@") +endif diff --git a/linux-user/mips64/syscall_n32.tbl b/linux-user/mips64/syscall_n32.tbl new file mode 100644 index 0000000000..e7c5ab38e4 --- /dev/null +++ b/linux-user/mips64/syscall_n32.tbl @@ -0,0 +1,376 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for mips +# +# The format is: +# +# +# The is always "n32" for this file. +# +0 n32 read sys_read +1 n32 write sys_write +2 n32 open sys_open +3 n32 close sys_close +4 n32 stat sys_newstat +5 n32 fstat sys_newfstat +6 n32 lstat sys_newlstat +7 n32 poll sys_poll +8 n32 lseek sys_lseek +9 n32 mmap sys_mips_mmap +10 n32 mprotect sys_mprotect +11 n32 munmap sys_munmap +12 n32 brk sys_brk +13 n32 rt_sigaction compat_sys_rt_sigaction +14 n32 rt_sigprocmask compat_sys_rt_sigprocmask +15 n32 ioctl compat_sys_ioctl +16 n32 pread64 sys_pread64 +17 n32 pwrite64 sys_pwrite64 +18 n32 readv compat_sys_readv +19 n32 writev compat_sys_writev +20 n32 access sys_access +21 n32 pipe sysm_pipe +22 n32 _newselect compat_sys_select +23 n32 sched_yield sys_sched_yield +24 n32 mremap sys_mremap +25 n32 msync sys_msync +26 n32 mincore sys_mincore +27 n32 madvise sys_madvise +28 n32 shmget sys_shmget +29 n32 shmat sys_shmat +30 n32 shmctl compat_sys_old_shmctl +31 n32 dup sys_dup +32 n32 dup2 sys_dup2 +33 n32 pause sys_pause +34 n32 nanosleep sys_nanosleep_time32 +35 n32 getitimer compat_sys_getitimer +36 n32 setitimer compat_sys_setitimer +37 n32 alarm sys_alarm +38 n32 getpid sys_getpid +39 n32 sendfile compat_sys_sendfile +40 n32 socket sys_socket +41 n32 connect sys_connect +42 n32 accept sys_accept +43 n32 sendto sys_sendto +44 n32 recvfrom compat_sys_recvfrom +45 n32 sendmsg compat_sys_sendmsg +46 n32 recvmsg compat_sys_recvmsg +47 n32 shutdown sys_shutdown +48 n32 bind sys_bind +49 n32 listen sys_listen +50 n32 getsockname sys_getsockname +51 n32 getpeername sys_getpeername +52 n32 socketpair sys_socketpair +53 n32 setsockopt compat_sys_setsockopt +54 n32 getsockopt compat_sys_getsockopt +55 n32 clone __sys_clone +56 n32 fork __sys_fork +57 n32 execve compat_sys_execve +58 n32 exit sys_exit +59 n32 wait4 compat_sys_wait4 +60 n32 kill sys_kill +61 n32 uname sys_newuname +62 n32 semget sys_semget +63 n32 semop sys_semop +64 n32 semctl compat_sys_old_semctl +65 n32 shmdt sys_shmdt +66 n32 msgget sys_msgget +67 n32 msgsnd compat_sys_msgsnd +68 n32 msgrcv compat_sys_msgrcv +69 n32 msgctl compat_sys_old_msgctl +70 n32 fcntl compat_sys_fcntl +71 n32 flock sys_flock +72 n32 fsync sys_fsync +73 n32 fdatasync sys_fdatasync +74 n32 truncate sys_truncate +75 n32 ftruncate sys_ftruncate +76 n32 getdents compat_sys_getdents +77 n32 getcwd sys_getcwd +78 n32 chdir sys_chdir +79 n32 fchdir sys_fchdir +80 n32 rename sys_rename +81 n32 mkdir sys_mkdir +82 n32 rmdir sys_rmdir +83 n32 creat sys_creat +84 n32 link sys_link +85 n32 unlink sys_unlink +86 n32 symlink sys_symlink +87 n32 readlink sys_readlink +88 n32 chmod sys_chmod +89 n32 fchmod sys_fchmod +90 n32 chown sys_chown +91 n32 fchown sys_fchown +92 n32 lchown sys_lchown +93 n32 umask sys_umask +94 n32 gettimeofday compat_sys_gettimeofday +95 n32 getrlimit compat_sys_getrlimit +96 n32 getrusage compat_sys_getrusage +97 n32 sysinfo compat_sys_sysinfo +98 n32 times compat_sys_times +99 n32 ptrace compat_sys_ptrace +100 n32 getuid sys_getuid +101 n32 syslog sys_syslog +102 n32 getgid sys_getgid +103 n32 setuid sys_setuid +104 n32 setgid sys_setgid +105 n32 geteuid sys_geteuid +106 n32 getegid sys_getegid +107 n32 setpgid sys_setpgid +108 n32 getppid sys_getppid +109 n32 getpgrp sys_getpgrp +110 n32 setsid sys_setsid +111 n32 setreuid sys_setreuid +112 n32 setregid sys_setregid +113 n32 getgroups sys_getgroups +114 n32 setgroups sys_setgroups +115 n32 setresuid sys_setresuid +116 n32 getresuid sys_getresuid +117 n32 setresgid sys_setresgid +118 n32 getresgid sys_getresgid +119 n32 getpgid sys_getpgid +120 n32 setfsuid sys_setfsuid +121 n32 setfsgid sys_setfsgid +122 n32 getsid sys_getsid +123 n32 capget sys_capget +124 n32 capset sys_capset +125 n32 rt_sigpending compat_sys_rt_sigpending +126 n32 rt_sigtimedwait compat_sys_rt_sigtimedwait_time32 +127 n32 rt_sigqueueinfo compat_sys_rt_sigqueueinfo +128 n32 rt_sigsuspend compat_sys_rt_sigsuspend +129 n32 sigaltstack compat_sys_sigaltstack +130 n32 utime sys_utime32 +131 n32 mknod sys_mknod +132 n32 personality sys_32_personality +133 n32 ustat compat_sys_ustat +134 n32 statfs compat_sys_statfs +135 n32 fstatfs compat_sys_fstatfs +136 n32 sysfs sys_sysfs +137 n32 getpriority sys_getpriority +138 n32 setpriority sys_setpriority +139 n32 sched_setparam sys_sched_setparam +140 n32 sched_getparam sys_sched_getparam +141 n32 sched_setscheduler sys_sched_setscheduler +142 n32 sched_getscheduler sys_sched_getscheduler +143 n32 sched_get_priority_max sys_sched_get_priority_max +144 n32 sched_get_priority_min sys_sched_get_priority_min +145 n32 sched_rr_get_interval sys_sched_rr_get_interval_time32 +146 n32 mlock sys_mlock +147 n32 munlock sys_munlock +148 n32 mlockall sys_mlockall +149 n32 munlockall sys_munlockall +150 n32 vhangup sys_vhangup +151 n32 pivot_root sys_pivot_root +152 n32 _sysctl compat_sys_sysctl +153 n32 prctl sys_prctl +154 n32 adjtimex sys_adjtimex_time32 +155 n32 setrlimit compat_sys_setrlimit +156 n32 chroot sys_chroot +157 n32 sync sys_sync +158 n32 acct sys_acct +159 n32 settimeofday compat_sys_settimeofday +160 n32 mount compat_sys_mount +161 n32 umount2 sys_umount +162 n32 swapon sys_swapon +163 n32 swapoff sys_swapoff +164 n32 reboot sys_reboot +165 n32 sethostname sys_sethostname +166 n32 setdomainname sys_setdomainname +167 n32 create_module sys_ni_syscall +168 n32 init_module sys_init_module +169 n32 delete_module sys_delete_module +170 n32 get_kernel_syms sys_ni_syscall +171 n32 query_module sys_ni_syscall +172 n32 quotactl sys_quotactl +173 n32 nfsservctl sys_ni_syscall +174 n32 getpmsg sys_ni_syscall +175 n32 putpmsg sys_ni_syscall +176 n32 afs_syscall sys_ni_syscall +# 177 reserved for security +177 n32 reserved177 sys_ni_syscall +178 n32 gettid sys_gettid +179 n32 readahead sys_readahead +180 n32 setxattr sys_setxattr +181 n32 lsetxattr sys_lsetxattr +182 n32 fsetxattr sys_fsetxattr +183 n32 getxattr sys_getxattr +184 n32 lgetxattr sys_lgetxattr +185 n32 fgetxattr sys_fgetxattr +186 n32 listxattr sys_listxattr +187 n32 llistxattr sys_llistxattr +188 n32 flistxattr sys_flistxattr +189 n32 removexattr sys_removexattr +190 n32 lremovexattr sys_lremovexattr +191 n32 fremovexattr sys_fremovexattr +192 n32 tkill sys_tkill +193 n32 reserved193 sys_ni_syscall +194 n32 futex sys_futex_time32 +195 n32 sched_setaffinity compat_sys_sched_setaffinity +196 n32 sched_getaffinity compat_sys_sched_getaffinity +197 n32 cacheflush sys_cacheflush +198 n32 cachectl sys_cachectl +199 n32 sysmips __sys_sysmips +200 n32 io_setup compat_sys_io_setup +201 n32 io_destroy sys_io_destroy +202 n32 io_getevents sys_io_getevents_time32 +203 n32 io_submit compat_sys_io_submit +204 n32 io_cancel sys_io_cancel +205 n32 exit_group sys_exit_group +206 n32 lookup_dcookie sys_lookup_dcookie +207 n32 epoll_create sys_epoll_create +208 n32 epoll_ctl sys_epoll_ctl +209 n32 epoll_wait sys_epoll_wait +210 n32 remap_file_pages sys_remap_file_pages +211 n32 rt_sigreturn sysn32_rt_sigreturn +212 n32 fcntl64 compat_sys_fcntl64 +213 n32 set_tid_address sys_set_tid_address +214 n32 restart_syscall sys_restart_syscall +215 n32 semtimedop sys_semtimedop_time32 +216 n32 fadvise64 sys_fadvise64_64 +217 n32 statfs64 compat_sys_statfs64 +218 n32 fstatfs64 compat_sys_fstatfs64 +219 n32 sendfile64 sys_sendfile64 +220 n32 timer_create compat_sys_timer_create +221 n32 timer_settime sys_timer_settime32 +222 n32 timer_gettime sys_timer_gettime32 +223 n32 timer_getoverrun sys_timer_getoverrun +224 n32 timer_delete sys_timer_delete +225 n32 clock_settime sys_clock_settime32 +226 n32 clock_gettime sys_clock_gettime32 +227 n32 clock_getres sys_clock_getres_time32 +228 n32 clock_nanosleep sys_clock_nanosleep_time32 +229 n32 tgkill sys_tgkill +230 n32 utimes sys_utimes_time32 +231 n32 mbind compat_sys_mbind +232 n32 get_mempolicy compat_sys_get_mempolicy +233 n32 set_mempolicy compat_sys_set_mempolicy +234 n32 mq_open compat_sys_mq_open +235 n32 mq_unlink sys_mq_unlink +236 n32 mq_timedsend sys_mq_timedsend_time32 +237 n32 mq_timedreceive sys_mq_timedreceive_time32 +238 n32 mq_notify compat_sys_mq_notify +239 n32 mq_getsetattr compat_sys_mq_getsetattr +240 n32 vserver sys_ni_syscall +241 n32 waitid compat_sys_waitid +# 242 was sys_setaltroot +243 n32 add_key sys_add_key +244 n32 request_key sys_request_key +245 n32 keyctl compat_sys_keyctl +246 n32 set_thread_area sys_set_thread_area +247 n32 inotify_init sys_inotify_init +248 n32 inotify_add_watch sys_inotify_add_watch +249 n32 inotify_rm_watch sys_inotify_rm_watch +250 n32 migrate_pages compat_sys_migrate_pages +251 n32 openat sys_openat +252 n32 mkdirat sys_mkdirat +253 n32 mknodat sys_mknodat +254 n32 fchownat sys_fchownat +255 n32 futimesat sys_futimesat_time32 +256 n32 newfstatat sys_newfstatat +257 n32 unlinkat sys_unlinkat +258 n32 renameat sys_renameat +259 n32 linkat sys_linkat +260 n32 symlinkat sys_symlinkat +261 n32 readlinkat sys_readlinkat +262 n32 fchmodat sys_fchmodat +263 n32 faccessat sys_faccessat +264 n32 pselect6 compat_sys_pselect6_time32 +265 n32 ppoll compat_sys_ppoll_time32 +266 n32 unshare sys_unshare +267 n32 splice sys_splice +268 n32 sync_file_range sys_sync_file_range +269 n32 tee sys_tee +270 n32 vmsplice compat_sys_vmsplice +271 n32 move_pages compat_sys_move_pages +272 n32 set_robust_list compat_sys_set_robust_list +273 n32 get_robust_list compat_sys_get_robust_list +274 n32 kexec_load compat_sys_kexec_load +275 n32 getcpu sys_getcpu +276 n32 epoll_pwait compat_sys_epoll_pwait +277 n32 ioprio_set sys_ioprio_set +278 n32 ioprio_get sys_ioprio_get +279 n32 utimensat sys_utimensat_time32 +280 n32 signalfd compat_sys_signalfd +281 n32 timerfd sys_ni_syscall +282 n32 eventfd sys_eventfd +283 n32 fallocate sys_fallocate +284 n32 timerfd_create sys_timerfd_create +285 n32 timerfd_gettime sys_timerfd_gettime32 +286 n32 timerfd_settime sys_timerfd_settime32 +287 n32 signalfd4 compat_sys_signalfd4 +288 n32 eventfd2 sys_eventfd2 +289 n32 epoll_create1 sys_epoll_create1 +290 n32 dup3 sys_dup3 +291 n32 pipe2 sys_pipe2 +292 n32 inotify_init1 sys_inotify_init1 +293 n32 preadv compat_sys_preadv +294 n32 pwritev compat_sys_pwritev +295 n32 rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo +296 n32 perf_event_open sys_perf_event_open +297 n32 accept4 sys_accept4 +298 n32 recvmmsg compat_sys_recvmmsg_time32 +299 n32 getdents64 sys_getdents64 +300 n32 fanotify_init sys_fanotify_init +301 n32 fanotify_mark sys_fanotify_mark +302 n32 prlimit64 sys_prlimit64 +303 n32 name_to_handle_at sys_name_to_handle_at +304 n32 open_by_handle_at sys_open_by_handle_at +305 n32 clock_adjtime sys_clock_adjtime32 +306 n32 syncfs sys_syncfs +307 n32 sendmmsg compat_sys_sendmmsg +308 n32 setns sys_setns +309 n32 process_vm_readv compat_sys_process_vm_readv +310 n32 process_vm_writev compat_sys_process_vm_writev +311 n32 kcmp sys_kcmp +312 n32 finit_module sys_finit_module +313 n32 sched_setattr sys_sched_setattr +314 n32 sched_getattr sys_sched_getattr +315 n32 renameat2 sys_renameat2 +316 n32 seccomp sys_seccomp +317 n32 getrandom sys_getrandom +318 n32 memfd_create sys_memfd_create +319 n32 bpf sys_bpf +320 n32 execveat compat_sys_execveat +321 n32 userfaultfd sys_userfaultfd +322 n32 membarrier sys_membarrier +323 n32 mlock2 sys_mlock2 +324 n32 copy_file_range sys_copy_file_range +325 n32 preadv2 compat_sys_preadv2 +326 n32 pwritev2 compat_sys_pwritev2 +327 n32 pkey_mprotect sys_pkey_mprotect +328 n32 pkey_alloc sys_pkey_alloc +329 n32 pkey_free sys_pkey_free +330 n32 statx sys_statx +331 n32 rseq sys_rseq +332 n32 io_pgetevents compat_sys_io_pgetevents +# 333 through 402 are unassigned to sync up with generic numbers +403 n32 clock_gettime64 sys_clock_gettime +404 n32 clock_settime64 sys_clock_settime +405 n32 clock_adjtime64 sys_clock_adjtime +406 n32 clock_getres_time64 sys_clock_getres +407 n32 clock_nanosleep_time64 sys_clock_nanosleep +408 n32 timer_gettime64 sys_timer_gettime +409 n32 timer_settime64 sys_timer_settime +410 n32 timerfd_gettime64 sys_timerfd_gettime +411 n32 timerfd_settime64 sys_timerfd_settime +412 n32 utimensat_time64 sys_utimensat +413 n32 pselect6_time64 compat_sys_pselect6_time64 +414 n32 ppoll_time64 compat_sys_ppoll_time64 +416 n32 io_pgetevents_time64 sys_io_pgetevents +417 n32 recvmmsg_time64 compat_sys_recvmmsg_time64 +418 n32 mq_timedsend_time64 sys_mq_timedsend +419 n32 mq_timedreceive_time64 sys_mq_timedreceive +420 n32 semtimedop_time64 sys_semtimedop +421 n32 rt_sigtimedwait_time64 compat_sys_rt_sigtimedwait_time64 +422 n32 futex_time64 sys_futex +423 n32 sched_rr_get_interval_time64 sys_sched_rr_get_interval +424 n32 pidfd_send_signal sys_pidfd_send_signal +425 n32 io_uring_setup sys_io_uring_setup +426 n32 io_uring_enter sys_io_uring_enter +427 n32 io_uring_register sys_io_uring_register +428 n32 open_tree sys_open_tree +429 n32 move_mount sys_move_mount +430 n32 fsopen sys_fsopen +431 n32 fsconfig sys_fsconfig +432 n32 fsmount sys_fsmount +433 n32 fspick sys_fspick +434 n32 pidfd_open sys_pidfd_open +435 n32 clone3 __sys_clone3 diff --git a/linux-user/mips64/syscall_n64.tbl b/linux-user/mips64/syscall_n64.tbl new file mode 100644 index 0000000000..13cd66581f --- /dev/null +++ b/linux-user/mips64/syscall_n64.tbl @@ -0,0 +1,352 @@ +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +# +# system call numbers and entry vectors for mips +# +# The format is: +# +# +# The is always "n64" for this file. +# +0 n64 read sys_read +1 n64 write sys_write +2 n64 open sys_open +3 n64 close sys_close +4 n64 stat sys_newstat +5 n64 fstat sys_newfstat +6 n64 lstat sys_newlstat +7 n64 poll sys_poll +8 n64 lseek sys_lseek +9 n64 mmap sys_mips_mmap +10 n64 mprotect sys_mprotect +11 n64 munmap sys_munmap +12 n64 brk sys_brk +13 n64 rt_sigaction sys_rt_sigaction +14 n64 rt_sigprocmask sys_rt_sigprocmask +15 n64 ioctl sys_ioctl +16 n64 pread64 sys_pread64 +17 n64 pwrite64 sys_pwrite64 +18 n64 readv sys_readv +19 n64 writev sys_writev +20 n64 access sys_access +21 n64 pipe sysm_pipe +22 n64 _newselect sys_select +23 n64 sched_yield sys_sched_yield +24 n64 mremap sys_mremap +25 n64 msync sys_msync +26 n64 mincore sys_mincore +27 n64 madvise sys_madvise +28 n64 shmget sys_shmget +29 n64 shmat sys_shmat +30 n64 shmctl sys_old_shmctl +31 n64 dup sys_dup +32 n64 dup2 sys_dup2 +33 n64 pause sys_pause +34 n64 nanosleep sys_nanosleep +35 n64 getitimer sys_getitimer +36 n64 setitimer sys_setitimer +37 n64 alarm sys_alarm +38 n64 getpid sys_getpid +39 n64 sendfile sys_sendfile64 +40 n64 socket sys_socket +41 n64 connect sys_connect +42 n64 accept sys_accept +43 n64 sendto sys_sendto +44 n64 recvfrom sys_recvfrom +45 n64 sendmsg sys_sendmsg +46 n64 recvmsg sys_recvmsg +47 n64 shutdown sys_shutdown +48 n64 bind sys_bind +49 n64 listen sys_listen +50 n64 getsockname sys_getsockname +51 n64 getpeername sys_getpeername +52 n64 socketpair sys_socketpair +53 n64 setsockopt sys_setsockopt +54 n64 getsockopt sys_getsockopt +55 n64 clone __sys_clone +56 n64 fork __sys_fork +57 n64 execve sys_execve +58 n64 exit sys_exit +59 n64 wait4 sys_wait4 +60 n64 kill sys_kill +61 n64 uname sys_newuname +62 n64 semget sys_semget +63 n64 semop sys_semop +64 n64 semctl sys_old_semctl +65 n64 shmdt sys_shmdt +66 n64 msgget sys_msgget +67 n64 msgsnd sys_msgsnd +68 n64 msgrcv sys_msgrcv +69 n64 msgctl sys_old_msgctl +70 n64 fcntl sys_fcntl +71 n64 flock sys_flock +72 n64 fsync sys_fsync +73 n64 fdatasync sys_fdatasync +74 n64 truncate sys_truncate +75 n64 ftruncate sys_ftruncate +76 n64 getdents sys_getdents +77 n64 getcwd sys_getcwd +78 n64 chdir sys_chdir +79 n64 fchdir sys_fchdir +80 n64 rename sys_rename +81 n64 mkdir sys_mkdir +82 n64 rmdir sys_rmdir +83 n64 creat sys_creat +84 n64 link sys_link +85 n64 unlink sys_unlink +86 n64 symlink sys_symlink +87 n64 readlink sys_readlink +88 n64 chmod sys_chmod +89 n64 fchmod sys_fchmod +90 n64 chown sys_chown +91 n64 fchown sys_fchown +92 n64 lchown sys_lchown +93 n64 umask sys_umask +94 n64 gettimeofday sys_gettimeofday +95 n64 getrlimit sys_getrlimit +96 n64 getrusage sys_getrusage +97 n64 sysinfo sys_sysinfo +98 n64 times sys_times +99 n64 ptrace sys_ptrace +100 n64 getuid sys_getuid +101 n64 syslog sys_syslog +102 n64 getgid sys_getgid +103 n64 setuid sys_setuid +104 n64 setgid sys_setgid +105 n64 geteuid sys_geteuid +106 n64 getegid sys_getegid +107 n64 setpgid sys_setpgid +108 n64 getppid sys_getppid +109 n64 getpgrp sys_getpgrp +110 n64 setsid sys_setsid +111 n64 setreuid sys_setreuid +112 n64 setregid sys_setregid +113 n64 getgroups sys_getgroups +114 n64 setgroups sys_setgroups +115 n64 setresuid sys_setresuid +116 n64 getresuid sys_getresuid +117 n64 setresgid sys_setresgid +118 n64 getresgid sys_getresgid +119 n64 getpgid sys_getpgid +120 n64 setfsuid sys_setfsuid +121 n64 setfsgid sys_setfsgid +122 n64 getsid sys_getsid +123 n64 capget sys_capget +124 n64 capset sys_capset +125 n64 rt_sigpending sys_rt_sigpending +126 n64 rt_sigtimedwait sys_rt_sigtimedwait +127 n64 rt_sigqueueinfo sys_rt_sigqueueinfo +128 n64 rt_sigsuspend sys_rt_sigsuspend +129 n64 sigaltstack sys_sigaltstack +130 n64 utime sys_utime +131 n64 mknod sys_mknod +132 n64 personality sys_personality +133 n64 ustat sys_ustat +134 n64 statfs sys_statfs +135 n64 fstatfs sys_fstatfs +136 n64 sysfs sys_sysfs +137 n64 getpriority sys_getpriority +138 n64 setpriority sys_setpriority +139 n64 sched_setparam sys_sched_setparam +140 n64 sched_getparam sys_sched_getparam +141 n64 sched_setscheduler sys_sched_setscheduler +142 n64 sched_getscheduler sys_sched_getscheduler +143 n64 sched_get_priority_max sys_sched_get_priority_max +144 n64 sched_get_priority_min sys_sched_get_priority_min +145 n64 sched_rr_get_interval sys_sched_rr_get_interval +146 n64 mlock sys_mlock +147 n64 munlock sys_munlock +148 n64 mlockall sys_mlockall +149 n64 munlockall sys_munlockall +150 n64 vhangup sys_vhangup +151 n64 pivot_root sys_pivot_root +152 n64 _sysctl sys_sysctl +153 n64 prctl sys_prctl +154 n64 adjtimex sys_adjtimex +155 n64 setrlimit sys_setrlimit +156 n64 chroot sys_chroot +157 n64 sync sys_sync +158 n64 acct sys_acct +159 n64 settimeofday sys_settimeofday +160 n64 mount sys_mount +161 n64 umount2 sys_umount +162 n64 swapon sys_swapon +163 n64 swapoff sys_swapoff +164 n64 reboot sys_reboot +165 n64 sethostname sys_sethostname +166 n64 setdomainname sys_setdomainname +167 n64 create_module sys_ni_syscall +168 n64 init_module sys_init_module +169 n64 delete_module sys_delete_module +170 n64 get_kernel_syms sys_ni_syscall +171 n64 query_module sys_ni_syscall +172 n64 quotactl sys_quotactl +173 n64 nfsservctl sys_ni_syscall +174 n64 getpmsg sys_ni_syscall +175 n64 putpmsg sys_ni_syscall +176 n64 afs_syscall sys_ni_syscall +# 177 reserved for security +177 n64 reserved177 sys_ni_syscall +178 n64 gettid sys_gettid +179 n64 readahead sys_readahead +180 n64 setxattr sys_setxattr +181 n64 lsetxattr sys_lsetxattr +182 n64 fsetxattr sys_fsetxattr +183 n64 getxattr sys_getxattr +184 n64 lgetxattr sys_lgetxattr +185 n64 fgetxattr sys_fgetxattr +186 n64 listxattr sys_listxattr +187 n64 llistxattr sys_llistxattr +188 n64 flistxattr sys_flistxattr +189 n64 removexattr sys_removexattr +190 n64 lremovexattr sys_lremovexattr +191 n64 fremovexattr sys_fremovexattr +192 n64 tkill sys_tkill +193 n64 reserved193 sys_ni_syscall +194 n64 futex sys_futex +195 n64 sched_setaffinity sys_sched_setaffinity +196 n64 sched_getaffinity sys_sched_getaffinity +197 n64 cacheflush sys_cacheflush +198 n64 cachectl sys_cachectl +199 n64 sysmips __sys_sysmips +200 n64 io_setup sys_io_setup +201 n64 io_destroy sys_io_destroy +202 n64 io_getevents sys_io_getevents +203 n64 io_submit sys_io_submit +204 n64 io_cancel sys_io_cancel +205 n64 exit_group sys_exit_group +206 n64 lookup_dcookie sys_lookup_dcookie +207 n64 epoll_create sys_epoll_create +208 n64 epoll_ctl sys_epoll_ctl +209 n64 epoll_wait sys_epoll_wait +210 n64 remap_file_pages sys_remap_file_pages +211 n64 rt_sigreturn sys_rt_sigreturn +212 n64 set_tid_address sys_set_tid_address +213 n64 restart_syscall sys_restart_syscall +214 n64 semtimedop sys_semtimedop +215 n64 fadvise64 sys_fadvise64_64 +216 n64 timer_create sys_timer_create +217 n64 timer_settime sys_timer_settime +218 n64 timer_gettime sys_timer_gettime +219 n64 timer_getoverrun sys_timer_getoverrun +220 n64 timer_delete sys_timer_delete +221 n64 clock_settime sys_clock_settime +222 n64 clock_gettime sys_clock_gettime +223 n64 clock_getres sys_clock_getres +224 n64 clock_nanosleep sys_clock_nanosleep +225 n64 tgkill sys_tgkill +226 n64 utimes sys_utimes +227 n64 mbind sys_mbind +228 n64 get_mempolicy sys_get_mempolicy +229 n64 set_mempolicy sys_set_mempolicy +230 n64 mq_open sys_mq_open +231 n64 mq_unlink sys_mq_unlink +232 n64 mq_timedsend sys_mq_timedsend +233 n64 mq_timedreceive sys_mq_timedreceive +234 n64 mq_notify sys_mq_notify +235 n64 mq_getsetattr sys_mq_getsetattr +236 n64 vserver sys_ni_syscall +237 n64 waitid sys_waitid +# 238 was sys_setaltroot +239 n64 add_key sys_add_key +240 n64 request_key sys_request_key +241 n64 keyctl sys_keyctl +242 n64 set_thread_area sys_set_thread_area +243 n64 inotify_init sys_inotify_init +244 n64 inotify_add_watch sys_inotify_add_watch +245 n64 inotify_rm_watch sys_inotify_rm_watch +246 n64 migrate_pages sys_migrate_pages +247 n64 openat sys_openat +248 n64 mkdirat sys_mkdirat +249 n64 mknodat sys_mknodat +250 n64 fchownat sys_fchownat +251 n64 futimesat sys_futimesat +252 n64 newfstatat sys_newfstatat +253 n64 unlinkat sys_unlinkat +254 n64 renameat sys_renameat +255 n64 linkat sys_linkat +256 n64 symlinkat sys_symlinkat +257 n64 readlinkat sys_readlinkat +258 n64 fchmodat sys_fchmodat +259 n64 faccessat sys_faccessat +260 n64 pselect6 sys_pselect6 +261 n64 ppoll sys_ppoll +262 n64 unshare sys_unshare +263 n64 splice sys_splice +264 n64 sync_file_range sys_sync_file_range +265 n64 tee sys_tee +266 n64 vmsplice sys_vmsplice +267 n64 move_pages sys_move_pages +268 n64 set_robust_list sys_set_robust_list +269 n64 get_robust_list sys_get_robust_list +270 n64 kexec_load sys_kexec_load +271 n64 getcpu sys_getcpu +272 n64 epoll_pwait sys_epoll_pwait +273 n64 ioprio_set sys_ioprio_set +274 n64 ioprio_get sys_ioprio_get +275 n64 utimensat sys_utimensat +276 n64 signalfd sys_signalfd +277 n64 timerfd sys_ni_syscall +278 n64 eventfd sys_eventfd +279 n64 fallocate sys_fallocate +280 n64 timerfd_create sys_timerfd_create +281 n64 timerfd_gettime sys_timerfd_gettime +282 n64 timerfd_settime sys_timerfd_settime +283 n64 signalfd4 sys_signalfd4 +284 n64 eventfd2 sys_eventfd2 +285 n64 epoll_create1 sys_epoll_create1 +286 n64 dup3 sys_dup3 +287 n64 pipe2 sys_pipe2 +288 n64 inotify_init1 sys_inotify_init1 +289 n64 preadv sys_preadv +290 n64 pwritev sys_pwritev +291 n64 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo +292 n64 perf_event_open sys_perf_event_open +293 n64 accept4 sys_accept4 +294 n64 recvmmsg sys_recvmmsg +295 n64 fanotify_init sys_fanotify_init +296 n64 fanotify_mark sys_fanotify_mark +297 n64 prlimit64 sys_prlimit64 +298 n64 name_to_handle_at sys_name_to_handle_at +299 n64 open_by_handle_at sys_open_by_handle_at +300 n64 clock_adjtime sys_clock_adjtime +301 n64 syncfs sys_syncfs +302 n64 sendmmsg sys_sendmmsg +303 n64 setns sys_setns +304 n64 process_vm_readv sys_process_vm_readv +305 n64 process_vm_writev sys_process_vm_writev +306 n64 kcmp sys_kcmp +307 n64 finit_module sys_finit_module +308 n64 getdents64 sys_getdents64 +309 n64 sched_setattr sys_sched_setattr +310 n64 sched_getattr sys_sched_getattr +311 n64 renameat2 sys_renameat2 +312 n64 seccomp sys_seccomp +313 n64 getrandom sys_getrandom +314 n64 memfd_create sys_memfd_create +315 n64 bpf sys_bpf +316 n64 execveat sys_execveat +317 n64 userfaultfd sys_userfaultfd +318 n64 membarrier sys_membarrier +319 n64 mlock2 sys_mlock2 +320 n64 copy_file_range sys_copy_file_range +321 n64 preadv2 sys_preadv2 +322 n64 pwritev2 sys_pwritev2 +323 n64 pkey_mprotect sys_pkey_mprotect +324 n64 pkey_alloc sys_pkey_alloc +325 n64 pkey_free sys_pkey_free +326 n64 statx sys_statx +327 n64 rseq sys_rseq +328 n64 io_pgetevents sys_io_pgetevents +# 329 through 423 are reserved to sync up with other architectures +424 n64 pidfd_send_signal sys_pidfd_send_signal +425 n64 io_uring_setup sys_io_uring_setup +426 n64 io_uring_enter sys_io_uring_enter +427 n64 io_uring_register sys_io_uring_register +428 n64 open_tree sys_open_tree +429 n64 move_mount sys_move_mount +430 n64 fsopen sys_fsopen +431 n64 fsconfig sys_fsconfig +432 n64 fsmount sys_fsmount +433 n64 fspick sys_fspick +434 n64 pidfd_open sys_pidfd_open +435 n64 clone3 __sys_clone3 diff --git a/linux-user/mips64/syscall_nr.h b/linux-user/mips64/syscall_nr.h deleted file mode 100644 index 6e23e9fcdb..0000000000 --- a/linux-user/mips64/syscall_nr.h +++ /dev/null @@ -1,725 +0,0 @@ -#ifndef LINUX_USER_MIPS64_SYSCALL_NR_H -#define LINUX_USER_MIPS64_SYSCALL_NR_H - -#ifdef TARGET_ABI32 -/* - * Linux N32 syscalls are in the range from 6000 to 6999. - */ -#define TARGET_NR_Linux 6000 -#define TARGET_NR_read (TARGET_NR_Linux + 0) -#define TARGET_NR_write (TARGET_NR_Linux + 1) -#define TARGET_NR_open (TARGET_NR_Linux + 2) -#define TARGET_NR_close (TARGET_NR_Linux + 3) -#define TARGET_NR_stat (TARGET_NR_Linux + 4) -#define TARGET_NR_fstat (TARGET_NR_Linux + 5) -#define TARGET_NR_lstat (TARGET_NR_Linux + 6) -#define TARGET_NR_poll (TARGET_NR_Linux + 7) -#define TARGET_NR_lseek (TARGET_NR_Linux + 8) -#define TARGET_NR_mmap (TARGET_NR_Linux + 9) -#define TARGET_NR_mprotect (TARGET_NR_Linux + 10) -#define TARGET_NR_munmap (TARGET_NR_Linux + 11) -#define TARGET_NR_brk (TARGET_NR_Linux + 12) -#define TARGET_NR_rt_sigaction (TARGET_NR_Linux + 13) -#define TARGET_NR_rt_sigprocmask (TARGET_NR_Linux + 14) -#define TARGET_NR_ioctl (TARGET_NR_Linux + 15) -#define TARGET_NR_pread64 (TARGET_NR_Linux + 16) -#define TARGET_NR_pwrite64 (TARGET_NR_Linux + 17) -#define TARGET_NR_readv (TARGET_NR_Linux + 18) -#define TARGET_NR_writev (TARGET_NR_Linux + 19) -#define TARGET_NR_access (TARGET_NR_Linux + 20) -#define TARGET_NR_pipe (TARGET_NR_Linux + 21) -#define TARGET_NR__newselect (TARGET_NR_Linux + 22) -#define TARGET_NR_sched_yield (TARGET_NR_Linux + 23) -#define TARGET_NR_mremap (TARGET_NR_Linux + 24) -#define TARGET_NR_msync (TARGET_NR_Linux + 25) -#define TARGET_NR_mincore (TARGET_NR_Linux + 26) -#define TARGET_NR_madvise (TARGET_NR_Linux + 27) -#define TARGET_NR_shmget (TARGET_NR_Linux + 28) -#define TARGET_NR_shmat (TARGET_NR_Linux + 29) -#define TARGET_NR_shmctl (TARGET_NR_Linux + 30) -#define TARGET_NR_dup (TARGET_NR_Linux + 31) -#define TARGET_NR_dup2 (TARGET_NR_Linux + 32) -#define TARGET_NR_pause (TARGET_NR_Linux + 33) -#define TARGET_NR_nanosleep (TARGET_NR_Linux + 34) -#define TARGET_NR_getitimer (TARGET_NR_Linux + 35) -#define TARGET_NR_setitimer (TARGET_NR_Linux + 36) -#define TARGET_NR_alarm (TARGET_NR_Linux + 37) -#define TARGET_NR_getpid (TARGET_NR_Linux + 38) -#define TARGET_NR_sendfile (TARGET_NR_Linux + 39) -#define TARGET_NR_socket (TARGET_NR_Linux + 40) -#define TARGET_NR_connect (TARGET_NR_Linux + 41) -#define TARGET_NR_accept (TARGET_NR_Linux + 42) -#define TARGET_NR_sendto (TARGET_NR_Linux + 43) -#define TARGET_NR_recvfrom (TARGET_NR_Linux + 44) -#define TARGET_NR_sendmsg (TARGET_NR_Linux + 45) -#define TARGET_NR_recvmsg (TARGET_NR_Linux + 46) -#define TARGET_NR_shutdown (TARGET_NR_Linux + 47) -#define TARGET_NR_bind (TARGET_NR_Linux + 48) -#define TARGET_NR_listen (TARGET_NR_Linux + 49) -#define TARGET_NR_getsockname (TARGET_NR_Linux + 50) -#define TARGET_NR_getpeername (TARGET_NR_Linux + 51) -#define TARGET_NR_socketpair (TARGET_NR_Linux + 52) -#define TARGET_NR_setsockopt (TARGET_NR_Linux + 53) -#define TARGET_NR_getsockopt (TARGET_NR_Linux + 54) -#define TARGET_NR_clone (TARGET_NR_Linux + 55) -#define TARGET_NR_fork (TARGET_NR_Linux + 56) -#define TARGET_NR_execve (TARGET_NR_Linux + 57) -#define TARGET_NR_exit (TARGET_NR_Linux + 58) -#define TARGET_NR_wait4 (TARGET_NR_Linux + 59) -#define TARGET_NR_kill (TARGET_NR_Linux + 60) -#define TARGET_NR_uname (TARGET_NR_Linux + 61) -#define TARGET_NR_semget (TARGET_NR_Linux + 62) -#define TARGET_NR_semop (TARGET_NR_Linux + 63) -#define TARGET_NR_semctl (TARGET_NR_Linux + 64) -#define TARGET_NR_shmdt (TARGET_NR_Linux + 65) -#define TARGET_NR_msgget (TARGET_NR_Linux + 66) -#define TARGET_NR_msgsnd (TARGET_NR_Linux + 67) -#define TARGET_NR_msgrcv (TARGET_NR_Linux + 68) -#define TARGET_NR_msgctl (TARGET_NR_Linux + 69) -#define TARGET_NR_fcntl (TARGET_NR_Linux + 70) -#define TARGET_NR_flock (TARGET_NR_Linux + 71) -#define TARGET_NR_fsync (TARGET_NR_Linux + 72) -#define TARGET_NR_fdatasync (TARGET_NR_Linux + 73) -#define TARGET_NR_truncate (TARGET_NR_Linux + 74) -#define TARGET_NR_ftruncate (TARGET_NR_Linux + 75) -#define TARGET_NR_getdents (TARGET_NR_Linux + 76) -#define TARGET_NR_getcwd (TARGET_NR_Linux + 77) -#define TARGET_NR_chdir (TARGET_NR_Linux + 78) -#define TARGET_NR_fchdir (TARGET_NR_Linux + 79) -#define TARGET_NR_rename (TARGET_NR_Linux + 80) -#define TARGET_NR_mkdir (TARGET_NR_Linux + 81) -#define TARGET_NR_rmdir (TARGET_NR_Linux + 82) -#define TARGET_NR_creat (TARGET_NR_Linux + 83) -#define TARGET_NR_link (TARGET_NR_Linux + 84) -#define TARGET_NR_unlink (TARGET_NR_Linux + 85) -#define TARGET_NR_symlink (TARGET_NR_Linux + 86) -#define TARGET_NR_readlink (TARGET_NR_Linux + 87) -#define TARGET_NR_chmod (TARGET_NR_Linux + 88) -#define TARGET_NR_fchmod (TARGET_NR_Linux + 89) -#define TARGET_NR_chown (TARGET_NR_Linux + 90) -#define TARGET_NR_fchown (TARGET_NR_Linux + 91) -#define TARGET_NR_lchown (TARGET_NR_Linux + 92) -#define TARGET_NR_umask (TARGET_NR_Linux + 93) -#define TARGET_NR_gettimeofday (TARGET_NR_Linux + 94) -#define TARGET_NR_getrlimit (TARGET_NR_Linux + 95) -#define TARGET_NR_getrusage (TARGET_NR_Linux + 96) -#define TARGET_NR_sysinfo (TARGET_NR_Linux + 97) -#define TARGET_NR_times (TARGET_NR_Linux + 98) -#define TARGET_NR_ptrace (TARGET_NR_Linux + 99) -#define TARGET_NR_getuid (TARGET_NR_Linux + 100) -#define TARGET_NR_syslog (TARGET_NR_Linux + 101) -#define TARGET_NR_getgid (TARGET_NR_Linux + 102) -#define TARGET_NR_setuid (TARGET_NR_Linux + 103) -#define TARGET_NR_setgid (TARGET_NR_Linux + 104) -#define TARGET_NR_geteuid (TARGET_NR_Linux + 105) -#define TARGET_NR_getegid (TARGET_NR_Linux + 106) -#define TARGET_NR_setpgid (TARGET_NR_Linux + 107) -#define TARGET_NR_getppid (TARGET_NR_Linux + 108) -#define TARGET_NR_getpgrp (TARGET_NR_Linux + 109) -#define TARGET_NR_setsid (TARGET_NR_Linux + 110) -#define TARGET_NR_setreuid (TARGET_NR_Linux + 111) -#define TARGET_NR_setregid (TARGET_NR_Linux + 112) -#define TARGET_NR_getgroups (TARGET_NR_Linux + 113) -#define TARGET_NR_setgroups (TARGET_NR_Linux + 114) -#define TARGET_NR_setresuid (TARGET_NR_Linux + 115) -#define TARGET_NR_getresuid (TARGET_NR_Linux + 116) -#define TARGET_NR_setresgid (TARGET_NR_Linux + 117) -#define TARGET_NR_getresgid (TARGET_NR_Linux + 118) -#define TARGET_NR_getpgid (TARGET_NR_Linux + 119) -#define TARGET_NR_setfsuid (TARGET_NR_Linux + 120) -#define TARGET_NR_setfsgid (TARGET_NR_Linux + 121) -#define TARGET_NR_getsid (TARGET_NR_Linux + 122) -#define TARGET_NR_capget (TARGET_NR_Linux + 123) -#define TARGET_NR_capset (TARGET_NR_Linux + 124) -#define TARGET_NR_rt_sigpending (TARGET_NR_Linux + 125) -#define TARGET_NR_rt_sigtimedwait (TARGET_NR_Linux + 126) -#define TARGET_NR_rt_sigqueueinfo (TARGET_NR_Linux + 127) -#define TARGET_NR_rt_sigsuspend (TARGET_NR_Linux + 128) -#define TARGET_NR_sigaltstack (TARGET_NR_Linux + 129) -#define TARGET_NR_utime (TARGET_NR_Linux + 130) -#define TARGET_NR_mknod (TARGET_NR_Linux + 131) -#define TARGET_NR_personality (TARGET_NR_Linux + 132) -#define TARGET_NR_ustat (TARGET_NR_Linux + 133) -#define TARGET_NR_statfs (TARGET_NR_Linux + 134) -#define TARGET_NR_fstatfs (TARGET_NR_Linux + 135) -#define TARGET_NR_sysfs (TARGET_NR_Linux + 136) -#define TARGET_NR_getpriority (TARGET_NR_Linux + 137) -#define TARGET_NR_setpriority (TARGET_NR_Linux + 138) -#define TARGET_NR_sched_setparam (TARGET_NR_Linux + 139) -#define TARGET_NR_sched_getparam (TARGET_NR_Linux + 140) -#define TARGET_NR_sched_setscheduler (TARGET_NR_Linux + 141) -#define TARGET_NR_sched_getscheduler (TARGET_NR_Linux + 142) -#define TARGET_NR_sched_get_priority_max (TARGET_NR_Linux + 143) -#define TARGET_NR_sched_get_priority_min (TARGET_NR_Linux + 144) -#define TARGET_NR_sched_rr_get_interval (TARGET_NR_Linux + 145) -#define TARGET_NR_mlock (TARGET_NR_Linux + 146) -#define TARGET_NR_munlock (TARGET_NR_Linux + 147) -#define TARGET_NR_mlockall (TARGET_NR_Linux + 148) -#define TARGET_NR_munlockall (TARGET_NR_Linux + 149) -#define TARGET_NR_vhangup (TARGET_NR_Linux + 150) -#define TARGET_NR_pivot_root (TARGET_NR_Linux + 151) -#define TARGET_NR__sysctl (TARGET_NR_Linux + 152) -#define TARGET_NR_prctl (TARGET_NR_Linux + 153) -#define TARGET_NR_adjtimex (TARGET_NR_Linux + 154) -#define TARGET_NR_setrlimit (TARGET_NR_Linux + 155) -#define TARGET_NR_chroot (TARGET_NR_Linux + 156) -#define TARGET_NR_sync (TARGET_NR_Linux + 157) -#define TARGET_NR_acct (TARGET_NR_Linux + 158) -#define TARGET_NR_settimeofday (TARGET_NR_Linux + 159) -#define TARGET_NR_mount (TARGET_NR_Linux + 160) -#define TARGET_NR_umount2 (TARGET_NR_Linux + 161) -#define TARGET_NR_swapon (TARGET_NR_Linux + 162) -#define TARGET_NR_swapoff (TARGET_NR_Linux + 163) -#define TARGET_NR_reboot (TARGET_NR_Linux + 164) -#define TARGET_NR_sethostname (TARGET_NR_Linux + 165) -#define TARGET_NR_setdomainname (TARGET_NR_Linux + 166) -#define TARGET_NR_create_module (TARGET_NR_Linux + 167) -#define TARGET_NR_init_module (TARGET_NR_Linux + 168) -#define TARGET_NR_delete_module (TARGET_NR_Linux + 169) -#define TARGET_NR_get_kernel_syms (TARGET_NR_Linux + 170) -#define TARGET_NR_query_module (TARGET_NR_Linux + 171) -#define TARGET_NR_quotactl (TARGET_NR_Linux + 172) -#define TARGET_NR_nfsservctl (TARGET_NR_Linux + 173) -#define TARGET_NR_getpmsg (TARGET_NR_Linux + 174) -#define TARGET_NR_putpmsg (TARGET_NR_Linux + 175) -#define TARGET_NR_afs_syscall (TARGET_NR_Linux + 176) -#define TARGET_NR_reserved177 (TARGET_NR_Linux + 177) -#define TARGET_NR_gettid (TARGET_NR_Linux + 178) -#define TARGET_NR_readahead (TARGET_NR_Linux + 179) -#define TARGET_NR_setxattr (TARGET_NR_Linux + 180) -#define TARGET_NR_lsetxattr (TARGET_NR_Linux + 181) -#define TARGET_NR_fsetxattr (TARGET_NR_Linux + 182) -#define TARGET_NR_getxattr (TARGET_NR_Linux + 183) -#define TARGET_NR_lgetxattr (TARGET_NR_Linux + 184) -#define TARGET_NR_fgetxattr (TARGET_NR_Linux + 185) -#define TARGET_NR_listxattr (TARGET_NR_Linux + 186) -#define TARGET_NR_llistxattr (TARGET_NR_Linux + 187) -#define TARGET_NR_flistxattr (TARGET_NR_Linux + 188) -#define TARGET_NR_removexattr (TARGET_NR_Linux + 189) -#define TARGET_NR_lremovexattr (TARGET_NR_Linux + 190) -#define TARGET_NR_fremovexattr (TARGET_NR_Linux + 191) -#define TARGET_NR_tkill (TARGET_NR_Linux + 192) -#define TARGET_NR_reserved193 (TARGET_NR_Linux + 193) -#define TARGET_NR_futex (TARGET_NR_Linux + 194) -#define TARGET_NR_sched_setaffinity (TARGET_NR_Linux + 195) -#define TARGET_NR_sched_getaffinity (TARGET_NR_Linux + 196) -#define TARGET_NR_cacheflush (TARGET_NR_Linux + 197) -#define TARGET_NR_cachectl (TARGET_NR_Linux + 198) -#define TARGET_NR_sysmips (TARGET_NR_Linux + 199) -#define TARGET_NR_io_setup (TARGET_NR_Linux + 200) -#define TARGET_NR_io_destroy (TARGET_NR_Linux + 201) -#define TARGET_NR_io_getevents (TARGET_NR_Linux + 202) -#define TARGET_NR_io_submit (TARGET_NR_Linux + 203) -#define TARGET_NR_io_cancel (TARGET_NR_Linux + 204) -#define TARGET_NR_exit_group (TARGET_NR_Linux + 205) -#define TARGET_NR_lookup_dcookie (TARGET_NR_Linux + 206) -#define TARGET_NR_epoll_create (TARGET_NR_Linux + 207) -#define TARGET_NR_epoll_ctl (TARGET_NR_Linux + 208) -#define TARGET_NR_epoll_wait (TARGET_NR_Linux + 209) -#define TARGET_NR_remap_file_pages (TARGET_NR_Linux + 210) -#define TARGET_NR_rt_sigreturn (TARGET_NR_Linux + 211) -#define TARGET_NR_fcntl64 (TARGET_NR_Linux + 212) -#define TARGET_NR_set_tid_address (TARGET_NR_Linux + 213) -#define TARGET_NR_restart_syscall (TARGET_NR_Linux + 214) -#define TARGET_NR_semtimedop (TARGET_NR_Linux + 215) -#define TARGET_NR_fadvise64 (TARGET_NR_Linux + 216) -#define TARGET_NR_statfs64 (TARGET_NR_Linux + 217) -#define TARGET_NR_fstatfs64 (TARGET_NR_Linux + 218) -#define TARGET_NR_sendfile64 (TARGET_NR_Linux + 219) -#define TARGET_NR_timer_create (TARGET_NR_Linux + 220) -#define TARGET_NR_timer_settime (TARGET_NR_Linux + 221) -#define TARGET_NR_timer_gettime (TARGET_NR_Linux + 222) -#define TARGET_NR_timer_getoverrun (TARGET_NR_Linux + 223) -#define TARGET_NR_timer_delete (TARGET_NR_Linux + 224) -#define TARGET_NR_clock_settime (TARGET_NR_Linux + 225) -#define TARGET_NR_clock_gettime (TARGET_NR_Linux + 226) -#define TARGET_NR_clock_getres (TARGET_NR_Linux + 227) -#define TARGET_NR_clock_nanosleep (TARGET_NR_Linux + 228) -#define TARGET_NR_tgkill (TARGET_NR_Linux + 229) -#define TARGET_NR_utimes (TARGET_NR_Linux + 230) -#define TARGET_NR_mbind (TARGET_NR_Linux + 231) -#define TARGET_NR_get_mempolicy (TARGET_NR_Linux + 232) -#define TARGET_NR_set_mempolicy (TARGET_NR_Linux + 233) -#define TARGET_NR_mq_open (TARGET_NR_Linux + 234) -#define TARGET_NR_mq_unlink (TARGET_NR_Linux + 235) -#define TARGET_NR_mq_timedsend (TARGET_NR_Linux + 236) -#define TARGET_NR_mq_timedreceive (TARGET_NR_Linux + 237) -#define TARGET_NR_mq_notify (TARGET_NR_Linux + 238) -#define TARGET_NR_mq_getsetattr (TARGET_NR_Linux + 239) -#define TARGET_NR_vserver (TARGET_NR_Linux + 240) -#define TARGET_NR_waitid (TARGET_NR_Linux + 241) -/* #define TARGET_NR_sys_setaltroot (TARGET_NR_Linux + 242) */ -#define TARGET_NR_add_key (TARGET_NR_Linux + 243) -#define TARGET_NR_request_key (TARGET_NR_Linux + 244) -#define TARGET_NR_keyctl (TARGET_NR_Linux + 245) -#define TARGET_NR_set_thread_area (TARGET_NR_Linux + 246) -#define TARGET_NR_inotify_init (TARGET_NR_Linux + 247) -#define TARGET_NR_inotify_add_watch (TARGET_NR_Linux + 248) -#define TARGET_NR_inotify_rm_watch (TARGET_NR_Linux + 249) -#define TARGET_NR_migrate_pages (TARGET_NR_Linux + 250) -#define TARGET_NR_openat (TARGET_NR_Linux + 251) -#define TARGET_NR_mkdirat (TARGET_NR_Linux + 252) -#define TARGET_NR_mknodat (TARGET_NR_Linux + 253) -#define TARGET_NR_fchownat (TARGET_NR_Linux + 254) -#define TARGET_NR_futimesat (TARGET_NR_Linux + 255) -#define TARGET_NR_newfstatat (TARGET_NR_Linux + 256) -#define TARGET_NR_unlinkat (TARGET_NR_Linux + 257) -#define TARGET_NR_renameat (TARGET_NR_Linux + 258) -#define TARGET_NR_linkat (TARGET_NR_Linux + 259) -#define TARGET_NR_symlinkat (TARGET_NR_Linux + 260) -#define TARGET_NR_readlinkat (TARGET_NR_Linux + 261) -#define TARGET_NR_fchmodat (TARGET_NR_Linux + 262) -#define TARGET_NR_faccessat (TARGET_NR_Linux + 263) -#define TARGET_NR_pselect6 (TARGET_NR_Linux + 264) -#define TARGET_NR_ppoll (TARGET_NR_Linux + 265) -#define TARGET_NR_unshare (TARGET_NR_Linux + 266) -#define TARGET_NR_splice (TARGET_NR_Linux + 267) -#define TARGET_NR_sync_file_range (TARGET_NR_Linux + 268) -#define TARGET_NR_tee (TARGET_NR_Linux + 269) -#define TARGET_NR_vmsplice (TARGET_NR_Linux + 270) -#define TARGET_NR_move_pages (TARGET_NR_Linux + 271) -#define TARGET_NR_set_robust_list (TARGET_NR_Linux + 272) -#define TARGET_NR_get_robust_list (TARGET_NR_Linux + 273) -#define TARGET_NR_kexec_load (TARGET_NR_Linux + 274) -#define TARGET_NR_getcpu (TARGET_NR_Linux + 275) -#define TARGET_NR_epoll_pwait (TARGET_NR_Linux + 276) -#define TARGET_NR_ioprio_set (TARGET_NR_Linux + 277) -#define TARGET_NR_ioprio_get (TARGET_NR_Linux + 278) -#define TARGET_NR_utimensat (TARGET_NR_Linux + 279) -#define TARGET_NR_signalfd (TARGET_NR_Linux + 280) -#define TARGET_NR_timerfd (TARGET_NR_Linux + 281) -#define TARGET_NR_eventfd (TARGET_NR_Linux + 282) -#define TARGET_NR_fallocate (TARGET_NR_Linux + 283) -#define TARGET_NR_timerfd_create (TARGET_NR_Linux + 284) -#define TARGET_NR_timerfd_gettime (TARGET_NR_Linux + 285) -#define TARGET_NR_timerfd_settime (TARGET_NR_Linux + 286) -#define TARGET_NR_signalfd4 (TARGET_NR_Linux + 287) -#define TARGET_NR_eventfd2 (TARGET_NR_Linux + 288) -#define TARGET_NR_epoll_create1 (TARGET_NR_Linux + 289) -#define TARGET_NR_dup3 (TARGET_NR_Linux + 290) -#define TARGET_NR_pipe2 (TARGET_NR_Linux + 291) -#define TARGET_NR_inotify_init1 (TARGET_NR_Linux + 292) -#define TARGET_NR_preadv (TARGET_NR_Linux + 293) -#define TARGET_NR_pwritev (TARGET_NR_Linux + 294) -#define TARGET_NR_rt_tgsigqueueinfo (TARGET_NR_Linux + 295) -#define TARGET_NR_perf_event_open (TARGET_NR_Linux + 296) -#define TARGET_NR_accept4 (TARGET_NR_Linux + 297) -#define TARGET_NR_recvmmsg (TARGET_NR_Linux + 298) -#define TARGET_NR_getdents64 (TARGET_NR_Linux + 299) -#define TARGET_NR_fanotify_init (TARGET_NR_Linux + 300) -#define TARGET_NR_fanotify_mark (TARGET_NR_Linux + 301) -#define TARGET_NR_prlimit64 (TARGET_NR_Linux + 302) -#define TARGET_NR_name_to_handle_at (TARGET_NR_Linux + 303) -#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 304) -#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 305) -#define TARGET_NR_syncfs (TARGET_NR_Linux + 306) -#define TARGET_NR_sendmmsg (TARGET_NR_Linux + 307) -#define TARGET_NR_setns (TARGET_NR_Linux + 308) -#define TARGET_NR_process_vm_readv (TARGET_NR_Linux + 309) -#define TARGET_NR_process_vm_writev (TARGET_NR_Linux + 310) -#define TARGET_NR_kcmp (TARGET_NR_Linux + 311) -#define TARGET_NR_finit_module (TARGET_NR_Linux + 312) -#define TARGET_NR_sched_setattr (TARGET_NR_Linux + 313) -#define TARGET_NR_sched_getattr (TARGET_NR_Linux + 314) -#define TARGET_NR_renameat2 (TARGET_NR_Linux + 315) -#define TARGET_NR_seccomp (TARGET_NR_Linux + 316) -#define TARGET_NR_getrandom (TARGET_NR_Linux + 317) -#define TARGET_NR_memfd_create (TARGET_NR_Linux + 318) -#define TARGET_NR_bpf (TARGET_NR_Linux + 319) -#define TARGET_NR_execveat (TARGET_NR_Linux + 320) -#define TARGET_NR_userfaultfd (TARGET_NR_Linux + 321) -#define TARGET_NR_membarrier (TARGET_NR_Linux + 322) -#define TARGET_NR_mlock2 (TARGET_NR_Linux + 323) -#define TARGET_NR_copy_file_range (TARGET_NR_Linux + 324) -#define TARGET_NR_preadv2 (TARGET_NR_Linux + 325) -#define TARGET_NR_pwritev2 (TARGET_NR_Linux + 326) -#define TARGET_NR_pkey_mprotect (TARGET_NR_Linux + 327) -#define TARGET_NR_pkey_alloc (TARGET_NR_Linux + 328) -#define TARGET_NR_pkey_free (TARGET_NR_Linux + 329) -#define TARGET_NR_statx (TARGET_NR_Linux + 330) -#define TARGET_NR_rseq (TARGET_NR_Linux + 331) -#define TARGET_NR_io_pgetevents (TARGET_NR_Linux + 332) -/* 333 through 402 are unassigned to sync up with generic numbers */ -#define TARGET_NR_clock_gettime64 (TARGET_NR_Linux + 403) -#define TARGET_NR_clock_settime64 (TARGET_NR_Linux + 404) -#define TARGET_NR_clock_adjtime64 (TARGET_NR_Linux + 405) -#define TARGET_NR_clock_getres_time64 (TARGET_NR_Linux + 406) -#define TARGET_NR_clock_nanosleep_time64 (TARGET_NR_Linux + 407) -#define TARGET_NR_timer_gettime64 (TARGET_NR_Linux + 408) -#define TARGET_NR_timer_settime64 (TARGET_NR_Linux + 409) -#define TARGET_NR_timerfd_gettime64 (TARGET_NR_Linux + 410) -#define TARGET_NR_timerfd_settime64 (TARGET_NR_Linux + 411) -#define TARGET_NR_utimensat_time64 (TARGET_NR_Linux + 412) -#define TARGET_NR_pselect6_time64 (TARGET_NR_Linux + 413) -#define TARGET_NR_ppoll_time64 (TARGET_NR_Linux + 414) -#define TARGET_NR_io_pgetevents_time64 (TARGET_NR_Linux + 416) -#define TARGET_NR_recvmmsg_time64 (TARGET_NR_Linux + 417) -#define TARGET_NR_mq_timedsend_time64 (TARGET_NR_Linux + 418) -#define TARGET_NR_mq_timedreceive_time64 (TARGET_NR_Linux + 419) -#define TARGET_NR_semtimedop_time64 (TARGET_NR_Linux + 420) -#define TARGET_NR_rt_sigtimedwait_time64 (TARGET_NR_Linux + 421) -#define TARGET_NR_futex_time64 (TARGET_NR_Linux + 422) -#define TARGET_NR_sched_rr_get_interval_time64 (TARGET_NR_Linux + 423) -#define TARGET_NR_pidfd_send_signal (TARGET_NR_Linux + 424) -#define TARGET_NR_io_uring_setup (TARGET_NR_Linux + 425) -#define TARGET_NR_io_uring_enter (TARGET_NR_Linux + 426) -#define TARGET_NR_io_uring_register (TARGET_NR_Linux + 427) -#define TARGET_NR_open_tree (TARGET_NR_Linux + 428) -#define TARGET_NR_move_mount (TARGET_NR_Linux + 429) -#define TARGET_NR_fsopen (TARGET_NR_Linux + 430) -#define TARGET_NR_fsconfig (TARGET_NR_Linux + 431) -#define TARGET_NR_fsmount (TARGET_NR_Linux + 432) -#define TARGET_NR_fspick (TARGET_NR_Linux + 433) -#define TARGET_NR_pidfd_open (TARGET_NR_Linux + 434) -#define TARGET_NR_clone3 (TARGET_NR_Linux + 435) - -#else -/* - * Linux 64-bit syscalls are in the range from 5000 to 5999. - */ -#define TARGET_NR_Linux 5000 -#define TARGET_NR_read (TARGET_NR_Linux + 0) -#define TARGET_NR_write (TARGET_NR_Linux + 1) -#define TARGET_NR_open (TARGET_NR_Linux + 2) -#define TARGET_NR_close (TARGET_NR_Linux + 3) -#define TARGET_NR_stat (TARGET_NR_Linux + 4) -#define TARGET_NR_fstat (TARGET_NR_Linux + 5) -#define TARGET_NR_lstat (TARGET_NR_Linux + 6) -#define TARGET_NR_poll (TARGET_NR_Linux + 7) -#define TARGET_NR_lseek (TARGET_NR_Linux + 8) -#define TARGET_NR_mmap (TARGET_NR_Linux + 9) -#define TARGET_NR_mprotect (TARGET_NR_Linux + 10) -#define TARGET_NR_munmap (TARGET_NR_Linux + 11) -#define TARGET_NR_brk (TARGET_NR_Linux + 12) -#define TARGET_NR_rt_sigaction (TARGET_NR_Linux + 13) -#define TARGET_NR_rt_sigprocmask (TARGET_NR_Linux + 14) -#define TARGET_NR_ioctl (TARGET_NR_Linux + 15) -#define TARGET_NR_pread64 (TARGET_NR_Linux + 16) -#define TARGET_NR_pwrite64 (TARGET_NR_Linux + 17) -#define TARGET_NR_readv (TARGET_NR_Linux + 18) -#define TARGET_NR_writev (TARGET_NR_Linux + 19) -#define TARGET_NR_access (TARGET_NR_Linux + 20) -#define TARGET_NR_pipe (TARGET_NR_Linux + 21) -#define TARGET_NR__newselect (TARGET_NR_Linux + 22) -#define TARGET_NR_sched_yield (TARGET_NR_Linux + 23) -#define TARGET_NR_mremap (TARGET_NR_Linux + 24) -#define TARGET_NR_msync (TARGET_NR_Linux + 25) -#define TARGET_NR_mincore (TARGET_NR_Linux + 26) -#define TARGET_NR_madvise (TARGET_NR_Linux + 27) -#define TARGET_NR_shmget (TARGET_NR_Linux + 28) -#define TARGET_NR_shmat (TARGET_NR_Linux + 29) -#define TARGET_NR_shmctl (TARGET_NR_Linux + 30) -#define TARGET_NR_dup (TARGET_NR_Linux + 31) -#define TARGET_NR_dup2 (TARGET_NR_Linux + 32) -#define TARGET_NR_pause (TARGET_NR_Linux + 33) -#define TARGET_NR_nanosleep (TARGET_NR_Linux + 34) -#define TARGET_NR_getitimer (TARGET_NR_Linux + 35) -#define TARGET_NR_setitimer (TARGET_NR_Linux + 36) -#define TARGET_NR_alarm (TARGET_NR_Linux + 37) -#define TARGET_NR_getpid (TARGET_NR_Linux + 38) -#define TARGET_NR_sendfile (TARGET_NR_Linux + 39) -#define TARGET_NR_socket (TARGET_NR_Linux + 40) -#define TARGET_NR_connect (TARGET_NR_Linux + 41) -#define TARGET_NR_accept (TARGET_NR_Linux + 42) -#define TARGET_NR_sendto (TARGET_NR_Linux + 43) -#define TARGET_NR_recvfrom (TARGET_NR_Linux + 44) -#define TARGET_NR_sendmsg (TARGET_NR_Linux + 45) -#define TARGET_NR_recvmsg (TARGET_NR_Linux + 46) -#define TARGET_NR_shutdown (TARGET_NR_Linux + 47) -#define TARGET_NR_bind (TARGET_NR_Linux + 48) -#define TARGET_NR_listen (TARGET_NR_Linux + 49) -#define TARGET_NR_getsockname (TARGET_NR_Linux + 50) -#define TARGET_NR_getpeername (TARGET_NR_Linux + 51) -#define TARGET_NR_socketpair (TARGET_NR_Linux + 52) -#define TARGET_NR_setsockopt (TARGET_NR_Linux + 53) -#define TARGET_NR_getsockopt (TARGET_NR_Linux + 54) -#define TARGET_NR_clone (TARGET_NR_Linux + 55) -#define TARGET_NR_fork (TARGET_NR_Linux + 56) -#define TARGET_NR_execve (TARGET_NR_Linux + 57) -#define TARGET_NR_exit (TARGET_NR_Linux + 58) -#define TARGET_NR_wait4 (TARGET_NR_Linux + 59) -#define TARGET_NR_kill (TARGET_NR_Linux + 60) -#define TARGET_NR_uname (TARGET_NR_Linux + 61) -#define TARGET_NR_semget (TARGET_NR_Linux + 62) -#define TARGET_NR_semop (TARGET_NR_Linux + 63) -#define TARGET_NR_semctl (TARGET_NR_Linux + 64) -#define TARGET_NR_shmdt (TARGET_NR_Linux + 65) -#define TARGET_NR_msgget (TARGET_NR_Linux + 66) -#define TARGET_NR_msgsnd (TARGET_NR_Linux + 67) -#define TARGET_NR_msgrcv (TARGET_NR_Linux + 68) -#define TARGET_NR_msgctl (TARGET_NR_Linux + 69) -#define TARGET_NR_fcntl (TARGET_NR_Linux + 70) -#define TARGET_NR_flock (TARGET_NR_Linux + 71) -#define TARGET_NR_fsync (TARGET_NR_Linux + 72) -#define TARGET_NR_fdatasync (TARGET_NR_Linux + 73) -#define TARGET_NR_truncate (TARGET_NR_Linux + 74) -#define TARGET_NR_ftruncate (TARGET_NR_Linux + 75) -#define TARGET_NR_getdents (TARGET_NR_Linux + 76) -#define TARGET_NR_getcwd (TARGET_NR_Linux + 77) -#define TARGET_NR_chdir (TARGET_NR_Linux + 78) -#define TARGET_NR_fchdir (TARGET_NR_Linux + 79) -#define TARGET_NR_rename (TARGET_NR_Linux + 80) -#define TARGET_NR_mkdir (TARGET_NR_Linux + 81) -#define TARGET_NR_rmdir (TARGET_NR_Linux + 82) -#define TARGET_NR_creat (TARGET_NR_Linux + 83) -#define TARGET_NR_link (TARGET_NR_Linux + 84) -#define TARGET_NR_unlink (TARGET_NR_Linux + 85) -#define TARGET_NR_symlink (TARGET_NR_Linux + 86) -#define TARGET_NR_readlink (TARGET_NR_Linux + 87) -#define TARGET_NR_chmod (TARGET_NR_Linux + 88) -#define TARGET_NR_fchmod (TARGET_NR_Linux + 89) -#define TARGET_NR_chown (TARGET_NR_Linux + 90) -#define TARGET_NR_fchown (TARGET_NR_Linux + 91) -#define TARGET_NR_lchown (TARGET_NR_Linux + 92) -#define TARGET_NR_umask (TARGET_NR_Linux + 93) -#define TARGET_NR_gettimeofday (TARGET_NR_Linux + 94) -#define TARGET_NR_getrlimit (TARGET_NR_Linux + 95) -#define TARGET_NR_getrusage (TARGET_NR_Linux + 96) -#define TARGET_NR_sysinfo (TARGET_NR_Linux + 97) -#define TARGET_NR_times (TARGET_NR_Linux + 98) -#define TARGET_NR_ptrace (TARGET_NR_Linux + 99) -#define TARGET_NR_getuid (TARGET_NR_Linux + 100) -#define TARGET_NR_syslog (TARGET_NR_Linux + 101) -#define TARGET_NR_getgid (TARGET_NR_Linux + 102) -#define TARGET_NR_setuid (TARGET_NR_Linux + 103) -#define TARGET_NR_setgid (TARGET_NR_Linux + 104) -#define TARGET_NR_geteuid (TARGET_NR_Linux + 105) -#define TARGET_NR_getegid (TARGET_NR_Linux + 106) -#define TARGET_NR_setpgid (TARGET_NR_Linux + 107) -#define TARGET_NR_getppid (TARGET_NR_Linux + 108) -#define TARGET_NR_getpgrp (TARGET_NR_Linux + 109) -#define TARGET_NR_setsid (TARGET_NR_Linux + 110) -#define TARGET_NR_setreuid (TARGET_NR_Linux + 111) -#define TARGET_NR_setregid (TARGET_NR_Linux + 112) -#define TARGET_NR_getgroups (TARGET_NR_Linux + 113) -#define TARGET_NR_setgroups (TARGET_NR_Linux + 114) -#define TARGET_NR_setresuid (TARGET_NR_Linux + 115) -#define TARGET_NR_getresuid (TARGET_NR_Linux + 116) -#define TARGET_NR_setresgid (TARGET_NR_Linux + 117) -#define TARGET_NR_getresgid (TARGET_NR_Linux + 118) -#define TARGET_NR_getpgid (TARGET_NR_Linux + 119) -#define TARGET_NR_setfsuid (TARGET_NR_Linux + 120) -#define TARGET_NR_setfsgid (TARGET_NR_Linux + 121) -#define TARGET_NR_getsid (TARGET_NR_Linux + 122) -#define TARGET_NR_capget (TARGET_NR_Linux + 123) -#define TARGET_NR_capset (TARGET_NR_Linux + 124) -#define TARGET_NR_rt_sigpending (TARGET_NR_Linux + 125) -#define TARGET_NR_rt_sigtimedwait (TARGET_NR_Linux + 126) -#define TARGET_NR_rt_sigqueueinfo (TARGET_NR_Linux + 127) -#define TARGET_NR_rt_sigsuspend (TARGET_NR_Linux + 128) -#define TARGET_NR_sigaltstack (TARGET_NR_Linux + 129) -#define TARGET_NR_utime (TARGET_NR_Linux + 130) -#define TARGET_NR_mknod (TARGET_NR_Linux + 131) -#define TARGET_NR_personality (TARGET_NR_Linux + 132) -#define TARGET_NR_ustat (TARGET_NR_Linux + 133) -#define TARGET_NR_statfs (TARGET_NR_Linux + 134) -#define TARGET_NR_fstatfs (TARGET_NR_Linux + 135) -#define TARGET_NR_sysfs (TARGET_NR_Linux + 136) -#define TARGET_NR_getpriority (TARGET_NR_Linux + 137) -#define TARGET_NR_setpriority (TARGET_NR_Linux + 138) -#define TARGET_NR_sched_setparam (TARGET_NR_Linux + 139) -#define TARGET_NR_sched_getparam (TARGET_NR_Linux + 140) -#define TARGET_NR_sched_setscheduler (TARGET_NR_Linux + 141) -#define TARGET_NR_sched_getscheduler (TARGET_NR_Linux + 142) -#define TARGET_NR_sched_get_priority_max (TARGET_NR_Linux + 143) -#define TARGET_NR_sched_get_priority_min (TARGET_NR_Linux + 144) -#define TARGET_NR_sched_rr_get_interval (TARGET_NR_Linux + 145) -#define TARGET_NR_mlock (TARGET_NR_Linux + 146) -#define TARGET_NR_munlock (TARGET_NR_Linux + 147) -#define TARGET_NR_mlockall (TARGET_NR_Linux + 148) -#define TARGET_NR_munlockall (TARGET_NR_Linux + 149) -#define TARGET_NR_vhangup (TARGET_NR_Linux + 150) -#define TARGET_NR_pivot_root (TARGET_NR_Linux + 151) -#define TARGET_NR__sysctl (TARGET_NR_Linux + 152) -#define TARGET_NR_prctl (TARGET_NR_Linux + 153) -#define TARGET_NR_adjtimex (TARGET_NR_Linux + 154) -#define TARGET_NR_setrlimit (TARGET_NR_Linux + 155) -#define TARGET_NR_chroot (TARGET_NR_Linux + 156) -#define TARGET_NR_sync (TARGET_NR_Linux + 157) -#define TARGET_NR_acct (TARGET_NR_Linux + 158) -#define TARGET_NR_settimeofday (TARGET_NR_Linux + 159) -#define TARGET_NR_mount (TARGET_NR_Linux + 160) -#define TARGET_NR_umount2 (TARGET_NR_Linux + 161) -#define TARGET_NR_swapon (TARGET_NR_Linux + 162) -#define TARGET_NR_swapoff (TARGET_NR_Linux + 163) -#define TARGET_NR_reboot (TARGET_NR_Linux + 164) -#define TARGET_NR_sethostname (TARGET_NR_Linux + 165) -#define TARGET_NR_setdomainname (TARGET_NR_Linux + 166) -#define TARGET_NR_create_module (TARGET_NR_Linux + 167) -#define TARGET_NR_init_module (TARGET_NR_Linux + 168) -#define TARGET_NR_delete_module (TARGET_NR_Linux + 169) -#define TARGET_NR_get_kernel_syms (TARGET_NR_Linux + 170) -#define TARGET_NR_query_module (TARGET_NR_Linux + 171) -#define TARGET_NR_quotactl (TARGET_NR_Linux + 172) -#define TARGET_NR_nfsservctl (TARGET_NR_Linux + 173) -#define TARGET_NR_getpmsg (TARGET_NR_Linux + 174) -#define TARGET_NR_putpmsg (TARGET_NR_Linux + 175) -#define TARGET_NR_afs_syscall (TARGET_NR_Linux + 176) -#define TARGET_NR_reserved177 (TARGET_NR_Linux + 177) -#define TARGET_NR_gettid (TARGET_NR_Linux + 178) -#define TARGET_NR_readahead (TARGET_NR_Linux + 179) -#define TARGET_NR_setxattr (TARGET_NR_Linux + 180) -#define TARGET_NR_lsetxattr (TARGET_NR_Linux + 181) -#define TARGET_NR_fsetxattr (TARGET_NR_Linux + 182) -#define TARGET_NR_getxattr (TARGET_NR_Linux + 183) -#define TARGET_NR_lgetxattr (TARGET_NR_Linux + 184) -#define TARGET_NR_fgetxattr (TARGET_NR_Linux + 185) -#define TARGET_NR_listxattr (TARGET_NR_Linux + 186) -#define TARGET_NR_llistxattr (TARGET_NR_Linux + 187) -#define TARGET_NR_flistxattr (TARGET_NR_Linux + 188) -#define TARGET_NR_removexattr (TARGET_NR_Linux + 189) -#define TARGET_NR_lremovexattr (TARGET_NR_Linux + 190) -#define TARGET_NR_fremovexattr (TARGET_NR_Linux + 191) -#define TARGET_NR_tkill (TARGET_NR_Linux + 192) -#define TARGET_NR_reserved193 (TARGET_NR_Linux + 193) -#define TARGET_NR_futex (TARGET_NR_Linux + 194) -#define TARGET_NR_sched_setaffinity (TARGET_NR_Linux + 195) -#define TARGET_NR_sched_getaffinity (TARGET_NR_Linux + 196) -#define TARGET_NR_cacheflush (TARGET_NR_Linux + 197) -#define TARGET_NR_cachectl (TARGET_NR_Linux + 198) -#define TARGET_NR_sysmips (TARGET_NR_Linux + 199) -#define TARGET_NR_io_setup (TARGET_NR_Linux + 200) -#define TARGET_NR_io_destroy (TARGET_NR_Linux + 201) -#define TARGET_NR_io_getevents (TARGET_NR_Linux + 202) -#define TARGET_NR_io_submit (TARGET_NR_Linux + 203) -#define TARGET_NR_io_cancel (TARGET_NR_Linux + 204) -#define TARGET_NR_exit_group (TARGET_NR_Linux + 205) -#define TARGET_NR_lookup_dcookie (TARGET_NR_Linux + 206) -#define TARGET_NR_epoll_create (TARGET_NR_Linux + 207) -#define TARGET_NR_epoll_ctl (TARGET_NR_Linux + 208) -#define TARGET_NR_epoll_wait (TARGET_NR_Linux + 209) -#define TARGET_NR_remap_file_pages (TARGET_NR_Linux + 210) -#define TARGET_NR_rt_sigreturn (TARGET_NR_Linux + 211) -#define TARGET_NR_set_tid_address (TARGET_NR_Linux + 212) -#define TARGET_NR_restart_syscall (TARGET_NR_Linux + 213) -#define TARGET_NR_semtimedop (TARGET_NR_Linux + 214) -#define TARGET_NR_fadvise64 (TARGET_NR_Linux + 215) -#define TARGET_NR_timer_create (TARGET_NR_Linux + 216) -#define TARGET_NR_timer_settime (TARGET_NR_Linux + 217) -#define TARGET_NR_timer_gettime (TARGET_NR_Linux + 218) -#define TARGET_NR_timer_getoverrun (TARGET_NR_Linux + 219) -#define TARGET_NR_timer_delete (TARGET_NR_Linux + 220) -#define TARGET_NR_clock_settime (TARGET_NR_Linux + 221) -#define TARGET_NR_clock_gettime (TARGET_NR_Linux + 222) -#define TARGET_NR_clock_getres (TARGET_NR_Linux + 223) -#define TARGET_NR_clock_nanosleep (TARGET_NR_Linux + 224) -#define TARGET_NR_tgkill (TARGET_NR_Linux + 225) -#define TARGET_NR_utimes (TARGET_NR_Linux + 226) -#define TARGET_NR_mbind (TARGET_NR_Linux + 227) -#define TARGET_NR_get_mempolicy (TARGET_NR_Linux + 228) -#define TARGET_NR_set_mempolicy (TARGET_NR_Linux + 229) -#define TARGET_NR_mq_open (TARGET_NR_Linux + 230) -#define TARGET_NR_mq_unlink (TARGET_NR_Linux + 231) -#define TARGET_NR_mq_timedsend (TARGET_NR_Linux + 232) -#define TARGET_NR_mq_timedreceive (TARGET_NR_Linux + 233) -#define TARGET_NR_mq_notify (TARGET_NR_Linux + 234) -#define TARGET_NR_mq_getsetattr (TARGET_NR_Linux + 235) -#define TARGET_NR_vserver (TARGET_NR_Linux + 236) -#define TARGET_NR_waitid (TARGET_NR_Linux + 237) -/* #define TARGET_NR_sys_setaltroot (TARGET_NR_Linux + 238) */ -#define TARGET_NR_add_key (TARGET_NR_Linux + 239) -#define TARGET_NR_request_key (TARGET_NR_Linux + 240) -#define TARGET_NR_keyctl (TARGET_NR_Linux + 241) -#define TARGET_NR_set_thread_area (TARGET_NR_Linux + 242) -#define TARGET_NR_inotify_init (TARGET_NR_Linux + 243) -#define TARGET_NR_inotify_add_watch (TARGET_NR_Linux + 244) -#define TARGET_NR_inotify_rm_watch (TARGET_NR_Linux + 245) -#define TARGET_NR_migrate_pages (TARGET_NR_Linux + 246) -#define TARGET_NR_openat (TARGET_NR_Linux + 247) -#define TARGET_NR_mkdirat (TARGET_NR_Linux + 248) -#define TARGET_NR_mknodat (TARGET_NR_Linux + 249) -#define TARGET_NR_fchownat (TARGET_NR_Linux + 250) -#define TARGET_NR_futimesat (TARGET_NR_Linux + 251) -#define TARGET_NR_newfstatat (TARGET_NR_Linux + 252) -#define TARGET_NR_unlinkat (TARGET_NR_Linux + 253) -#define TARGET_NR_renameat (TARGET_NR_Linux + 254) -#define TARGET_NR_linkat (TARGET_NR_Linux + 255) -#define TARGET_NR_symlinkat (TARGET_NR_Linux + 256) -#define TARGET_NR_readlinkat (TARGET_NR_Linux + 257) -#define TARGET_NR_fchmodat (TARGET_NR_Linux + 258) -#define TARGET_NR_faccessat (TARGET_NR_Linux + 259) -#define TARGET_NR_pselect6 (TARGET_NR_Linux + 260) -#define TARGET_NR_ppoll (TARGET_NR_Linux + 261) -#define TARGET_NR_unshare (TARGET_NR_Linux + 262) -#define TARGET_NR_splice (TARGET_NR_Linux + 263) -#define TARGET_NR_sync_file_range (TARGET_NR_Linux + 264) -#define TARGET_NR_tee (TARGET_NR_Linux + 265) -#define TARGET_NR_vmsplice (TARGET_NR_Linux + 266) -#define TARGET_NR_move_pages (TARGET_NR_Linux + 267) -#define TARGET_NR_set_robust_list (TARGET_NR_Linux + 268) -#define TARGET_NR_get_robust_list (TARGET_NR_Linux + 269) -#define TARGET_NR_kexec_load (TARGET_NR_Linux + 270) -#define TARGET_NR_getcpu (TARGET_NR_Linux + 271) -#define TARGET_NR_epoll_pwait (TARGET_NR_Linux + 272) -#define TARGET_NR_ioprio_set (TARGET_NR_Linux + 273) -#define TARGET_NR_ioprio_get (TARGET_NR_Linux + 274) -#define TARGET_NR_utimensat (TARGET_NR_Linux + 275) -#define TARGET_NR_signalfd (TARGET_NR_Linux + 276) -#define TARGET_NR_timerfd (TARGET_NR_Linux + 277) -#define TARGET_NR_eventfd (TARGET_NR_Linux + 278) -#define TARGET_NR_fallocate (TARGET_NR_Linux + 279) -#define TARGET_NR_timerfd_create (TARGET_NR_Linux + 280) -#define TARGET_NR_timerfd_gettime (TARGET_NR_Linux + 281) -#define TARGET_NR_timerfd_settime (TARGET_NR_Linux + 282) -#define TARGET_NR_signalfd4 (TARGET_NR_Linux + 283) -#define TARGET_NR_eventfd2 (TARGET_NR_Linux + 284) -#define TARGET_NR_epoll_create1 (TARGET_NR_Linux + 285) -#define TARGET_NR_dup3 (TARGET_NR_Linux + 286) -#define TARGET_NR_pipe2 (TARGET_NR_Linux + 287) -#define TARGET_NR_inotify_init1 (TARGET_NR_Linux + 288) -#define TARGET_NR_preadv (TARGET_NR_Linux + 289) -#define TARGET_NR_pwritev (TARGET_NR_Linux + 290) -#define TARGET_NR_rt_tgsigqueueinfo (TARGET_NR_Linux + 291) -#define TARGET_NR_perf_event_open (TARGET_NR_Linux + 292) -#define TARGET_NR_accept4 (TARGET_NR_Linux + 293) -#define TARGET_NR_recvmmsg (TARGET_NR_Linux + 294) -#define TARGET_NR_fanotify_init (TARGET_NR_Linux + 295) -#define TARGET_NR_fanotify_mark (TARGET_NR_Linux + 296) -#define TARGET_NR_prlimit64 (TARGET_NR_Linux + 297) -#define TARGET_NR_name_to_handle_at (TARGET_NR_Linux + 298) -#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 299) -#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 300) -#define TARGET_NR_syncfs (TARGET_NR_Linux + 301) -#define TARGET_NR_sendmmsg (TARGET_NR_Linux + 302) -#define TARGET_NR_setns (TARGET_NR_Linux + 303) -#define TARGET_NR_process_vm_readv (TARGET_NR_Linux + 304) -#define TARGET_NR_process_vm_writev (TARGET_NR_Linux + 305) -#define TARGET_NR_kcmp (TARGET_NR_Linux + 306) -#define TARGET_NR_finit_module (TARGET_NR_Linux + 307) -#define TARGET_NR_getdents64 (TARGET_NR_Linux + 308) -#define TARGET_NR_sched_setattr (TARGET_NR_Linux + 309) -#define TARGET_NR_sched_getattr (TARGET_NR_Linux + 310) -#define TARGET_NR_renameat2 (TARGET_NR_Linux + 311) -#define TARGET_NR_seccomp (TARGET_NR_Linux + 312) -#define TARGET_NR_getrandom (TARGET_NR_Linux + 313) -#define TARGET_NR_memfd_create (TARGET_NR_Linux + 314) -#define TARGET_NR_bpf (TARGET_NR_Linux + 315) -#define TARGET_NR_execveat (TARGET_NR_Linux + 316) -#define TARGET_NR_userfaultfd (TARGET_NR_Linux + 317) -#define TARGET_NR_membarrier (TARGET_NR_Linux + 318) -#define TARGET_NR_mlock2 (TARGET_NR_Linux + 319) -#define TARGET_NR_copy_file_range (TARGET_NR_Linux + 320) -#define TARGET_NR_preadv2 (TARGET_NR_Linux + 321) -#define TARGET_NR_pwritev2 (TARGET_NR_Linux + 322) -#define TARGET_NR_pkey_mprotect (TARGET_NR_Linux + 323) -#define TARGET_NR_pkey_alloc (TARGET_NR_Linux + 324) -#define TARGET_NR_pkey_free (TARGET_NR_Linux + 325) -#define TARGET_NR_statx (TARGET_NR_Linux + 326) -#define TARGET_NR_rseq (TARGET_NR_Linux + 327) -#define TARGET_NR_io_pgetevents (TARGET_NR_Linux + 328) -/* 329 through 423 are reserved to sync up with other architectures */ -#define TARGET_NR_pidfd_send_signal (TARGET_NR_Linux + 424) -#define TARGET_NR_io_uring_setup (TARGET_NR_Linux + 425) -#define TARGET_NR_io_uring_enter (TARGET_NR_Linux + 426) -#define TARGET_NR_io_uring_register (TARGET_NR_Linux + 427) -#define TARGET_NR_open_tree (TARGET_NR_Linux + 428) -#define TARGET_NR_move_mount (TARGET_NR_Linux + 429) -#define TARGET_NR_fsopen (TARGET_NR_Linux + 430) -#define TARGET_NR_fsconfig (TARGET_NR_Linux + 431) -#define TARGET_NR_fsmount (TARGET_NR_Linux + 432) -#define TARGET_NR_fspick (TARGET_NR_Linux + 433) -#define TARGET_NR_pidfd_open (TARGET_NR_Linux + 434) -#define TARGET_NR_clone3 (TARGET_NR_Linux + 435) -#endif - -#endif diff --git a/linux-user/mips64/syscallhdr.sh b/linux-user/mips64/syscallhdr.sh new file mode 100644 index 0000000000..ed5a45165a --- /dev/null +++ b/linux-user/mips64/syscallhdr.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +in="$1" +out="$2" +my_abis=`echo "($3)" | tr ',' '|'` +prefix="$4" +offset="$5" + +fileguard=LINUX_USER_MIPS64_`basename "$out" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( + printf "#ifndef %s\n" "${fileguard}" + printf "#define %s\n" "${fileguard}" + printf "\n" + + nxt=0 + while read nr abi name entry compat ; do + if [ -z "$offset" ]; then + printf "#define TARGET_NR_%s%s\t%s\n" \ + "${prefix}" "${name}" "${nr}" + else + printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \ + "${prefix}" "${name}" "${offset}" "${nr}" + fi + nxt=$((nr+1)) + done + + printf "\n" + printf "#endif /* %s */" "${fileguard}" + printf "\n" +) > "$out" From e3a6c825b2c82424034d023c879f040766ab15de Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:34:00 +0100 Subject: [PATCH 25/32] linux-user, scripts: add a script to update syscall.tbl scripts/update-syscalltbl.sh has the list of syscall.tbl to update and can copy them from the linux source directory Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Reviewed-by: Richard Henderson Message-Id: <20200310103403.3284090-19-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- MAINTAINERS | 1 + scripts/update-syscalltbl.sh | 49 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 scripts/update-syscalltbl.sh diff --git a/MAINTAINERS b/MAINTAINERS index 36d0c6887a..709832758e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2448,6 +2448,7 @@ S: Maintained F: linux-user/ F: default-configs/*-linux-user.mak F: scripts/qemu-binfmt-conf.sh +F: scripts/update-syscalltbl.sh Tiny Code Generator (TCG) ------------------------- diff --git a/scripts/update-syscalltbl.sh b/scripts/update-syscalltbl.sh new file mode 100755 index 0000000000..2d23e56800 --- /dev/null +++ b/scripts/update-syscalltbl.sh @@ -0,0 +1,49 @@ +TBL_LIST="\ +arch/alpha/kernel/syscalls/syscall.tbl,linux-user/alpha/syscall.tbl \ +arch/arm/tools/syscall.tbl,linux-user/arm/syscall.tbl \ +arch/m68k/kernel/syscalls/syscall.tbl,linux-user/m68k/syscall.tbl \ +arch/microblaze/kernel/syscalls/syscall.tbl,linux-user/microblaze/syscall.tbl \ +arch/mips/kernel/syscalls/syscall_n32.tbl,linux-user/mips64/syscall_n32.tbl \ +arch/mips/kernel/syscalls/syscall_n64.tbl,linux-user/mips64/syscall_n64.tbl \ +arch/mips/kernel/syscalls/syscall_o32.tbl,linux-user/mips/syscall_o32.tbl \ +arch/parisc/kernel/syscalls/syscall.tbl,linux-user/hppa/syscall.tbl \ +arch/powerpc/kernel/syscalls/syscall.tbl,linux-user/ppc/syscall.tbl \ +arch/s390/kernel/syscalls/syscall.tbl,linux-user/s390x/syscall.tbl \ +arch/sh/kernel/syscalls/syscall.tbl,linux-user/sh4/syscall.tbl \ +arch/sparc/kernel/syscalls/syscall.tbl,linux-user/sparc64/syscall.tbl \ +arch/sparc/kernel/syscalls/syscall.tbl,linux-user/sparc/syscall.tbl \ +arch/x86/entry/syscalls/syscall_32.tbl,linux-user/i386/syscall_32.tbl \ +arch/x86/entry/syscalls/syscall_64.tbl,linux-user/x86_64/syscall_64.tbl \ +arch/xtensa/kernel/syscalls/syscall.tbl,linux-user/xtensa/syscall.tbl\ +" + +linux="$1" +output="$2" + +if [ -z "$linux" ] || ! [ -d "$linux" ]; then + cat << EOF +usage: update-syscalltbl.sh LINUX_PATH [OUTPUT_PATH] + +LINUX_PATH Linux kernel directory to obtain the syscall.tbl from +OUTPUT_PATH output directory, usually the qemu source tree (default: $PWD) +EOF + exit 1 +fi + +if [ -z "$output" ]; then + output="$PWD" +fi + +for entry in $TBL_LIST; do + OFS="$IFS" + IFS=, + set $entry + src=$1 + dst=$2 + IFS="$OFS" + if ! cp "$linux/$src" "$output/$dst" ; then + echo "Cannot copy $linux/$src to $output/$dst" 1>&2 + exit 1 + fi +done + From 28b7d5fd59c158eeaf814f92da385f6986de5c66 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:34:01 +0100 Subject: [PATCH 26/32] linux-user: update syscall.tbl from linux 0bf999f9c5e7 Run scripts/update-syscalltbl.sh with linux commit 0bf999f9c5e7 Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-20-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/arm/syscall.tbl | 2 ++ linux-user/hppa/syscall.tbl | 2 ++ linux-user/i386/syscall_32.tbl | 2 ++ linux-user/m68k/syscall.tbl | 4 +++- linux-user/microblaze/syscall.tbl | 2 ++ linux-user/mips/syscall_o32.tbl | 2 ++ linux-user/mips64/syscall_n32.tbl | 2 ++ linux-user/mips64/syscall_n64.tbl | 2 ++ linux-user/ppc/syscall.tbl | 2 ++ linux-user/s390x/syscall.tbl | 2 ++ linux-user/sh4/syscall.tbl | 2 ++ linux-user/sparc/syscall.tbl | 2 ++ linux-user/sparc64/syscall.tbl | 2 ++ linux-user/x86_64/syscall_64.tbl | 2 ++ linux-user/xtensa/syscall.tbl | 2 ++ 15 files changed, 31 insertions(+), 1 deletion(-) diff --git a/linux-user/arm/syscall.tbl b/linux-user/arm/syscall.tbl index 6da7dc4d79..4d1cf74a2c 100644 --- a/linux-user/arm/syscall.tbl +++ b/linux-user/arm/syscall.tbl @@ -449,3 +449,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open 435 common clone3 sys_clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/hppa/syscall.tbl b/linux-user/hppa/syscall.tbl index 285ff51615..52a15f5cd1 100644 --- a/linux-user/hppa/syscall.tbl +++ b/linux-user/hppa/syscall.tbl @@ -433,3 +433,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open 435 common clone3 sys_clone3_wrapper +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/i386/syscall_32.tbl b/linux-user/i386/syscall_32.tbl index 15908eb9b1..c17cb77eb1 100644 --- a/linux-user/i386/syscall_32.tbl +++ b/linux-user/i386/syscall_32.tbl @@ -440,3 +440,5 @@ 433 i386 fspick sys_fspick __ia32_sys_fspick 434 i386 pidfd_open sys_pidfd_open __ia32_sys_pidfd_open 435 i386 clone3 sys_clone3 __ia32_sys_clone3 +437 i386 openat2 sys_openat2 __ia32_sys_openat2 +438 i386 pidfd_getfd sys_pidfd_getfd __ia32_sys_pidfd_getfd diff --git a/linux-user/m68k/syscall.tbl b/linux-user/m68k/syscall.tbl index a88a285a0e..f4f49fcb76 100644 --- a/linux-user/m68k/syscall.tbl +++ b/linux-user/m68k/syscall.tbl @@ -434,4 +434,6 @@ 432 common fsmount sys_fsmount 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open -# 435 reserved for clone3 +435 common clone3 __sys_clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/microblaze/syscall.tbl b/linux-user/microblaze/syscall.tbl index 09b0cd7dab..4c67b11f9c 100644 --- a/linux-user/microblaze/syscall.tbl +++ b/linux-user/microblaze/syscall.tbl @@ -441,3 +441,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open 435 common clone3 sys_clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/mips/syscall_o32.tbl b/linux-user/mips/syscall_o32.tbl index 353539ea41..ac586774c9 100644 --- a/linux-user/mips/syscall_o32.tbl +++ b/linux-user/mips/syscall_o32.tbl @@ -423,3 +423,5 @@ 433 o32 fspick sys_fspick 434 o32 pidfd_open sys_pidfd_open 435 o32 clone3 __sys_clone3 +437 o32 openat2 sys_openat2 +438 o32 pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/mips64/syscall_n32.tbl b/linux-user/mips64/syscall_n32.tbl index e7c5ab38e4..1f9e8ad636 100644 --- a/linux-user/mips64/syscall_n32.tbl +++ b/linux-user/mips64/syscall_n32.tbl @@ -374,3 +374,5 @@ 433 n32 fspick sys_fspick 434 n32 pidfd_open sys_pidfd_open 435 n32 clone3 __sys_clone3 +437 n32 openat2 sys_openat2 +438 n32 pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/mips64/syscall_n64.tbl b/linux-user/mips64/syscall_n64.tbl index 13cd66581f..c0b9d802db 100644 --- a/linux-user/mips64/syscall_n64.tbl +++ b/linux-user/mips64/syscall_n64.tbl @@ -350,3 +350,5 @@ 433 n64 fspick sys_fspick 434 n64 pidfd_open sys_pidfd_open 435 n64 clone3 __sys_clone3 +437 n64 openat2 sys_openat2 +438 n64 pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/ppc/syscall.tbl b/linux-user/ppc/syscall.tbl index 43f736ed47..35b61bfc1b 100644 --- a/linux-user/ppc/syscall.tbl +++ b/linux-user/ppc/syscall.tbl @@ -517,3 +517,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open 435 nospu clone3 ppc_clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/s390x/syscall.tbl b/linux-user/s390x/syscall.tbl index 3054e9c035..bd7bd3581a 100644 --- a/linux-user/s390x/syscall.tbl +++ b/linux-user/s390x/syscall.tbl @@ -438,3 +438,5 @@ 433 common fspick sys_fspick sys_fspick 434 common pidfd_open sys_pidfd_open sys_pidfd_open 435 common clone3 sys_clone3 sys_clone3 +437 common openat2 sys_openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/sh4/syscall.tbl b/linux-user/sh4/syscall.tbl index b5ed26c4c0..c7a30fcd13 100644 --- a/linux-user/sh4/syscall.tbl +++ b/linux-user/sh4/syscall.tbl @@ -438,3 +438,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open # 435 reserved for clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/sparc/syscall.tbl b/linux-user/sparc/syscall.tbl index 8c8cc7537f..f13615ecde 100644 --- a/linux-user/sparc/syscall.tbl +++ b/linux-user/sparc/syscall.tbl @@ -481,3 +481,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open # 435 reserved for clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/sparc64/syscall.tbl b/linux-user/sparc64/syscall.tbl index 8c8cc7537f..f13615ecde 100644 --- a/linux-user/sparc64/syscall.tbl +++ b/linux-user/sparc64/syscall.tbl @@ -481,3 +481,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open # 435 reserved for clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd diff --git a/linux-user/x86_64/syscall_64.tbl b/linux-user/x86_64/syscall_64.tbl index c29976eca4..44d510bc9b 100644 --- a/linux-user/x86_64/syscall_64.tbl +++ b/linux-user/x86_64/syscall_64.tbl @@ -357,6 +357,8 @@ 433 common fspick __x64_sys_fspick 434 common pidfd_open __x64_sys_pidfd_open 435 common clone3 __x64_sys_clone3/ptregs +437 common openat2 __x64_sys_openat2 +438 common pidfd_getfd __x64_sys_pidfd_getfd # # x32-specific system call numbers start at 512 to avoid cache impact diff --git a/linux-user/xtensa/syscall.tbl b/linux-user/xtensa/syscall.tbl index 25f4de729a..85a9ab1bc0 100644 --- a/linux-user/xtensa/syscall.tbl +++ b/linux-user/xtensa/syscall.tbl @@ -406,3 +406,5 @@ 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open 435 common clone3 sys_clone3 +437 common openat2 sys_openat2 +438 common pidfd_getfd sys_pidfd_getfd From ac5d3c670a7ce1ba8c695f99c0027a8e55355e50 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:34:02 +0100 Subject: [PATCH 27/32] linux-user,mips: move content of mips_syscall_args Move content of mips_syscall_args to mips-syscall-args-o32.c.inc to ease automatic update. No functionnal change Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-21-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/mips/cpu_loop.c | 440 +------------------------ linux-user/mips/syscall-args-o32.c.inc | 438 ++++++++++++++++++++++++ 2 files changed, 439 insertions(+), 439 deletions(-) create mode 100644 linux-user/mips/syscall-args-o32.c.inc diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 396367d81d..553e8ca7f5 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -26,447 +26,9 @@ # ifdef TARGET_ABI_MIPSO32 # define MIPS_SYSCALL_NUMBER_UNUSED -1 -# define MIPS_SYS(name, args) args, static const int8_t mips_syscall_args[] = { - MIPS_SYS(sys_syscall , 8) /* 4000 */ - MIPS_SYS(sys_exit , 1) - MIPS_SYS(sys_fork , 0) - MIPS_SYS(sys_read , 3) - MIPS_SYS(sys_write , 3) - MIPS_SYS(sys_open , 3) /* 4005 */ - MIPS_SYS(sys_close , 1) - MIPS_SYS(sys_waitpid , 3) - MIPS_SYS(sys_creat , 2) - MIPS_SYS(sys_link , 2) - MIPS_SYS(sys_unlink , 1) /* 4010 */ - MIPS_SYS(sys_execve , 0) - MIPS_SYS(sys_chdir , 1) - MIPS_SYS(sys_time , 1) - MIPS_SYS(sys_mknod , 3) - MIPS_SYS(sys_chmod , 2) /* 4015 */ - MIPS_SYS(sys_lchown , 3) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_stat */ - MIPS_SYS(sys_lseek , 3) - MIPS_SYS(sys_getpid , 0) /* 4020 */ - MIPS_SYS(sys_mount , 5) - MIPS_SYS(sys_umount , 1) - MIPS_SYS(sys_setuid , 1) - MIPS_SYS(sys_getuid , 0) - MIPS_SYS(sys_stime , 1) /* 4025 */ - MIPS_SYS(sys_ptrace , 4) - MIPS_SYS(sys_alarm , 1) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_fstat */ - MIPS_SYS(sys_pause , 0) - MIPS_SYS(sys_utime , 2) /* 4030 */ - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_access , 2) - MIPS_SYS(sys_nice , 1) - MIPS_SYS(sys_ni_syscall , 0) /* 4035 */ - MIPS_SYS(sys_sync , 0) - MIPS_SYS(sys_kill , 2) - MIPS_SYS(sys_rename , 2) - MIPS_SYS(sys_mkdir , 2) - MIPS_SYS(sys_rmdir , 1) /* 4040 */ - MIPS_SYS(sys_dup , 1) - MIPS_SYS(sys_pipe , 0) - MIPS_SYS(sys_times , 1) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_brk , 1) /* 4045 */ - MIPS_SYS(sys_setgid , 1) - MIPS_SYS(sys_getgid , 0) - MIPS_SYS(sys_ni_syscall , 0) /* was signal(2) */ - MIPS_SYS(sys_geteuid , 0) - MIPS_SYS(sys_getegid , 0) /* 4050 */ - MIPS_SYS(sys_acct , 0) - MIPS_SYS(sys_umount2 , 2) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ioctl , 3) - MIPS_SYS(sys_fcntl , 3) /* 4055 */ - MIPS_SYS(sys_ni_syscall , 2) - MIPS_SYS(sys_setpgid , 2) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_olduname , 1) - MIPS_SYS(sys_umask , 1) /* 4060 */ - MIPS_SYS(sys_chroot , 1) - MIPS_SYS(sys_ustat , 2) - MIPS_SYS(sys_dup2 , 2) - MIPS_SYS(sys_getppid , 0) - MIPS_SYS(sys_getpgrp , 0) /* 4065 */ - MIPS_SYS(sys_setsid , 0) - MIPS_SYS(sys_sigaction , 3) - MIPS_SYS(sys_sgetmask , 0) - MIPS_SYS(sys_ssetmask , 1) - MIPS_SYS(sys_setreuid , 2) /* 4070 */ - MIPS_SYS(sys_setregid , 2) - MIPS_SYS(sys_sigsuspend , 0) - MIPS_SYS(sys_sigpending , 1) - MIPS_SYS(sys_sethostname , 2) - MIPS_SYS(sys_setrlimit , 2) /* 4075 */ - MIPS_SYS(sys_getrlimit , 2) - MIPS_SYS(sys_getrusage , 2) - MIPS_SYS(sys_gettimeofday, 2) - MIPS_SYS(sys_settimeofday, 2) - MIPS_SYS(sys_getgroups , 2) /* 4080 */ - MIPS_SYS(sys_setgroups , 2) - MIPS_SYS(sys_ni_syscall , 0) /* old_select */ - MIPS_SYS(sys_symlink , 2) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_lstat */ - MIPS_SYS(sys_readlink , 3) /* 4085 */ - MIPS_SYS(sys_uselib , 1) - MIPS_SYS(sys_swapon , 2) - MIPS_SYS(sys_reboot , 3) - MIPS_SYS(old_readdir , 3) - MIPS_SYS(old_mmap , 6) /* 4090 */ - MIPS_SYS(sys_munmap , 2) - MIPS_SYS(sys_truncate , 2) - MIPS_SYS(sys_ftruncate , 2) - MIPS_SYS(sys_fchmod , 2) - MIPS_SYS(sys_fchown , 3) /* 4095 */ - MIPS_SYS(sys_getpriority , 2) - MIPS_SYS(sys_setpriority , 3) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_statfs , 2) - MIPS_SYS(sys_fstatfs , 2) /* 4100 */ - MIPS_SYS(sys_ni_syscall , 0) /* was ioperm(2) */ - MIPS_SYS(sys_socketcall , 2) - MIPS_SYS(sys_syslog , 3) - MIPS_SYS(sys_setitimer , 3) - MIPS_SYS(sys_getitimer , 2) /* 4105 */ - MIPS_SYS(sys_newstat , 2) - MIPS_SYS(sys_newlstat , 2) - MIPS_SYS(sys_newfstat , 2) - MIPS_SYS(sys_uname , 1) - MIPS_SYS(sys_ni_syscall , 0) /* 4110 was iopl(2) */ - MIPS_SYS(sys_vhangup , 0) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_idle() */ - MIPS_SYS(sys_ni_syscall , 0) /* was sys_vm86 */ - MIPS_SYS(sys_wait4 , 4) - MIPS_SYS(sys_swapoff , 1) /* 4115 */ - MIPS_SYS(sys_sysinfo , 1) - MIPS_SYS(sys_ipc , 6) - MIPS_SYS(sys_fsync , 1) - MIPS_SYS(sys_sigreturn , 0) - MIPS_SYS(sys_clone , 6) /* 4120 */ - MIPS_SYS(sys_setdomainname, 2) - MIPS_SYS(sys_newuname , 1) - MIPS_SYS(sys_ni_syscall , 0) /* sys_modify_ldt */ - MIPS_SYS(sys_adjtimex , 1) - MIPS_SYS(sys_mprotect , 3) /* 4125 */ - MIPS_SYS(sys_sigprocmask , 3) - MIPS_SYS(sys_ni_syscall , 0) /* was create_module */ - MIPS_SYS(sys_init_module , 5) - MIPS_SYS(sys_delete_module, 1) - MIPS_SYS(sys_ni_syscall , 0) /* 4130 was get_kernel_syms */ - MIPS_SYS(sys_quotactl , 0) - MIPS_SYS(sys_getpgid , 1) - MIPS_SYS(sys_fchdir , 1) - MIPS_SYS(sys_bdflush , 2) - MIPS_SYS(sys_sysfs , 3) /* 4135 */ - MIPS_SYS(sys_personality , 1) - MIPS_SYS(sys_ni_syscall , 0) /* for afs_syscall */ - MIPS_SYS(sys_setfsuid , 1) - MIPS_SYS(sys_setfsgid , 1) - MIPS_SYS(sys_llseek , 5) /* 4140 */ - MIPS_SYS(sys_getdents , 3) - MIPS_SYS(sys_select , 5) - MIPS_SYS(sys_flock , 2) - MIPS_SYS(sys_msync , 3) - MIPS_SYS(sys_readv , 3) /* 4145 */ - MIPS_SYS(sys_writev , 3) - MIPS_SYS(sys_cacheflush , 3) - MIPS_SYS(sys_cachectl , 3) - MIPS_SYS(sys_sysmips , 4) - MIPS_SYS(sys_ni_syscall , 0) /* 4150 */ - MIPS_SYS(sys_getsid , 1) - MIPS_SYS(sys_fdatasync , 0) - MIPS_SYS(sys_sysctl , 1) - MIPS_SYS(sys_mlock , 2) - MIPS_SYS(sys_munlock , 2) /* 4155 */ - MIPS_SYS(sys_mlockall , 1) - MIPS_SYS(sys_munlockall , 0) - MIPS_SYS(sys_sched_setparam, 2) - MIPS_SYS(sys_sched_getparam, 2) - MIPS_SYS(sys_sched_setscheduler, 3) /* 4160 */ - MIPS_SYS(sys_sched_getscheduler, 1) - MIPS_SYS(sys_sched_yield , 0) - MIPS_SYS(sys_sched_get_priority_max, 1) - MIPS_SYS(sys_sched_get_priority_min, 1) - MIPS_SYS(sys_sched_rr_get_interval, 2) /* 4165 */ - MIPS_SYS(sys_nanosleep, 2) - MIPS_SYS(sys_mremap , 5) - MIPS_SYS(sys_accept , 3) - MIPS_SYS(sys_bind , 3) - MIPS_SYS(sys_connect , 3) /* 4170 */ - MIPS_SYS(sys_getpeername , 3) - MIPS_SYS(sys_getsockname , 3) - MIPS_SYS(sys_getsockopt , 5) - MIPS_SYS(sys_listen , 2) - MIPS_SYS(sys_recv , 4) /* 4175 */ - MIPS_SYS(sys_recvfrom , 6) - MIPS_SYS(sys_recvmsg , 3) - MIPS_SYS(sys_send , 4) - MIPS_SYS(sys_sendmsg , 3) - MIPS_SYS(sys_sendto , 6) /* 4180 */ - MIPS_SYS(sys_setsockopt , 5) - MIPS_SYS(sys_shutdown , 2) - MIPS_SYS(sys_socket , 3) - MIPS_SYS(sys_socketpair , 4) - MIPS_SYS(sys_setresuid , 3) /* 4185 */ - MIPS_SYS(sys_getresuid , 3) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_query_module */ - MIPS_SYS(sys_poll , 3) - MIPS_SYS(sys_nfsservctl , 3) - MIPS_SYS(sys_setresgid , 3) /* 4190 */ - MIPS_SYS(sys_getresgid , 3) - MIPS_SYS(sys_prctl , 5) - MIPS_SYS(sys_rt_sigreturn, 0) - MIPS_SYS(sys_rt_sigaction, 4) - MIPS_SYS(sys_rt_sigprocmask, 4) /* 4195 */ - MIPS_SYS(sys_rt_sigpending, 2) - MIPS_SYS(sys_rt_sigtimedwait, 4) - MIPS_SYS(sys_rt_sigqueueinfo, 3) - MIPS_SYS(sys_rt_sigsuspend, 0) - MIPS_SYS(sys_pread64 , 6) /* 4200 */ - MIPS_SYS(sys_pwrite64 , 6) - MIPS_SYS(sys_chown , 3) - MIPS_SYS(sys_getcwd , 2) - MIPS_SYS(sys_capget , 2) - MIPS_SYS(sys_capset , 2) /* 4205 */ - MIPS_SYS(sys_sigaltstack , 2) - MIPS_SYS(sys_sendfile , 4) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_mmap2 , 6) /* 4210 */ - MIPS_SYS(sys_truncate64 , 4) - MIPS_SYS(sys_ftruncate64 , 4) - MIPS_SYS(sys_stat64 , 2) - MIPS_SYS(sys_lstat64 , 2) - MIPS_SYS(sys_fstat64 , 2) /* 4215 */ - MIPS_SYS(sys_pivot_root , 2) - MIPS_SYS(sys_mincore , 3) - MIPS_SYS(sys_madvise , 3) - MIPS_SYS(sys_getdents64 , 3) - MIPS_SYS(sys_fcntl64 , 3) /* 4220 */ - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_gettid , 0) - MIPS_SYS(sys_readahead , 5) - MIPS_SYS(sys_setxattr , 5) - MIPS_SYS(sys_lsetxattr , 5) /* 4225 */ - MIPS_SYS(sys_fsetxattr , 5) - MIPS_SYS(sys_getxattr , 4) - MIPS_SYS(sys_lgetxattr , 4) - MIPS_SYS(sys_fgetxattr , 4) - MIPS_SYS(sys_listxattr , 3) /* 4230 */ - MIPS_SYS(sys_llistxattr , 3) - MIPS_SYS(sys_flistxattr , 3) - MIPS_SYS(sys_removexattr , 2) - MIPS_SYS(sys_lremovexattr, 2) - MIPS_SYS(sys_fremovexattr, 2) /* 4235 */ - MIPS_SYS(sys_tkill , 2) - MIPS_SYS(sys_sendfile64 , 5) - MIPS_SYS(sys_futex , 6) - MIPS_SYS(sys_sched_setaffinity, 3) - MIPS_SYS(sys_sched_getaffinity, 3) /* 4240 */ - MIPS_SYS(sys_io_setup , 2) - MIPS_SYS(sys_io_destroy , 1) - MIPS_SYS(sys_io_getevents, 5) - MIPS_SYS(sys_io_submit , 3) - MIPS_SYS(sys_io_cancel , 3) /* 4245 */ - MIPS_SYS(sys_exit_group , 1) - MIPS_SYS(sys_lookup_dcookie, 3) - MIPS_SYS(sys_epoll_create, 1) - MIPS_SYS(sys_epoll_ctl , 4) - MIPS_SYS(sys_epoll_wait , 3) /* 4250 */ - MIPS_SYS(sys_remap_file_pages, 5) - MIPS_SYS(sys_set_tid_address, 1) - MIPS_SYS(sys_restart_syscall, 0) - MIPS_SYS(sys_fadvise64_64, 7) - MIPS_SYS(sys_statfs64 , 3) /* 4255 */ - MIPS_SYS(sys_fstatfs64 , 2) - MIPS_SYS(sys_timer_create, 3) - MIPS_SYS(sys_timer_settime, 4) - MIPS_SYS(sys_timer_gettime, 2) - MIPS_SYS(sys_timer_getoverrun, 1) /* 4260 */ - MIPS_SYS(sys_timer_delete, 1) - MIPS_SYS(sys_clock_settime, 2) - MIPS_SYS(sys_clock_gettime, 2) - MIPS_SYS(sys_clock_getres, 2) - MIPS_SYS(sys_clock_nanosleep, 4) /* 4265 */ - MIPS_SYS(sys_tgkill , 3) - MIPS_SYS(sys_utimes , 2) - MIPS_SYS(sys_mbind , 4) - MIPS_SYS(sys_ni_syscall , 0) /* sys_get_mempolicy */ - MIPS_SYS(sys_ni_syscall , 0) /* 4270 sys_set_mempolicy */ - MIPS_SYS(sys_mq_open , 4) - MIPS_SYS(sys_mq_unlink , 1) - MIPS_SYS(sys_mq_timedsend, 5) - MIPS_SYS(sys_mq_timedreceive, 5) - MIPS_SYS(sys_mq_notify , 2) /* 4275 */ - MIPS_SYS(sys_mq_getsetattr, 3) - MIPS_SYS(sys_ni_syscall , 0) /* sys_vserver */ - MIPS_SYS(sys_waitid , 4) - MIPS_SYS(sys_ni_syscall , 0) /* available, was setaltroot */ - MIPS_SYS(sys_add_key , 5) - MIPS_SYS(sys_request_key, 4) - MIPS_SYS(sys_keyctl , 5) - MIPS_SYS(sys_set_thread_area, 1) - MIPS_SYS(sys_inotify_init, 0) - MIPS_SYS(sys_inotify_add_watch, 3) /* 4285 */ - MIPS_SYS(sys_inotify_rm_watch, 2) - MIPS_SYS(sys_migrate_pages, 4) - MIPS_SYS(sys_openat, 4) - MIPS_SYS(sys_mkdirat, 3) - MIPS_SYS(sys_mknodat, 4) /* 4290 */ - MIPS_SYS(sys_fchownat, 5) - MIPS_SYS(sys_futimesat, 3) - MIPS_SYS(sys_fstatat64, 4) - MIPS_SYS(sys_unlinkat, 3) - MIPS_SYS(sys_renameat, 4) /* 4295 */ - MIPS_SYS(sys_linkat, 5) - MIPS_SYS(sys_symlinkat, 3) - MIPS_SYS(sys_readlinkat, 4) - MIPS_SYS(sys_fchmodat, 3) - MIPS_SYS(sys_faccessat, 3) /* 4300 */ - MIPS_SYS(sys_pselect6, 6) - MIPS_SYS(sys_ppoll, 5) - MIPS_SYS(sys_unshare, 1) - MIPS_SYS(sys_splice, 6) - MIPS_SYS(sys_sync_file_range, 7) /* 4305 */ - MIPS_SYS(sys_tee, 4) - MIPS_SYS(sys_vmsplice, 4) - MIPS_SYS(sys_move_pages, 6) - MIPS_SYS(sys_set_robust_list, 2) - MIPS_SYS(sys_get_robust_list, 3) /* 4310 */ - MIPS_SYS(sys_kexec_load, 4) - MIPS_SYS(sys_getcpu, 3) - MIPS_SYS(sys_epoll_pwait, 6) - MIPS_SYS(sys_ioprio_set, 3) - MIPS_SYS(sys_ioprio_get, 2) - MIPS_SYS(sys_utimensat, 4) - MIPS_SYS(sys_signalfd, 3) - MIPS_SYS(sys_ni_syscall, 0) /* was timerfd */ - MIPS_SYS(sys_eventfd, 1) - MIPS_SYS(sys_fallocate, 6) /* 4320 */ - MIPS_SYS(sys_timerfd_create, 2) - MIPS_SYS(sys_timerfd_gettime, 2) - MIPS_SYS(sys_timerfd_settime, 4) - MIPS_SYS(sys_signalfd4, 4) - MIPS_SYS(sys_eventfd2, 2) /* 4325 */ - MIPS_SYS(sys_epoll_create1, 1) - MIPS_SYS(sys_dup3, 3) - MIPS_SYS(sys_pipe2, 2) - MIPS_SYS(sys_inotify_init1, 1) - MIPS_SYS(sys_preadv, 5) /* 4330 */ - MIPS_SYS(sys_pwritev, 5) - MIPS_SYS(sys_rt_tgsigqueueinfo, 4) - MIPS_SYS(sys_perf_event_open, 5) - MIPS_SYS(sys_accept4, 4) - MIPS_SYS(sys_recvmmsg, 5) /* 4335 */ - MIPS_SYS(sys_fanotify_init, 2) - MIPS_SYS(sys_fanotify_mark, 6) - MIPS_SYS(sys_prlimit64, 4) - MIPS_SYS(sys_name_to_handle_at, 5) - MIPS_SYS(sys_open_by_handle_at, 3) /* 4340 */ - MIPS_SYS(sys_clock_adjtime, 2) - MIPS_SYS(sys_syncfs, 1) - MIPS_SYS(sys_sendmmsg, 4) - MIPS_SYS(sys_setns, 2) - MIPS_SYS(sys_process_vm_readv, 6) /* 345 */ - MIPS_SYS(sys_process_vm_writev, 6) - MIPS_SYS(sys_kcmp, 5) - MIPS_SYS(sys_finit_module, 3) - MIPS_SYS(sys_sched_setattr, 2) - MIPS_SYS(sys_sched_getattr, 3) /* 350 */ - MIPS_SYS(sys_renameat2, 5) - MIPS_SYS(sys_seccomp, 3) - MIPS_SYS(sys_getrandom, 3) - MIPS_SYS(sys_memfd_create, 2) - MIPS_SYS(sys_bpf, 3) /* 355 */ - MIPS_SYS(sys_execveat, 5) - MIPS_SYS(sys_userfaultfd, 1) - MIPS_SYS(sys_membarrier, 2) - MIPS_SYS(sys_mlock2, 3) - MIPS_SYS(sys_copy_file_range, 6) /* 360 */ - MIPS_SYS(sys_preadv2, 6) - MIPS_SYS(sys_pwritev2, 6) - MIPS_SYS(sys_pkey_mprotect, 4) - MIPS_SYS(sys_pkey_alloc, 2) - MIPS_SYS(sys_pkey_free, 1) /* 365 */ - MIPS_SYS(sys_statx, 5) - MIPS_SYS(sys_rseq, 4) - MIPS_SYS(sys_io_pgetevents, 6) - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 370 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 375 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 380 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 385 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 390 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYS(sys_semget, 3) - MIPS_SYS(sys_semctl, 4) - MIPS_SYS(sys_shmget, 3) /* 395 */ - MIPS_SYS(sys_shmctl, 3) - MIPS_SYS(sys_shmat, 3) - MIPS_SYS(sys_shmdt, 1) - MIPS_SYS(sys_msgget, 2) - MIPS_SYS(sys_msgsnd, 4) /* 400 */ - MIPS_SYS(sys_msgrcv, 5) - MIPS_SYS(sys_msgctl, 3) - MIPS_SYS(sys_clock_gettime64, 2) - MIPS_SYS(sys_clock_settime64, 2) - MIPS_SYS(sys_clock_adjtime64, 2) /* 405 */ - MIPS_SYS(sys_clock_getres_time64, 2) - MIPS_SYS(sys_clock_nanosleep_time64, 4) - MIPS_SYS(sys_timer_gettime64, 2) - MIPS_SYS(sys_timer_settime64, 4) - MIPS_SYS(sys_timerfd_gettime64, 2) /* 410 */ - MIPS_SYS(sys_timerfd_settime64, 4) - MIPS_SYS(sys_utimensat_time64, 4) - MIPS_SYS(sys_pselect6_time64, 6) - MIPS_SYS(sys_ppoll_time64, 5) - MIPS_SYSCALL_NUMBER_UNUSED, /* 415 */ - MIPS_SYS(sys_io_pgetevents_time64, 6) - MIPS_SYS(sys_recvmmsg_time64, 5) - MIPS_SYS(sys_mq_timedsend_time64, 5) - MIPS_SYS(sys_mq_timedreceive_time64, 5) - MIPS_SYS(sys_semtimedop_time64, 4) /* 420 */ - MIPS_SYS(sys_rt_sigtimedwait_time64, 4) - MIPS_SYS(sys_futex_time64, 6) - MIPS_SYS(sys_sched_rr_get_interval_time64, 2) - MIPS_SYS(sys_pidfd_send_signal, 4) - MIPS_SYS(sys_io_uring_setup, 2) /* 425 */ - MIPS_SYS(sys_io_uring_enter, 6) - MIPS_SYS(sys_io_uring_register, 4) - MIPS_SYS(sys_open_tree, 3) - MIPS_SYS(sys_move_mount, 5) - MIPS_SYS(sys_fsopen, 2) /* 430 */ - MIPS_SYS(sys_fsconfig, 5) - MIPS_SYS(sys_fsmount, 3) - MIPS_SYS(sys_fspick, 3) - MIPS_SYS(sys_pidfd_open, 2) - MIPS_SYS(sys_clone3, 2) /* 435 */ - +#include "syscall-args-o32.c.inc" }; -# undef MIPS_SYS # endif /* O32 */ /* Break codes */ diff --git a/linux-user/mips/syscall-args-o32.c.inc b/linux-user/mips/syscall-args-o32.c.inc new file mode 100644 index 0000000000..f060b06144 --- /dev/null +++ b/linux-user/mips/syscall-args-o32.c.inc @@ -0,0 +1,438 @@ +# define MIPS_SYS(name, args) args, + MIPS_SYS(sys_syscall , 8) /* 4000 */ + MIPS_SYS(sys_exit , 1) + MIPS_SYS(sys_fork , 0) + MIPS_SYS(sys_read , 3) + MIPS_SYS(sys_write , 3) + MIPS_SYS(sys_open , 3) /* 4005 */ + MIPS_SYS(sys_close , 1) + MIPS_SYS(sys_waitpid , 3) + MIPS_SYS(sys_creat , 2) + MIPS_SYS(sys_link , 2) + MIPS_SYS(sys_unlink , 1) /* 4010 */ + MIPS_SYS(sys_execve , 0) + MIPS_SYS(sys_chdir , 1) + MIPS_SYS(sys_time , 1) + MIPS_SYS(sys_mknod , 3) + MIPS_SYS(sys_chmod , 2) /* 4015 */ + MIPS_SYS(sys_lchown , 3) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_ni_syscall , 0) /* was sys_stat */ + MIPS_SYS(sys_lseek , 3) + MIPS_SYS(sys_getpid , 0) /* 4020 */ + MIPS_SYS(sys_mount , 5) + MIPS_SYS(sys_umount , 1) + MIPS_SYS(sys_setuid , 1) + MIPS_SYS(sys_getuid , 0) + MIPS_SYS(sys_stime , 1) /* 4025 */ + MIPS_SYS(sys_ptrace , 4) + MIPS_SYS(sys_alarm , 1) + MIPS_SYS(sys_ni_syscall , 0) /* was sys_fstat */ + MIPS_SYS(sys_pause , 0) + MIPS_SYS(sys_utime , 2) /* 4030 */ + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_access , 2) + MIPS_SYS(sys_nice , 1) + MIPS_SYS(sys_ni_syscall , 0) /* 4035 */ + MIPS_SYS(sys_sync , 0) + MIPS_SYS(sys_kill , 2) + MIPS_SYS(sys_rename , 2) + MIPS_SYS(sys_mkdir , 2) + MIPS_SYS(sys_rmdir , 1) /* 4040 */ + MIPS_SYS(sys_dup , 1) + MIPS_SYS(sys_pipe , 0) + MIPS_SYS(sys_times , 1) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_brk , 1) /* 4045 */ + MIPS_SYS(sys_setgid , 1) + MIPS_SYS(sys_getgid , 0) + MIPS_SYS(sys_ni_syscall , 0) /* was signal(2) */ + MIPS_SYS(sys_geteuid , 0) + MIPS_SYS(sys_getegid , 0) /* 4050 */ + MIPS_SYS(sys_acct , 0) + MIPS_SYS(sys_umount2 , 2) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_ioctl , 3) + MIPS_SYS(sys_fcntl , 3) /* 4055 */ + MIPS_SYS(sys_ni_syscall , 2) + MIPS_SYS(sys_setpgid , 2) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_olduname , 1) + MIPS_SYS(sys_umask , 1) /* 4060 */ + MIPS_SYS(sys_chroot , 1) + MIPS_SYS(sys_ustat , 2) + MIPS_SYS(sys_dup2 , 2) + MIPS_SYS(sys_getppid , 0) + MIPS_SYS(sys_getpgrp , 0) /* 4065 */ + MIPS_SYS(sys_setsid , 0) + MIPS_SYS(sys_sigaction , 3) + MIPS_SYS(sys_sgetmask , 0) + MIPS_SYS(sys_ssetmask , 1) + MIPS_SYS(sys_setreuid , 2) /* 4070 */ + MIPS_SYS(sys_setregid , 2) + MIPS_SYS(sys_sigsuspend , 0) + MIPS_SYS(sys_sigpending , 1) + MIPS_SYS(sys_sethostname , 2) + MIPS_SYS(sys_setrlimit , 2) /* 4075 */ + MIPS_SYS(sys_getrlimit , 2) + MIPS_SYS(sys_getrusage , 2) + MIPS_SYS(sys_gettimeofday, 2) + MIPS_SYS(sys_settimeofday, 2) + MIPS_SYS(sys_getgroups , 2) /* 4080 */ + MIPS_SYS(sys_setgroups , 2) + MIPS_SYS(sys_ni_syscall , 0) /* old_select */ + MIPS_SYS(sys_symlink , 2) + MIPS_SYS(sys_ni_syscall , 0) /* was sys_lstat */ + MIPS_SYS(sys_readlink , 3) /* 4085 */ + MIPS_SYS(sys_uselib , 1) + MIPS_SYS(sys_swapon , 2) + MIPS_SYS(sys_reboot , 3) + MIPS_SYS(old_readdir , 3) + MIPS_SYS(old_mmap , 6) /* 4090 */ + MIPS_SYS(sys_munmap , 2) + MIPS_SYS(sys_truncate , 2) + MIPS_SYS(sys_ftruncate , 2) + MIPS_SYS(sys_fchmod , 2) + MIPS_SYS(sys_fchown , 3) /* 4095 */ + MIPS_SYS(sys_getpriority , 2) + MIPS_SYS(sys_setpriority , 3) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_statfs , 2) + MIPS_SYS(sys_fstatfs , 2) /* 4100 */ + MIPS_SYS(sys_ni_syscall , 0) /* was ioperm(2) */ + MIPS_SYS(sys_socketcall , 2) + MIPS_SYS(sys_syslog , 3) + MIPS_SYS(sys_setitimer , 3) + MIPS_SYS(sys_getitimer , 2) /* 4105 */ + MIPS_SYS(sys_newstat , 2) + MIPS_SYS(sys_newlstat , 2) + MIPS_SYS(sys_newfstat , 2) + MIPS_SYS(sys_uname , 1) + MIPS_SYS(sys_ni_syscall , 0) /* 4110 was iopl(2) */ + MIPS_SYS(sys_vhangup , 0) + MIPS_SYS(sys_ni_syscall , 0) /* was sys_idle() */ + MIPS_SYS(sys_ni_syscall , 0) /* was sys_vm86 */ + MIPS_SYS(sys_wait4 , 4) + MIPS_SYS(sys_swapoff , 1) /* 4115 */ + MIPS_SYS(sys_sysinfo , 1) + MIPS_SYS(sys_ipc , 6) + MIPS_SYS(sys_fsync , 1) + MIPS_SYS(sys_sigreturn , 0) + MIPS_SYS(sys_clone , 6) /* 4120 */ + MIPS_SYS(sys_setdomainname, 2) + MIPS_SYS(sys_newuname , 1) + MIPS_SYS(sys_ni_syscall , 0) /* sys_modify_ldt */ + MIPS_SYS(sys_adjtimex , 1) + MIPS_SYS(sys_mprotect , 3) /* 4125 */ + MIPS_SYS(sys_sigprocmask , 3) + MIPS_SYS(sys_ni_syscall , 0) /* was create_module */ + MIPS_SYS(sys_init_module , 5) + MIPS_SYS(sys_delete_module, 1) + MIPS_SYS(sys_ni_syscall , 0) /* 4130 was get_kernel_syms */ + MIPS_SYS(sys_quotactl , 0) + MIPS_SYS(sys_getpgid , 1) + MIPS_SYS(sys_fchdir , 1) + MIPS_SYS(sys_bdflush , 2) + MIPS_SYS(sys_sysfs , 3) /* 4135 */ + MIPS_SYS(sys_personality , 1) + MIPS_SYS(sys_ni_syscall , 0) /* for afs_syscall */ + MIPS_SYS(sys_setfsuid , 1) + MIPS_SYS(sys_setfsgid , 1) + MIPS_SYS(sys_llseek , 5) /* 4140 */ + MIPS_SYS(sys_getdents , 3) + MIPS_SYS(sys_select , 5) + MIPS_SYS(sys_flock , 2) + MIPS_SYS(sys_msync , 3) + MIPS_SYS(sys_readv , 3) /* 4145 */ + MIPS_SYS(sys_writev , 3) + MIPS_SYS(sys_cacheflush , 3) + MIPS_SYS(sys_cachectl , 3) + MIPS_SYS(sys_sysmips , 4) + MIPS_SYS(sys_ni_syscall , 0) /* 4150 */ + MIPS_SYS(sys_getsid , 1) + MIPS_SYS(sys_fdatasync , 0) + MIPS_SYS(sys_sysctl , 1) + MIPS_SYS(sys_mlock , 2) + MIPS_SYS(sys_munlock , 2) /* 4155 */ + MIPS_SYS(sys_mlockall , 1) + MIPS_SYS(sys_munlockall , 0) + MIPS_SYS(sys_sched_setparam, 2) + MIPS_SYS(sys_sched_getparam, 2) + MIPS_SYS(sys_sched_setscheduler, 3) /* 4160 */ + MIPS_SYS(sys_sched_getscheduler, 1) + MIPS_SYS(sys_sched_yield , 0) + MIPS_SYS(sys_sched_get_priority_max, 1) + MIPS_SYS(sys_sched_get_priority_min, 1) + MIPS_SYS(sys_sched_rr_get_interval, 2) /* 4165 */ + MIPS_SYS(sys_nanosleep, 2) + MIPS_SYS(sys_mremap , 5) + MIPS_SYS(sys_accept , 3) + MIPS_SYS(sys_bind , 3) + MIPS_SYS(sys_connect , 3) /* 4170 */ + MIPS_SYS(sys_getpeername , 3) + MIPS_SYS(sys_getsockname , 3) + MIPS_SYS(sys_getsockopt , 5) + MIPS_SYS(sys_listen , 2) + MIPS_SYS(sys_recv , 4) /* 4175 */ + MIPS_SYS(sys_recvfrom , 6) + MIPS_SYS(sys_recvmsg , 3) + MIPS_SYS(sys_send , 4) + MIPS_SYS(sys_sendmsg , 3) + MIPS_SYS(sys_sendto , 6) /* 4180 */ + MIPS_SYS(sys_setsockopt , 5) + MIPS_SYS(sys_shutdown , 2) + MIPS_SYS(sys_socket , 3) + MIPS_SYS(sys_socketpair , 4) + MIPS_SYS(sys_setresuid , 3) /* 4185 */ + MIPS_SYS(sys_getresuid , 3) + MIPS_SYS(sys_ni_syscall , 0) /* was sys_query_module */ + MIPS_SYS(sys_poll , 3) + MIPS_SYS(sys_nfsservctl , 3) + MIPS_SYS(sys_setresgid , 3) /* 4190 */ + MIPS_SYS(sys_getresgid , 3) + MIPS_SYS(sys_prctl , 5) + MIPS_SYS(sys_rt_sigreturn, 0) + MIPS_SYS(sys_rt_sigaction, 4) + MIPS_SYS(sys_rt_sigprocmask, 4) /* 4195 */ + MIPS_SYS(sys_rt_sigpending, 2) + MIPS_SYS(sys_rt_sigtimedwait, 4) + MIPS_SYS(sys_rt_sigqueueinfo, 3) + MIPS_SYS(sys_rt_sigsuspend, 0) + MIPS_SYS(sys_pread64 , 6) /* 4200 */ + MIPS_SYS(sys_pwrite64 , 6) + MIPS_SYS(sys_chown , 3) + MIPS_SYS(sys_getcwd , 2) + MIPS_SYS(sys_capget , 2) + MIPS_SYS(sys_capset , 2) /* 4205 */ + MIPS_SYS(sys_sigaltstack , 2) + MIPS_SYS(sys_sendfile , 4) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_mmap2 , 6) /* 4210 */ + MIPS_SYS(sys_truncate64 , 4) + MIPS_SYS(sys_ftruncate64 , 4) + MIPS_SYS(sys_stat64 , 2) + MIPS_SYS(sys_lstat64 , 2) + MIPS_SYS(sys_fstat64 , 2) /* 4215 */ + MIPS_SYS(sys_pivot_root , 2) + MIPS_SYS(sys_mincore , 3) + MIPS_SYS(sys_madvise , 3) + MIPS_SYS(sys_getdents64 , 3) + MIPS_SYS(sys_fcntl64 , 3) /* 4220 */ + MIPS_SYS(sys_ni_syscall , 0) + MIPS_SYS(sys_gettid , 0) + MIPS_SYS(sys_readahead , 5) + MIPS_SYS(sys_setxattr , 5) + MIPS_SYS(sys_lsetxattr , 5) /* 4225 */ + MIPS_SYS(sys_fsetxattr , 5) + MIPS_SYS(sys_getxattr , 4) + MIPS_SYS(sys_lgetxattr , 4) + MIPS_SYS(sys_fgetxattr , 4) + MIPS_SYS(sys_listxattr , 3) /* 4230 */ + MIPS_SYS(sys_llistxattr , 3) + MIPS_SYS(sys_flistxattr , 3) + MIPS_SYS(sys_removexattr , 2) + MIPS_SYS(sys_lremovexattr, 2) + MIPS_SYS(sys_fremovexattr, 2) /* 4235 */ + MIPS_SYS(sys_tkill , 2) + MIPS_SYS(sys_sendfile64 , 5) + MIPS_SYS(sys_futex , 6) + MIPS_SYS(sys_sched_setaffinity, 3) + MIPS_SYS(sys_sched_getaffinity, 3) /* 4240 */ + MIPS_SYS(sys_io_setup , 2) + MIPS_SYS(sys_io_destroy , 1) + MIPS_SYS(sys_io_getevents, 5) + MIPS_SYS(sys_io_submit , 3) + MIPS_SYS(sys_io_cancel , 3) /* 4245 */ + MIPS_SYS(sys_exit_group , 1) + MIPS_SYS(sys_lookup_dcookie, 3) + MIPS_SYS(sys_epoll_create, 1) + MIPS_SYS(sys_epoll_ctl , 4) + MIPS_SYS(sys_epoll_wait , 3) /* 4250 */ + MIPS_SYS(sys_remap_file_pages, 5) + MIPS_SYS(sys_set_tid_address, 1) + MIPS_SYS(sys_restart_syscall, 0) + MIPS_SYS(sys_fadvise64_64, 7) + MIPS_SYS(sys_statfs64 , 3) /* 4255 */ + MIPS_SYS(sys_fstatfs64 , 2) + MIPS_SYS(sys_timer_create, 3) + MIPS_SYS(sys_timer_settime, 4) + MIPS_SYS(sys_timer_gettime, 2) + MIPS_SYS(sys_timer_getoverrun, 1) /* 4260 */ + MIPS_SYS(sys_timer_delete, 1) + MIPS_SYS(sys_clock_settime, 2) + MIPS_SYS(sys_clock_gettime, 2) + MIPS_SYS(sys_clock_getres, 2) + MIPS_SYS(sys_clock_nanosleep, 4) /* 4265 */ + MIPS_SYS(sys_tgkill , 3) + MIPS_SYS(sys_utimes , 2) + MIPS_SYS(sys_mbind , 4) + MIPS_SYS(sys_ni_syscall , 0) /* sys_get_mempolicy */ + MIPS_SYS(sys_ni_syscall , 0) /* 4270 sys_set_mempolicy */ + MIPS_SYS(sys_mq_open , 4) + MIPS_SYS(sys_mq_unlink , 1) + MIPS_SYS(sys_mq_timedsend, 5) + MIPS_SYS(sys_mq_timedreceive, 5) + MIPS_SYS(sys_mq_notify , 2) /* 4275 */ + MIPS_SYS(sys_mq_getsetattr, 3) + MIPS_SYS(sys_ni_syscall , 0) /* sys_vserver */ + MIPS_SYS(sys_waitid , 4) + MIPS_SYS(sys_ni_syscall , 0) /* available, was setaltroot */ + MIPS_SYS(sys_add_key , 5) + MIPS_SYS(sys_request_key, 4) + MIPS_SYS(sys_keyctl , 5) + MIPS_SYS(sys_set_thread_area, 1) + MIPS_SYS(sys_inotify_init, 0) + MIPS_SYS(sys_inotify_add_watch, 3) /* 4285 */ + MIPS_SYS(sys_inotify_rm_watch, 2) + MIPS_SYS(sys_migrate_pages, 4) + MIPS_SYS(sys_openat, 4) + MIPS_SYS(sys_mkdirat, 3) + MIPS_SYS(sys_mknodat, 4) /* 4290 */ + MIPS_SYS(sys_fchownat, 5) + MIPS_SYS(sys_futimesat, 3) + MIPS_SYS(sys_fstatat64, 4) + MIPS_SYS(sys_unlinkat, 3) + MIPS_SYS(sys_renameat, 4) /* 4295 */ + MIPS_SYS(sys_linkat, 5) + MIPS_SYS(sys_symlinkat, 3) + MIPS_SYS(sys_readlinkat, 4) + MIPS_SYS(sys_fchmodat, 3) + MIPS_SYS(sys_faccessat, 3) /* 4300 */ + MIPS_SYS(sys_pselect6, 6) + MIPS_SYS(sys_ppoll, 5) + MIPS_SYS(sys_unshare, 1) + MIPS_SYS(sys_splice, 6) + MIPS_SYS(sys_sync_file_range, 7) /* 4305 */ + MIPS_SYS(sys_tee, 4) + MIPS_SYS(sys_vmsplice, 4) + MIPS_SYS(sys_move_pages, 6) + MIPS_SYS(sys_set_robust_list, 2) + MIPS_SYS(sys_get_robust_list, 3) /* 4310 */ + MIPS_SYS(sys_kexec_load, 4) + MIPS_SYS(sys_getcpu, 3) + MIPS_SYS(sys_epoll_pwait, 6) + MIPS_SYS(sys_ioprio_set, 3) + MIPS_SYS(sys_ioprio_get, 2) + MIPS_SYS(sys_utimensat, 4) + MIPS_SYS(sys_signalfd, 3) + MIPS_SYS(sys_ni_syscall, 0) /* was timerfd */ + MIPS_SYS(sys_eventfd, 1) + MIPS_SYS(sys_fallocate, 6) /* 4320 */ + MIPS_SYS(sys_timerfd_create, 2) + MIPS_SYS(sys_timerfd_gettime, 2) + MIPS_SYS(sys_timerfd_settime, 4) + MIPS_SYS(sys_signalfd4, 4) + MIPS_SYS(sys_eventfd2, 2) /* 4325 */ + MIPS_SYS(sys_epoll_create1, 1) + MIPS_SYS(sys_dup3, 3) + MIPS_SYS(sys_pipe2, 2) + MIPS_SYS(sys_inotify_init1, 1) + MIPS_SYS(sys_preadv, 5) /* 4330 */ + MIPS_SYS(sys_pwritev, 5) + MIPS_SYS(sys_rt_tgsigqueueinfo, 4) + MIPS_SYS(sys_perf_event_open, 5) + MIPS_SYS(sys_accept4, 4) + MIPS_SYS(sys_recvmmsg, 5) /* 4335 */ + MIPS_SYS(sys_fanotify_init, 2) + MIPS_SYS(sys_fanotify_mark, 6) + MIPS_SYS(sys_prlimit64, 4) + MIPS_SYS(sys_name_to_handle_at, 5) + MIPS_SYS(sys_open_by_handle_at, 3) /* 4340 */ + MIPS_SYS(sys_clock_adjtime, 2) + MIPS_SYS(sys_syncfs, 1) + MIPS_SYS(sys_sendmmsg, 4) + MIPS_SYS(sys_setns, 2) + MIPS_SYS(sys_process_vm_readv, 6) /* 345 */ + MIPS_SYS(sys_process_vm_writev, 6) + MIPS_SYS(sys_kcmp, 5) + MIPS_SYS(sys_finit_module, 3) + MIPS_SYS(sys_sched_setattr, 2) + MIPS_SYS(sys_sched_getattr, 3) /* 350 */ + MIPS_SYS(sys_renameat2, 5) + MIPS_SYS(sys_seccomp, 3) + MIPS_SYS(sys_getrandom, 3) + MIPS_SYS(sys_memfd_create, 2) + MIPS_SYS(sys_bpf, 3) /* 355 */ + MIPS_SYS(sys_execveat, 5) + MIPS_SYS(sys_userfaultfd, 1) + MIPS_SYS(sys_membarrier, 2) + MIPS_SYS(sys_mlock2, 3) + MIPS_SYS(sys_copy_file_range, 6) /* 360 */ + MIPS_SYS(sys_preadv2, 6) + MIPS_SYS(sys_pwritev2, 6) + MIPS_SYS(sys_pkey_mprotect, 4) + MIPS_SYS(sys_pkey_alloc, 2) + MIPS_SYS(sys_pkey_free, 1) /* 365 */ + MIPS_SYS(sys_statx, 5) + MIPS_SYS(sys_rseq, 4) + MIPS_SYS(sys_io_pgetevents, 6) + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, /* 370 */ + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, /* 375 */ + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, /* 380 */ + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, /* 385 */ + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, /* 390 */ + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYSCALL_NUMBER_UNUSED, + MIPS_SYS(sys_semget, 3) + MIPS_SYS(sys_semctl, 4) + MIPS_SYS(sys_shmget, 3) /* 395 */ + MIPS_SYS(sys_shmctl, 3) + MIPS_SYS(sys_shmat, 3) + MIPS_SYS(sys_shmdt, 1) + MIPS_SYS(sys_msgget, 2) + MIPS_SYS(sys_msgsnd, 4) /* 400 */ + MIPS_SYS(sys_msgrcv, 5) + MIPS_SYS(sys_msgctl, 3) + MIPS_SYS(sys_clock_gettime64, 2) + MIPS_SYS(sys_clock_settime64, 2) + MIPS_SYS(sys_clock_adjtime64, 2) /* 405 */ + MIPS_SYS(sys_clock_getres_time64, 2) + MIPS_SYS(sys_clock_nanosleep_time64, 4) + MIPS_SYS(sys_timer_gettime64, 2) + MIPS_SYS(sys_timer_settime64, 4) + MIPS_SYS(sys_timerfd_gettime64, 2) /* 410 */ + MIPS_SYS(sys_timerfd_settime64, 4) + MIPS_SYS(sys_utimensat_time64, 4) + MIPS_SYS(sys_pselect6_time64, 6) + MIPS_SYS(sys_ppoll_time64, 5) + MIPS_SYSCALL_NUMBER_UNUSED, /* 415 */ + MIPS_SYS(sys_io_pgetevents_time64, 6) + MIPS_SYS(sys_recvmmsg_time64, 5) + MIPS_SYS(sys_mq_timedsend_time64, 5) + MIPS_SYS(sys_mq_timedreceive_time64, 5) + MIPS_SYS(sys_semtimedop_time64, 4) /* 420 */ + MIPS_SYS(sys_rt_sigtimedwait_time64, 4) + MIPS_SYS(sys_futex_time64, 6) + MIPS_SYS(sys_sched_rr_get_interval_time64, 2) + MIPS_SYS(sys_pidfd_send_signal, 4) + MIPS_SYS(sys_io_uring_setup, 2) /* 425 */ + MIPS_SYS(sys_io_uring_enter, 6) + MIPS_SYS(sys_io_uring_register, 4) + MIPS_SYS(sys_open_tree, 3) + MIPS_SYS(sys_move_mount, 5) + MIPS_SYS(sys_fsopen, 2) /* 430 */ + MIPS_SYS(sys_fsconfig, 5) + MIPS_SYS(sys_fsmount, 3) + MIPS_SYS(sys_fspick, 3) + MIPS_SYS(sys_pidfd_open, 2) + MIPS_SYS(sys_clone3, 2) /* 435 */ +# undef MIPS_SYS From 5733333020649bf08ae523e8bac7c8e0db125d0c Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 Mar 2020 11:34:03 +0100 Subject: [PATCH 28/32] linux-user,mips: update syscall-args-o32.c.inc Add a script to update the file from strace github and run it Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-22-laurent@vivier.eu> [lv: added file in MAINTAINERS] Signed-off-by: Laurent Vivier --- MAINTAINERS | 1 + linux-user/mips/syscall-args-o32.c.inc | 874 ++++++++++++------------- scripts/update-mips-syscall-args.sh | 57 ++ 3 files changed, 494 insertions(+), 438 deletions(-) create mode 100755 scripts/update-mips-syscall-args.sh diff --git a/MAINTAINERS b/MAINTAINERS index 709832758e..958e05b27f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2449,6 +2449,7 @@ F: linux-user/ F: default-configs/*-linux-user.mak F: scripts/qemu-binfmt-conf.sh F: scripts/update-syscalltbl.sh +F: scripts/update-mips-syscall-args.sh Tiny Code Generator (TCG) ------------------------- diff --git a/linux-user/mips/syscall-args-o32.c.inc b/linux-user/mips/syscall-args-o32.c.inc index f060b06144..0ad35857b4 100644 --- a/linux-user/mips/syscall-args-o32.c.inc +++ b/linux-user/mips/syscall-args-o32.c.inc @@ -1,438 +1,436 @@ -# define MIPS_SYS(name, args) args, - MIPS_SYS(sys_syscall , 8) /* 4000 */ - MIPS_SYS(sys_exit , 1) - MIPS_SYS(sys_fork , 0) - MIPS_SYS(sys_read , 3) - MIPS_SYS(sys_write , 3) - MIPS_SYS(sys_open , 3) /* 4005 */ - MIPS_SYS(sys_close , 1) - MIPS_SYS(sys_waitpid , 3) - MIPS_SYS(sys_creat , 2) - MIPS_SYS(sys_link , 2) - MIPS_SYS(sys_unlink , 1) /* 4010 */ - MIPS_SYS(sys_execve , 0) - MIPS_SYS(sys_chdir , 1) - MIPS_SYS(sys_time , 1) - MIPS_SYS(sys_mknod , 3) - MIPS_SYS(sys_chmod , 2) /* 4015 */ - MIPS_SYS(sys_lchown , 3) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_stat */ - MIPS_SYS(sys_lseek , 3) - MIPS_SYS(sys_getpid , 0) /* 4020 */ - MIPS_SYS(sys_mount , 5) - MIPS_SYS(sys_umount , 1) - MIPS_SYS(sys_setuid , 1) - MIPS_SYS(sys_getuid , 0) - MIPS_SYS(sys_stime , 1) /* 4025 */ - MIPS_SYS(sys_ptrace , 4) - MIPS_SYS(sys_alarm , 1) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_fstat */ - MIPS_SYS(sys_pause , 0) - MIPS_SYS(sys_utime , 2) /* 4030 */ - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_access , 2) - MIPS_SYS(sys_nice , 1) - MIPS_SYS(sys_ni_syscall , 0) /* 4035 */ - MIPS_SYS(sys_sync , 0) - MIPS_SYS(sys_kill , 2) - MIPS_SYS(sys_rename , 2) - MIPS_SYS(sys_mkdir , 2) - MIPS_SYS(sys_rmdir , 1) /* 4040 */ - MIPS_SYS(sys_dup , 1) - MIPS_SYS(sys_pipe , 0) - MIPS_SYS(sys_times , 1) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_brk , 1) /* 4045 */ - MIPS_SYS(sys_setgid , 1) - MIPS_SYS(sys_getgid , 0) - MIPS_SYS(sys_ni_syscall , 0) /* was signal(2) */ - MIPS_SYS(sys_geteuid , 0) - MIPS_SYS(sys_getegid , 0) /* 4050 */ - MIPS_SYS(sys_acct , 0) - MIPS_SYS(sys_umount2 , 2) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ioctl , 3) - MIPS_SYS(sys_fcntl , 3) /* 4055 */ - MIPS_SYS(sys_ni_syscall , 2) - MIPS_SYS(sys_setpgid , 2) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_olduname , 1) - MIPS_SYS(sys_umask , 1) /* 4060 */ - MIPS_SYS(sys_chroot , 1) - MIPS_SYS(sys_ustat , 2) - MIPS_SYS(sys_dup2 , 2) - MIPS_SYS(sys_getppid , 0) - MIPS_SYS(sys_getpgrp , 0) /* 4065 */ - MIPS_SYS(sys_setsid , 0) - MIPS_SYS(sys_sigaction , 3) - MIPS_SYS(sys_sgetmask , 0) - MIPS_SYS(sys_ssetmask , 1) - MIPS_SYS(sys_setreuid , 2) /* 4070 */ - MIPS_SYS(sys_setregid , 2) - MIPS_SYS(sys_sigsuspend , 0) - MIPS_SYS(sys_sigpending , 1) - MIPS_SYS(sys_sethostname , 2) - MIPS_SYS(sys_setrlimit , 2) /* 4075 */ - MIPS_SYS(sys_getrlimit , 2) - MIPS_SYS(sys_getrusage , 2) - MIPS_SYS(sys_gettimeofday, 2) - MIPS_SYS(sys_settimeofday, 2) - MIPS_SYS(sys_getgroups , 2) /* 4080 */ - MIPS_SYS(sys_setgroups , 2) - MIPS_SYS(sys_ni_syscall , 0) /* old_select */ - MIPS_SYS(sys_symlink , 2) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_lstat */ - MIPS_SYS(sys_readlink , 3) /* 4085 */ - MIPS_SYS(sys_uselib , 1) - MIPS_SYS(sys_swapon , 2) - MIPS_SYS(sys_reboot , 3) - MIPS_SYS(old_readdir , 3) - MIPS_SYS(old_mmap , 6) /* 4090 */ - MIPS_SYS(sys_munmap , 2) - MIPS_SYS(sys_truncate , 2) - MIPS_SYS(sys_ftruncate , 2) - MIPS_SYS(sys_fchmod , 2) - MIPS_SYS(sys_fchown , 3) /* 4095 */ - MIPS_SYS(sys_getpriority , 2) - MIPS_SYS(sys_setpriority , 3) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_statfs , 2) - MIPS_SYS(sys_fstatfs , 2) /* 4100 */ - MIPS_SYS(sys_ni_syscall , 0) /* was ioperm(2) */ - MIPS_SYS(sys_socketcall , 2) - MIPS_SYS(sys_syslog , 3) - MIPS_SYS(sys_setitimer , 3) - MIPS_SYS(sys_getitimer , 2) /* 4105 */ - MIPS_SYS(sys_newstat , 2) - MIPS_SYS(sys_newlstat , 2) - MIPS_SYS(sys_newfstat , 2) - MIPS_SYS(sys_uname , 1) - MIPS_SYS(sys_ni_syscall , 0) /* 4110 was iopl(2) */ - MIPS_SYS(sys_vhangup , 0) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_idle() */ - MIPS_SYS(sys_ni_syscall , 0) /* was sys_vm86 */ - MIPS_SYS(sys_wait4 , 4) - MIPS_SYS(sys_swapoff , 1) /* 4115 */ - MIPS_SYS(sys_sysinfo , 1) - MIPS_SYS(sys_ipc , 6) - MIPS_SYS(sys_fsync , 1) - MIPS_SYS(sys_sigreturn , 0) - MIPS_SYS(sys_clone , 6) /* 4120 */ - MIPS_SYS(sys_setdomainname, 2) - MIPS_SYS(sys_newuname , 1) - MIPS_SYS(sys_ni_syscall , 0) /* sys_modify_ldt */ - MIPS_SYS(sys_adjtimex , 1) - MIPS_SYS(sys_mprotect , 3) /* 4125 */ - MIPS_SYS(sys_sigprocmask , 3) - MIPS_SYS(sys_ni_syscall , 0) /* was create_module */ - MIPS_SYS(sys_init_module , 5) - MIPS_SYS(sys_delete_module, 1) - MIPS_SYS(sys_ni_syscall , 0) /* 4130 was get_kernel_syms */ - MIPS_SYS(sys_quotactl , 0) - MIPS_SYS(sys_getpgid , 1) - MIPS_SYS(sys_fchdir , 1) - MIPS_SYS(sys_bdflush , 2) - MIPS_SYS(sys_sysfs , 3) /* 4135 */ - MIPS_SYS(sys_personality , 1) - MIPS_SYS(sys_ni_syscall , 0) /* for afs_syscall */ - MIPS_SYS(sys_setfsuid , 1) - MIPS_SYS(sys_setfsgid , 1) - MIPS_SYS(sys_llseek , 5) /* 4140 */ - MIPS_SYS(sys_getdents , 3) - MIPS_SYS(sys_select , 5) - MIPS_SYS(sys_flock , 2) - MIPS_SYS(sys_msync , 3) - MIPS_SYS(sys_readv , 3) /* 4145 */ - MIPS_SYS(sys_writev , 3) - MIPS_SYS(sys_cacheflush , 3) - MIPS_SYS(sys_cachectl , 3) - MIPS_SYS(sys_sysmips , 4) - MIPS_SYS(sys_ni_syscall , 0) /* 4150 */ - MIPS_SYS(sys_getsid , 1) - MIPS_SYS(sys_fdatasync , 0) - MIPS_SYS(sys_sysctl , 1) - MIPS_SYS(sys_mlock , 2) - MIPS_SYS(sys_munlock , 2) /* 4155 */ - MIPS_SYS(sys_mlockall , 1) - MIPS_SYS(sys_munlockall , 0) - MIPS_SYS(sys_sched_setparam, 2) - MIPS_SYS(sys_sched_getparam, 2) - MIPS_SYS(sys_sched_setscheduler, 3) /* 4160 */ - MIPS_SYS(sys_sched_getscheduler, 1) - MIPS_SYS(sys_sched_yield , 0) - MIPS_SYS(sys_sched_get_priority_max, 1) - MIPS_SYS(sys_sched_get_priority_min, 1) - MIPS_SYS(sys_sched_rr_get_interval, 2) /* 4165 */ - MIPS_SYS(sys_nanosleep, 2) - MIPS_SYS(sys_mremap , 5) - MIPS_SYS(sys_accept , 3) - MIPS_SYS(sys_bind , 3) - MIPS_SYS(sys_connect , 3) /* 4170 */ - MIPS_SYS(sys_getpeername , 3) - MIPS_SYS(sys_getsockname , 3) - MIPS_SYS(sys_getsockopt , 5) - MIPS_SYS(sys_listen , 2) - MIPS_SYS(sys_recv , 4) /* 4175 */ - MIPS_SYS(sys_recvfrom , 6) - MIPS_SYS(sys_recvmsg , 3) - MIPS_SYS(sys_send , 4) - MIPS_SYS(sys_sendmsg , 3) - MIPS_SYS(sys_sendto , 6) /* 4180 */ - MIPS_SYS(sys_setsockopt , 5) - MIPS_SYS(sys_shutdown , 2) - MIPS_SYS(sys_socket , 3) - MIPS_SYS(sys_socketpair , 4) - MIPS_SYS(sys_setresuid , 3) /* 4185 */ - MIPS_SYS(sys_getresuid , 3) - MIPS_SYS(sys_ni_syscall , 0) /* was sys_query_module */ - MIPS_SYS(sys_poll , 3) - MIPS_SYS(sys_nfsservctl , 3) - MIPS_SYS(sys_setresgid , 3) /* 4190 */ - MIPS_SYS(sys_getresgid , 3) - MIPS_SYS(sys_prctl , 5) - MIPS_SYS(sys_rt_sigreturn, 0) - MIPS_SYS(sys_rt_sigaction, 4) - MIPS_SYS(sys_rt_sigprocmask, 4) /* 4195 */ - MIPS_SYS(sys_rt_sigpending, 2) - MIPS_SYS(sys_rt_sigtimedwait, 4) - MIPS_SYS(sys_rt_sigqueueinfo, 3) - MIPS_SYS(sys_rt_sigsuspend, 0) - MIPS_SYS(sys_pread64 , 6) /* 4200 */ - MIPS_SYS(sys_pwrite64 , 6) - MIPS_SYS(sys_chown , 3) - MIPS_SYS(sys_getcwd , 2) - MIPS_SYS(sys_capget , 2) - MIPS_SYS(sys_capset , 2) /* 4205 */ - MIPS_SYS(sys_sigaltstack , 2) - MIPS_SYS(sys_sendfile , 4) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_mmap2 , 6) /* 4210 */ - MIPS_SYS(sys_truncate64 , 4) - MIPS_SYS(sys_ftruncate64 , 4) - MIPS_SYS(sys_stat64 , 2) - MIPS_SYS(sys_lstat64 , 2) - MIPS_SYS(sys_fstat64 , 2) /* 4215 */ - MIPS_SYS(sys_pivot_root , 2) - MIPS_SYS(sys_mincore , 3) - MIPS_SYS(sys_madvise , 3) - MIPS_SYS(sys_getdents64 , 3) - MIPS_SYS(sys_fcntl64 , 3) /* 4220 */ - MIPS_SYS(sys_ni_syscall , 0) - MIPS_SYS(sys_gettid , 0) - MIPS_SYS(sys_readahead , 5) - MIPS_SYS(sys_setxattr , 5) - MIPS_SYS(sys_lsetxattr , 5) /* 4225 */ - MIPS_SYS(sys_fsetxattr , 5) - MIPS_SYS(sys_getxattr , 4) - MIPS_SYS(sys_lgetxattr , 4) - MIPS_SYS(sys_fgetxattr , 4) - MIPS_SYS(sys_listxattr , 3) /* 4230 */ - MIPS_SYS(sys_llistxattr , 3) - MIPS_SYS(sys_flistxattr , 3) - MIPS_SYS(sys_removexattr , 2) - MIPS_SYS(sys_lremovexattr, 2) - MIPS_SYS(sys_fremovexattr, 2) /* 4235 */ - MIPS_SYS(sys_tkill , 2) - MIPS_SYS(sys_sendfile64 , 5) - MIPS_SYS(sys_futex , 6) - MIPS_SYS(sys_sched_setaffinity, 3) - MIPS_SYS(sys_sched_getaffinity, 3) /* 4240 */ - MIPS_SYS(sys_io_setup , 2) - MIPS_SYS(sys_io_destroy , 1) - MIPS_SYS(sys_io_getevents, 5) - MIPS_SYS(sys_io_submit , 3) - MIPS_SYS(sys_io_cancel , 3) /* 4245 */ - MIPS_SYS(sys_exit_group , 1) - MIPS_SYS(sys_lookup_dcookie, 3) - MIPS_SYS(sys_epoll_create, 1) - MIPS_SYS(sys_epoll_ctl , 4) - MIPS_SYS(sys_epoll_wait , 3) /* 4250 */ - MIPS_SYS(sys_remap_file_pages, 5) - MIPS_SYS(sys_set_tid_address, 1) - MIPS_SYS(sys_restart_syscall, 0) - MIPS_SYS(sys_fadvise64_64, 7) - MIPS_SYS(sys_statfs64 , 3) /* 4255 */ - MIPS_SYS(sys_fstatfs64 , 2) - MIPS_SYS(sys_timer_create, 3) - MIPS_SYS(sys_timer_settime, 4) - MIPS_SYS(sys_timer_gettime, 2) - MIPS_SYS(sys_timer_getoverrun, 1) /* 4260 */ - MIPS_SYS(sys_timer_delete, 1) - MIPS_SYS(sys_clock_settime, 2) - MIPS_SYS(sys_clock_gettime, 2) - MIPS_SYS(sys_clock_getres, 2) - MIPS_SYS(sys_clock_nanosleep, 4) /* 4265 */ - MIPS_SYS(sys_tgkill , 3) - MIPS_SYS(sys_utimes , 2) - MIPS_SYS(sys_mbind , 4) - MIPS_SYS(sys_ni_syscall , 0) /* sys_get_mempolicy */ - MIPS_SYS(sys_ni_syscall , 0) /* 4270 sys_set_mempolicy */ - MIPS_SYS(sys_mq_open , 4) - MIPS_SYS(sys_mq_unlink , 1) - MIPS_SYS(sys_mq_timedsend, 5) - MIPS_SYS(sys_mq_timedreceive, 5) - MIPS_SYS(sys_mq_notify , 2) /* 4275 */ - MIPS_SYS(sys_mq_getsetattr, 3) - MIPS_SYS(sys_ni_syscall , 0) /* sys_vserver */ - MIPS_SYS(sys_waitid , 4) - MIPS_SYS(sys_ni_syscall , 0) /* available, was setaltroot */ - MIPS_SYS(sys_add_key , 5) - MIPS_SYS(sys_request_key, 4) - MIPS_SYS(sys_keyctl , 5) - MIPS_SYS(sys_set_thread_area, 1) - MIPS_SYS(sys_inotify_init, 0) - MIPS_SYS(sys_inotify_add_watch, 3) /* 4285 */ - MIPS_SYS(sys_inotify_rm_watch, 2) - MIPS_SYS(sys_migrate_pages, 4) - MIPS_SYS(sys_openat, 4) - MIPS_SYS(sys_mkdirat, 3) - MIPS_SYS(sys_mknodat, 4) /* 4290 */ - MIPS_SYS(sys_fchownat, 5) - MIPS_SYS(sys_futimesat, 3) - MIPS_SYS(sys_fstatat64, 4) - MIPS_SYS(sys_unlinkat, 3) - MIPS_SYS(sys_renameat, 4) /* 4295 */ - MIPS_SYS(sys_linkat, 5) - MIPS_SYS(sys_symlinkat, 3) - MIPS_SYS(sys_readlinkat, 4) - MIPS_SYS(sys_fchmodat, 3) - MIPS_SYS(sys_faccessat, 3) /* 4300 */ - MIPS_SYS(sys_pselect6, 6) - MIPS_SYS(sys_ppoll, 5) - MIPS_SYS(sys_unshare, 1) - MIPS_SYS(sys_splice, 6) - MIPS_SYS(sys_sync_file_range, 7) /* 4305 */ - MIPS_SYS(sys_tee, 4) - MIPS_SYS(sys_vmsplice, 4) - MIPS_SYS(sys_move_pages, 6) - MIPS_SYS(sys_set_robust_list, 2) - MIPS_SYS(sys_get_robust_list, 3) /* 4310 */ - MIPS_SYS(sys_kexec_load, 4) - MIPS_SYS(sys_getcpu, 3) - MIPS_SYS(sys_epoll_pwait, 6) - MIPS_SYS(sys_ioprio_set, 3) - MIPS_SYS(sys_ioprio_get, 2) - MIPS_SYS(sys_utimensat, 4) - MIPS_SYS(sys_signalfd, 3) - MIPS_SYS(sys_ni_syscall, 0) /* was timerfd */ - MIPS_SYS(sys_eventfd, 1) - MIPS_SYS(sys_fallocate, 6) /* 4320 */ - MIPS_SYS(sys_timerfd_create, 2) - MIPS_SYS(sys_timerfd_gettime, 2) - MIPS_SYS(sys_timerfd_settime, 4) - MIPS_SYS(sys_signalfd4, 4) - MIPS_SYS(sys_eventfd2, 2) /* 4325 */ - MIPS_SYS(sys_epoll_create1, 1) - MIPS_SYS(sys_dup3, 3) - MIPS_SYS(sys_pipe2, 2) - MIPS_SYS(sys_inotify_init1, 1) - MIPS_SYS(sys_preadv, 5) /* 4330 */ - MIPS_SYS(sys_pwritev, 5) - MIPS_SYS(sys_rt_tgsigqueueinfo, 4) - MIPS_SYS(sys_perf_event_open, 5) - MIPS_SYS(sys_accept4, 4) - MIPS_SYS(sys_recvmmsg, 5) /* 4335 */ - MIPS_SYS(sys_fanotify_init, 2) - MIPS_SYS(sys_fanotify_mark, 6) - MIPS_SYS(sys_prlimit64, 4) - MIPS_SYS(sys_name_to_handle_at, 5) - MIPS_SYS(sys_open_by_handle_at, 3) /* 4340 */ - MIPS_SYS(sys_clock_adjtime, 2) - MIPS_SYS(sys_syncfs, 1) - MIPS_SYS(sys_sendmmsg, 4) - MIPS_SYS(sys_setns, 2) - MIPS_SYS(sys_process_vm_readv, 6) /* 345 */ - MIPS_SYS(sys_process_vm_writev, 6) - MIPS_SYS(sys_kcmp, 5) - MIPS_SYS(sys_finit_module, 3) - MIPS_SYS(sys_sched_setattr, 2) - MIPS_SYS(sys_sched_getattr, 3) /* 350 */ - MIPS_SYS(sys_renameat2, 5) - MIPS_SYS(sys_seccomp, 3) - MIPS_SYS(sys_getrandom, 3) - MIPS_SYS(sys_memfd_create, 2) - MIPS_SYS(sys_bpf, 3) /* 355 */ - MIPS_SYS(sys_execveat, 5) - MIPS_SYS(sys_userfaultfd, 1) - MIPS_SYS(sys_membarrier, 2) - MIPS_SYS(sys_mlock2, 3) - MIPS_SYS(sys_copy_file_range, 6) /* 360 */ - MIPS_SYS(sys_preadv2, 6) - MIPS_SYS(sys_pwritev2, 6) - MIPS_SYS(sys_pkey_mprotect, 4) - MIPS_SYS(sys_pkey_alloc, 2) - MIPS_SYS(sys_pkey_free, 1) /* 365 */ - MIPS_SYS(sys_statx, 5) - MIPS_SYS(sys_rseq, 4) - MIPS_SYS(sys_io_pgetevents, 6) - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 370 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 375 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 380 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 385 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, /* 390 */ - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYSCALL_NUMBER_UNUSED, - MIPS_SYS(sys_semget, 3) - MIPS_SYS(sys_semctl, 4) - MIPS_SYS(sys_shmget, 3) /* 395 */ - MIPS_SYS(sys_shmctl, 3) - MIPS_SYS(sys_shmat, 3) - MIPS_SYS(sys_shmdt, 1) - MIPS_SYS(sys_msgget, 2) - MIPS_SYS(sys_msgsnd, 4) /* 400 */ - MIPS_SYS(sys_msgrcv, 5) - MIPS_SYS(sys_msgctl, 3) - MIPS_SYS(sys_clock_gettime64, 2) - MIPS_SYS(sys_clock_settime64, 2) - MIPS_SYS(sys_clock_adjtime64, 2) /* 405 */ - MIPS_SYS(sys_clock_getres_time64, 2) - MIPS_SYS(sys_clock_nanosleep_time64, 4) - MIPS_SYS(sys_timer_gettime64, 2) - MIPS_SYS(sys_timer_settime64, 4) - MIPS_SYS(sys_timerfd_gettime64, 2) /* 410 */ - MIPS_SYS(sys_timerfd_settime64, 4) - MIPS_SYS(sys_utimensat_time64, 4) - MIPS_SYS(sys_pselect6_time64, 6) - MIPS_SYS(sys_ppoll_time64, 5) - MIPS_SYSCALL_NUMBER_UNUSED, /* 415 */ - MIPS_SYS(sys_io_pgetevents_time64, 6) - MIPS_SYS(sys_recvmmsg_time64, 5) - MIPS_SYS(sys_mq_timedsend_time64, 5) - MIPS_SYS(sys_mq_timedreceive_time64, 5) - MIPS_SYS(sys_semtimedop_time64, 4) /* 420 */ - MIPS_SYS(sys_rt_sigtimedwait_time64, 4) - MIPS_SYS(sys_futex_time64, 6) - MIPS_SYS(sys_sched_rr_get_interval_time64, 2) - MIPS_SYS(sys_pidfd_send_signal, 4) - MIPS_SYS(sys_io_uring_setup, 2) /* 425 */ - MIPS_SYS(sys_io_uring_enter, 6) - MIPS_SYS(sys_io_uring_register, 4) - MIPS_SYS(sys_open_tree, 3) - MIPS_SYS(sys_move_mount, 5) - MIPS_SYS(sys_fsopen, 2) /* 430 */ - MIPS_SYS(sys_fsconfig, 5) - MIPS_SYS(sys_fsmount, 3) - MIPS_SYS(sys_fspick, 3) - MIPS_SYS(sys_pidfd_open, 2) - MIPS_SYS(sys_clone3, 2) /* 435 */ -# undef MIPS_SYS + [ 0] = 7, /* syscall */ + [ 1] = 1, /* exit */ + [ 2] = 0, /* fork */ + [ 3] = 3, /* read */ + [ 4] = 3, /* write */ + [ 5] = 3, /* open */ + [ 6] = 1, /* close */ + [ 7] = 3, /* waitpid */ + [ 8] = 2, /* creat */ + [ 9] = 2, /* link */ + [ 10] = 1, /* unlink */ + [ 11] = 3, /* execve */ + [ 12] = 1, /* chdir */ + [ 13] = 1, /* time */ + [ 14] = 3, /* mknod */ + [ 15] = 2, /* chmod */ + [ 16] = 3, /* lchown */ + [ 17] = 0, /* break */ + [ 18] = 2, /* oldstat */ + [ 19] = 3, /* lseek */ + [ 20] = 0, /* getpid */ + [ 21] = 5, /* mount */ + [ 22] = 1, /* umount */ + [ 23] = 1, /* setuid */ + [ 24] = 0, /* getuid */ + [ 25] = 1, /* stime */ + [ 26] = 4, /* ptrace */ + [ 27] = 1, /* alarm */ + [ 28] = 2, /* oldfstat */ + [ 29] = 0, /* pause */ + [ 30] = 2, /* utime */ + [ 31] = 0, /* stty */ + [ 32] = 0, /* gtty */ + [ 33] = 2, /* access */ + [ 34] = 1, /* nice */ + [ 35] = 1, /* ftime */ + [ 36] = 0, /* sync */ + [ 37] = 2, /* kill */ + [ 38] = 2, /* rename */ + [ 39] = 2, /* mkdir */ + [ 40] = 1, /* rmdir */ + [ 41] = 1, /* dup */ + [ 42] = 0, /* pipe */ + [ 43] = 1, /* times */ + [ 44] = 0, /* prof */ + [ 45] = 1, /* brk */ + [ 46] = 1, /* setgid */ + [ 47] = 0, /* getgid */ + [ 48] = 2, /* signal */ + [ 49] = 0, /* geteuid */ + [ 50] = 0, /* getegid */ + [ 51] = 1, /* acct */ + [ 52] = 2, /* umount2 */ + [ 53] = 0, /* lock */ + [ 54] = 3, /* ioctl */ + [ 55] = 3, /* fcntl */ + [ 56] = 0, /* mpx */ + [ 57] = 2, /* setpgid */ + [ 58] = 0, /* ulimit */ + [ 59] = 1, /* oldolduname */ + [ 60] = 1, /* umask */ + [ 61] = 1, /* chroot */ + [ 62] = 2, /* ustat */ + [ 63] = 2, /* dup2 */ + [ 64] = 0, /* getppid */ + [ 65] = 0, /* getpgrp */ + [ 66] = 0, /* setsid */ + [ 67] = 3, /* sigaction */ + [ 68] = 0, /* sgetmask */ + [ 69] = 1, /* ssetmask */ + [ 70] = 2, /* setreuid */ + [ 71] = 2, /* setregid */ + [ 72] = 1, /* sigsuspend */ + [ 73] = 1, /* sigpending */ + [ 74] = 2, /* sethostname */ + [ 75] = 2, /* setrlimit */ + [ 76] = 2, /* getrlimit */ + [ 77] = 2, /* getrusage */ + [ 78] = 2, /* gettimeofday */ + [ 79] = 2, /* settimeofday */ + [ 80] = 2, /* getgroups */ + [ 81] = 2, /* setgroups */ + [ 82] = 0, /* reserved82 */ + [ 83] = 2, /* symlink */ + [ 84] = 2, /* oldlstat */ + [ 85] = 3, /* readlink */ + [ 86] = 1, /* uselib */ + [ 87] = 2, /* swapon */ + [ 88] = 4, /* reboot */ + [ 89] = 3, /* readdir */ + [ 90] = 6, /* mmap */ + [ 91] = 2, /* munmap */ + [ 92] = 2, /* truncate */ + [ 93] = 2, /* ftruncate */ + [ 94] = 2, /* fchmod */ + [ 95] = 3, /* fchown */ + [ 96] = 2, /* getpriority */ + [ 97] = 3, /* setpriority */ + [ 98] = 0, /* profil */ + [ 99] = 2, /* statfs */ + [ 100] = 2, /* fstatfs */ + [ 101] = 3, /* ioperm */ + [ 102] = 2, /* socketcall */ + [ 103] = 3, /* syslog */ + [ 104] = 3, /* setitimer */ + [ 105] = 2, /* getitimer */ + [ 106] = 2, /* stat */ + [ 107] = 2, /* lstat */ + [ 108] = 2, /* fstat */ + [ 109] = 1, /* olduname */ + [ 110] = 1, /* iopl */ + [ 111] = 0, /* vhangup */ + [ 112] = 0, /* idle */ + [ 113] = 5, /* vm86 */ + [ 114] = 4, /* wait4 */ + [ 115] = 1, /* swapoff */ + [ 116] = 1, /* sysinfo */ + [ 117] = 6, /* ipc */ + [ 118] = 1, /* fsync */ + [ 119] = 0, /* sigreturn */ + [ 120] = 5, /* clone */ + [ 121] = 2, /* setdomainname */ + [ 122] = 1, /* uname */ + [ 123] = 0, /* modify_ldt */ + [ 124] = 1, /* adjtimex */ + [ 125] = 3, /* mprotect */ + [ 126] = 3, /* sigprocmask */ + [ 127] = 2, /* create_module */ + [ 128] = 3, /* init_module */ + [ 129] = 2, /* delete_module */ + [ 130] = 1, /* get_kernel_syms */ + [ 131] = 4, /* quotactl */ + [ 132] = 1, /* getpgid */ + [ 133] = 1, /* fchdir */ + [ 134] = 2, /* bdflush */ + [ 135] = 3, /* sysfs */ + [ 136] = 1, /* personality */ + [ 137] = 0, /* afs_syscall */ + [ 138] = 1, /* setfsuid */ + [ 139] = 1, /* setfsgid */ + [ 140] = 5, /* _llseek */ + [ 141] = 3, /* getdents */ + [ 142] = 5, /* _newselect */ + [ 143] = 2, /* flock */ + [ 144] = 3, /* msync */ + [ 145] = 3, /* readv */ + [ 146] = 3, /* writev */ + [ 147] = 3, /* cacheflush */ + [ 148] = 3, /* cachectl */ + [ 149] = 4, /* sysmips */ + [ 150] = 0, /* setup */ + [ 151] = 1, /* getsid */ + [ 152] = 1, /* fdatasync */ + [ 153] = 1, /* _sysctl */ + [ 154] = 2, /* mlock */ + [ 155] = 2, /* munlock */ + [ 156] = 1, /* mlockall */ + [ 157] = 0, /* munlockall */ + [ 158] = 2, /* sched_setparam */ + [ 159] = 2, /* sched_getparam */ + [ 160] = 3, /* sched_setscheduler */ + [ 161] = 1, /* sched_getscheduler */ + [ 162] = 0, /* sched_yield */ + [ 163] = 1, /* sched_get_priority_max */ + [ 164] = 1, /* sched_get_priority_min */ + [ 165] = 2, /* sched_rr_get_interval */ + [ 166] = 2, /* nanosleep */ + [ 167] = 5, /* mremap */ + [ 168] = 3, /* accept */ + [ 169] = 3, /* bind */ + [ 170] = 3, /* connect */ + [ 171] = 3, /* getpeername */ + [ 172] = 3, /* getsockname */ + [ 173] = 5, /* getsockopt */ + [ 174] = 2, /* listen */ + [ 175] = 4, /* recv */ + [ 176] = 6, /* recvfrom */ + [ 177] = 3, /* recvmsg */ + [ 178] = 4, /* send */ + [ 179] = 3, /* sendmsg */ + [ 180] = 6, /* sendto */ + [ 181] = 5, /* setsockopt */ + [ 182] = 2, /* shutdown */ + [ 183] = 3, /* socket */ + [ 184] = 4, /* socketpair */ + [ 185] = 3, /* setresuid */ + [ 186] = 3, /* getresuid */ + [ 187] = 5, /* query_module */ + [ 188] = 3, /* poll */ + [ 189] = 3, /* nfsservctl */ + [ 190] = 3, /* setresgid */ + [ 191] = 3, /* getresgid */ + [ 192] = 5, /* prctl */ + [ 193] = 0, /* rt_sigreturn */ + [ 194] = 4, /* rt_sigaction */ + [ 195] = 4, /* rt_sigprocmask */ + [ 196] = 2, /* rt_sigpending */ + [ 197] = 4, /* rt_sigtimedwait */ + [ 198] = 3, /* rt_sigqueueinfo */ + [ 199] = 2, /* rt_sigsuspend */ + [ 200] = 6, /* pread64 */ + [ 201] = 6, /* pwrite64 */ + [ 202] = 3, /* chown */ + [ 203] = 2, /* getcwd */ + [ 204] = 2, /* capget */ + [ 205] = 2, /* capset */ + [ 206] = 2, /* sigaltstack */ + [ 207] = 4, /* sendfile */ + [ 208] = 5, /* getpmsg */ + [ 209] = 5, /* putpmsg */ + [ 210] = 6, /* mmap2 */ + [ 211] = 4, /* truncate64 */ + [ 212] = 4, /* ftruncate64 */ + [ 213] = 2, /* stat64 */ + [ 214] = 2, /* lstat64 */ + [ 215] = 2, /* fstat64 */ + [ 216] = 2, /* pivot_root */ + [ 217] = 3, /* mincore */ + [ 218] = 3, /* madvise */ + [ 219] = 3, /* getdents64 */ + [ 220] = 3, /* fcntl64 */ + [ 221] = 0, /* reserved221 */ + [ 222] = 0, /* gettid */ + [ 223] = 5, /* readahead */ + [ 224] = 5, /* setxattr */ + [ 225] = 5, /* lsetxattr */ + [ 226] = 5, /* fsetxattr */ + [ 227] = 4, /* getxattr */ + [ 228] = 4, /* lgetxattr */ + [ 229] = 4, /* fgetxattr */ + [ 230] = 3, /* listxattr */ + [ 231] = 3, /* llistxattr */ + [ 232] = 3, /* flistxattr */ + [ 233] = 2, /* removexattr */ + [ 234] = 2, /* lremovexattr */ + [ 235] = 2, /* fremovexattr */ + [ 236] = 2, /* tkill */ + [ 237] = 4, /* sendfile64 */ + [ 238] = 6, /* futex */ + [ 239] = 3, /* sched_setaffinity */ + [ 240] = 3, /* sched_getaffinity */ + [ 241] = 2, /* io_setup */ + [ 242] = 1, /* io_destroy */ + [ 243] = 5, /* io_getevents */ + [ 244] = 3, /* io_submit */ + [ 245] = 3, /* io_cancel */ + [ 246] = 1, /* exit_group */ + [ 247] = 4, /* lookup_dcookie */ + [ 248] = 1, /* epoll_create */ + [ 249] = 4, /* epoll_ctl */ + [ 250] = 4, /* epoll_wait */ + [ 251] = 5, /* remap_file_pages */ + [ 252] = 1, /* set_tid_address */ + [ 253] = 0, /* restart_syscall */ + [ 254] = 7, /* fadvise64 */ + [ 255] = 3, /* statfs64 */ + [ 256] = 3, /* fstatfs64 */ + [ 257] = 3, /* timer_create */ + [ 258] = 4, /* timer_settime */ + [ 259] = 2, /* timer_gettime */ + [ 260] = 1, /* timer_getoverrun */ + [ 261] = 1, /* timer_delete */ + [ 262] = 2, /* clock_settime */ + [ 263] = 2, /* clock_gettime */ + [ 264] = 2, /* clock_getres */ + [ 265] = 4, /* clock_nanosleep */ + [ 266] = 3, /* tgkill */ + [ 267] = 2, /* utimes */ + [ 268] = 6, /* mbind */ + [ 269] = 5, /* get_mempolicy */ + [ 270] = 3, /* set_mempolicy */ + [ 271] = 4, /* mq_open */ + [ 272] = 1, /* mq_unlink */ + [ 273] = 5, /* mq_timedsend */ + [ 274] = 5, /* mq_timedreceive */ + [ 275] = 2, /* mq_notify */ + [ 276] = 3, /* mq_getsetattr */ + [ 277] = 5, /* vserver */ + [ 278] = 5, /* waitid */ + [ 279] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 280] = 5, /* add_key */ + [ 281] = 4, /* request_key */ + [ 282] = 5, /* keyctl */ + [ 283] = 1, /* set_thread_area */ + [ 284] = 0, /* inotify_init */ + [ 285] = 3, /* inotify_add_watch */ + [ 286] = 2, /* inotify_rm_watch */ + [ 287] = 4, /* migrate_pages */ + [ 288] = 4, /* openat */ + [ 289] = 3, /* mkdirat */ + [ 290] = 4, /* mknodat */ + [ 291] = 5, /* fchownat */ + [ 292] = 3, /* futimesat */ + [ 293] = 4, /* fstatat64 */ + [ 294] = 3, /* unlinkat */ + [ 295] = 4, /* renameat */ + [ 296] = 5, /* linkat */ + [ 297] = 3, /* symlinkat */ + [ 298] = 4, /* readlinkat */ + [ 299] = 3, /* fchmodat */ + [ 300] = 3, /* faccessat */ + [ 301] = 6, /* pselect6 */ + [ 302] = 5, /* ppoll */ + [ 303] = 1, /* unshare */ + [ 304] = 6, /* splice */ + [ 305] = 7, /* sync_file_range */ + [ 306] = 4, /* tee */ + [ 307] = 4, /* vmsplice */ + [ 308] = 6, /* move_pages */ + [ 309] = 2, /* set_robust_list */ + [ 310] = 3, /* get_robust_list */ + [ 311] = 4, /* kexec_load */ + [ 312] = 3, /* getcpu */ + [ 313] = 6, /* epoll_pwait */ + [ 314] = 3, /* ioprio_set */ + [ 315] = 2, /* ioprio_get */ + [ 316] = 4, /* utimensat */ + [ 317] = 3, /* signalfd */ + [ 318] = 4, /* timerfd */ + [ 319] = 1, /* eventfd */ + [ 320] = 6, /* fallocate */ + [ 321] = 2, /* timerfd_create */ + [ 322] = 2, /* timerfd_gettime */ + [ 323] = 4, /* timerfd_settime */ + [ 324] = 4, /* signalfd4 */ + [ 325] = 2, /* eventfd2 */ + [ 326] = 1, /* epoll_create1 */ + [ 327] = 3, /* dup3 */ + [ 328] = 2, /* pipe2 */ + [ 329] = 1, /* inotify_init1 */ + [ 330] = 5, /* preadv */ + [ 331] = 5, /* pwritev */ + [ 332] = 4, /* rt_tgsigqueueinfo */ + [ 333] = 5, /* perf_event_open */ + [ 334] = 4, /* accept4 */ + [ 335] = 5, /* recvmmsg */ + [ 336] = 2, /* fanotify_init */ + [ 337] = 6, /* fanotify_mark */ + [ 338] = 4, /* prlimit64 */ + [ 339] = 5, /* name_to_handle_at */ + [ 340] = 3, /* open_by_handle_at */ + [ 341] = 2, /* clock_adjtime */ + [ 342] = 1, /* syncfs */ + [ 343] = 4, /* sendmmsg */ + [ 344] = 2, /* setns */ + [ 345] = 6, /* process_vm_readv */ + [ 346] = 6, /* process_vm_writev */ + [ 347] = 5, /* kcmp */ + [ 348] = 3, /* finit_module */ + [ 349] = 3, /* sched_setattr */ + [ 350] = 4, /* sched_getattr */ + [ 351] = 5, /* renameat2 */ + [ 352] = 3, /* seccomp */ + [ 353] = 3, /* getrandom */ + [ 354] = 2, /* memfd_create */ + [ 355] = 3, /* bpf */ + [ 356] = 5, /* execveat */ + [ 357] = 1, /* userfaultfd */ + [ 358] = 2, /* membarrier */ + [ 359] = 3, /* mlock2 */ + [ 360] = 6, /* copy_file_range */ + [ 361] = 6, /* preadv2 */ + [ 362] = 6, /* pwritev2 */ + [ 363] = 4, /* pkey_mprotect */ + [ 364] = 2, /* pkey_alloc */ + [ 365] = 1, /* pkey_free */ + [ 366] = 5, /* statx */ + [ 367] = 4, /* rseq */ + [ 368] = 6, /* io_pgetevents */ + [ 369] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 370] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 371] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 372] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 373] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 374] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 375] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 376] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 377] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 378] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 379] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 380] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 381] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 382] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 383] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 384] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 385] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 386] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 387] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 388] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 389] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 390] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 391] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 392] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 393] = 3, /* semget */ + [ 394] = 4, /* semctl */ + [ 395] = 3, /* shmget */ + [ 396] = 3, /* shmctl */ + [ 397] = 3, /* shmat */ + [ 398] = 1, /* shmdt */ + [ 399] = 2, /* msgget */ + [ 400] = 4, /* msgsnd */ + [ 401] = 5, /* msgrcv */ + [ 402] = 3, /* msgctl */ + [ 403] = 2, /* clock_gettime64 */ + [ 404] = 2, /* clock_settime64 */ + [ 405] = 2, /* clock_adjtime64 */ + [ 406] = 2, /* clock_getres_time64 */ + [ 407] = 4, /* clock_nanosleep_time64 */ + [ 408] = 2, /* timer_gettime64 */ + [ 409] = 4, /* timer_settime64 */ + [ 410] = 2, /* timerfd_gettime64 */ + [ 411] = 4, /* timerfd_settime64 */ + [ 412] = 4, /* utimensat_time64 */ + [ 413] = 6, /* pselect6_time64 */ + [ 414] = 5, /* ppoll_time64 */ + [ 415] = MIPS_SYSCALL_NUMBER_UNUSED, + [ 416] = 6, /* io_pgetevents_time64 */ + [ 417] = 5, /* recvmmsg_time64 */ + [ 418] = 5, /* mq_timedsend_time64 */ + [ 419] = 5, /* mq_timedreceive_time64 */ + [ 420] = 4, /* semtimedop_time64 */ + [ 421] = 4, /* rt_sigtimedwait_time64 */ + [ 422] = 6, /* futex_time64 */ + [ 423] = 2, /* sched_rr_get_interval_time64 */ + [ 424] = 4, /* pidfd_send_signal */ + [ 425] = 2, /* io_uring_setup */ + [ 426] = 6, /* io_uring_enter */ + [ 427] = 4, /* io_uring_register */ + [ 428] = 3, /* open_tree */ + [ 429] = 5, /* move_mount */ + [ 430] = 2, /* fsopen */ + [ 431] = 5, /* fsconfig */ + [ 432] = 3, /* fsmount */ + [ 433] = 3, /* fspick */ + [ 434] = 2, /* pidfd_open */ + [ 435] = 2, /* clone3 */ diff --git a/scripts/update-mips-syscall-args.sh b/scripts/update-mips-syscall-args.sh new file mode 100755 index 0000000000..4f0dda4b83 --- /dev/null +++ b/scripts/update-mips-syscall-args.sh @@ -0,0 +1,57 @@ +#!/bin/sh + +URL=https://raw.githubusercontent.com/strace/strace/master +FILES="sysent.h sysent_shorthand_defs.h linux/mips/syscallent-compat.h \ + linux/mips/syscallent-o32.h linux/syscallent-common-32.h \ + linux/syscallent-common.h" + +output="$1" +if [ "$output" = "" ] ; then + output="$PWD" +fi + +INC=linux-user/mips/syscall-args-o32.c.inc + +TMP=$(mktemp -d) +cd $TMP + +for file in $FILES; do + curl -O $URL/$file +done + +> subcall32.h + +cat > gen_mips_o32.c < + +#define LINUX_MIPSO32 +#define MAX_ARGS 7 + +#include "sysent.h" +#include "sysent_shorthand_defs.h" + +#define SEN(syscall_name) 0,0 +const struct_sysent sysent0[] = { +#include "syscallent-o32.h" +}; + +int main(void) +{ + int i; + + for (i = 4000; i < sizeof(sysent0) / sizeof(struct_sysent); i++) { + if (sysent0[i].sys_name == NULL) { + printf(" [% 4d] = MIPS_SYSCALL_NUMBER_UNUSED,\n", i - 4000); + } else { + printf(" [% 4d] = %d, /* %s */\n", i - 4000, + sysent0[i].nargs, sysent0[i].sys_name); + } + } + + return 0; +} +EOF + +cc -o gen_mips_o32 gen_mips_o32.c && ./gen_mips_o32 > "$output/$INC" + +rm -fr "$TMP" From 382ae67af3eab60f754ebdfe862218b4cbd95338 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 16 Mar 2020 09:56:17 +0100 Subject: [PATCH 29/32] scripts: add a script to generate syscall_nr.h This script is needed for targets based on asm-generic syscall numbers generation Signed-off-by: Laurent Vivier Reviewed-by: Alistair Francis Reviewed-by: Taylor Simpson Reviewed-by: Richard Henderson Message-Id: <20200316085620.309769-2-laurent@vivier.eu> [lv: added file in MAINTAINERS] --- MAINTAINERS | 1 + scripts/gensyscalls.sh | 102 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100755 scripts/gensyscalls.sh diff --git a/MAINTAINERS b/MAINTAINERS index 958e05b27f..45d48992b1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2450,6 +2450,7 @@ F: default-configs/*-linux-user.mak F: scripts/qemu-binfmt-conf.sh F: scripts/update-syscalltbl.sh F: scripts/update-mips-syscall-args.sh +F: scripts/gensyscalls.sh Tiny Code Generator (TCG) ------------------------- diff --git a/scripts/gensyscalls.sh b/scripts/gensyscalls.sh new file mode 100755 index 0000000000..b7b8456f63 --- /dev/null +++ b/scripts/gensyscalls.sh @@ -0,0 +1,102 @@ +#!/bin/sh +# +# Update syscall_nr.h files from linux headers asm-generic/unistd.h +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# + +linux="$1" +output="$2" + +TMP=$(mktemp -d) + +if [ "$linux" = "" ] ; then + echo "Needs path to linux source tree" 1>&2 + exit 1 +fi + +if [ "$output" = "" ] ; then + output="$PWD" +fi + +upper() +{ + echo "$1" | tr "[:lower:]" "[:upper:]" | tr "[:punct:]" "_" +} + +qemu_arch() +{ + case "$1" in + arm64) + echo "aarch64" + ;; + *) + echo "$1" + ;; + esac +} + +read_includes() +{ + arch=$1 + bits=$2 + + cpp -P -nostdinc -fdirectives-only \ + -D_UAPI_ASM_$(upper ${arch})_BITSPERLONG_H \ + -D__BITS_PER_LONG=${bits} \ + -I${linux}/arch/${arch}/include/uapi/ \ + -I${linux}/include/uapi \ + -I${TMP} \ + "${linux}/arch/${arch}/include/uapi/asm/unistd.h" +} + +filter_defines() +{ + grep -e "#define __NR_" -e "#define __NR3264" +} + +rename_defines() +{ + sed "s/ __NR_/ TARGET_NR_/g;s/(__NR_/(TARGET_NR_/g" +} + +evaluate_values() +{ + sed "s/#define TARGET_NR_/QEMU TARGET_NR_/" | \ + cpp -P -nostdinc | \ + sed "s/^QEMU /#define /" +} + +generate_syscall_nr() +{ + arch=$1 + bits=$2 + file="$3" + guard="$(upper LINUX_USER_$(qemu_arch $arch)_$(basename "$file"))" + + (echo "/*" + echo " * This file contains the system call numbers." + echo " * Do not modify." + echo " * This file is generated by scripts/gensyscalls.sh" + echo " */" + echo "#ifndef ${guard}" + echo "#define ${guard}" + echo + read_includes $arch $bits | filter_defines | rename_defines | \ + evaluate_values | sort -n -k 3 + echo + echo "#endif /* ${guard} */" + echo) > "$file" +} + +mkdir "$TMP/asm" +> "$TMP/asm/bitsperlong.h" + +generate_syscall_nr arm64 64 "$output/linux-user/aarch64/syscall_nr.h" +generate_syscall_nr nios2 32 "$output/linux-user/nios2/syscall_nr.h" +generate_syscall_nr openrisc 32 "$output/linux-user/openrisc/syscall_nr.h" + +generate_syscall_nr riscv 32 "$output/linux-user/riscv/syscall32_nr.h" +generate_syscall_nr riscv 64 "$output/linux-user/riscv/syscall64_nr.h" +rm -fr "$TMP" From ca2144c8a8cfb87cdd9e78f301295fc09f002ed1 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 16 Mar 2020 09:56:18 +0100 Subject: [PATCH 30/32] linux-user, aarch64: sync syscall numbers with kernel v5.5 Use helper script scripts/gensyscalls.sh to generate the file. This change TARGET_NR_fstatat64 by TARGET_NR_newfstatat that is correct because definitions from linux are: arch/arm64/include/uapi/asm/unistd.h #define __ARCH_WANT_NEW_STAT include/uapi/asm-generic/unistd.h #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) #define __NR3264_fstatat 79 __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) #define __NR3264_fstat 80 __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) #endif ... #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) ... #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) #define __NR_newfstatat __NR3264_fstatat #define __NR_fstat __NR3264_fstat #endif ... Add syscalls 286 (preadv2) to 435 (clone3). Signed-off-by: Laurent Vivier Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Message-Id: <20200316085620.309769-3-laurent@vivier.eu> --- linux-user/aarch64/syscall_nr.h | 34 ++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/linux-user/aarch64/syscall_nr.h b/linux-user/aarch64/syscall_nr.h index f00ffd7fb8..85de000b24 100644 --- a/linux-user/aarch64/syscall_nr.h +++ b/linux-user/aarch64/syscall_nr.h @@ -1,7 +1,8 @@ /* * This file contains the system call numbers. + * Do not modify. + * This file is generated by scripts/gensyscalls.sh */ - #ifndef LINUX_USER_AARCH64_SYSCALL_NR_H #define LINUX_USER_AARCH64_SYSCALL_NR_H @@ -84,7 +85,7 @@ #define TARGET_NR_splice 76 #define TARGET_NR_tee 77 #define TARGET_NR_readlinkat 78 -#define TARGET_NR_fstatat64 79 +#define TARGET_NR_newfstatat 79 #define TARGET_NR_fstat 80 #define TARGET_NR_sync 81 #define TARGET_NR_fsync 82 @@ -254,8 +255,8 @@ #define TARGET_NR_prlimit64 261 #define TARGET_NR_fanotify_init 262 #define TARGET_NR_fanotify_mark 263 -#define TARGET_NR_name_to_handle_at 264 -#define TARGET_NR_open_by_handle_at 265 +#define TARGET_NR_name_to_handle_at 264 +#define TARGET_NR_open_by_handle_at 265 #define TARGET_NR_clock_adjtime 266 #define TARGET_NR_syncfs 267 #define TARGET_NR_setns 268 @@ -276,5 +277,28 @@ #define TARGET_NR_membarrier 283 #define TARGET_NR_mlock2 284 #define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289 +#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_io_pgetevents 292 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 +#define TARGET_NR_pidfd_send_signal 424 +#define TARGET_NR_io_uring_setup 425 +#define TARGET_NR_io_uring_enter 426 +#define TARGET_NR_io_uring_register 427 +#define TARGET_NR_open_tree 428 +#define TARGET_NR_move_mount 429 +#define TARGET_NR_fsopen 430 +#define TARGET_NR_fsconfig 431 +#define TARGET_NR_fsmount 432 +#define TARGET_NR_fspick 433 +#define TARGET_NR_pidfd_open 434 +#define TARGET_NR_clone3 435 +#define TARGET_NR_syscalls 436 + +#endif /* LINUX_USER_AARCH64_SYSCALL_NR_H */ -#endif From a830fa26388409fe644218fbe6f172a1b41855d9 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 16 Mar 2020 09:56:19 +0100 Subject: [PATCH 31/32] linux-user, nios2: sync syscall numbers with kernel v5.5 Use helper script scripts/gensyscalls.sh to generate the file. This adds TARGET_NR_llseek that was missing and remove syscalls 1024 to 1079. Add new syscalls from 288 (pkey_mprotect) to 434 (pidfd_open) Signed-off-by: Laurent Vivier Reviewed-by: Alistair Francis Message-Id: <20200316085620.309769-4-laurent@vivier.eu> --- linux-user/nios2/syscall_nr.h | 650 +++++++++++++++++----------------- 1 file changed, 320 insertions(+), 330 deletions(-) diff --git a/linux-user/nios2/syscall_nr.h b/linux-user/nios2/syscall_nr.h index 8fb87864ca..32d485dc9a 100644 --- a/linux-user/nios2/syscall_nr.h +++ b/linux-user/nios2/syscall_nr.h @@ -1,334 +1,324 @@ +/* + * This file contains the system call numbers. + * Do not modify. + * This file is generated by scripts/gensyscalls.sh + */ #ifndef LINUX_USER_NIOS2_SYSCALL_NR_H #define LINUX_USER_NIOS2_SYSCALL_NR_H -#define TARGET_NR_io_setup 0 -#define TARGET_NR_io_destroy 1 -#define TARGET_NR_io_submit 2 -#define TARGET_NR_io_cancel 3 -#define TARGET_NR_io_getevents 4 -#define TARGET_NR_setxattr 5 -#define TARGET_NR_lsetxattr 6 -#define TARGET_NR_fsetxattr 7 -#define TARGET_NR_getxattr 8 -#define TARGET_NR_lgetxattr 9 -#define TARGET_NR_fgetxattr 10 -#define TARGET_NR_listxattr 11 -#define TARGET_NR_llistxattr 12 -#define TARGET_NR_flistxattr 13 -#define TARGET_NR_removexattr 14 -#define TARGET_NR_lremovexattr 15 -#define TARGET_NR_fremovexattr 16 -#define TARGET_NR_getcwd 17 -#define TARGET_NR_lookup_dcookie 18 -#define TARGET_NR_eventfd2 19 -#define TARGET_NR_epoll_create1 20 -#define TARGET_NR_epoll_ctl 21 -#define TARGET_NR_epoll_pwait 22 -#define TARGET_NR_dup 23 -#define TARGET_NR_dup3 24 -#define TARGET_NR_fcntl64 25 -#define TARGET_NR_inotify_init1 26 -#define TARGET_NR_inotify_add_watch 27 -#define TARGET_NR_inotify_rm_watch 28 -#define TARGET_NR_ioctl 29 -#define TARGET_NR_ioprio_set 30 -#define TARGET_NR_ioprio_get 31 -#define TARGET_NR_flock 32 -#define TARGET_NR_mknodat 33 -#define TARGET_NR_mkdirat 34 -#define TARGET_NR_unlinkat 35 -#define TARGET_NR_symlinkat 36 -#define TARGET_NR_linkat 37 -#define TARGET_NR_renameat 38 -#define TARGET_NR_umount2 39 -#define TARGET_NR_mount 40 -#define TARGET_NR_pivot_root 41 -#define TARGET_NR_nfsservctl 42 -#define TARGET_NR_statfs64 43 -#define TARGET_NR_fstatfs64 44 -#define TARGET_NR_truncate64 45 -#define TARGET_NR_ftruncate64 46 -#define TARGET_NR_fallocate 47 -#define TARGET_NR_faccessat 48 -#define TARGET_NR_chdir 49 -#define TARGET_NR_fchdir 50 -#define TARGET_NR_chroot 51 -#define TARGET_NR_fchmod 52 -#define TARGET_NR_fchmodat 53 -#define TARGET_NR_fchownat 54 -#define TARGET_NR_fchown 55 -#define TARGET_NR_openat 56 -#define TARGET_NR_close 57 -#define TARGET_NR_vhangup 58 -#define TARGET_NR_pipe2 59 -#define TARGET_NR_quotactl 60 -#define TARGET_NR_getdents64 61 -#define TARGET_NR_read 63 -#define TARGET_NR_write 64 -#define TARGET_NR_readv 65 -#define TARGET_NR_writev 66 -#define TARGET_NR_pread64 67 -#define TARGET_NR_pwrite64 68 -#define TARGET_NR_preadv 69 -#define TARGET_NR_pwritev 70 -#define TARGET_NR_sendfile64 71 -#define TARGET_NR_pselect6 72 -#define TARGET_NR_ppoll 73 -#define TARGET_NR_signalfd4 74 -#define TARGET_NR_vmsplice 75 -#define TARGET_NR_splice 76 -#define TARGET_NR_tee 77 -#define TARGET_NR_readlinkat 78 -#define TARGET_NR_fstatat64 79 -#define TARGET_NR_fstat64 80 -#define TARGET_NR_sync 81 -#define TARGET_NR_fsync 82 -#define TARGET_NR_fdatasync 83 -#define TARGET_NR_sync_file_range 84 -#define TARGET_NR_timerfd_create 85 -#define TARGET_NR_timerfd_settime 86 -#define TARGET_NR_timerfd_gettime 87 -#define TARGET_NR_utimensat 88 -#define TARGET_NR_acct 89 -#define TARGET_NR_capget 90 -#define TARGET_NR_capset 91 -#define TARGET_NR_personality 92 -#define TARGET_NR_exit 93 -#define TARGET_NR_exit_group 94 -#define TARGET_NR_waitid 95 -#define TARGET_NR_set_tid_address 96 -#define TARGET_NR_unshare 97 -#define TARGET_NR_futex 98 -#define TARGET_NR_set_robust_list 99 -#define TARGET_NR_get_robust_list 100 -#define TARGET_NR_nanosleep 101 -#define TARGET_NR_getitimer 102 -#define TARGET_NR_setitimer 103 -#define TARGET_NR_kexec_load 104 -#define TARGET_NR_init_module 105 -#define TARGET_NR_delete_module 106 -#define TARGET_NR_timer_create 107 -#define TARGET_NR_timer_gettime 108 -#define TARGET_NR_timer_getoverrun 109 -#define TARGET_NR_timer_settime 110 -#define TARGET_NR_timer_delete 111 -#define TARGET_NR_clock_settime 112 -#define TARGET_NR_clock_gettime 113 -#define TARGET_NR_clock_getres 114 -#define TARGET_NR_clock_nanosleep 115 -#define TARGET_NR_syslog 116 -#define TARGET_NR_ptrace 117 -#define TARGET_NR_sched_setparam 118 -#define TARGET_NR_sched_setscheduler 119 -#define TARGET_NR_sched_getscheduler 120 -#define TARGET_NR_sched_getparam 121 -#define TARGET_NR_sched_setaffinity 122 -#define TARGET_NR_sched_getaffinity 123 -#define TARGET_NR_sched_yield 124 -#define TARGET_NR_sched_get_priority_max 125 -#define TARGET_NR_sched_get_priority_min 126 -#define TARGET_NR_sched_rr_get_interval 127 -#define TARGET_NR_restart_syscall 128 -#define TARGET_NR_kill 129 -#define TARGET_NR_tkill 130 -#define TARGET_NR_tgkill 131 -#define TARGET_NR_sigaltstack 132 -#define TARGET_NR_rt_sigsuspend 133 -#define TARGET_NR_rt_sigaction 134 -#define TARGET_NR_rt_sigprocmask 135 -#define TARGET_NR_rt_sigpending 136 -#define TARGET_NR_rt_sigtimedwait 137 -#define TARGET_NR_rt_sigqueueinfo 138 -#define TARGET_NR_rt_sigreturn 139 -#define TARGET_NR_setpriority 140 -#define TARGET_NR_getpriority 141 -#define TARGET_NR_reboot 142 -#define TARGET_NR_setregid 143 -#define TARGET_NR_setgid 144 -#define TARGET_NR_setreuid 145 -#define TARGET_NR_setuid 146 -#define TARGET_NR_setresuid 147 -#define TARGET_NR_getresuid 148 -#define TARGET_NR_setresgid 149 -#define TARGET_NR_getresgid 150 -#define TARGET_NR_setfsuid 151 -#define TARGET_NR_setfsgid 152 -#define TARGET_NR_times 153 -#define TARGET_NR_setpgid 154 -#define TARGET_NR_getpgid 155 -#define TARGET_NR_getsid 156 -#define TARGET_NR_setsid 157 -#define TARGET_NR_getgroups 158 -#define TARGET_NR_setgroups 159 -#define TARGET_NR_uname 160 -#define TARGET_NR_sethostname 161 -#define TARGET_NR_setdomainname 162 -#define TARGET_NR_getrlimit 163 -#define TARGET_NR_setrlimit 164 -#define TARGET_NR_getrusage 165 -#define TARGET_NR_umask 166 -#define TARGET_NR_prctl 167 -#define TARGET_NR_getcpu 168 -#define TARGET_NR_gettimeofday 169 -#define TARGET_NR_settimeofday 170 -#define TARGET_NR_adjtimex 171 -#define TARGET_NR_getpid 172 -#define TARGET_NR_getppid 173 -#define TARGET_NR_getuid 174 -#define TARGET_NR_geteuid 175 -#define TARGET_NR_getgid 176 -#define TARGET_NR_getegid 177 -#define TARGET_NR_gettid 178 -#define TARGET_NR_sysinfo 179 -#define TARGET_NR_mq_open 180 -#define TARGET_NR_mq_unlink 181 -#define TARGET_NR_mq_timedsend 182 -#define TARGET_NR_mq_timedreceive 183 -#define TARGET_NR_mq_notify 184 -#define TARGET_NR_mq_getsetattr 185 -#define TARGET_NR_msgget 186 -#define TARGET_NR_msgctl 187 -#define TARGET_NR_msgrcv 188 -#define TARGET_NR_msgsnd 189 -#define TARGET_NR_semget 190 -#define TARGET_NR_semctl 191 -#define TARGET_NR_semtimedop 192 -#define TARGET_NR_semop 193 -#define TARGET_NR_shmget 194 -#define TARGET_NR_shmctl 195 -#define TARGET_NR_shmat 196 -#define TARGET_NR_shmdt 197 -#define TARGET_NR_socket 198 -#define TARGET_NR_socketpair 199 -#define TARGET_NR_bind 200 -#define TARGET_NR_listen 201 -#define TARGET_NR_accept 202 -#define TARGET_NR_connect 203 -#define TARGET_NR_getsockname 204 -#define TARGET_NR_getpeername 205 -#define TARGET_NR_sendto 206 -#define TARGET_NR_recvfrom 207 -#define TARGET_NR_setsockopt 208 -#define TARGET_NR_getsockopt 209 -#define TARGET_NR_shutdown 210 -#define TARGET_NR_sendmsg 211 -#define TARGET_NR_recvmsg 212 -#define TARGET_NR_readahead 213 -#define TARGET_NR_brk 214 -#define TARGET_NR_munmap 215 -#define TARGET_NR_mremap 216 -#define TARGET_NR_add_key 217 -#define TARGET_NR_request_key 218 -#define TARGET_NR_keyctl 219 -#define TARGET_NR_clone 220 -#define TARGET_NR_execve 221 -#define TARGET_NR_mmap2 222 -#define TARGET_NR_fadvise64_64 223 -#define TARGET_NR_swapon 224 -#define TARGET_NR_swapoff 225 -#define TARGET_NR_mprotect 226 -#define TARGET_NR_msync 227 -#define TARGET_NR_mlock 228 -#define TARGET_NR_munlock 229 -#define TARGET_NR_mlockall 230 -#define TARGET_NR_munlockall 231 -#define TARGET_NR_mincore 232 -#define TARGET_NR_madvise 233 -#define TARGET_NR_remap_file_pages 234 -#define TARGET_NR_mbind 235 -#define TARGET_NR_get_mempolicy 236 -#define TARGET_NR_set_mempolicy 237 -#define TARGET_NR_migrate_pages 238 -#define TARGET_NR_move_pages 239 -#define TARGET_NR_rt_tgsigqueueinfo 240 -#define TARGET_NR_perf_event_open 241 -#define TARGET_NR_accept4 242 -#define TARGET_NR_recvmmsg 243 -#define TARGET_NR_cacheflush 244 -#define TARGET_NR_arch_specific_syscall 244 -#define TARGET_NR_wait4 260 -#define TARGET_NR_prlimit64 261 -#define TARGET_NR_fanotify_init 262 -#define TARGET_NR_fanotify_mark 263 -#define TARGET_NR_name_to_handle_at 264 -#define TARGET_NR_open_by_handle_at 265 -#define TARGET_NR_clock_adjtime 266 -#define TARGET_NR_syncfs 267 -#define TARGET_NR_setns 268 -#define TARGET_NR_sendmmsg 269 -#define TARGET_NR_process_vm_readv 270 -#define TARGET_NR_process_vm_writev 271 -#define TARGET_NR_kcmp 272 -#define TARGET_NR_finit_module 273 -#define TARGET_NR_sched_setattr 274 -#define TARGET_NR_sched_getattr 275 -#define TARGET_NR_renameat2 276 -#define TARGET_NR_seccomp 277 -#define TARGET_NR_getrandom 278 -#define TARGET_NR_memfd_create 279 -#define TARGET_NR_bpf 280 -#define TARGET_NR_execveat 281 -#define TARGET_NR_userfaultfd 282 -#define TARGET_NR_membarrier 283 -#define TARGET_NR_mlock2 284 -#define TARGET_NR_copy_file_range 285 -#define TARGET_NR_preadv2 286 -#define TARGET_NR_pwritev2 287 -#define TARGET_NR_open 1024 -#define TARGET_NR_link 1025 -#define TARGET_NR_unlink 1026 -#define TARGET_NR_mknod 1027 -#define TARGET_NR_chmod 1028 -#define TARGET_NR_chown 1029 -#define TARGET_NR_mkdir 1030 -#define TARGET_NR_rmdir 1031 -#define TARGET_NR_lchown 1032 -#define TARGET_NR_access 1033 -#define TARGET_NR_rename 1034 -#define TARGET_NR_readlink 1035 -#define TARGET_NR_symlink 1036 -#define TARGET_NR_utimes 1037 -#define TARGET_NR_3264_stat 1038 -#define TARGET_NR_3264_lstat 1039 -#define TARGET_NR_pipe 1040 -#define TARGET_NR_dup2 1041 -#define TARGET_NR_epoll_create 1042 -#define TARGET_NR_inotify_init 1043 -#define TARGET_NR_eventfd 1044 -#define TARGET_NR_signalfd 1045 -#define TARGET_NR_sendfile 1046 -#define TARGET_NR_ftruncate 1047 -#define TARGET_NR_truncate 1048 -#define TARGET_NR_stat 1049 -#define TARGET_NR_lstat 1050 -#define TARGET_NR_fstat 1051 -#define TARGET_NR_fcntl 1052 -#define TARGET_NR_fadvise64 1053 -#define TARGET_NR_newfstatat 1054 -#define TARGET_NR_fstatfs 1055 -#define TARGET_NR_statfs 1056 -#define TARGET_NR_lseek 1057 -#define TARGET_NR_mmap 1058 -#define TARGET_NR_alarm 1059 -#define TARGET_NR_getpgrp 1060 -#define TARGET_NR_pause 1061 -#define TARGET_NR_time 1062 -#define TARGET_NR_utime 1063 -#define TARGET_NR_creat 1064 -#define TARGET_NR_getdents 1065 -#define TARGET_NR_futimesat 1066 -#define TARGET_NR_select 1067 -#define TARGET_NR_poll 1068 -#define TARGET_NR_epoll_wait 1069 -#define TARGET_NR_ustat 1070 -#define TARGET_NR_vfork 1071 -#define TARGET_NR_oldwait4 1072 -#define TARGET_NR_recv 1073 -#define TARGET_NR_send 1074 -#define TARGET_NR_bdflush 1075 -#define TARGET_NR_umount 1076 -#define TARGET_NR_uselib 1077 -#define TARGET_NR__sysctl 1078 -#define TARGET_NR_fork 1079 +#define TARGET_NR_cacheflush (TARGET_NR_arch_specific_syscall) +#define TARGET_NR_io_setup 0 +#define TARGET_NR_io_destroy 1 +#define TARGET_NR_io_submit 2 +#define TARGET_NR_io_cancel 3 +#define TARGET_NR_io_getevents 4 +#define TARGET_NR_setxattr 5 +#define TARGET_NR_lsetxattr 6 +#define TARGET_NR_fsetxattr 7 +#define TARGET_NR_getxattr 8 +#define TARGET_NR_lgetxattr 9 +#define TARGET_NR_fgetxattr 10 +#define TARGET_NR_listxattr 11 +#define TARGET_NR_llistxattr 12 +#define TARGET_NR_flistxattr 13 +#define TARGET_NR_removexattr 14 +#define TARGET_NR_lremovexattr 15 +#define TARGET_NR_fremovexattr 16 +#define TARGET_NR_getcwd 17 +#define TARGET_NR_lookup_dcookie 18 +#define TARGET_NR_eventfd2 19 +#define TARGET_NR_epoll_create1 20 +#define TARGET_NR_epoll_ctl 21 +#define TARGET_NR_epoll_pwait 22 +#define TARGET_NR_dup 23 +#define TARGET_NR_dup3 24 +#define TARGET_NR_fcntl64 25 +#define TARGET_NR_inotify_init1 26 +#define TARGET_NR_inotify_add_watch 27 +#define TARGET_NR_inotify_rm_watch 28 +#define TARGET_NR_ioctl 29 +#define TARGET_NR_ioprio_set 30 +#define TARGET_NR_ioprio_get 31 +#define TARGET_NR_flock 32 +#define TARGET_NR_mknodat 33 +#define TARGET_NR_mkdirat 34 +#define TARGET_NR_unlinkat 35 +#define TARGET_NR_symlinkat 36 +#define TARGET_NR_linkat 37 +#define TARGET_NR_renameat 38 +#define TARGET_NR_umount2 39 +#define TARGET_NR_mount 40 +#define TARGET_NR_pivot_root 41 +#define TARGET_NR_nfsservctl 42 +#define TARGET_NR_statfs64 43 +#define TARGET_NR_fstatfs64 44 +#define TARGET_NR_truncate64 45 +#define TARGET_NR_ftruncate64 46 +#define TARGET_NR_fallocate 47 +#define TARGET_NR_faccessat 48 +#define TARGET_NR_chdir 49 +#define TARGET_NR_fchdir 50 +#define TARGET_NR_chroot 51 +#define TARGET_NR_fchmod 52 +#define TARGET_NR_fchmodat 53 +#define TARGET_NR_fchownat 54 +#define TARGET_NR_fchown 55 +#define TARGET_NR_openat 56 +#define TARGET_NR_close 57 +#define TARGET_NR_vhangup 58 +#define TARGET_NR_pipe2 59 +#define TARGET_NR_quotactl 60 +#define TARGET_NR_getdents64 61 +#define TARGET_NR_llseek 62 +#define TARGET_NR_read 63 +#define TARGET_NR_write 64 +#define TARGET_NR_readv 65 +#define TARGET_NR_writev 66 +#define TARGET_NR_pread64 67 +#define TARGET_NR_pwrite64 68 +#define TARGET_NR_preadv 69 +#define TARGET_NR_pwritev 70 +#define TARGET_NR_sendfile64 71 +#define TARGET_NR_pselect6 72 +#define TARGET_NR_ppoll 73 +#define TARGET_NR_signalfd4 74 +#define TARGET_NR_vmsplice 75 +#define TARGET_NR_splice 76 +#define TARGET_NR_tee 77 +#define TARGET_NR_readlinkat 78 +#define TARGET_NR_fstatat64 79 +#define TARGET_NR_fstat64 80 +#define TARGET_NR_sync 81 +#define TARGET_NR_fsync 82 +#define TARGET_NR_fdatasync 83 +#define TARGET_NR_sync_file_range 84 +#define TARGET_NR_timerfd_create 85 +#define TARGET_NR_timerfd_settime 86 +#define TARGET_NR_timerfd_gettime 87 +#define TARGET_NR_utimensat 88 +#define TARGET_NR_acct 89 +#define TARGET_NR_capget 90 +#define TARGET_NR_capset 91 +#define TARGET_NR_personality 92 +#define TARGET_NR_exit 93 +#define TARGET_NR_exit_group 94 +#define TARGET_NR_waitid 95 +#define TARGET_NR_set_tid_address 96 +#define TARGET_NR_unshare 97 +#define TARGET_NR_futex 98 +#define TARGET_NR_set_robust_list 99 +#define TARGET_NR_get_robust_list 100 +#define TARGET_NR_nanosleep 101 +#define TARGET_NR_getitimer 102 +#define TARGET_NR_setitimer 103 +#define TARGET_NR_kexec_load 104 +#define TARGET_NR_init_module 105 +#define TARGET_NR_delete_module 106 +#define TARGET_NR_timer_create 107 +#define TARGET_NR_timer_gettime 108 +#define TARGET_NR_timer_getoverrun 109 +#define TARGET_NR_timer_settime 110 +#define TARGET_NR_timer_delete 111 +#define TARGET_NR_clock_settime 112 +#define TARGET_NR_clock_gettime 113 +#define TARGET_NR_clock_getres 114 +#define TARGET_NR_clock_nanosleep 115 +#define TARGET_NR_syslog 116 +#define TARGET_NR_ptrace 117 +#define TARGET_NR_sched_setparam 118 +#define TARGET_NR_sched_setscheduler 119 +#define TARGET_NR_sched_getscheduler 120 +#define TARGET_NR_sched_getparam 121 +#define TARGET_NR_sched_setaffinity 122 +#define TARGET_NR_sched_getaffinity 123 +#define TARGET_NR_sched_yield 124 +#define TARGET_NR_sched_get_priority_max 125 +#define TARGET_NR_sched_get_priority_min 126 +#define TARGET_NR_sched_rr_get_interval 127 +#define TARGET_NR_restart_syscall 128 +#define TARGET_NR_kill 129 +#define TARGET_NR_tkill 130 +#define TARGET_NR_tgkill 131 +#define TARGET_NR_sigaltstack 132 +#define TARGET_NR_rt_sigsuspend 133 +#define TARGET_NR_rt_sigaction 134 +#define TARGET_NR_rt_sigprocmask 135 +#define TARGET_NR_rt_sigpending 136 +#define TARGET_NR_rt_sigtimedwait 137 +#define TARGET_NR_rt_sigqueueinfo 138 +#define TARGET_NR_rt_sigreturn 139 +#define TARGET_NR_setpriority 140 +#define TARGET_NR_getpriority 141 +#define TARGET_NR_reboot 142 +#define TARGET_NR_setregid 143 +#define TARGET_NR_setgid 144 +#define TARGET_NR_setreuid 145 +#define TARGET_NR_setuid 146 +#define TARGET_NR_setresuid 147 +#define TARGET_NR_getresuid 148 +#define TARGET_NR_setresgid 149 +#define TARGET_NR_getresgid 150 +#define TARGET_NR_setfsuid 151 +#define TARGET_NR_setfsgid 152 +#define TARGET_NR_times 153 +#define TARGET_NR_setpgid 154 +#define TARGET_NR_getpgid 155 +#define TARGET_NR_getsid 156 +#define TARGET_NR_setsid 157 +#define TARGET_NR_getgroups 158 +#define TARGET_NR_setgroups 159 +#define TARGET_NR_uname 160 +#define TARGET_NR_sethostname 161 +#define TARGET_NR_setdomainname 162 +#define TARGET_NR_getrlimit 163 +#define TARGET_NR_setrlimit 164 +#define TARGET_NR_getrusage 165 +#define TARGET_NR_umask 166 +#define TARGET_NR_prctl 167 +#define TARGET_NR_getcpu 168 +#define TARGET_NR_gettimeofday 169 +#define TARGET_NR_settimeofday 170 +#define TARGET_NR_adjtimex 171 +#define TARGET_NR_getpid 172 +#define TARGET_NR_getppid 173 +#define TARGET_NR_getuid 174 +#define TARGET_NR_geteuid 175 +#define TARGET_NR_getgid 176 +#define TARGET_NR_getegid 177 +#define TARGET_NR_gettid 178 +#define TARGET_NR_sysinfo 179 +#define TARGET_NR_mq_open 180 +#define TARGET_NR_mq_unlink 181 +#define TARGET_NR_mq_timedsend 182 +#define TARGET_NR_mq_timedreceive 183 +#define TARGET_NR_mq_notify 184 +#define TARGET_NR_mq_getsetattr 185 +#define TARGET_NR_msgget 186 +#define TARGET_NR_msgctl 187 +#define TARGET_NR_msgrcv 188 +#define TARGET_NR_msgsnd 189 +#define TARGET_NR_semget 190 +#define TARGET_NR_semctl 191 +#define TARGET_NR_semtimedop 192 +#define TARGET_NR_semop 193 +#define TARGET_NR_shmget 194 +#define TARGET_NR_shmctl 195 +#define TARGET_NR_shmat 196 +#define TARGET_NR_shmdt 197 +#define TARGET_NR_socket 198 +#define TARGET_NR_socketpair 199 +#define TARGET_NR_bind 200 +#define TARGET_NR_listen 201 +#define TARGET_NR_accept 202 +#define TARGET_NR_connect 203 +#define TARGET_NR_getsockname 204 +#define TARGET_NR_getpeername 205 +#define TARGET_NR_sendto 206 +#define TARGET_NR_recvfrom 207 +#define TARGET_NR_setsockopt 208 +#define TARGET_NR_getsockopt 209 +#define TARGET_NR_shutdown 210 +#define TARGET_NR_sendmsg 211 +#define TARGET_NR_recvmsg 212 +#define TARGET_NR_readahead 213 +#define TARGET_NR_brk 214 +#define TARGET_NR_munmap 215 +#define TARGET_NR_mremap 216 +#define TARGET_NR_add_key 217 +#define TARGET_NR_request_key 218 +#define TARGET_NR_keyctl 219 +#define TARGET_NR_clone 220 +#define TARGET_NR_execve 221 +#define TARGET_NR_mmap2 222 +#define TARGET_NR_fadvise64_64 223 +#define TARGET_NR_swapon 224 +#define TARGET_NR_swapoff 225 +#define TARGET_NR_mprotect 226 +#define TARGET_NR_msync 227 +#define TARGET_NR_mlock 228 +#define TARGET_NR_munlock 229 +#define TARGET_NR_mlockall 230 +#define TARGET_NR_munlockall 231 +#define TARGET_NR_mincore 232 +#define TARGET_NR_madvise 233 +#define TARGET_NR_remap_file_pages 234 +#define TARGET_NR_mbind 235 +#define TARGET_NR_get_mempolicy 236 +#define TARGET_NR_set_mempolicy 237 +#define TARGET_NR_migrate_pages 238 +#define TARGET_NR_move_pages 239 +#define TARGET_NR_rt_tgsigqueueinfo 240 +#define TARGET_NR_perf_event_open 241 +#define TARGET_NR_accept4 242 +#define TARGET_NR_recvmmsg 243 +#define TARGET_NR_arch_specific_syscall 244 +#define TARGET_NR_wait4 260 +#define TARGET_NR_prlimit64 261 +#define TARGET_NR_fanotify_init 262 +#define TARGET_NR_fanotify_mark 263 +#define TARGET_NR_name_to_handle_at 264 +#define TARGET_NR_open_by_handle_at 265 +#define TARGET_NR_clock_adjtime 266 +#define TARGET_NR_syncfs 267 +#define TARGET_NR_setns 268 +#define TARGET_NR_sendmmsg 269 +#define TARGET_NR_process_vm_readv 270 +#define TARGET_NR_process_vm_writev 271 +#define TARGET_NR_kcmp 272 +#define TARGET_NR_finit_module 273 +#define TARGET_NR_sched_setattr 274 +#define TARGET_NR_sched_getattr 275 +#define TARGET_NR_renameat2 276 +#define TARGET_NR_seccomp 277 +#define TARGET_NR_getrandom 278 +#define TARGET_NR_memfd_create 279 +#define TARGET_NR_bpf 280 +#define TARGET_NR_execveat 281 +#define TARGET_NR_userfaultfd 282 +#define TARGET_NR_membarrier 283 +#define TARGET_NR_mlock2 284 +#define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289 +#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_io_pgetevents 292 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 +#define TARGET_NR_clock_gettime64 403 +#define TARGET_NR_clock_settime64 404 +#define TARGET_NR_clock_adjtime64 405 +#define TARGET_NR_clock_getres_time64 406 +#define TARGET_NR_clock_nanosleep_time64 407 +#define TARGET_NR_timer_gettime64 408 +#define TARGET_NR_timer_settime64 409 +#define TARGET_NR_timerfd_gettime64 410 +#define TARGET_NR_timerfd_settime64 411 +#define TARGET_NR_utimensat_time64 412 +#define TARGET_NR_pselect6_time64 413 +#define TARGET_NR_ppoll_time64 414 +#define TARGET_NR_io_pgetevents_time64 416 +#define TARGET_NR_recvmmsg_time64 417 +#define TARGET_NR_mq_timedsend_time64 418 +#define TARGET_NR_mq_timedreceive_time64 419 +#define TARGET_NR_semtimedop_time64 420 +#define TARGET_NR_rt_sigtimedwait_time64 421 +#define TARGET_NR_futex_time64 422 +#define TARGET_NR_sched_rr_get_interval_time64 423 +#define TARGET_NR_pidfd_send_signal 424 +#define TARGET_NR_io_uring_setup 425 +#define TARGET_NR_io_uring_enter 426 +#define TARGET_NR_io_uring_register 427 +#define TARGET_NR_open_tree 428 +#define TARGET_NR_move_mount 429 +#define TARGET_NR_fsopen 430 +#define TARGET_NR_fsconfig 431 +#define TARGET_NR_fsmount 432 +#define TARGET_NR_fspick 433 +#define TARGET_NR_pidfd_open 434 +#define TARGET_NR_syscalls 436 + +#endif /* LINUX_USER_NIOS2_SYSCALL_NR_H */ -#endif From a64ddbb03acf1ee916c826ae89e0e1aa6500d5ae Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 16 Mar 2020 09:56:20 +0100 Subject: [PATCH 32/32] linux-user, openrisc: sync syscall numbers with kernel v5.5 Use helper script scripts/gensyscalls.sh to generate the file. Add TARGET_NR_or1k_atomic Remove useless comments and blank lines. Define diretly the __NR_XXX64 syscalls rather than using the intermediate __NR3264 definition. Remove wrong cut'n'paste (like "#ifdef __ARCH_WANT_SYNC_FILE_RANGE2") Add new syscalls from 286 (preadv) to 434 (pidfd_open). Remove obsolete syscalls 1204 (open) to 1079 (fork). Signed-off-by: Laurent Vivier Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Message-Id: <20200316085620.309769-5-laurent@vivier.eu> --- linux-user/openrisc/syscall_nr.h | 307 ++++++------------------------- 1 file changed, 61 insertions(+), 246 deletions(-) diff --git a/linux-user/openrisc/syscall_nr.h b/linux-user/openrisc/syscall_nr.h index 7763dbcfd8..340383beb2 100644 --- a/linux-user/openrisc/syscall_nr.h +++ b/linux-user/openrisc/syscall_nr.h @@ -1,13 +1,17 @@ +/* + * This file contains the system call numbers. + * Do not modify. + * This file is generated by scripts/gensyscalls.sh + */ #ifndef LINUX_USER_OPENRISC_SYSCALL_NR_H #define LINUX_USER_OPENRISC_SYSCALL_NR_H #define TARGET_NR_io_setup 0 +#define TARGET_NR_or1k_atomic TARGET_NR_arch_specific_syscall #define TARGET_NR_io_destroy 1 #define TARGET_NR_io_submit 2 #define TARGET_NR_io_cancel 3 #define TARGET_NR_io_getevents 4 - -/* fs/xattr.c */ #define TARGET_NR_setxattr 5 #define TARGET_NR_lsetxattr 6 #define TARGET_NR_fsetxattr 7 @@ -20,63 +24,36 @@ #define TARGET_NR_removexattr 14 #define TARGET_NR_lremovexattr 15 #define TARGET_NR_fremovexattr 16 - -/* fs/dcache.c */ #define TARGET_NR_getcwd 17 - -/* fs/cookies.c */ #define TARGET_NR_lookup_dcookie 18 - -/* fs/eventfd.c */ #define TARGET_NR_eventfd2 19 - -/* fs/eventpoll.c */ #define TARGET_NR_epoll_create1 20 #define TARGET_NR_epoll_ctl 21 #define TARGET_NR_epoll_pwait 22 - -/* fs/fcntl.c */ #define TARGET_NR_dup 23 #define TARGET_NR_dup3 24 -#define TARGET_NR_3264_fcntl 25 - -/* fs/inotify_user.c */ +#define TARGET_NR_fcntl64 25 #define TARGET_NR_inotify_init1 26 #define TARGET_NR_inotify_add_watch 27 #define TARGET_NR_inotify_rm_watch 28 - -/* fs/ioctl.c */ #define TARGET_NR_ioctl 29 - -/* fs/ioprio.c */ #define TARGET_NR_ioprio_set 30 #define TARGET_NR_ioprio_get 31 - -/* fs/locks.c */ #define TARGET_NR_flock 32 - -/* fs/namei.c */ #define TARGET_NR_mknodat 33 #define TARGET_NR_mkdirat 34 #define TARGET_NR_unlinkat 35 #define TARGET_NR_symlinkat 36 #define TARGET_NR_linkat 37 #define TARGET_NR_renameat 38 - -/* fs/namespace.c */ #define TARGET_NR_umount2 39 #define TARGET_NR_mount 40 #define TARGET_NR_pivot_root 41 - -/* fs/nfsctl.c */ #define TARGET_NR_nfsservctl 42 - -/* fs/open.c */ -#define TARGET_NR_3264_statfs 43 -#define TARGET_NR_3264_fstatfs 44 -#define TARGET_NR_3264_truncate 45 -#define TARGET_NR_3264_ftruncate 46 - +#define TARGET_NR_statfs64 43 +#define TARGET_NR_fstatfs64 44 +#define TARGET_NR_truncate64 45 +#define TARGET_NR_ftruncate64 46 #define TARGET_NR_fallocate 47 #define TARGET_NR_faccessat 48 #define TARGET_NR_chdir 49 @@ -89,18 +66,10 @@ #define TARGET_NR_openat 56 #define TARGET_NR_close 57 #define TARGET_NR_vhangup 58 - -/* fs/pipe.c */ #define TARGET_NR_pipe2 59 - -/* fs/quota.c */ #define TARGET_NR_quotactl 60 - -/* fs/readdir.c */ #define TARGET_NR_getdents64 61 - -/* fs/read_write.c */ -#define TARGET_NR_3264_lseek 62 +#define TARGET_NR_llseek 62 #define TARGET_NR_read 63 #define TARGET_NR_write 64 #define TARGET_NR_readv 65 @@ -109,85 +78,42 @@ #define TARGET_NR_pwrite64 68 #define TARGET_NR_preadv 69 #define TARGET_NR_pwritev 70 - -/* fs/sendfile.c */ -#define TARGET_NR_3264_sendfile 71 - -/* fs/select.c */ +#define TARGET_NR_sendfile64 71 #define TARGET_NR_pselect6 72 #define TARGET_NR_ppoll 73 - -/* fs/signalfd.c */ #define TARGET_NR_signalfd4 74 - -/* fs/splice.c */ #define TARGET_NR_vmsplice 75 #define TARGET_NR_splice 76 #define TARGET_NR_tee 77 - -/* fs/stat.c */ #define TARGET_NR_readlinkat 78 -#define TARGET_NR_3264_fstatat 79 -#define TARGET_NR_3264_fstat 80 - -/* fs/sync.c */ +#define TARGET_NR_fstatat64 79 +#define TARGET_NR_fstat64 80 #define TARGET_NR_sync 81 #define TARGET_NR_fsync 82 #define TARGET_NR_fdatasync 83 - -#ifdef __ARCH_WANT_SYNC_FILE_RANGE2 -#define TARGET_NR_sync_file_range2 84 -#else #define TARGET_NR_sync_file_range 84 -#endif - -/* fs/timerfd.c */ #define TARGET_NR_timerfd_create 85 #define TARGET_NR_timerfd_settime 86 #define TARGET_NR_timerfd_gettime 87 - -/* fs/utimes.c */ #define TARGET_NR_utimensat 88 - -/* kernel/acct.c */ #define TARGET_NR_acct 89 - -/* kernel/capability.c */ #define TARGET_NR_capget 90 #define TARGET_NR_capset 91 - -/* kernel/exec_domain.c */ #define TARGET_NR_personality 92 - -/* kernel/exit.c */ #define TARGET_NR_exit 93 #define TARGET_NR_exit_group 94 #define TARGET_NR_waitid 95 - -/* kernel/fork.c */ #define TARGET_NR_set_tid_address 96 #define TARGET_NR_unshare 97 - -/* kernel/futex.c */ #define TARGET_NR_futex 98 #define TARGET_NR_set_robust_list 99 #define TARGET_NR_get_robust_list 100 - -/* kernel/hrtimer.c */ #define TARGET_NR_nanosleep 101 - -/* kernel/itimer.c */ #define TARGET_NR_getitimer 102 #define TARGET_NR_setitimer 103 - -/* kernel/kexec.c */ #define TARGET_NR_kexec_load 104 - -/* kernel/module.c */ #define TARGET_NR_init_module 105 #define TARGET_NR_delete_module 106 - -/* kernel/posix-timers.c */ #define TARGET_NR_timer_create 107 #define TARGET_NR_timer_gettime 108 #define TARGET_NR_timer_getoverrun 109 @@ -197,14 +123,8 @@ #define TARGET_NR_clock_gettime 113 #define TARGET_NR_clock_getres 114 #define TARGET_NR_clock_nanosleep 115 - -/* kernel/printk.c */ #define TARGET_NR_syslog 116 - -/* kernel/ptrace.c */ #define TARGET_NR_ptrace 117 - -/* kernel/sched.c */ #define TARGET_NR_sched_setparam 118 #define TARGET_NR_sched_setscheduler 119 #define TARGET_NR_sched_getscheduler 120 @@ -215,8 +135,6 @@ #define TARGET_NR_sched_get_priority_max 125 #define TARGET_NR_sched_get_priority_min 126 #define TARGET_NR_sched_rr_get_interval 127 - -/* kernel/signal.c */ #define TARGET_NR_restart_syscall 128 #define TARGET_NR_kill 129 #define TARGET_NR_tkill 130 @@ -229,8 +147,6 @@ #define TARGET_NR_rt_sigtimedwait 137 #define TARGET_NR_rt_sigqueueinfo 138 #define TARGET_NR_rt_sigreturn 139 - -/* kernel/sys.c */ #define TARGET_NR_setpriority 140 #define TARGET_NR_getpriority 141 #define TARGET_NR_reboot 142 @@ -260,13 +176,9 @@ #define TARGET_NR_umask 166 #define TARGET_NR_prctl 167 #define TARGET_NR_getcpu 168 - -/* kernel/time.c */ #define TARGET_NR_gettimeofday 169 #define TARGET_NR_settimeofday 170 #define TARGET_NR_adjtimex 171 - -/* kernel/timer.c */ #define TARGET_NR_getpid 172 #define TARGET_NR_getppid 173 #define TARGET_NR_getuid 174 @@ -275,34 +187,24 @@ #define TARGET_NR_getegid 177 #define TARGET_NR_gettid 178 #define TARGET_NR_sysinfo 179 - -/* ipc/mqueue.c */ #define TARGET_NR_mq_open 180 #define TARGET_NR_mq_unlink 181 #define TARGET_NR_mq_timedsend 182 #define TARGET_NR_mq_timedreceive 183 #define TARGET_NR_mq_notify 184 #define TARGET_NR_mq_getsetattr 185 - -/* ipc/msg.c */ #define TARGET_NR_msgget 186 #define TARGET_NR_msgctl 187 #define TARGET_NR_msgrcv 188 #define TARGET_NR_msgsnd 189 - -/* ipc/sem.c */ #define TARGET_NR_semget 190 #define TARGET_NR_semctl 191 #define TARGET_NR_semtimedop 192 #define TARGET_NR_semop 193 - -/* ipc/shm.c */ #define TARGET_NR_shmget 194 #define TARGET_NR_shmctl 195 #define TARGET_NR_shmat 196 #define TARGET_NR_shmdt 197 - -/* net/socket.c */ #define TARGET_NR_socket 198 #define TARGET_NR_socketpair 199 #define TARGET_NR_bind 200 @@ -318,30 +220,17 @@ #define TARGET_NR_shutdown 210 #define TARGET_NR_sendmsg 211 #define TARGET_NR_recvmsg 212 - -/* mm/filemap.c */ #define TARGET_NR_readahead 213 - -/* mm/nommu.c, also with MMU */ #define TARGET_NR_brk 214 #define TARGET_NR_munmap 215 #define TARGET_NR_mremap 216 - -/* security/keys/keyctl.c */ #define TARGET_NR_add_key 217 #define TARGET_NR_request_key 218 #define TARGET_NR_keyctl 219 - -/* arch/example/kernel/sys_example.c */ #define TARGET_NR_clone 220 #define TARGET_NR_execve 221 - -#define TARGET_NR_3264_mmap 222 -/* mm/fadvise.c */ -#define TARGET_NR_3264_fadvise64 223 - -/* mm/, CONFIG_MMU only */ -#ifndef __ARCH_NOMMU +#define TARGET_NR_mmap2 222 +#define TARGET_NR_fadvise64_64 223 #define TARGET_NR_swapon 224 #define TARGET_NR_swapoff 225 #define TARGET_NR_mprotect 226 @@ -358,25 +247,17 @@ #define TARGET_NR_set_mempolicy 237 #define TARGET_NR_migrate_pages 238 #define TARGET_NR_move_pages 239 -#endif - #define TARGET_NR_rt_tgsigqueueinfo 240 #define TARGET_NR_perf_event_open 241 #define TARGET_NR_accept4 242 #define TARGET_NR_recvmmsg 243 - -/* - * Architectures may provide up to 16 syscalls of their own - * starting with this value. - */ #define TARGET_NR_arch_specific_syscall 244 - #define TARGET_NR_wait4 260 #define TARGET_NR_prlimit64 261 #define TARGET_NR_fanotify_init 262 #define TARGET_NR_fanotify_mark 263 -#define TARGET_NR_name_to_handle_at 264 -#define TARGET_NR_open_by_handle_at 265 +#define TARGET_NR_name_to_handle_at 264 +#define TARGET_NR_open_by_handle_at 265 #define TARGET_NR_clock_adjtime 266 #define TARGET_NR_syncfs 267 #define TARGET_NR_setns 268 @@ -397,113 +278,47 @@ #define TARGET_NR_membarrier 283 #define TARGET_NR_mlock2 284 #define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289 +#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_io_pgetevents 292 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 +#define TARGET_NR_clock_gettime64 403 +#define TARGET_NR_clock_settime64 404 +#define TARGET_NR_clock_adjtime64 405 +#define TARGET_NR_clock_getres_time64 406 +#define TARGET_NR_clock_nanosleep_time64 407 +#define TARGET_NR_timer_gettime64 408 +#define TARGET_NR_timer_settime64 409 +#define TARGET_NR_timerfd_gettime64 410 +#define TARGET_NR_timerfd_settime64 411 +#define TARGET_NR_utimensat_time64 412 +#define TARGET_NR_pselect6_time64 413 +#define TARGET_NR_ppoll_time64 414 +#define TARGET_NR_io_pgetevents_time64 416 +#define TARGET_NR_recvmmsg_time64 417 +#define TARGET_NR_mq_timedsend_time64 418 +#define TARGET_NR_mq_timedreceive_time64 419 +#define TARGET_NR_semtimedop_time64 420 +#define TARGET_NR_rt_sigtimedwait_time64 421 +#define TARGET_NR_futex_time64 422 +#define TARGET_NR_sched_rr_get_interval_time64 423 +#define TARGET_NR_pidfd_send_signal 424 +#define TARGET_NR_io_uring_setup 425 +#define TARGET_NR_io_uring_enter 426 +#define TARGET_NR_io_uring_register 427 +#define TARGET_NR_open_tree 428 +#define TARGET_NR_move_mount 429 +#define TARGET_NR_fsopen 430 +#define TARGET_NR_fsconfig 431 +#define TARGET_NR_fsmount 432 +#define TARGET_NR_fspick 433 +#define TARGET_NR_pidfd_open 434 +#define TARGET_NR_syscalls 436 -/* - * All syscalls below here should go away really, - * these are provided for both review and as a porting - * help for the C library version. -* - * Last chance: are any of these important enough to - * enable by default? - */ -#define TARGET_NR_open 1024 -#define TARGET_NR_link 1025 -#define TARGET_NR_unlink 1026 -#define TARGET_NR_mknod 1027 -#define TARGET_NR_chmod 1028 -#define TARGET_NR_chown 1029 -#define TARGET_NR_mkdir 1030 -#define TARGET_NR_rmdir 1031 -#define TARGET_NR_lchown 1032 -#define TARGET_NR_access 1033 -#define TARGET_NR_rename 1034 -#define TARGET_NR_readlink 1035 -#define TARGET_NR_symlink 1036 -#define TARGET_NR_utimes 1037 -#define TARGET_NR_3264_stat 1038 -#define TARGET_NR_3264_lstat 1039 +#endif /* LINUX_USER_OPENRISC_SYSCALL_NR_H */ -#define TARGET_NR_pipe 1040 -#define TARGET_NR_dup2 1041 -#define TARGET_NR_epoll_create 1042 -#define TARGET_NR_inotify_init 1043 -#define TARGET_NR_eventfd 1044 -#define TARGET_NR_signalfd 1045 - -#define TARGET_NR_sendfile 1046 -#define TARGET_NR_ftruncate 1047 -#define TARGET_NR_truncate 1048 -#define TARGET_NR_stat 1049 -#define TARGET_NR_lstat 1050 -#define TARGET_NR_fstat 1051 -#define TARGET_NR_fcntl 1052 -#define TARGET_NR_fadvise64 1053 -#define __ARCH_WANT_SYS_FADVISE64 -#define TARGET_NR_newfstatat 1054 -#define __ARCH_WANT_SYS_NEWFSTATAT -#define TARGET_NR_fstatfs 1055 -#define TARGET_NR_statfs 1056 -#define TARGET_NR_lseek 1057 -#define TARGET_NR_mmap 1058 - -#define TARGET_NR_alarm 1059 -#define __ARCH_WANT_SYS_ALARM -#define TARGET_NR_getpgrp 1060 -#define __ARCH_WANT_SYS_GETPGRP -#define TARGET_NR_pause 1061 -#define __ARCH_WANT_SYS_PAUSE -#define TARGET_NR_time 1062 -#define __ARCH_WANT_SYS_TIME -#define __ARCH_WANT_COMPAT_SYS_TIME -#define TARGET_NR_utime 1063 -#define __ARCH_WANT_SYS_UTIME - -#define TARGET_NR_creat 1064 -#define TARGET_NR_getdents 1065 -#define __ARCH_WANT_SYS_GETDENTS -#define TARGET_NR_futimesat 1066 -#define TARGET_NR_poll 1068 -#define TARGET_NR_epoll_wait 1069 -#define TARGET_NR_ustat 1070 -#define TARGET_NR_vfork 1071 -#define TARGET_NR_oldwait4 1072 -#define TARGET_NR_recv 1073 -#define TARGET_NR_send 1074 -#define TARGET_NR_bdflush 1075 -#define TARGET_NR_umount 1076 -#define __ARCH_WANT_SYS_OLDUMOUNT -#define TARGET_NR_uselib 1077 -#define TARGET_NR__sysctl 1078 - -#define TARGET_NR_fork 1079 - - -/* - * 32 bit systems traditionally used different - * syscalls for off_t and loff_t arguments, while - * 64 bit systems only need the off_t version. - * For new 32 bit platforms, there is no need to - * implement the old 32 bit off_t syscalls, so - * they take different names. - * Here we map the numbers so that both versions - * use the same syscall table layout. - */ - -#define TARGET_NR_fcntl64 TARGET_NR_3264_fcntl -#define TARGET_NR_statfs64 TARGET_NR_3264_statfs -#define TARGET_NR_fstatfs64 TARGET_NR_3264_fstatfs -#define TARGET_NR_truncate64 TARGET_NR_3264_truncate -#define TARGET_NR_ftruncate64 TARGET_NR_3264_ftruncate -#define TARGET_NR_llseek TARGET_NR_3264_lseek -#define TARGET_NR_sendfile64 TARGET_NR_3264_sendfile -#define TARGET_NR_fstatat64 TARGET_NR_3264_fstatat -#define TARGET_NR_fstat64 TARGET_NR_3264_fstat -#define TARGET_NR_mmap2 TARGET_NR_3264_mmap -#define TARGET_NR_fadvise64_64 TARGET_NR_3264_fadvise64 - -#ifdef TARGET_NR_3264_stat -#define TARGET_NR_stat64 TARGET_NR_3264_stat -#define TARGET_NR_lstat64 TARGET_NR_3264_lstat -#endif - -#endif