aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/linux')
-rw-r--r--sys/amd64/linux/Makefile1
-rw-r--r--sys/amd64/linux/linux.h104
-rw-r--r--sys/amd64/linux/linux_dummy_machdep.c16
-rw-r--r--sys/amd64/linux/linux_genassym.c5
-rw-r--r--sys/amd64/linux/linux_locore.asm6
-rw-r--r--sys/amd64/linux/linux_machdep.c173
-rw-r--r--sys/amd64/linux/linux_proto.h128
-rw-r--r--sys/amd64/linux/linux_support.S (renamed from sys/amd64/linux/linux_support.s)4
-rw-r--r--sys/amd64/linux/linux_syscall.h18
-rw-r--r--sys/amd64/linux/linux_syscalls.c18
-rw-r--r--sys/amd64/linux/linux_sysent.c241
-rw-r--r--sys/amd64/linux/linux_systrace_args.c297
-rw-r--r--sys/amd64/linux/linux_sysvec.c509
-rw-r--r--sys/amd64/linux/linux_vdso.lds.s2
-rw-r--r--sys/amd64/linux/linux_vdso_gtod.c11
-rw-r--r--sys/amd64/linux/syscalls.conf2
-rw-r--r--sys/amd64/linux/syscalls.master138
17 files changed, 960 insertions, 713 deletions
diff --git a/sys/amd64/linux/Makefile b/sys/amd64/linux/Makefile
index 662c7f8fc42f..e0d74bb46c78 100644
--- a/sys/amd64/linux/Makefile
+++ b/sys/amd64/linux/Makefile
@@ -1,6 +1,5 @@
# Makefile for syscall tables
#
-# $FreeBSD$
GENERATED_PREFIX= linux_
diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h
index c9e28f20ef94..918b9129f47b 100644
--- a/sys/amd64/linux/linux.h
+++ b/sys/amd64/linux/linux.h
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
@@ -25,8 +25,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#ifndef _AMD64_LINUX_H_
@@ -54,7 +52,6 @@ typedef uint16_t l_ushort;
typedef l_ulong l_uintptr_t;
typedef l_long l_clock_t;
typedef l_int l_daddr_t;
-typedef l_ulong l_dev_t;
typedef l_uint l_gid_t;
typedef l_ushort l_gid16_t;
typedef l_uint l_uid_t;
@@ -90,7 +87,10 @@ typedef struct {
/*
* Miscellaneous
*/
-#define LINUX_AT_COUNT 20 /* Count of used aux entry types. */
+#define LINUX_AT_COUNT 21 /* Count of used aux entry types.
+ * Keep this synchronized with
+ * linux_copyout_auxargs() code.
+ */
struct l___sysctl_args
{
@@ -131,14 +131,14 @@ struct l_timespec {
};
struct l_newstat {
- l_dev_t st_dev;
+ l_ulong st_dev;
l_ino_t st_ino;
l_ulong st_nlink;
l_uint st_mode;
l_uid_t st_uid;
l_gid_t st_gid;
- l_uint __st_pad1;
- l_dev_t st_rdev;
+ l_uint __st_pad0;
+ l_ulong st_rdev;
l_off_t st_size;
l_long st_blksize;
l_long st_blocks;
@@ -188,34 +188,6 @@ typedef struct {
#define LINUX_MS_NOEXEC 0x0008
#define LINUX_MS_REMOUNT 0x0020
-/*
- * SystemV IPC defines
- */
-#define LINUX_IPC_RMID 0
-#define LINUX_IPC_SET 1
-#define LINUX_IPC_STAT 2
-#define LINUX_IPC_INFO 3
-
-#define LINUX_SHM_LOCK 11
-#define LINUX_SHM_UNLOCK 12
-#define LINUX_SHM_STAT 13
-#define LINUX_SHM_INFO 14
-
-#define LINUX_SHM_RDONLY 0x1000
-#define LINUX_SHM_RND 0x2000
-#define LINUX_SHM_REMAP 0x4000
-
-/* semctl commands */
-#define LINUX_GETPID 11
-#define LINUX_GETVAL 12
-#define LINUX_GETALL 13
-#define LINUX_GETNCNT 14
-#define LINUX_GETZCNT 15
-#define LINUX_SETVAL 16
-#define LINUX_SETALL 17
-#define LINUX_SEM_STAT 18
-#define LINUX_SEM_INFO 19
-
union l_semun {
l_int val;
l_uintptr_t buf;
@@ -224,51 +196,6 @@ union l_semun {
l_uintptr_t __pad;
};
-struct l_ifmap {
- l_ulong mem_start;
- l_ulong mem_end;
- l_ushort base_addr;
- u_char irq;
- u_char dma;
- u_char port;
- /* 3 bytes spare */
-};
-
-struct l_ifreq {
- union {
- char ifrn_name[LINUX_IFNAMSIZ];
- } ifr_ifrn;
-
- union {
- struct l_sockaddr ifru_addr;
- struct l_sockaddr ifru_dstaddr;
- struct l_sockaddr ifru_broadaddr;
- struct l_sockaddr ifru_netmask;
- struct l_sockaddr ifru_hwaddr;
- l_short ifru_flags[1];
- l_int ifru_ivalue;
- l_int ifru_mtu;
- struct l_ifmap ifru_map;
- char ifru_slave[LINUX_IFNAMSIZ];
- l_uintptr_t ifru_data;
- } ifr_ifru;
-};
-
-#define ifr_name ifr_ifrn.ifrn_name /* Interface name */
-#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
-#define ifr_ifindex ifr_ifru.ifru_ivalue /* Interface index */
-
-struct l_ifconf {
- int ifc_len;
- union {
- l_uintptr_t ifcu_buf;
- l_uintptr_t ifcu_req;
- } ifc_ifcu;
-};
-
-#define ifc_buf ifc_ifcu.ifcu_buf
-#define ifc_req ifc_ifcu.ifcu_req
-
#define LINUX_ARCH_SET_GS 0x1001
#define LINUX_ARCH_SET_FS 0x1002
#define LINUX_ARCH_GET_FS 0x1003
@@ -277,17 +204,6 @@ struct l_ifconf {
#define linux_copyout_rusage(r, u) copyout(r, u, sizeof(*r))
-/* robust futexes */
-struct linux_robust_list {
- l_uintptr_t next;
-};
-
-struct linux_robust_list_head {
- struct linux_robust_list list;
- l_long futex_offset;
- l_uintptr_t pending_list;
-};
-
/* This corresponds to 'struct user_regs_struct' in Linux. */
struct linux_pt_regset {
l_ulong r15;
@@ -331,6 +247,10 @@ void linux_ptrace_get_syscall_info_machdep(const struct reg *reg,
struct syscall_info *si);
int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
struct linux_pt_regset *l_regset);
+int linux_ptrace_peekuser(struct thread *td, pid_t pid,
+ void *addr, void *data);
+int linux_ptrace_pokeuser(struct thread *td, pid_t pid,
+ void *addr, void *data);
#endif /* _KERNEL */
#endif /* !_AMD64_LINUX_H_ */
diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c
index 3ce407af291c..53bdb8099578 100644
--- a/sys/amd64/linux/linux_dummy_machdep.c
+++ b/sys/amd64/linux/linux_dummy_machdep.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2013 Dmitry Chagin <dchagin@FreeBSD.org>
*
@@ -25,14 +25,10 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/kernel.h>
-#include <sys/sdt.h>
-#include <sys/systm.h>
#include <sys/proc.h>
+#include <sys/sdt.h>
#include <amd64/linux/linux.h>
#include <amd64/linux/linux_proto.h>
@@ -60,13 +56,9 @@ DUMMY(io_destroy);
DUMMY(io_getevents);
DUMMY(io_submit);
DUMMY(io_cancel);
-DUMMY(mq_open);
-DUMMY(mq_unlink);
-DUMMY(mq_timedsend);
-DUMMY(mq_timedreceive);
-DUMMY(mq_notify);
-DUMMY(mq_getsetattr);
DUMMY(readahead);
DUMMY(restart_syscall);
/* Linux 3.15: */
DUMMY(kexec_file_load);
+/* Linux 6.6: */
+DUMMY(map_shadow_stack);
diff --git a/sys/amd64/linux/linux_genassym.c b/sys/amd64/linux/linux_genassym.c
index 14880afcc89b..61526cd144b2 100644
--- a/sys/amd64/linux/linux_genassym.c
+++ b/sys/amd64/linux/linux_genassym.c
@@ -1,9 +1,6 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
-#include <sys/assym.h>
#include <sys/systm.h>
+#include <sys/assym.h>
#include <amd64/linux/linux.h>
#include <compat/linux/linux_mib.h>
diff --git a/sys/amd64/linux/linux_locore.asm b/sys/amd64/linux/linux_locore.asm
index f26996980007..19a6ac5d50d8 100644
--- a/sys/amd64/linux/linux_locore.asm
+++ b/sys/amd64/linux/linux_locore.asm
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2015-2022 Dmitry Chagin <dchagin@freeBSD.org>
*
@@ -23,8 +23,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include "linux_assym.h" /* system definitions */
@@ -60,8 +58,6 @@ ENTRY(linux_rt_sigcode)
.cfi_offset %rax, L_SC_RAX
.cfi_offset %rcx, L_SC_RCX
.cfi_offset %rip, L_SC_RIP
- .cfi_offset 49, L_SC_RFLAGS
- .cfi_offset %cs, L_SC_CS
.cfi_offset %rsp, L_SC_RSP
movq %rsp, %rbx /* rt_sigframe for rt_sigreturn */
diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c
index 1c042424f3ea..7ec1ec56bb95 100644
--- a/sys/amd64/linux/linux_machdep.c
+++ b/sys/amd64/linux/linux_machdep.c
@@ -29,54 +29,24 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
-#include <sys/capsicum.h>
-#include <sys/clock.h>
-#include <sys/dirent.h>
-#include <sys/fcntl.h>
-#include <sys/file.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
+#include <sys/systm.h>
#include <sys/ktr.h>
-#include <sys/limits.h>
#include <sys/lock.h>
-#include <sys/malloc.h>
#include <sys/mman.h>
#include <sys/mutex.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/resourcevar.h>
-#include <sys/sched.h>
#include <sys/syscallsubr.h>
-#include <sys/sysproto.h>
-#include <sys/systm.h>
-#include <sys/unistd.h>
-#include <sys/vnode.h>
-#include <sys/wait.h>
-#include <security/mac/mac_framework.h>
-
-#include <ufs/ufs/extattr.h>
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-
-#include <machine/frame.h>
#include <machine/md_var.h>
#include <machine/pcb.h>
-#include <machine/psl.h>
-#include <machine/segments.h>
#include <machine/specialreg.h>
#include <vm/pmap.h>
#include <vm/vm.h>
-#include <vm/vm_extern.h>
-#include <vm/vm_kern.h>
-#include <vm/vm_map.h>
+#include <vm/vm_param.h>
#include <x86/ifunc.h>
#include <x86/reg.h>
@@ -84,13 +54,8 @@ __FBSDID("$FreeBSD$");
#include <amd64/linux/linux.h>
#include <amd64/linux/linux_proto.h>
-#include <compat/linux/linux_emul.h>
-#include <compat/linux/linux_file.h>
#include <compat/linux/linux_fork.h>
-#include <compat/linux/linux_ipc.h>
#include <compat/linux/linux_misc.h>
-#include <compat/linux/linux_mmap.h>
-#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_util.h>
#define LINUX_ARCH_AMD64 0xc000003e
@@ -111,28 +76,6 @@ linux_set_upcall(struct thread *td, register_t stack)
}
int
-linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
-{
-
- return (linux_mmap_common(td, args->addr, args->len, args->prot,
- args->flags, args->fd, args->pgoff));
-}
-
-int
-linux_mprotect(struct thread *td, struct linux_mprotect_args *uap)
-{
-
- return (linux_mprotect_common(td, uap->addr, uap->len, uap->prot));
-}
-
-int
-linux_madvise(struct thread *td, struct linux_madvise_args *uap)
-{
-
- return (linux_madvise_common(td, uap->addr, uap->len, uap->behav));
-}
-
-int
linux_iopl(struct thread *td, struct linux_iopl_args *args)
{
int error;
@@ -368,12 +311,6 @@ linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
linux_msg(td, "PT_LWPINFO failed with error %d", error);
return (error);
}
- if ((lwpinfo.pl_flags & PL_FLAG_SCE) != 0) {
- /*
- * Undo the mangling done in exception.S:fast_syscall_common().
- */
- l_regset->r10 = l_regset->rcx;
- }
if ((lwpinfo.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)) != 0) {
/*
* In Linux, the syscall number - passed to the syscall
@@ -385,3 +322,109 @@ linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
return (0);
}
+
+#define LINUX_URO(a,m) ((uintptr_t)a == offsetof(struct linux_pt_regset, m))
+
+int
+linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data)
+{
+ struct linux_pt_regset reg;
+ struct reg b_reg;
+ uint64_t val;
+ int error;
+
+ if ((uintptr_t)addr & (sizeof(data) -1) || (uintptr_t)addr < 0)
+ return (EIO);
+ if ((uintptr_t)addr >= sizeof(struct linux_pt_regset)) {
+ LINUX_RATELIMIT_MSG_OPT1("PTRACE_PEEKUSER offset %ld "
+ "not implemented; returning EINVAL", (uintptr_t)addr);
+ return (EINVAL);
+ }
+
+ if (LINUX_URO(addr, fs_base))
+ return (kern_ptrace(td, PT_GETFSBASE, pid, data, 0));
+ if (LINUX_URO(addr, gs_base))
+ return (kern_ptrace(td, PT_GETGSBASE, pid, data, 0));
+ if ((error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0)) != 0)
+ return (error);
+ bsd_to_linux_regset(&b_reg, &reg);
+ val = *(&reg.r15 + ((uintptr_t)addr / sizeof(reg.r15)));
+ return (copyout(&val, data, sizeof(val)));
+}
+
+static inline bool
+linux_invalid_selector(u_short val)
+{
+
+ return (val != 0 && ISPL(val) != SEL_UPL);
+}
+
+struct linux_segreg_off {
+ uintptr_t reg;
+ bool is0;
+};
+
+const struct linux_segreg_off linux_segregs_off[] = {
+ {
+ .reg = offsetof(struct linux_pt_regset, gs),
+ .is0 = true,
+ },
+ {
+ .reg = offsetof(struct linux_pt_regset, fs),
+ .is0 = true,
+ },
+ {
+ .reg = offsetof(struct linux_pt_regset, ds),
+ .is0 = true,
+ },
+ {
+ .reg = offsetof(struct linux_pt_regset, es),
+ .is0 = true,
+ },
+ {
+ .reg = offsetof(struct linux_pt_regset, cs),
+ .is0 = false,
+ },
+ {
+ .reg = offsetof(struct linux_pt_regset, ss),
+ .is0 = false,
+ },
+};
+
+int
+linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
+{
+ struct linux_pt_regset reg;
+ struct reg b_reg, b_reg1;
+ int error, i;
+
+ if ((uintptr_t)addr & (sizeof(data) -1) || (uintptr_t)addr < 0)
+ return (EIO);
+ if ((uintptr_t)addr >= sizeof(struct linux_pt_regset)) {
+ LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld "
+ "not implemented; returning EINVAL", (uintptr_t)addr);
+ return (EINVAL);
+ }
+
+ if (LINUX_URO(addr, fs_base))
+ return (kern_ptrace(td, PT_SETFSBASE, pid, data, 0));
+ if (LINUX_URO(addr, gs_base))
+ return (kern_ptrace(td, PT_SETGSBASE, pid, data, 0));
+ for (i = 0; i < nitems(linux_segregs_off); i++) {
+ if ((uintptr_t)addr == linux_segregs_off[i].reg) {
+ if (linux_invalid_selector((uintptr_t)data))
+ return (EIO);
+ if (!linux_segregs_off[i].is0 && (uintptr_t)data == 0)
+ return (EIO);
+ }
+ }
+ if ((error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0)) != 0)
+ return (error);
+ bsd_to_linux_regset(&b_reg, &reg);
+ *(&reg.r15 + ((uintptr_t)addr / sizeof(reg.r15))) = (uint64_t)data;
+ linux_to_bsd_regset(&b_reg1, &reg);
+ b_reg1.r_err = b_reg.r_err;
+ b_reg1.r_trapno = b_reg.r_trapno;
+ return (kern_ptrace(td, PT_SETREGS, pid, &b_reg, 0));
+}
+#undef LINUX_URO
diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
index 8b4ea2bb42fc..f1d9c96a78d7 100644
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -2,14 +2,13 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically @generated.
- * $FreeBSD$
*/
#ifndef _LINUX_SYSPROTO_H_
#define _LINUX_SYSPROTO_H_
+#include <sys/types.h>
#include <sys/signal.h>
-#include <sys/acl.h>
#include <sys/cpuset.h>
#include <sys/domainset.h>
#include <sys/_ffcounter.h>
@@ -34,7 +33,11 @@ struct thread;
#define PADR_(t) 0
#endif
-#define nosys linux_nosys
+struct linux_write_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
+ char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)];
+};
struct linux_open_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
@@ -110,6 +113,11 @@ struct linux_pwrite_args {
char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)];
char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
};
+struct linux_writev_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
+ char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
+};
struct linux_access_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char amode_l_[PADL_(l_int)]; l_int amode; char amode_r_[PADR_(l_int)];
@@ -288,8 +296,8 @@ struct linux_vfork_args {
};
struct linux_execve_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
- char argp_l_[PADL_(char **)]; char ** argp; char argp_r_[PADR_(char **)];
- char envp_l_[PADL_(char **)]; char ** envp; char envp_r_[PADR_(char **)];
+ char argp_l_[PADL_(l_uintptr_t *)]; l_uintptr_t * argp; char argp_r_[PADR_(l_uintptr_t *)];
+ char envp_l_[PADL_(l_uintptr_t *)]; l_uintptr_t * envp; char envp_r_[PADR_(l_uintptr_t *)];
};
struct linux_exit_args {
char rval_l_[PADL_(l_int)]; l_int rval; char rval_r_[PADR_(l_int)];
@@ -501,7 +509,7 @@ struct linux_utime_args {
struct linux_mknod_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)];
- char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)];
+ char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)];
};
struct linux_personality_args {
char per_l_[PADL_(l_uint)]; l_uint per; char per_r_[PADR_(l_uint)];
@@ -635,55 +643,55 @@ struct linux_readahead_args {
struct linux_setxattr_args {
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
- char value_l_[PADL_(const char *)]; const char * value; char value_r_[PADR_(const char *)];
+ char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
};
struct linux_lsetxattr_args {
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
- char value_l_[PADL_(const char *)]; const char * value; char value_r_[PADR_(const char *)];
+ char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
};
struct linux_fsetxattr_args {
char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)];
char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
- char value_l_[PADL_(const char *)]; const char * value; char value_r_[PADR_(const char *)];
+ char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
};
struct linux_getxattr_args {
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
- char value_l_[PADL_(char *)]; char * value; char value_r_[PADR_(char *)];
+ char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
};
struct linux_lgetxattr_args {
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
- char value_l_[PADL_(char *)]; char * value; char value_r_[PADR_(char *)];
+ char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
};
struct linux_fgetxattr_args {
char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)];
char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
- char value_l_[PADL_(char *)]; char * value; char value_r_[PADR_(char *)];
+ char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
};
struct linux_listxattr_args {
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
- char list_l_[PADL_(const char *)]; const char * list; char list_r_[PADR_(const char *)];
+ char list_l_[PADL_(char *)]; char * list; char list_r_[PADR_(char *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
};
struct linux_llistxattr_args {
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
- char list_l_[PADL_(const char *)]; const char * list; char list_r_[PADR_(const char *)];
+ char list_l_[PADL_(char *)]; char * list; char list_r_[PADR_(char *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
};
struct linux_flistxattr_args {
char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)];
- char list_l_[PADL_(const char *)]; const char * list; char list_r_[PADR_(const char *)];
+ char list_l_[PADL_(char *)]; char * list; char list_r_[PADR_(char *)];
char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)];
};
struct linux_removexattr_args {
@@ -772,7 +780,7 @@ struct linux_fadvise64_args {
};
struct linux_timer_create_args {
char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)];
- char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)];
+ char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)];
char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)];
};
struct linux_timer_settime_args {
@@ -867,7 +875,7 @@ struct linux_mq_timedreceive_args {
};
struct linux_mq_notify_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
- char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)];
+ char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)];
};
struct linux_mq_getsetattr_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
@@ -894,19 +902,25 @@ struct linux_keyctl_args {
syscallarg_t dummy;
};
struct linux_ioprio_set_args {
- syscallarg_t dummy;
+ char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)];
+ char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)];
+ char ioprio_l_[PADL_(l_int)]; l_int ioprio; char ioprio_r_[PADR_(l_int)];
};
struct linux_ioprio_get_args {
- syscallarg_t dummy;
+ char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)];
+ char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)];
};
struct linux_inotify_init_args {
syscallarg_t dummy;
};
struct linux_inotify_add_watch_args {
- syscallarg_t dummy;
+ char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)];
+ char pathname_l_[PADL_(const char *)]; const char * pathname; char pathname_r_[PADR_(const char *)];
+ char mask_l_[PADL_(uint32_t)]; uint32_t mask; char mask_r_[PADR_(uint32_t)];
};
struct linux_inotify_rm_watch_args {
- syscallarg_t dummy;
+ char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)];
+ char wd_l_[PADL_(uint32_t)]; uint32_t wd; char wd_r_[PADR_(uint32_t)];
};
struct linux_migrate_pages_args {
syscallarg_t dummy;
@@ -926,7 +940,7 @@ struct linux_mknodat_args {
char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)];
char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)];
char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)];
- char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)];
+ char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)];
};
struct linux_fchownat_args {
char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)];
@@ -1363,7 +1377,9 @@ struct linux_clone3_args {
char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)];
};
struct linux_close_range_args {
- syscallarg_t dummy;
+ char first_l_[PADL_(l_uint)]; l_uint first; char first_r_[PADR_(l_uint)];
+ char last_l_[PADL_(l_uint)]; l_uint last; char last_r_[PADR_(l_uint)];
+ char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)];
};
struct linux_openat2_args {
syscallarg_t dummy;
@@ -1391,7 +1407,40 @@ struct linux_epoll_pwait2_args {
struct linux_mount_setattr_args {
syscallarg_t dummy;
};
-#define nosys linux_nosys
+struct linux_quotactl_fd_args {
+ syscallarg_t dummy;
+};
+struct linux_landlock_create_ruleset_args {
+ syscallarg_t dummy;
+};
+struct linux_landlock_add_rule_args {
+ syscallarg_t dummy;
+};
+struct linux_landlock_restrict_self_args {
+ syscallarg_t dummy;
+};
+struct linux_memfd_secret_args {
+ syscallarg_t dummy;
+};
+struct linux_process_mrelease_args {
+ syscallarg_t dummy;
+};
+struct linux_futex_waitv_args {
+ syscallarg_t dummy;
+};
+struct linux_set_mempolicy_home_node_args {
+ syscallarg_t dummy;
+};
+struct linux_cachestat_args {
+ syscallarg_t dummy;
+};
+struct linux_fchmodat2_args {
+ syscallarg_t dummy;
+};
+struct linux_map_shadow_stack_args {
+ syscallarg_t dummy;
+};
+int linux_write(struct thread *, struct linux_write_args *);
int linux_open(struct thread *, struct linux_open_args *);
int linux_newstat(struct thread *, struct linux_newstat_args *);
int linux_newfstat(struct thread *, struct linux_newfstat_args *);
@@ -1407,6 +1456,7 @@ int linux_rt_sigreturn(struct thread *, struct linux_rt_sigreturn_args *);
int linux_ioctl(struct thread *, struct linux_ioctl_args *);
int linux_pread(struct thread *, struct linux_pread_args *);
int linux_pwrite(struct thread *, struct linux_pwrite_args *);
+int linux_writev(struct thread *, struct linux_writev_args *);
int linux_access(struct thread *, struct linux_access_args *);
int linux_pipe(struct thread *, struct linux_pipe_args *);
int linux_select(struct thread *, struct linux_select_args *);
@@ -1689,6 +1739,18 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *);
int linux_process_madvise(struct thread *, struct linux_process_madvise_args *);
int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *);
int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
+int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *);
+int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *);
+int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *);
+int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *);
+int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *);
+int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *);
+int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *);
+int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *);
+int linux_cachestat(struct thread *, struct linux_cachestat_args *);
+int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *);
+int linux_map_shadow_stack(struct thread *, struct linux_map_shadow_stack_args *);
+#define LINUX_SYS_AUE_linux_write AUE_NULL
#define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC
#define LINUX_SYS_AUE_linux_newstat AUE_STAT
#define LINUX_SYS_AUE_linux_newfstat AUE_FSTAT
@@ -1704,6 +1766,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
#define LINUX_SYS_AUE_linux_ioctl AUE_IOCTL
#define LINUX_SYS_AUE_linux_pread AUE_PREAD
#define LINUX_SYS_AUE_linux_pwrite AUE_PWRITE
+#define LINUX_SYS_AUE_linux_writev AUE_WRITEV
#define LINUX_SYS_AUE_linux_access AUE_ACCESS
#define LINUX_SYS_AUE_linux_pipe AUE_PIPE
#define LINUX_SYS_AUE_linux_select AUE_SELECT
@@ -1883,8 +1946,8 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
#define LINUX_SYS_AUE_linux_add_key AUE_NULL
#define LINUX_SYS_AUE_linux_request_key AUE_NULL
#define LINUX_SYS_AUE_linux_keyctl AUE_NULL
-#define LINUX_SYS_AUE_linux_ioprio_set AUE_NULL
-#define LINUX_SYS_AUE_linux_ioprio_get AUE_NULL
+#define LINUX_SYS_AUE_linux_ioprio_set AUE_SETPRIORITY
+#define LINUX_SYS_AUE_linux_ioprio_get AUE_GETPRIORITY
#define LINUX_SYS_AUE_linux_inotify_init AUE_NULL
#define LINUX_SYS_AUE_linux_inotify_add_watch AUE_NULL
#define LINUX_SYS_AUE_linux_inotify_rm_watch AUE_NULL
@@ -1979,13 +2042,24 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
#define LINUX_SYS_AUE_linux_fspick AUE_NULL
#define LINUX_SYS_AUE_linux_pidfd_open AUE_NULL
#define LINUX_SYS_AUE_linux_clone3 AUE_NULL
-#define LINUX_SYS_AUE_linux_close_range AUE_NULL
+#define LINUX_SYS_AUE_linux_close_range AUE_CLOSERANGE
#define LINUX_SYS_AUE_linux_openat2 AUE_NULL
#define LINUX_SYS_AUE_linux_pidfd_getfd AUE_NULL
#define LINUX_SYS_AUE_linux_faccessat2 AUE_NULL
#define LINUX_SYS_AUE_linux_process_madvise AUE_NULL
#define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL
#define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL
+#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL
+#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL
+#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL
+#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL
+#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL
+#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL
+#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL
+#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL
+#define LINUX_SYS_AUE_linux_cachestat AUE_NULL
+#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL
+#define LINUX_SYS_AUE_linux_map_shadow_stack AUE_NULL
#undef PAD_
#undef PADL_
diff --git a/sys/amd64/linux/linux_support.s b/sys/amd64/linux/linux_support.S
index 1e9ad45b9623..7cc59b205a97 100644
--- a/sys/amd64/linux/linux_support.s
+++ b/sys/amd64/linux/linux_support.S
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2007 Konstantin Belousov
* All rights reserved.
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include "linux_assym.h" /* system definitions */
diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h
index 9fc5e8ca877f..3f1198399416 100644
--- a/sys/amd64/linux/linux_syscall.h
+++ b/sys/amd64/linux/linux_syscall.h
@@ -2,11 +2,10 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically @generated.
- * $FreeBSD$
*/
#define LINUX_SYS_read 0
-#define LINUX_SYS_write 1
+#define LINUX_SYS_linux_write 1
#define LINUX_SYS_linux_open 2
#define LINUX_SYS_close 3
#define LINUX_SYS_linux_newstat 4
@@ -25,7 +24,7 @@
#define LINUX_SYS_linux_pread 17
#define LINUX_SYS_linux_pwrite 18
#define LINUX_SYS_readv 19
-#define LINUX_SYS_writev 20
+#define LINUX_SYS_linux_writev 20
#define LINUX_SYS_linux_access 21
#define LINUX_SYS_linux_pipe 22
#define LINUX_SYS_linux_select 23
@@ -344,4 +343,15 @@
#define LINUX_SYS_linux_process_madvise 440
#define LINUX_SYS_linux_epoll_pwait2 441
#define LINUX_SYS_linux_mount_setattr 442
-#define LINUX_SYS_MAXSYSCALL 444
+#define LINUX_SYS_linux_quotactl_fd 443
+#define LINUX_SYS_linux_landlock_create_ruleset 444
+#define LINUX_SYS_linux_landlock_add_rule 445
+#define LINUX_SYS_linux_landlock_restrict_self 446
+#define LINUX_SYS_linux_memfd_secret 447
+#define LINUX_SYS_linux_process_mrelease 448
+#define LINUX_SYS_linux_futex_waitv 449
+#define LINUX_SYS_linux_set_mempolicy_home_node 450
+#define LINUX_SYS_linux_cachestat 451
+#define LINUX_SYS_linux_fchmodat2 452
+#define LINUX_SYS_linux_map_shadow_stack 453
+#define LINUX_SYS_MAXSYSCALL 454
diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c
index 68d3561e5fa7..eeec76f3f3b9 100644
--- a/sys/amd64/linux/linux_syscalls.c
+++ b/sys/amd64/linux/linux_syscalls.c
@@ -2,13 +2,11 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically @generated.
- * $FreeBSD$
*/
const char *linux_syscallnames[] = {
-#define nosys linux_nosys
"read", /* 0 = read */
- "write", /* 1 = write */
+ "linux_write", /* 1 = linux_write */
"linux_open", /* 2 = linux_open */
"close", /* 3 = close */
"linux_newstat", /* 4 = linux_newstat */
@@ -27,7 +25,7 @@ const char *linux_syscallnames[] = {
"linux_pread", /* 17 = linux_pread */
"linux_pwrite", /* 18 = linux_pwrite */
"readv", /* 19 = readv */
- "writev", /* 20 = writev */
+ "linux_writev", /* 20 = linux_writev */
"linux_access", /* 21 = linux_access */
"linux_pipe", /* 22 = linux_pipe */
"linux_select", /* 23 = linux_select */
@@ -450,5 +448,15 @@ const char *linux_syscallnames[] = {
"linux_process_madvise", /* 440 = linux_process_madvise */
"linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */
"linux_mount_setattr", /* 442 = linux_mount_setattr */
- "#443", /* 443 = nosys */
+ "linux_quotactl_fd", /* 443 = linux_quotactl_fd */
+ "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */
+ "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */
+ "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */
+ "linux_memfd_secret", /* 447 = linux_memfd_secret */
+ "linux_process_mrelease", /* 448 = linux_process_mrelease */
+ "linux_futex_waitv", /* 449 = linux_futex_waitv */
+ "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */
+ "linux_cachestat", /* 451 = linux_cachestat */
+ "linux_fchmodat2", /* 452 = linux_fchmodat2 */
+ "linux_map_shadow_stack", /* 453 = linux_map_shadow_stack */
};
diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c
index 7716c34305d8..62b50cf68a32 100644
--- a/sys/amd64/linux/linux_sysent.c
+++ b/sys/amd64/linux/linux_sysent.c
@@ -2,13 +2,11 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically @generated.
- * $FreeBSD$
*/
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
-#include <compat/linux/linux_sysproto.h>
#include <amd64/linux/linux.h>
#include <amd64/linux/linux_proto.h>
@@ -16,9 +14,8 @@
/* The casts are bogus but will do for now. */
struct sysent linux_sysent[] = {
-#define nosys linux_nosys
{ .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = read */
- { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = write */
+ { .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_write */
{ .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_open */
{ .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = close */
{ .sy_narg = AS(linux_newstat_args), .sy_call = (sy_call_t *)linux_newstat, .sy_auevent = AUE_STAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = linux_newstat */
@@ -37,7 +34,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 17 = linux_pread */
{ .sy_narg = AS(linux_pwrite_args), .sy_call = (sy_call_t *)linux_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 18 = linux_pwrite */
{ .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 19 = readv */
- { .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 20 = writev */
+ { .sy_narg = AS(linux_writev_args), .sy_call = (sy_call_t *)linux_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 20 = linux_writev */
{ .sy_narg = AS(linux_access_args), .sy_call = (sy_call_t *)linux_access, .sy_auevent = AUE_ACCESS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 21 = linux_access */
{ .sy_narg = AS(linux_pipe_args), .sy_call = (sy_call_t *)linux_pipe, .sy_auevent = AUE_PIPE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 22 = linux_pipe */
{ .sy_narg = AS(linux_select_args), .sy_call = (sy_call_t *)linux_select, .sy_auevent = AUE_SELECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 23 = linux_select */
@@ -151,7 +148,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_sigaltstack_args), .sy_call = (sy_call_t *)linux_sigaltstack, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 131 = linux_sigaltstack */
{ .sy_narg = AS(linux_utime_args), .sy_call = (sy_call_t *)linux_utime, .sy_auevent = AUE_UTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 132 = linux_utime */
{ .sy_narg = AS(linux_mknod_args), .sy_call = (sy_call_t *)linux_mknod, .sy_auevent = AUE_MKNOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 133 = linux_mknod */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 134 = uselib */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 134 = uselib */
{ .sy_narg = AS(linux_personality_args), .sy_call = (sy_call_t *)linux_personality, .sy_auevent = AUE_PERSONALITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 135 = linux_personality */
{ .sy_narg = AS(linux_ustat_args), .sy_call = (sy_call_t *)linux_ustat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 136 = linux_ustat */
{ .sy_narg = AS(linux_statfs_args), .sy_call = (sy_call_t *)linux_statfs, .sy_auevent = AUE_STATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 137 = linux_statfs */
@@ -179,7 +176,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_adjtimex, .sy_auevent = AUE_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 159 = linux_adjtimex */
{ .sy_narg = AS(linux_setrlimit_args), .sy_call = (sy_call_t *)linux_setrlimit, .sy_auevent = AUE_SETRLIMIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 160 = linux_setrlimit */
{ .sy_narg = AS(chroot_args), .sy_call = (sy_call_t *)sys_chroot, .sy_auevent = AUE_CHROOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 161 = chroot */
- { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sync, .sy_auevent = AUE_SYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 162 = sync */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sync, .sy_auevent = AUE_SYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 162 = sync */
{ .sy_narg = AS(acct_args), .sy_call = (sy_call_t *)sys_acct, .sy_auevent = AUE_ACCT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 163 = acct */
{ .sy_narg = AS(settimeofday_args), .sy_call = (sy_call_t *)sys_settimeofday, .sy_auevent = AUE_SETTIMEOFDAY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 164 = settimeofday */
{ .sy_narg = AS(linux_mount_args), .sy_call = (sy_call_t *)linux_mount, .sy_auevent = AUE_MOUNT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 165 = linux_mount */
@@ -191,18 +188,18 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_setdomainname_args), .sy_call = (sy_call_t *)linux_setdomainname, .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 171 = linux_setdomainname */
{ .sy_narg = AS(linux_iopl_args), .sy_call = (sy_call_t *)linux_iopl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 172 = linux_iopl */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioperm, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 173 = linux_ioperm */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 174 = create_module */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 174 = create_module */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_init_module, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 175 = linux_init_module */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_delete_module, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 176 = linux_delete_module */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 177 = get_kernel_syms */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 178 = query_module */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 177 = get_kernel_syms */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 178 = query_module */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 179 = linux_quotactl */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 180 = nfsservctl */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 181 = getpmsg */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 182 = putpmsg */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 183 = afs_syscall */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 184 = tuxcall */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 185 = security */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 180 = nfsservctl */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 181 = getpmsg */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 182 = putpmsg */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 183 = afs_syscall */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 184 = tuxcall */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 185 = security */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_gettid, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 186 = linux_gettid */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_readahead, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 187 = linux_readahead */
{ .sy_narg = AS(linux_setxattr_args), .sy_call = (sy_call_t *)linux_setxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 188 = linux_setxattr */
@@ -222,17 +219,17 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_sys_futex_args), .sy_call = (sy_call_t *)linux_sys_futex, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 202 = linux_sys_futex */
{ .sy_narg = AS(linux_sched_setaffinity_args), .sy_call = (sy_call_t *)linux_sched_setaffinity, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 203 = linux_sched_setaffinity */
{ .sy_narg = AS(linux_sched_getaffinity_args), .sy_call = (sy_call_t *)linux_sched_getaffinity, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 204 = linux_sched_getaffinity */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 205 = set_thread_area */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 205 = set_thread_area */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 206 = linux_io_setup */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_destroy, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 207 = linux_io_destroy */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_getevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 208 = linux_io_getevents */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_submit, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 209 = linux_io_submit */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_cancel, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 210 = linux_io_cancel */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 211 = get_thread_area */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 211 = get_thread_area */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_lookup_dcookie, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 212 = linux_lookup_dcookie */
{ .sy_narg = AS(linux_epoll_create_args), .sy_call = (sy_call_t *)linux_epoll_create, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 213 = linux_epoll_create */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 214 = epoll_ctl_old */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 215 = epoll_wait_old */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 214 = epoll_ctl_old */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 215 = epoll_wait_old */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_remap_file_pages, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 216 = linux_remap_file_pages */
{ .sy_narg = AS(linux_getdents64_args), .sy_call = (sy_call_t *)linux_getdents64, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 217 = linux_getdents64 */
{ .sy_narg = AS(linux_set_tid_address_args), .sy_call = (sy_call_t *)linux_set_tid_address, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 218 = linux_set_tid_address */
@@ -253,7 +250,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_epoll_ctl_args), .sy_call = (sy_call_t *)linux_epoll_ctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 233 = linux_epoll_ctl */
{ .sy_narg = AS(linux_tgkill_args), .sy_call = (sy_call_t *)linux_tgkill, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 234 = linux_tgkill */
{ .sy_narg = AS(linux_utimes_args), .sy_call = (sy_call_t *)linux_utimes, .sy_auevent = AUE_UTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 235 = linux_utimes */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 236 = vserver */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 236 = vserver */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_mbind, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 237 = linux_mbind */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 238 = linux_set_mempolicy */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_get_mempolicy, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 239 = linux_get_mempolicy */
@@ -268,11 +265,11 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_add_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 248 = linux_add_key */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_request_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 249 = linux_request_key */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_keyctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 250 = linux_keyctl */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = linux_ioprio_set */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 252 = linux_ioprio_get */
+ { .sy_narg = AS(linux_ioprio_set_args), .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_SETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = linux_ioprio_set */
+ { .sy_narg = AS(linux_ioprio_get_args), .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_GETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 252 = linux_ioprio_get */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 253 = linux_inotify_init */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_add_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = linux_inotify_add_watch */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_rm_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 255 = linux_inotify_rm_watch */
+ { .sy_narg = AS(linux_inotify_add_watch_args), .sy_call = (sy_call_t *)linux_inotify_add_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = linux_inotify_add_watch */
+ { .sy_narg = AS(linux_inotify_rm_watch_args), .sy_call = (sy_call_t *)linux_inotify_rm_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 255 = linux_inotify_rm_watch */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_migrate_pages, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 256 = linux_migrate_pages */
{ .sy_narg = AS(linux_openat_args), .sy_call = (sy_call_t *)linux_openat, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 257 = linux_openat */
{ .sy_narg = AS(linux_mkdirat_args), .sy_call = (sy_call_t *)linux_mkdirat, .sy_auevent = AUE_MKDIRAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 258 = linux_mkdirat */
@@ -293,7 +290,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_set_robust_list_args), .sy_call = (sy_call_t *)linux_set_robust_list, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 273 = linux_set_robust_list */
{ .sy_narg = AS(linux_get_robust_list_args), .sy_call = (sy_call_t *)linux_get_robust_list, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 274 = linux_get_robust_list */
{ .sy_narg = AS(linux_splice_args), .sy_call = (sy_call_t *)linux_splice, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 275 = linux_splice */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_tee, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 276 = linux_tee */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_tee, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 276 = linux_tee */
{ .sy_narg = AS(linux_sync_file_range_args), .sy_call = (sy_call_t *)linux_sync_file_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 277 = linux_sync_file_range */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_vmsplice, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 278 = linux_vmsplice */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_move_pages, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 279 = linux_move_pages */
@@ -352,95 +349,95 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_statx_args), .sy_call = (sy_call_t *)linux_statx, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 332 = linux_statx */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 333 = linux_io_pgetevents */
{ .sy_narg = AS(linux_rseq_args), .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 334 = linux_rseq */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 335 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 336 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 337 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 338 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 339 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 340 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 341 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 342 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 343 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 344 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 345 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 346 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 347 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 348 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 349 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 350 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 351 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 352 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 353 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 354 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 355 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 356 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 357 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 358 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 359 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 360 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 361 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 362 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 363 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 364 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 365 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 366 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 367 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 368 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 369 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 370 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 371 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 372 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 373 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 374 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 375 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 376 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 377 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 378 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 379 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 380 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 381 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 382 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 383 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 384 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 385 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 386 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 387 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 388 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 389 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 390 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 391 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 392 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 393 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 394 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 395 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 396 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 397 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 398 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 399 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 400 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 401 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 402 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 403 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 404 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 405 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 406 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 407 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 408 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 409 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 410 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 411 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 412 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 413 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 414 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 416 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 417 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 418 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 419 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 420 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 421 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 422 = nosys */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 423 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 335 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 336 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 337 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 338 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 339 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 340 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 341 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 342 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 343 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 344 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 345 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 346 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 347 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 348 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 349 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 350 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 351 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 352 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 353 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 354 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 355 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 356 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 357 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 358 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 359 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 360 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 361 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 362 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 363 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 364 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 365 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 366 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 367 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 368 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 369 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 370 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 371 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 372 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 373 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 374 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 375 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 376 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 377 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 378 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 379 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 380 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 381 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 382 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 383 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 384 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 385 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 386 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 387 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 388 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 389 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 390 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 391 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 392 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 393 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 394 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 395 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 396 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 397 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 398 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 399 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 400 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 401 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 402 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 403 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 404 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 405 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 406 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 407 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 408 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 409 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 410 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 411 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 412 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 413 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 414 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 416 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 417 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 418 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 419 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 420 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 421 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 422 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 423 = nosys */
{ .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 425 = linux_io_uring_setup */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_enter, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 426 = linux_io_uring_enter */
@@ -453,12 +450,22 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */
{ .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
+ { .sy_narg = AS(linux_close_range_args), .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_CLOSERANGE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */
{ .sy_narg = AS(linux_faccessat2_args), .sy_call = (sy_call_t *)linux_faccessat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 439 = linux_faccessat2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */
{ .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_map_shadow_stack, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 453 = linux_map_shadow_stack */
};
diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c
index c0d079200f62..1dc4de019080 100644
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -1,9 +1,9 @@
/*
- * System call argument to DTrace register array converstion.
+ * System call argument to DTrace register array conversion.
*
- * DO NOT EDIT-- this file is automatically @generated.
- * $FreeBSD$
* This file is part of the DTrace syscall provider.
+ *
+ * DO NOT EDIT-- this file is automatically @generated.
*/
static void
@@ -12,7 +12,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
int64_t *iarg = (int64_t *)uarg;
int a = 0;
switch (sysnum) {
-#define nosys linux_nosys
/* read */
case 0: {
struct read_args *p = params;
@@ -22,9 +21,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 3;
break;
}
- /* write */
+ /* linux_write */
case 1: {
- struct write_args *p = params;
+ struct linux_write_args *p = params;
iarg[a++] = p->fd; /* int */
uarg[a++] = (intptr_t)p->buf; /* char * */
iarg[a++] = p->nbyte; /* l_size_t */
@@ -190,9 +189,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 3;
break;
}
- /* writev */
+ /* linux_writev */
case 20: {
- struct writev_args *p = params;
+ struct linux_writev_args *p = params;
iarg[a++] = p->fd; /* int */
uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */
uarg[a++] = p->iovcnt; /* u_int */
@@ -531,8 +530,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 59: {
struct linux_execve_args *p = params;
uarg[a++] = (intptr_t)p->path; /* char * */
- uarg[a++] = (intptr_t)p->argp; /* char ** */
- uarg[a++] = (intptr_t)p->envp; /* char ** */
+ uarg[a++] = (intptr_t)p->argp; /* l_uintptr_t * */
+ uarg[a++] = (intptr_t)p->envp; /* l_uintptr_t * */
*n_args = 3;
break;
}
@@ -1114,7 +1113,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
struct linux_mknod_args *p = params;
uarg[a++] = (intptr_t)p->path; /* char * */
iarg[a++] = p->mode; /* l_mode_t */
- iarg[a++] = p->dev; /* l_uint */
+ iarg[a++] = p->dev; /* l_dev_t */
*n_args = 3;
break;
}
@@ -1437,7 +1436,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
struct linux_setxattr_args *p = params;
uarg[a++] = (intptr_t)p->path; /* const char * */
uarg[a++] = (intptr_t)p->name; /* const char * */
- uarg[a++] = (intptr_t)p->value; /* const char * */
+ uarg[a++] = (intptr_t)p->value; /* void * */
iarg[a++] = p->size; /* l_size_t */
iarg[a++] = p->flags; /* l_int */
*n_args = 5;
@@ -1448,7 +1447,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
struct linux_lsetxattr_args *p = params;
uarg[a++] = (intptr_t)p->path; /* const char * */
uarg[a++] = (intptr_t)p->name; /* const char * */
- uarg[a++] = (intptr_t)p->value; /* const char * */
+ uarg[a++] = (intptr_t)p->value; /* void * */
iarg[a++] = p->size; /* l_size_t */
iarg[a++] = p->flags; /* l_int */
*n_args = 5;
@@ -1459,7 +1458,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
struct linux_fsetxattr_args *p = params;
iarg[a++] = p->fd; /* l_int */
uarg[a++] = (intptr_t)p->name; /* const char * */
- uarg[a++] = (intptr_t)p->value; /* const char * */
+ uarg[a++] = (intptr_t)p->value; /* void * */
iarg[a++] = p->size; /* l_size_t */
iarg[a++] = p->flags; /* l_int */
*n_args = 5;
@@ -1470,7 +1469,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
struct linux_getxattr_args *p = params;
uarg[a++] = (intptr_t)p->path; /* const char * */
uarg[a++] = (intptr_t)p->name; /* const char * */
- uarg[a++] = (intptr_t)p->value; /* char * */
+ uarg[a++] = (intptr_t)p->value; /* void * */
iarg[a++] = p->size; /* l_size_t */
*n_args = 4;
break;
@@ -1480,7 +1479,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
struct linux_lgetxattr_args *p = params;
uarg[a++] = (intptr_t)p->path; /* const char * */
uarg[a++] = (intptr_t)p->name; /* const char * */
- uarg[a++] = (intptr_t)p->value; /* char * */
+ uarg[a++] = (intptr_t)p->value; /* void * */
iarg[a++] = p->size; /* l_size_t */
*n_args = 4;
break;
@@ -1490,7 +1489,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
struct linux_fgetxattr_args *p = params;
iarg[a++] = p->fd; /* l_int */
uarg[a++] = (intptr_t)p->name; /* const char * */
- uarg[a++] = (intptr_t)p->value; /* char * */
+ uarg[a++] = (intptr_t)p->value; /* void * */
iarg[a++] = p->size; /* l_size_t */
*n_args = 4;
break;
@@ -1499,7 +1498,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 194: {
struct linux_listxattr_args *p = params;
uarg[a++] = (intptr_t)p->path; /* const char * */
- uarg[a++] = (intptr_t)p->list; /* const char * */
+ uarg[a++] = (intptr_t)p->list; /* char * */
iarg[a++] = p->size; /* l_size_t */
*n_args = 3;
break;
@@ -1508,7 +1507,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 195: {
struct linux_llistxattr_args *p = params;
uarg[a++] = (intptr_t)p->path; /* const char * */
- uarg[a++] = (intptr_t)p->list; /* const char * */
+ uarg[a++] = (intptr_t)p->list; /* char * */
iarg[a++] = p->size; /* l_size_t */
*n_args = 3;
break;
@@ -1517,7 +1516,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 196: {
struct linux_flistxattr_args *p = params;
iarg[a++] = p->fd; /* l_int */
- uarg[a++] = (intptr_t)p->list; /* const char * */
+ uarg[a++] = (intptr_t)p->list; /* char * */
iarg[a++] = p->size; /* l_size_t */
*n_args = 3;
break;
@@ -1678,7 +1677,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 222: {
struct linux_timer_create_args *p = params;
iarg[a++] = p->clock_id; /* clockid_t */
- uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */
+ uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */
uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */
*n_args = 3;
break;
@@ -1851,7 +1850,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 244: {
struct linux_mq_notify_args *p = params;
iarg[a++] = p->mqd; /* l_mqd_t */
- uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */
+ uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */
*n_args = 2;
break;
}
@@ -1897,12 +1896,19 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_ioprio_set */
case 251: {
- *n_args = 0;
+ struct linux_ioprio_set_args *p = params;
+ iarg[a++] = p->which; /* l_int */
+ iarg[a++] = p->who; /* l_int */
+ iarg[a++] = p->ioprio; /* l_int */
+ *n_args = 3;
break;
}
/* linux_ioprio_get */
case 252: {
- *n_args = 0;
+ struct linux_ioprio_get_args *p = params;
+ iarg[a++] = p->which; /* l_int */
+ iarg[a++] = p->who; /* l_int */
+ *n_args = 2;
break;
}
/* linux_inotify_init */
@@ -1912,12 +1918,19 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_inotify_add_watch */
case 254: {
- *n_args = 0;
+ struct linux_inotify_add_watch_args *p = params;
+ iarg[a++] = p->fd; /* l_int */
+ uarg[a++] = (intptr_t)p->pathname; /* const char * */
+ uarg[a++] = p->mask; /* uint32_t */
+ *n_args = 3;
break;
}
/* linux_inotify_rm_watch */
case 255: {
- *n_args = 0;
+ struct linux_inotify_rm_watch_args *p = params;
+ iarg[a++] = p->fd; /* l_int */
+ uarg[a++] = p->wd; /* uint32_t */
+ *n_args = 2;
break;
}
/* linux_migrate_pages */
@@ -1950,7 +1963,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
iarg[a++] = p->dfd; /* l_int */
uarg[a++] = (intptr_t)p->filename; /* const char * */
iarg[a++] = p->mode; /* l_mode_t */
- iarg[a++] = p->dev; /* l_uint */
+ iarg[a++] = p->dev; /* l_dev_t */
*n_args = 4;
break;
}
@@ -2696,7 +2709,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_close_range */
case 436: {
- *n_args = 0;
+ struct linux_close_range_args *p = params;
+ iarg[a++] = p->first; /* l_uint */
+ iarg[a++] = p->last; /* l_uint */
+ iarg[a++] = p->flags; /* l_uint */
+ *n_args = 3;
break;
}
/* linux_openat2 */
@@ -2741,6 +2758,61 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 0;
break;
}
+ /* linux_quotactl_fd */
+ case 443: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_landlock_create_ruleset */
+ case 444: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_landlock_add_rule */
+ case 445: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_landlock_restrict_self */
+ case 446: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_memfd_secret */
+ case 447: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_process_mrelease */
+ case 448: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_futex_waitv */
+ case 449: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_set_mempolicy_home_node */
+ case 450: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_cachestat */
+ case 451: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_fchmodat2 */
+ case 452: {
+ *n_args = 0;
+ break;
+ }
+ /* linux_map_shadow_stack */
+ case 453: {
+ *n_args = 0;
+ break;
+ }
default:
*n_args = 0;
break;
@@ -2751,7 +2823,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
{
const char *p = NULL;
switch (sysnum) {
-#define nosys linux_nosys
/* read */
case 0:
switch (ndx) {
@@ -2768,7 +2839,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* write */
+ /* linux_write */
case 1:
switch (ndx) {
case 0:
@@ -3063,7 +3134,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* writev */
+ /* linux_writev */
case 20:
switch (ndx) {
case 0:
@@ -3647,10 +3718,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland char *";
break;
case 1:
- p = "userland char **";
+ p = "userland l_uintptr_t *";
break;
case 2:
- p = "userland char **";
+ p = "userland l_uintptr_t *";
break;
default:
break;
@@ -4575,7 +4646,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_mode_t";
break;
case 2:
- p = "l_uint";
+ p = "l_dev_t";
break;
default:
break;
@@ -5036,7 +5107,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 2:
- p = "userland const char *";
+ p = "userland void *";
break;
case 3:
p = "l_size_t";
@@ -5058,7 +5129,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 2:
- p = "userland const char *";
+ p = "userland void *";
break;
case 3:
p = "l_size_t";
@@ -5080,7 +5151,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 2:
- p = "userland const char *";
+ p = "userland void *";
break;
case 3:
p = "l_size_t";
@@ -5102,7 +5173,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 2:
- p = "userland char *";
+ p = "userland void *";
break;
case 3:
p = "l_size_t";
@@ -5121,7 +5192,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 2:
- p = "userland char *";
+ p = "userland void *";
break;
case 3:
p = "l_size_t";
@@ -5140,7 +5211,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 2:
- p = "userland char *";
+ p = "userland void *";
break;
case 3:
p = "l_size_t";
@@ -5156,7 +5227,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 1:
- p = "userland const char *";
+ p = "userland char *";
break;
case 2:
p = "l_size_t";
@@ -5172,7 +5243,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "userland const char *";
break;
case 1:
- p = "userland const char *";
+ p = "userland char *";
break;
case 2:
p = "l_size_t";
@@ -5188,7 +5259,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_int";
break;
case 1:
- p = "userland const char *";
+ p = "userland char *";
break;
case 2:
p = "l_size_t";
@@ -5421,7 +5492,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "clockid_t";
break;
case 1:
- p = "userland struct sigevent *";
+ p = "userland struct l_sigevent *";
break;
case 2:
p = "userland l_timer_t *";
@@ -5706,7 +5777,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_mqd_t";
break;
case 1:
- p = "userland const struct l_timespec *";
+ p = "userland const struct l_sigevent *";
break;
default:
break;
@@ -5764,18 +5835,64 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_ioprio_set */
case 251:
+ switch (ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "l_int";
+ break;
+ case 2:
+ p = "l_int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_ioprio_get */
case 252:
+ switch (ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "l_int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_inotify_init */
case 253:
break;
/* linux_inotify_add_watch */
case 254:
+ switch (ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "userland const char *";
+ break;
+ case 2:
+ p = "uint32_t";
+ break;
+ default:
+ break;
+ };
break;
/* linux_inotify_rm_watch */
case 255:
+ switch (ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "uint32_t";
+ break;
+ default:
+ break;
+ };
break;
/* linux_migrate_pages */
case 256:
@@ -5828,7 +5945,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_mode_t";
break;
case 3:
- p = "l_uint";
+ p = "l_dev_t";
break;
default:
break;
@@ -7078,6 +7195,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_close_range */
case 436:
+ switch (ndx) {
+ case 0:
+ p = "l_uint";
+ break;
+ case 1:
+ p = "l_uint";
+ break;
+ case 2:
+ p = "l_uint";
+ break;
+ default:
+ break;
+ };
break;
/* linux_openat2 */
case 437:
@@ -7135,6 +7265,39 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
/* linux_mount_setattr */
case 442:
break;
+ /* linux_quotactl_fd */
+ case 443:
+ break;
+ /* linux_landlock_create_ruleset */
+ case 444:
+ break;
+ /* linux_landlock_add_rule */
+ case 445:
+ break;
+ /* linux_landlock_restrict_self */
+ case 446:
+ break;
+ /* linux_memfd_secret */
+ case 447:
+ break;
+ /* linux_process_mrelease */
+ case 448:
+ break;
+ /* linux_futex_waitv */
+ case 449:
+ break;
+ /* linux_set_mempolicy_home_node */
+ case 450:
+ break;
+ /* linux_cachestat */
+ case 451:
+ break;
+ /* linux_fchmodat2 */
+ case 452:
+ break;
+ /* linux_map_shadow_stack */
+ case 453:
+ break;
default:
break;
};
@@ -7146,13 +7309,12 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
{
const char *p = NULL;
switch (sysnum) {
-#define nosys linux_nosys
/* read */
case 0:
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* write */
+ /* linux_write */
case 1:
if (ndx == 0 || ndx == 1)
p = "int";
@@ -7247,7 +7409,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* writev */
+ /* linux_writev */
case 20:
if (ndx == 0 || ndx == 1)
p = "int";
@@ -8209,14 +8371,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
case 250:
/* linux_ioprio_set */
case 251:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_ioprio_get */
case 252:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_inotify_init */
case 253:
/* linux_inotify_add_watch */
case 254:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_inotify_rm_watch */
case 255:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_migrate_pages */
case 256:
/* linux_openat */
@@ -8608,6 +8782,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_close_range */
case 436:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_openat2 */
case 437:
/* linux_pidfd_getfd */
@@ -8626,6 +8803,28 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_mount_setattr */
case 442:
+ /* linux_quotactl_fd */
+ case 443:
+ /* linux_landlock_create_ruleset */
+ case 444:
+ /* linux_landlock_add_rule */
+ case 445:
+ /* linux_landlock_restrict_self */
+ case 446:
+ /* linux_memfd_secret */
+ case 447:
+ /* linux_process_mrelease */
+ case 448:
+ /* linux_futex_waitv */
+ case 449:
+ /* linux_set_mempolicy_home_node */
+ case 450:
+ /* linux_cachestat */
+ case 451:
+ /* linux_fchmodat2 */
+ case 452:
+ /* linux_map_shadow_stack */
+ case 453:
default:
break;
};
diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
index 25fc8b10e903..c8579c5da4ad 100644
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -31,63 +31,49 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define __ELF_WORD_SIZE 64
#include <sys/param.h>
-#include <sys/systm.h>
#include <sys/exec.h>
-#include <sys/fcntl.h>
#include <sys/imgact.h>
#include <sys/imgact_elf.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
-#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/proc.h>
-#include <sys/resourcevar.h>
#include <sys/stddef.h>
-#include <sys/signalvar.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysent.h>
-#include <sys/sysproto.h>
-#include <sys/vnode.h>
-#include <sys/eventhandler.h>
-#include <vm/vm.h>
#include <vm/pmap.h>
-#include <vm/vm_extern.h>
-#include <vm/vm_map.h>
-#include <vm/vm_object.h>
-#include <vm/vm_page.h>
+#include <vm/vm.h>
#include <vm/vm_param.h>
-#include <machine/cpu.h>
#include <machine/md_var.h>
-#include <machine/pcb.h>
-#include <machine/specialreg.h>
#include <machine/trap.h>
#include <x86/linux/linux_x86.h>
#include <amd64/linux/linux.h>
#include <amd64/linux/linux_proto.h>
+#include <compat/linux/linux_elf.h>
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_fork.h>
#include <compat/linux/linux_ioctl.h>
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_signal.h>
-#include <compat/linux/linux_sysproto.h>
#include <compat/linux/linux_util.h>
#include <compat/linux/linux_vdso.h>
#include <x86/linux/linux_x86_sigframe.h>
+_Static_assert(sizeof(struct l_fpstate) ==
+ sizeof(__typeof(((mcontext_t *)0)->mc_fpstate)),
+ "fxsave area size incorrect");
+
MODULE_VERSION(linux64, 1);
#define LINUX_VDSOPAGE_SIZE PAGE_SIZE * 2
@@ -110,14 +96,10 @@ extern char _binary_linux_vdso_so_o_end;
static vm_offset_t linux_vdso_base;
extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
+extern const char *linux_syscallnames[];
SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
-static int linux_copyout_strings(struct image_params *imgp,
- uintptr_t *stack_base);
-static int linux_fixup_elf(uintptr_t *stack_base,
- struct image_params *iparams);
-static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel);
static void linux_vdso_install(const void *param);
static void linux_vdso_deinstall(const void *param);
static void linux_vdso_reloc(char *mapping, Elf_Addr offset);
@@ -137,6 +119,23 @@ LINUX_VDSO_SYM_INTPTR(kern_timekeep_base);
LINUX_VDSO_SYM_INTPTR(kern_tsc_selector);
LINUX_VDSO_SYM_INTPTR(kern_cpu_selector);
+/*
+ * According to the Intel x86 ISA 64-bit syscall
+ * saves %rip to %rcx and rflags to %r11. Registers on syscall entry:
+ * %rax system call number
+ * %rcx return address
+ * %r11 saved rflags
+ * %rdi arg1
+ * %rsi arg2
+ * %rdx arg3
+ * %r10 arg4
+ * %r8 arg5
+ * %r9 arg6
+ *
+ * Then FreeBSD fast_syscall() move registers:
+ * %rcx -> trapframe.tf_rip
+ * %r10 -> trapframe.tf_rcx
+ */
static int
linux_fetch_syscall_args(struct thread *td)
{
@@ -159,10 +158,15 @@ linux_fetch_syscall_args(struct thread *td)
if (sa->code >= p->p_sysent->sv_size)
/* nosys */
- sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1];
+ sa->callp = &nosys_sysent;
else
sa->callp = &p->p_sysent->sv_table[sa->code];
+ /* Restore r10 earlier to avoid doing this multiply times. */
+ frame->tf_r10 = frame->tf_rcx;
+ /* Restore %rcx for machine context. */
+ frame->tf_rcx = frame->tf_rip;
+
td->td_retval[0] = 0;
return (0);
}
@@ -177,7 +181,6 @@ linux_set_syscall_retval(struct thread *td, int error)
switch (error) {
case 0:
frame->tf_rax = td->td_retval[0];
- frame->tf_r10 = frame->tf_rcx;
break;
case ERESTART:
@@ -188,7 +191,6 @@ linux_set_syscall_retval(struct thread *td, int error)
*
*/
frame->tf_rip -= frame->tf_err;
- frame->tf_r10 = frame->tf_rcx;
break;
case EJUSTRETURN:
@@ -196,7 +198,6 @@ linux_set_syscall_retval(struct thread *td, int error)
default:
frame->tf_rax = bsd_to_linux_errno(error);
- frame->tf_r10 = frame->tf_rcx;
break;
}
@@ -205,9 +206,6 @@ linux_set_syscall_retval(struct thread *td, int error)
* and %r11 values are not preserved across the syscall.
* Require full context restore to get all registers except
* those two restored at return to usermode.
- *
- * XXX: Would be great to be able to avoid PCB_FULL_IRET
- * for the error == 0 case.
*/
set_pcb_flags(td->td_pcb, PCB_FULL_IRET);
}
@@ -220,192 +218,14 @@ linux_set_fork_retval(struct thread *td)
frame->tf_rax = 0;
}
-static int
-linux_copyout_auxargs(struct image_params *imgp, uintptr_t base)
-{
- Elf_Auxargs *args;
- Elf_Auxinfo *argarray, *pos;
- struct proc *p;
- int error, issetugid;
-
- p = imgp->proc;
- args = (Elf64_Auxargs *)imgp->auxargs;
- argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP,
- M_WAITOK | M_ZERO);
-
- issetugid = p->p_flag & P_SUGID ? 1 : 0;
- AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, linux_vdso_base);
- AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature);
- AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz);
- AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz);
- AUXARGS_ENTRY(pos, AT_PHDR, args->phdr);
- AUXARGS_ENTRY(pos, AT_PHENT, args->phent);
- AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum);
- AUXARGS_ENTRY(pos, AT_BASE, args->base);
- AUXARGS_ENTRY(pos, AT_FLAGS, args->flags);
- AUXARGS_ENTRY(pos, AT_ENTRY, args->entry);
- AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid);
- AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid);
- AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid);
- AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid);
- AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid);
- AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary);
- AUXARGS_ENTRY(pos, LINUX_AT_HWCAP2, 0);
- if (imgp->execpathp != 0)
- AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp);
- if (args->execfd != -1)
- AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd);
- AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform));
- AUXARGS_ENTRY(pos, AT_NULL, 0);
-
- free(imgp->auxargs, M_TEMP);
- imgp->auxargs = NULL;
- KASSERT(pos - argarray <= LINUX_AT_COUNT, ("Too many auxargs"));
-
- error = copyout(argarray, (void *)base,
- sizeof(*argarray) * LINUX_AT_COUNT);
- free(argarray, M_TEMP);
- return (error);
-}
-
-static int
-linux_fixup_elf(uintptr_t *stack_base, struct image_params *imgp)
-{
- Elf_Addr *base;
-
- base = (Elf64_Addr *)*stack_base;
- base--;
- if (suword(base, (uint64_t)imgp->args->argc) == -1)
- return (EFAULT);
-
- *stack_base = (uintptr_t)base;
- return (0);
-}
-
-/*
- * Copy strings out to the new process address space, constructing new arg
- * and env vector tables. Return a pointer to the base so that it can be used
- * as the initial stack pointer.
- */
-static int
-linux_copyout_strings(struct image_params *imgp, uintptr_t *stack_base)
+void
+linux64_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos)
{
- int argc, envc, error;
- char **vectp;
- char *stringp;
- uintptr_t destp, ustringp;
- struct ps_strings *arginfo;
- char canary[LINUX_AT_RANDOM_LEN];
- size_t execpath_len;
- struct proc *p;
-
- p = imgp->proc;
- arginfo = (struct ps_strings *)PROC_PS_STRINGS(p);
- destp = (uintptr_t)arginfo;
-
- if (imgp->execpath != NULL && imgp->auxargs != NULL) {
- execpath_len = strlen(imgp->execpath) + 1;
- destp -= execpath_len;
- destp = rounddown2(destp, sizeof(void *));
- imgp->execpathp = (void *)destp;
- error = copyout(imgp->execpath, imgp->execpathp, execpath_len);
- if (error != 0)
- return (error);
- }
-
- /* Prepare the canary for SSP. */
- arc4rand(canary, sizeof(canary), 0);
- destp -= roundup(sizeof(canary), sizeof(void *));
- imgp->canary = (void *)destp;
- error = copyout(canary, imgp->canary, sizeof(canary));
- if (error != 0)
- return (error);
-
- /* Allocate room for the argument and environment strings. */
- destp -= ARG_MAX - imgp->args->stringspace;
- destp = rounddown2(destp, sizeof(void *));
- ustringp = destp;
-
- if (imgp->auxargs) {
- /*
- * Allocate room on the stack for the ELF auxargs
- * array. It has LINUX_AT_COUNT entries.
- */
- destp -= LINUX_AT_COUNT * sizeof(Elf64_Auxinfo);
- destp = rounddown2(destp, sizeof(void *));
- }
-
- vectp = (char **)destp;
-
- /*
- * Allocate room for the argv[] and env vectors including the
- * terminating NULL pointers.
- */
- vectp -= imgp->args->argc + 1 + imgp->args->envc + 1;
-
- /*
- * Starting with 2.24, glibc depends on a 16-byte stack alignment.
- * One "long argc" will be prepended later.
- */
- vectp = (char **)((((uintptr_t)vectp + 8) & ~0xF) - 8);
-
- /* vectp also becomes our initial stack base. */
- *stack_base = (uintptr_t)vectp;
-
- stringp = imgp->args->begin_argv;
- argc = imgp->args->argc;
- envc = imgp->args->envc;
-
- /* Copy out strings - arguments and environment. */
- error = copyout(stringp, (void *)ustringp,
- ARG_MAX - imgp->args->stringspace);
- if (error != 0)
- return (error);
-
- /* Fill in "ps_strings" struct for ps, w, etc. */
- if (suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp) != 0 ||
- suword(&arginfo->ps_nargvstr, argc) != 0)
- return (EFAULT);
-
- /* Fill in argument portion of vector table. */
- for (; argc > 0; --argc) {
- if (suword(vectp++, ustringp) != 0)
- return (EFAULT);
- while (*stringp++ != 0)
- ustringp++;
- ustringp++;
- }
-
- /* A null vector table pointer separates the argp's from the envp's. */
- if (suword(vectp++, 0) != 0)
- return (EFAULT);
-
- if (suword(&arginfo->ps_envstr, (long)(intptr_t)vectp) != 0 ||
- suword(&arginfo->ps_nenvstr, envc) != 0)
- return (EFAULT);
-
- /* Fill in environment portion of vector table. */
- for (; envc > 0; --envc) {
- if (suword(vectp++, ustringp) != 0)
- return (EFAULT);
- while (*stringp++ != 0)
- ustringp++;
- ustringp++;
- }
-
- /* The end of the vector table is a null pointer. */
- if (suword(vectp, 0) != 0)
- return (EFAULT);
- if (imgp->auxargs) {
- vectp++;
- error = imgp->sysent->sv_copyout_auxargs(imgp,
- (uintptr_t)vectp);
- if (error != 0)
- return (error);
- }
-
- return (0);
+ AUXARGS_ENTRY((*pos), LINUX_AT_SYSINFO_EHDR, linux_vdso_base);
+ AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP, cpu_feature);
+ AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP2, linux_x86_elf_hwcap2());
+ AUXARGS_ENTRY((*pos), LINUX_AT_PLATFORM, PTROUT(linux_platform));
}
/*
@@ -427,7 +247,7 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp,
pcb->pcb_fsbase = 0;
pcb->pcb_gsbase = 0;
- clear_pcb_flags(pcb, PCB_32BIT);
+ clear_pcb_flags(pcb, PCB_32BIT | PCB_TLSBASE);
pcb->pcb_initial_fpucw = __LINUX_NPXCW__;
set_pcb_flags(pcb, PCB_FULL_IRET);
@@ -453,16 +273,90 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp,
fpstate_drop(td);
}
+static int
+linux_fxrstor(struct thread *td, mcontext_t *mcp, struct l_sigcontext *sc)
+{
+ struct savefpu *fp = (struct savefpu *)&mcp->mc_fpstate[0];
+ int error;
+
+ error = copyin(PTRIN(sc->sc_fpstate), fp, sizeof(mcp->mc_fpstate));
+ if (error != 0)
+ return (error);
+ bzero(&fp->sv_pad[0], sizeof(fp->sv_pad));
+ return (set_fpcontext(td, mcp, NULL, 0));
+}
+
+static int
+linux_xrstor(struct thread *td, mcontext_t *mcp, struct l_sigcontext *sc)
+{
+ struct savefpu *fp = (struct savefpu *)&mcp->mc_fpstate[0];
+ char *xfpustate;
+ struct proc *p;
+ uint32_t magic2;
+ int error;
+
+ p = td->td_proc;
+ mcp->mc_xfpustate_len = cpu_max_ext_state_size - sizeof(struct savefpu);
+
+ /* Legacy region of an xsave area. */
+ error = copyin(PTRIN(sc->sc_fpstate), fp, sizeof(mcp->mc_fpstate));
+ if (error != 0)
+ return (error);
+ bzero(&fp->sv_pad[0], sizeof(fp->sv_pad));
+
+ /* Extended region of an xsave area. */
+ sc->sc_fpstate += sizeof(mcp->mc_fpstate);
+ xfpustate = (char *)fpu_save_area_alloc();
+ error = copyin(PTRIN(sc->sc_fpstate), xfpustate, mcp->mc_xfpustate_len);
+ if (error != 0) {
+ fpu_save_area_free((struct savefpu *)xfpustate);
+ uprintf("pid %d (%s): linux xrstor failed\n", p->p_pid,
+ td->td_name);
+ return (error);
+ }
+
+ /* Linux specific end of xsave area marker. */
+ sc->sc_fpstate += mcp->mc_xfpustate_len;
+ error = copyin(PTRIN(sc->sc_fpstate), &magic2, LINUX_FP_XSTATE_MAGIC2_SIZE);
+ if (error != 0 || magic2 != LINUX_FP_XSTATE_MAGIC2) {
+ fpu_save_area_free((struct savefpu *)xfpustate);
+ uprintf("pid %d (%s): sigreturn magic2 0x%x error %d\n",
+ p->p_pid, td->td_name, magic2, error);
+ return (error);
+ }
+
+ error = set_fpcontext(td, mcp, xfpustate, mcp->mc_xfpustate_len);
+ fpu_save_area_free((struct savefpu *)xfpustate);
+ if (error != 0) {
+ uprintf("pid %d (%s): sigreturn set_fpcontext error %d\n",
+ p->p_pid, td->td_name, error);
+ }
+ return (error);
+}
+
+static int
+linux_copyin_fpstate(struct thread *td, struct l_ucontext *uc)
+{
+ mcontext_t mc;
+
+ bzero(&mc, sizeof(mc));
+ mc.mc_ownedfp = _MC_FPOWNED_FPU;
+ mc.mc_fpformat = _MC_FPFMT_XMM;
+
+ if ((uc->uc_flags & LINUX_UC_FP_XSTATE) != 0)
+ return (linux_xrstor(td, &mc, &uc->uc_mcontext));
+ else
+ return (linux_fxrstor(td, &mc, &uc->uc_mcontext));
+}
+
/*
* Copied from amd64/amd64/machdep.c
- *
- * XXX fpu state need? don't think so
*/
int
linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args)
{
struct proc *p;
- struct l_ucontext uc;
+ struct l_rt_sigframe sf;
struct l_sigcontext *context;
struct trapframe *regs;
unsigned long rflags;
@@ -471,12 +365,12 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args)
ksiginfo_t ksi;
regs = td->td_frame;
- error = copyin((void *)regs->tf_rbx, &uc, sizeof(uc));
+ error = copyin((void *)regs->tf_rbx, &sf, sizeof(sf));
if (error != 0)
return (error);
p = td->td_proc;
- context = &uc.uc_mcontext;
+ context = &sf.sf_uc.uc_mcontext;
rflags = context->sc_rflags;
/*
@@ -515,7 +409,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args)
return (EINVAL);
}
- linux_to_bsd_sigset(&uc.uc_sigmask, &bmask);
+ linux_to_bsd_sigset(&sf.sf_uc.uc_sigmask, &bmask);
kern_sigprocmask(td, SIG_SETMASK, &bmask, NULL, 0);
regs->tf_rdi = context->sc_rdi;
@@ -539,10 +433,82 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args)
regs->tf_err = context->sc_err;
regs->tf_rflags = rflags;
+ error = linux_copyin_fpstate(td, &sf.sf_uc);
+ if (error != 0) {
+ uprintf("pid %d comm %s linux can't restore fpu state %d\n",
+ p->p_pid, p->p_comm, error);
+ return (error);
+ }
+
set_pcb_flags(td->td_pcb, PCB_FULL_IRET);
return (EJUSTRETURN);
}
+static int
+linux_fxsave(mcontext_t *mcp, void *ufp)
+{
+ struct l_fpstate *fx = (struct l_fpstate *)&mcp->mc_fpstate[0];
+
+ bzero(&fx->reserved2[0], sizeof(fx->reserved2));
+ return (copyout(fx, ufp, sizeof(*fx)));
+}
+
+static int
+linux_xsave(mcontext_t *mcp, char *xfpusave, char *ufp)
+{
+ struct l_fpstate *fx = (struct l_fpstate *)&mcp->mc_fpstate[0];
+ uint32_t magic2;
+ int error;
+
+ /* Legacy region of an xsave area. */
+ fx->sw_reserved.magic1 = LINUX_FP_XSTATE_MAGIC1;
+ fx->sw_reserved.xstate_size = mcp->mc_xfpustate_len + sizeof(*fx);
+ fx->sw_reserved.extended_size = fx->sw_reserved.xstate_size +
+ LINUX_FP_XSTATE_MAGIC2_SIZE;
+ fx->sw_reserved.xfeatures = xsave_mask;
+
+ error = copyout(fx, ufp, sizeof(*fx));
+ if (error != 0)
+ return (error);
+ ufp += sizeof(*fx);
+
+ /* Extended region of an xsave area. */
+ error = copyout(xfpusave, ufp, mcp->mc_xfpustate_len);
+ if (error != 0)
+ return (error);
+
+ /* Linux specific end of xsave area marker. */
+ ufp += mcp->mc_xfpustate_len;
+ magic2 = LINUX_FP_XSTATE_MAGIC2;
+ return (copyout(&magic2, ufp, LINUX_FP_XSTATE_MAGIC2_SIZE));
+}
+
+static int
+linux_copyout_fpstate(struct thread *td, struct l_ucontext *uc, char **sp)
+{
+ size_t xfpusave_len;
+ char *xfpusave;
+ mcontext_t mc;
+ char *ufp = *sp;
+
+ get_fpcontext(td, &mc, &xfpusave, &xfpusave_len);
+ KASSERT(mc.mc_fpformat != _MC_FPFMT_NODEV, ("fpu not present"));
+
+ /* Room for fxsave area. */
+ ufp -= sizeof(struct l_fpstate);
+ if (xfpusave != NULL) {
+ /* Room for xsave area. */
+ ufp -= (xfpusave_len + LINUX_FP_XSTATE_MAGIC2_SIZE);
+ uc->uc_flags |= LINUX_UC_FP_XSTATE;
+ }
+ *sp = ufp = (char *)((unsigned long)ufp & ~0x3Ful);
+
+ if (xfpusave != NULL)
+ return (linux_xsave(&mc, xfpusave, ufp));
+ else
+ return (linux_fxsave(&mc, ufp));
+}
+
/*
* copied from amd64/amd64/machdep.c
*
@@ -555,7 +521,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
struct proc *p;
struct thread *td;
struct sigacts *psp;
- caddr_t sp;
+ char *sp;
struct trapframe *regs;
int sig, code;
int oonstack, issiginfo;
@@ -574,16 +540,37 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
LINUX_CTR4(rt_sendsig, "%p, %d, %p, %u",
catcher, sig, mask, code);
- /* Save user context. */
bzero(&sf, sizeof(sf));
- bsd_to_linux_sigset(mask, &sf.sf_uc.uc_sigmask);
- sf.sf_uc.uc_mcontext.sc_mask = sf.sf_uc.uc_sigmask;
-
sf.sf_uc.uc_stack.ss_sp = PTROUT(td->td_sigstk.ss_sp);
sf.sf_uc.uc_stack.ss_size = td->td_sigstk.ss_size;
sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK)
? ((oonstack) ? LINUX_SS_ONSTACK : 0) : LINUX_SS_DISABLE;
+ /* Allocate space for the signal handler context. */
+ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
+ SIGISMEMBER(psp->ps_sigonstack, sig)) {
+ sp = (char *)td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
+ } else
+ sp = (char *)regs->tf_rsp - 128;
+
+ mtx_unlock(&psp->ps_mtx);
+ PROC_UNLOCK(p);
+
+ if (linux_copyout_fpstate(td, &sf.sf_uc, &sp) != 0) {
+ uprintf("pid %d comm %s linux can't save fpu state, killing\n",
+ p->p_pid, p->p_comm);
+ PROC_LOCK(p);
+ sigexit(td, SIGILL);
+ }
+ sf.sf_uc.uc_mcontext.sc_fpstate = (register_t)sp;
+
+ /* Make room, keeping the stack aligned. */
+ sp -= sizeof(struct l_rt_sigframe);
+ sfp = (struct l_rt_sigframe *)((unsigned long)sp & ~0xFul);
+
+ /* Save user context. */
+ bsd_to_linux_sigset(mask, &sf.sf_uc.uc_sigmask);
+ sf.sf_uc.uc_mcontext.sc_mask = sf.sf_uc.uc_sigmask;
sf.sf_uc.uc_mcontext.sc_rdi = regs->tf_rdi;
sf.sf_uc.uc_mcontext.sc_rsi = regs->tf_rsi;
sf.sf_uc.uc_mcontext.sc_rdx = regs->tf_rdx;
@@ -607,19 +594,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
sf.sf_uc.uc_mcontext.sc_trapno = bsd_to_linux_trapcode(code);
sf.sf_uc.uc_mcontext.sc_cr2 = (register_t)ksi->ksi_addr;
- /* Allocate space for the signal handler context. */
- if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
- SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sp = (caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
- } else
- sp = (caddr_t)regs->tf_rsp - 128;
- sp -= sizeof(struct l_rt_sigframe);
- /* Align to 16 bytes. */
- sfp = (struct l_rt_sigframe *)((unsigned long)sp & ~0xFul);
-
- mtx_unlock(&psp->ps_mtx);
- PROC_UNLOCK(p);
-
/* Translate the signal. */
sig = bsd_to_linux_signal(sig);
/* Fill in POSIX parts. */
@@ -633,6 +607,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
sigexit(td, SIGILL);
}
+ fpstate_drop(td);
/* Build the argument list for the signal handler. */
regs->tf_rdi = sig; /* arg 1 in %rdi */
regs->tf_rax = 0;
@@ -703,7 +678,7 @@ linux_vsyscall(struct thread *td)
struct sysentvec elf_linux_sysvec = {
.sv_size = LINUX_SYS_MAXSYSCALL,
.sv_table = linux_sysent,
- .sv_fixup = linux_fixup_elf,
+ .sv_fixup = __elfN(freebsd_fixup),
.sv_sendsig = linux_rt_sendsig,
.sv_sigcode = &_binary_linux_vdso_so_o_start,
.sv_szsigcode = &linux_szsigcode,
@@ -712,7 +687,6 @@ struct sysentvec elf_linux_sysvec = {
.sv_elf_core_osabi = ELFOSABI_NONE,
.sv_elf_core_abi_vendor = LINUX_ABI_VENDOR,
.sv_elf_core_prepare_notes = linux64_prepare_notes,
- .sv_imgact_try = linux_exec_imgact_try,
.sv_minsigstksz = LINUX_MINSIGSTKSZ,
.sv_minuser = VM_MIN_ADDRESS,
.sv_maxuser = VM_MAXUSER_ADDRESS_LA48,
@@ -720,8 +694,8 @@ struct sysentvec elf_linux_sysvec = {
.sv_psstrings = LINUX_PS_STRINGS_LA48,
.sv_psstringssz = sizeof(struct ps_strings),
.sv_stackprot = VM_PROT_ALL,
- .sv_copyout_auxargs = linux_copyout_auxargs,
- .sv_copyout_strings = linux_copyout_strings,
+ .sv_copyout_auxargs = __linuxN(copyout_auxargs),
+ .sv_copyout_strings = __linuxN(copyout_strings),
.sv_setregs = linux_exec_setregs,
.sv_fixlimit = NULL,
.sv_maxssiz = NULL,
@@ -729,12 +703,16 @@ struct sysentvec elf_linux_sysvec = {
SV_SIG_WAITNDQ | SV_TIMEKEEP,
.sv_set_syscall_retval = linux_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
- .sv_syscallnames = NULL,
+ .sv_syscallnames = linux_syscallnames,
.sv_shared_page_base = LINUX_SHAREDPAGE_LA48,
.sv_shared_page_len = PAGE_SIZE,
.sv_schedtail = linux_schedtail,
.sv_thread_detach = linux_thread_detach,
.sv_trap = linux_vsyscall,
+ .sv_hwcap = NULL,
+ .sv_hwcap2 = NULL,
+ .sv_hwcap3 = NULL,
+ .sv_hwcap4 = NULL,
.sv_onexec = linux_on_exec_vmspace,
.sv_onexit = linux_on_exit,
.sv_ontdexit = linux_thread_dtor,
@@ -750,7 +728,7 @@ linux_on_exec_vmspace(struct proc *p, struct image_params *imgp)
error = linux_map_vdso(p, linux_vdso_obj, linux_vdso_base,
LINUX_VDSOPAGE_SIZE, imgp);
if (error == 0)
- linux_on_exec(p, imgp);
+ error = linux_on_exec(p, imgp);
return (error);
}
@@ -772,7 +750,7 @@ linux_exec_sysvec_init(void *param)
tkoff = kern_timekeep_base - linux_vdso_base;
ktimekeep_base = (l_uintptr_t *)(linux_vdso_mapping + tkoff);
- *ktimekeep_base = sv->sv_timekeep_base;
+ *ktimekeep_base = sv->sv_shared_page_base + sv->sv_timekeep_offset;
tkoff = kern_tsc_selector - linux_vdso_base;
ktsc_selector = (l_uintptr_t *)(linux_vdso_mapping + tkoff);
@@ -879,37 +857,11 @@ linux_vdso_reloc(char *mapping, Elf_Addr offset)
}
}
-static char GNULINUX_ABI_VENDOR[] = "GNU";
-static int GNULINUX_ABI_DESC = 0;
-
-static bool
-linux_trans_osrel(const Elf_Note *note, int32_t *osrel)
-{
- const Elf32_Word *desc;
- uintptr_t p;
-
- p = (uintptr_t)(note + 1);
- p += roundup2(note->n_namesz, sizeof(Elf32_Addr));
-
- desc = (const Elf32_Word *)p;
- if (desc[0] != GNULINUX_ABI_DESC)
- return (false);
-
- /*
- * For Linux we encode osrel using the Linux convention of
- * (version << 16) | (major << 8) | (minor)
- * See macro in linux_mib.h
- */
- *osrel = LINUX_KERNVER(desc[1], desc[2], desc[3]);
-
- return (true);
-}
-
static Elf_Brandnote linux64_brandnote = {
- .hdr.n_namesz = sizeof(GNULINUX_ABI_VENDOR),
+ .hdr.n_namesz = sizeof(GNU_ABI_VENDOR),
.hdr.n_descsz = 16,
.hdr.n_type = 1,
- .vendor = GNULINUX_ABI_VENDOR,
+ .vendor = GNU_ABI_VENDOR,
.flags = BN_TRANSLATE_OSREL,
.trans_osrel = linux_trans_osrel
};
@@ -918,7 +870,6 @@ static Elf64_Brandinfo linux_glibc2brand = {
.brand = ELFOSABI_LINUX,
.machine = EM_X86_64,
.compat_3_brand = "Linux",
- .emul_path = linux_emul_path,
.interp_path = "/lib64/ld-linux-x86-64.so.2",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
@@ -930,7 +881,6 @@ static Elf64_Brandinfo linux_glibc2brandshort = {
.brand = ELFOSABI_LINUX,
.machine = EM_X86_64,
.compat_3_brand = "Linux",
- .emul_path = linux_emul_path,
.interp_path = "/lib64/ld-linux.so.2",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
@@ -942,7 +892,6 @@ static Elf64_Brandinfo linux_muslbrand = {
.brand = ELFOSABI_LINUX,
.machine = EM_X86_64,
.compat_3_brand = "Linux",
- .emul_path = linux_emul_path,
.interp_path = "/lib/ld-musl-x86_64.so.1",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
@@ -951,7 +900,7 @@ static Elf64_Brandinfo linux_muslbrand = {
LINUX_BI_FUTEX_REQUEUE
};
-Elf64_Brandinfo *linux_brandlist[] = {
+static Elf64_Brandinfo *linux_brandlist[] = {
&linux_glibc2brand,
&linux_glibc2brandshort,
&linux_muslbrand,
diff --git a/sys/amd64/linux/linux_vdso.lds.s b/sys/amd64/linux/linux_vdso.lds.s
index 24d8cab162f8..f6dfd7d03082 100644
--- a/sys/amd64/linux/linux_vdso.lds.s
+++ b/sys/amd64/linux/linux_vdso.lds.s
@@ -1,8 +1,6 @@
/*
* Linker script for 64-bit vDSO.
* Copied from Linux kernel arch/x86/vdso/vdso-layout.lds.S
- *
- * $FreeBSD$
*/
SECTIONS
diff --git a/sys/amd64/linux/linux_vdso_gtod.c b/sys/amd64/linux/linux_vdso_gtod.c
index 3d18b551e6fb..abe42d51a3ac 100644
--- a/sys/amd64/linux/linux_vdso_gtod.c
+++ b/sys/amd64/linux/linux_vdso_gtod.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2021 Dmitry Chagin <dchagin@FreeBSD.org>
*
@@ -25,12 +25,10 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/elf.h>
#include <sys/errno.h>
#include <sys/proc.h>
+#include <sys/stdarg.h>
#include <sys/stddef.h>
#define _KERNEL
#include <sys/vdso.h>
@@ -39,12 +37,11 @@ __FBSDID("$FreeBSD$");
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/stdarg.h>
#include <amd64/linux/linux.h>
#include <amd64/linux/linux_syscall.h>
#include <compat/linux/linux_errno.h>
-#include <compat/linux/linux_timer.h>
+#include <compat/linux/linux_time.h>
/* The kernel fixup this at vDSO install */
uintptr_t *kern_timekeep_base = NULL;
@@ -64,7 +61,7 @@ write(int fd, const void *buf, size_t size)
(
"syscall"
: "=a"(res)
- : "a"(LINUX_SYS_write), "D"(fd), "S"(buf), "d"(size)
+ : "a"(LINUX_SYS_linux_write), "D"(fd), "S"(buf), "d"(size)
: "cc", "rcx", "r11", "memory"
);
return (res);
diff --git a/sys/amd64/linux/syscalls.conf b/sys/amd64/linux/syscalls.conf
index a47f80444c2a..2c6c1e45f8d9 100644
--- a/sys/amd64/linux/syscalls.conf
+++ b/sys/amd64/linux/syscalls.conf
@@ -1,10 +1,8 @@
-# $FreeBSD$
sysnames="linux_syscalls.c"
sysproto="linux_proto.h"
sysproto_h=_LINUX_SYSPROTO_H_
syshdr="linux_syscall.h"
syssw="linux_sysent.c"
-sysmk="/dev/null"
syscallprefix="LINUX_SYS_"
switchname="linux_sysent"
namesname="linux_syscallnames"
diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master
index 896bbcc5e652..5e1394751ef6 100644
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -1,6 +1,4 @@
- $FreeBSD$
-; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; System call name/number master file (or rather, slave, from LINUX).
; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h.
@@ -26,18 +24,16 @@
; function prototype in sys/sysproto.h. Does add a
; definition to syscall.h besides adding a sysent.
+; #include's, #defines's, etc. may be included, and are copied to the output
+; files. However, #ifdef, etc will be copied, but any lines that don't start
+; with # will not. Caveat Emptor.
+
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
-#include <compat/linux/linux_sysproto.h>
#include <amd64/linux/linux.h>
#include <amd64/linux/linux_proto.h>
-; Isn't pretty, but there seems to be no other way to trap nosys
-#define nosys linux_nosys
-
-; #ifdef's, etc. may be included, and are copied to the output files.
-
0 AUE_NULL NOPROTO {
int read(
int fd,
@@ -45,8 +41,8 @@
l_size_t nbyte
);
}
-1 AUE_NULL NOPROTO {
- int write(
+1 AUE_NULL STD {
+ int linux_write(
int fd,
char *buf,
l_size_t nbyte
@@ -175,8 +171,8 @@
u_int iovcnt
);
}
-20 AUE_WRITEV NOPROTO {
- int writev(
+20 AUE_WRITEV STD {
+ int linux_writev(
int fd,
struct iovec *iovp,
u_int iovcnt
@@ -437,8 +433,8 @@
59 AUE_EXECVE STD {
int linux_execve(
char *path,
- char **argp,
- char **envp
+ l_uintptr_t *argp,
+ l_uintptr_t *envp
);
}
60 AUE_EXIT STD {
@@ -872,7 +868,7 @@
int linux_mknod(
char *path,
l_mode_t mode,
- l_uint dev
+ l_dev_t dev
);
}
134 AUE_USELIB UNIMPL uselib
@@ -1115,7 +1111,7 @@
int linux_setxattr(
const char *path,
const char *name,
- const char *value,
+ void *value,
l_size_t size,
l_int flags
);
@@ -1124,7 +1120,7 @@
int linux_lsetxattr(
const char *path,
const char *name,
- const char *value,
+ void *value,
l_size_t size,
l_int flags
);
@@ -1133,7 +1129,7 @@
int linux_fsetxattr(
l_int fd,
const char *name,
- const char *value,
+ void *value,
l_size_t size,
l_int flags
);
@@ -1142,7 +1138,7 @@
int linux_getxattr(
const char *path,
const char *name,
- char *value,
+ void *value,
l_size_t size
);
}
@@ -1150,7 +1146,7 @@
int linux_lgetxattr(
const char *path,
const char *name,
- char *value,
+ void *value,
l_size_t size
);
}
@@ -1158,28 +1154,28 @@
int linux_fgetxattr(
l_int fd,
const char *name,
- char *value,
+ void *value,
l_size_t size
);
}
194 AUE_NULL STD {
int linux_listxattr(
const char *path,
- const char *list,
+ char *list,
l_size_t size
);
}
195 AUE_NULL STD {
int linux_llistxattr(
const char *path,
- const char *list,
+ char *list,
l_size_t size
);
}
196 AUE_NULL STD {
int linux_flistxattr(
l_int fd,
- const char *list,
+ char *list,
l_size_t size
);
}
@@ -1300,7 +1296,7 @@
222 AUE_NULL STD {
int linux_timer_create(
clockid_t clock_id,
- struct sigevent *evp,
+ struct l_sigevent *evp,
l_timer_t *timerid
);
}
@@ -1432,7 +1428,7 @@
244 AUE_NULL STD {
int linux_mq_notify(
l_mqd_t mqd,
- const struct l_timespec *abs_timeout
+ const struct l_sigevent *sevp,
);
}
245 AUE_NULL STD {
@@ -1463,20 +1459,34 @@
250 AUE_NULL STD {
int linux_keyctl(void);
}
-251 AUE_NULL STD {
- int linux_ioprio_set(void);
+251 AUE_SETPRIORITY STD {
+ int linux_ioprio_set(
+ l_int which,
+ l_int who,
+ l_int ioprio
+ );
}
-252 AUE_NULL STD {
- int linux_ioprio_get(void);
+252 AUE_GETPRIORITY STD {
+ int linux_ioprio_get(
+ l_int which,
+ l_int who
+ );
}
253 AUE_NULL STD {
int linux_inotify_init(void);
}
254 AUE_NULL STD {
- int linux_inotify_add_watch(void);
+ int linux_inotify_add_watch(
+ l_int fd,
+ const char *pathname,
+ uint32_t mask
+ );
}
255 AUE_NULL STD {
- int linux_inotify_rm_watch(void);
+ int linux_inotify_rm_watch(
+ l_int fd,
+ uint32_t wd
+ );
}
256 AUE_NULL STD {
int linux_migrate_pages(void);
@@ -1501,7 +1511,7 @@
l_int dfd,
const char *filename,
l_mode_t mode,
- l_uint dev
+ l_dev_t dev
);
}
260 AUE_FCHOWNAT STD {
@@ -2051,7 +2061,7 @@
uint32_t sig
);
}
-; Linux 5.0:
+; Linux 5.1:
335-423 AUE_NULL UNIMPL nosys
424 AUE_NULL STD {
int linux_pidfd_send_signal(
@@ -2070,6 +2080,7 @@
427 AUE_NULL STD {
int linux_io_uring_register(void);
}
+; Linux 5.2:
428 AUE_NULL STD {
int linux_open_tree(void);
}
@@ -2088,6 +2099,7 @@
433 AUE_NULL STD {
int linux_fspick(void);
}
+; Linux 5.3:
434 AUE_NULL STD {
int linux_pidfd_open(void);
}
@@ -2097,15 +2109,22 @@
l_size_t usize
);
}
-436 AUE_NULL STD {
- int linux_close_range(void);
+; Linux 5.9:
+436 AUE_CLOSERANGE STD {
+ int linux_close_range(
+ l_uint first,
+ l_uint last,
+ l_uint flags
+ );
}
+; Linux 5.6:
437 AUE_NULL STD {
int linux_openat2(void);
}
438 AUE_NULL STD {
int linux_pidfd_getfd(void);
}
+; Linux 5.8:
439 AUE_NULL STD {
int linux_faccessat2(
l_int dfd,
@@ -2114,9 +2133,11 @@
l_int flags
);
}
+; Linux 5.10:
440 AUE_NULL STD {
int linux_process_madvise(void);
}
+; Linux 5.11:
441 AUE_NULL STD {
int linux_epoll_pwait2(
l_int epfd,
@@ -2127,9 +2148,50 @@
l_size_t sigsetsize
);
}
+; Linux 5.12:
442 AUE_NULL STD {
int linux_mount_setattr(void);
}
-; please, keep this line at the end.
-443 AUE_NULL UNIMPL nosys
+; Linux 5.14:
+443 AUE_NULL STD {
+ int linux_quotactl_fd(void);
+ }
+; Linux 5.13:
+444 AUE_NULL STD {
+ int linux_landlock_create_ruleset(void);
+ }
+445 AUE_NULL STD {
+ int linux_landlock_add_rule(void);
+ }
+446 AUE_NULL STD {
+ int linux_landlock_restrict_self(void);
+ }
+; Linux 5.14:
+447 AUE_NULL STD {
+ int linux_memfd_secret(void);
+ }
+; Linux 5.15:
+448 AUE_NULL STD {
+ int linux_process_mrelease(void);
+ }
+; Linux 5.16:
+449 AUE_NULL STD {
+ int linux_futex_waitv(void);
+ }
+; Linux 5.17:
+450 AUE_NULL STD {
+ int linux_set_mempolicy_home_node(void);
+ }
+; Linux 6.5:
+451 AUE_NULL STD {
+ int linux_cachestat(void);
+ }
+; Linux 6.6:
+452 AUE_NULL STD {
+ int linux_fchmodat2(void);
+ }
+453 AUE_NULL STD {
+ int linux_map_shadow_stack(void);
+ }
+
; vim: syntax=off