diff options
| author | ryo <ryo@NetBSD.org> | 2021-11-25 03:08:03 +0000 |
|---|---|---|
| committer | ryo <ryo@NetBSD.org> | 2021-11-25 03:08:03 +0000 |
| commit | 172281034fb9508dbffcabf787097cd4cb73031d (patch) | |
| tree | 0cdb2b955215a20d79c8727e09f5080615856883 /sys | |
| parent | 527e592f4c1b061d03489e0d4bd5015b14ade55a (diff) | |
add support COMPAT_LINUX32 for aarch64
Diffstat (limited to 'sys')
52 files changed, 14661 insertions, 75 deletions
diff --git a/sys/arch/aarch64/aarch64/aarch32_syscall.c b/sys/arch/aarch64/aarch64/aarch32_syscall.c index c024b2cdc72..066a21b66ab 100644 --- a/sys/arch/aarch64/aarch64/aarch32_syscall.c +++ b/sys/arch/aarch64/aarch64/aarch32_syscall.c @@ -1,4 +1,4 @@ -/* $NetBSD: aarch32_syscall.c,v 1.5 2021/05/15 11:39:20 rin Exp $ */ +/* $NetBSD: aarch32_syscall.c,v 1.6 2021/11/25 03:08:04 ryo Exp $ */ /* * Copyright (c) 2018 Ryo Shimizu <ryo@nerv.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aarch32_syscall.c,v 1.5 2021/05/15 11:39:20 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aarch32_syscall.c,v 1.6 2021/11/25 03:08:04 ryo Exp $"); #include <sys/param.h> #include <sys/ktrace.h> @@ -71,8 +71,28 @@ EMULNAME(syscall)(struct trapframe *tf) curcpu()->ci_data.cpu_nsyscall++; - uint32_t code = tf->tf_esr & 0xffff; /* XXX: 16-23bits are omitted */ thumbmode = (tf->tf_spsr & SPSR_A32_T) ? true : false; +#ifdef SYSCALL_CODE_REG + /* + * mov.w r<SYSCALL_CODE_REG>, #<syscall_no> + * svc #<SYSCALL_CODE_REG_SVC> + */ +#ifdef SYSCALL_CODE_REG_SVC + if ((tf->tf_esr & 0xffff) != SYSCALL_CODE_REG_SVC) { + error = EINVAL; + goto bad; + } +#endif + uint32_t code = tf->tf_reg[SYSCALL_CODE_REG]; +#if (SYSCALL_CODE_REG == 0) + int regstart = 1; /* args start from r1 */ + int nargs_reg = NARGREG - 1; /* number of argument in registers */ +#else + int regstart = 0; /* args start from r0 */ + int nargs_reg = NARGREG; /* number of argument in registers */ +#endif +#else /* SYSCALL_CODE_REG */ + uint32_t code = tf->tf_esr & 0xffff; /* XXX: 16-23bits are omitted */ if (thumbmode) { if (code != 255) { do_trapsignal(l, SIGILL, ILL_ILLTRP, @@ -83,13 +103,17 @@ EMULNAME(syscall)(struct trapframe *tf) code = tf->tf_reg[0]; tf->tf_reg[0] = tf->tf_reg[12]; /* orig $r0 is saved to $ip */ } - - int nargs_reg = NARGREG; /* number of argument in registers */ int regstart = 0; /* args start from r0 */ + int nargs_reg = NARGREG; /* number of argument in registers */ +#endif /* SYSCALL_CODE_REG */ +#ifdef SYSCALL_CODE_REMAP + code = SYSCALL_CODE_REMAP(code); +#endif code %= EMULNAMEU(SYS_NSYSENT); callp = p->p_emul->e_sysent + code; +#ifndef SYSCALL_NO_INDIRECT if (__predict_false(callp->sy_flags & SYCALL_INDIRECT)) { int off = 1; #ifdef NETBSD32_SYS_netbsd32____syscall /* XXX ugly: apply only for NETBSD32 */ @@ -117,6 +141,7 @@ EMULNAME(syscall)(struct trapframe *tf) goto bad; } } +#endif /* SYSCALL_NO_INDIRECT */ /* number of argument to fetch from sp */ KASSERT(callp->sy_narg <= EMULNAMEU(SYS_MAXSYSARGS)); @@ -133,8 +158,8 @@ EMULNAME(syscall)(struct trapframe *tf) goto bad; } - rval[0] = rval[1] = 0; - + rval[0] = 0; + rval[1] = tf->tf_reg[1]; #if 0 error = sy_invoke(callp, l, args32buf.a32, rval, code); #else @@ -171,7 +196,9 @@ EMULNAME(syscall)(struct trapframe *tf) if (__predict_true(error == 0)) { tf->tf_reg[0] = rval[0]; +#ifndef SYSCALL_NO_RVAL1 tf->tf_reg[1] = rval[1]; +#endif tf->tf_spsr &= ~NZCV_C; } else { switch (error) { @@ -190,6 +217,8 @@ EMULNAME(syscall)(struct trapframe *tf) #ifndef __HAVE_MINIMAL_EMUL if (p->p_emul->e_errno) error = p->p_emul->e_errno[error]; +#elif defined(SYSCALL_EMUL_ERRNO) + error = SYSCALL_EMUL_ERRNO(error); #endif tf->tf_reg[0] = error; tf->tf_spsr |= NZCV_C; diff --git a/sys/arch/aarch64/aarch64/linux32_syscall.c b/sys/arch/aarch64/aarch64/linux32_syscall.c new file mode 100644 index 00000000000..daeab81eaae --- /dev/null +++ b/sys/arch/aarch64/aarch64/linux32_syscall.c @@ -0,0 +1,84 @@ +/* $NetBSD: linux32_syscall.c,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#include <sys/cdefs.h> +__KERNEL_RCSID(0, "$NetBSD: linux32_syscall.c,v 1.1 2021/11/25 03:08:04 ryo Exp $"); + +#if defined(_KERNEL_OPT) +#include "opt_compat_linux32.h" +#endif + +#include <sys/param.h> +#include <sys/types.h> + +#include <compat/linux32/linux32_syscall.h> +#include <compat/linux32/common/linux32_errno.h> + +#define EMULNAME(x) __CONCAT(linux32_,x) +#define EMULNAMEU(x) __CONCAT(LINUX32_,x) + +/* + * syscall.c behavior options + */ + +/* + * EABI linux/arm always uses indirect syscall, and code of 'svc #<code>' must + * be zero. The system call number is specified by the r7 register. + */ +#define NARGREG 7 /* Seven(all) arguments are passed in r0-r6 */ +#define SYSCALL_CODE_REG 7 /* syscall number is passed in r7 */ +#define SYSCALL_CODE_REG_SVC 0 /* Non-zero is OABI, but not supported */ +#define SYSCALL_NO_INDIRECT + +/* used when __HAVE_MINIMAL_EMUL is not defined */ +#define SYSCALL_EMUL_ERRNO(x) native_to_linux32_errno[x] + +/* don't update x1 register with rval[1] */ +#define SYSCALL_NO_RVAL1 + +#define SYSCALL_CODE_REMAP(code) linux32_syscall_code_remap(code) + +/* + * see also comments in the bottom of + * sys/compat/linux32/arch/aarch64/syscalls.master + */ +#define LINUX32_EARM_NR_BASE 0x0f0000 +#define LINUX32_SYS_ARMBASE 480 + +static inline uint32_t +linux32_syscall_code_remap(uint32_t code) +{ + if (code > LINUX32_EARM_NR_BASE) + code = code - LINUX32_EARM_NR_BASE + LINUX32_SYS_ARMBASE; + return code; +} + +#include "aarch32_syscall.c" diff --git a/sys/arch/aarch64/conf/files.aarch64 b/sys/arch/aarch64/conf/files.aarch64 index a82662c8f42..4699ba7f002 100644 --- a/sys/arch/aarch64/conf/files.aarch64 +++ b/sys/arch/aarch64/conf/files.aarch64 @@ -1,4 +1,4 @@ -# $NetBSD: files.aarch64,v 1.35 2021/10/30 18:44:24 jmcneill Exp $ +# $NetBSD: files.aarch64,v 1.36 2021/11/25 03:08:04 ryo Exp $ defflag opt_cpuoptions.h AARCH64_ALIGNMENT_CHECK defflag opt_cpuoptions.h AARCH64_EL0_STACK_ALIGNMENT_CHECK @@ -134,7 +134,12 @@ file arch/aarch64/aarch64/netbsd32_syscall.c compat_netbsd32 include "compat/ossaudio/files.ossaudio" include "compat/linux/files.linux" include "compat/linux/arch/aarch64/files.linux_aarch64" -file arch/aarch64/aarch64/linux_syscall.c compat_linux +file arch/aarch64/aarch64/linux_syscall.c compat_linux + +# Linux 32 bit compatibility (COMPAT_LINUX32) +include "compat/linux32/files.linux32" +include "compat/linux32/arch/aarch64/files.linux32_aarch64" +file arch/aarch64/aarch64/linux32_syscall.c compat_linux32 # profiling support file dev/tprof/tprof_armv8.c tprof needs-flag diff --git a/sys/compat/linux/arch/aarch64/linux_commons.c b/sys/compat/linux/arch/aarch64/linux_commons.c index 9fb78d98d76..10793b4cf82 100644 --- a/sys/compat/linux/arch/aarch64/linux_commons.c +++ b/sys/compat/linux/arch/aarch64/linux_commons.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_commons.c,v 1.2 2021/10/12 08:36:28 andvar Exp $ */ +/* $NetBSD: linux_commons.c,v 1.3 2021/11/25 03:08:04 ryo Exp $ */ /* * This file includes C files from the common @@ -13,7 +13,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_commons.c,v 1.2 2021/10/12 08:36:28 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_commons.c,v 1.3 2021/11/25 03:08:04 ryo Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -34,4 +34,5 @@ __KERNEL_RCSID(0, "$NetBSD: linux_commons.c,v 1.2 2021/10/12 08:36:28 andvar Exp #include "../../common/linux_pipe.c" #include "../../common/linux_file64.c" #include "../../common/linux_misc_notalpha.c" +#include "../../common/linux_sig_notalpha.c" #include "../../common/linux_fadvise64.c" diff --git a/sys/compat/linux/arch/aarch64/linux_machdep.h b/sys/compat/linux/arch/aarch64/linux_machdep.h index 931ea1cf751..71421abdaf0 100644 --- a/sys/compat/linux/arch/aarch64/linux_machdep.h +++ b/sys/compat/linux/arch/aarch64/linux_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.h,v 1.1 2021/09/23 06:56:27 ryo Exp $ */ +/* $NetBSD: linux_machdep.h,v 1.2 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -74,6 +74,49 @@ struct linux_rt_sigframe { struct linux_ucontext uc; }; +/* + * Not required for COMPAT_LINUX, + * but required for COMPAT_LINUX32. + */ +struct linux_sys_open_args { + syscallarg(const char *) path; + syscallarg(int) flags; + syscallarg(linux_umode_t) mode; +}; +int linux_sys_open(struct lwp *, const struct linux_sys_open_args *, register_t *); + +struct linux_sys_eventfd_args { + syscallarg(unsigned int) initval; +}; +int linux_sys_eventfd(struct lwp *, const struct linux_sys_eventfd_args *, register_t *); + +struct linux_sys_llseek_args { + syscallarg(int) fd; + syscallarg(u_int32_t) ohigh; + syscallarg(u_int32_t) olow; + syscallarg(void *) res; + syscallarg(int) whence; +}; +int linux_sys_llseek(struct lwp *, const struct linux_sys_llseek_args *, register_t *); + +struct linux_sys_unlink_args { + syscallarg(const char *) path; +}; +int linux_sys_unlink(struct lwp *, const struct linux_sys_unlink_args *, register_t *); + +struct linux_sys_mknod_args { + syscallarg(const char *) path; + syscallarg(linux_umode_t) mode; + syscallarg(unsigned) dev; +}; +int linux_sys_mknod(struct lwp *, const struct linux_sys_mknod_args *, register_t *); + +struct linux_sys_alarm_args { + syscallarg(unsigned int) secs; +}; +int linux_sys_alarm(struct lwp *, const struct linux_sys_alarm_args *, register_t *); + +int linux_sys_pause(struct lwp *, const void *, register_t *); #ifdef _KERNEL __BEGIN_DECLS diff --git a/sys/compat/linux/common/linux_file.c b/sys/compat/linux/common/linux_file.c index 06e40091019..64f806cc74b 100644 --- a/sys/compat/linux/common/linux_file.c +++ b/sys/compat/linux/common/linux_file.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_file.c,v 1.121 2021/09/23 06:56:27 ryo Exp $ */ +/* $NetBSD: linux_file.c,v 1.122 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.121 2021/09/23 06:56:27 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.122 2021/11/25 03:08:04 ryo Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -206,7 +206,6 @@ linux_open_ctty(struct lwp *l, int flags, int fd) } } -#if !defined(__aarch64__) /* * open(2). Take care of the different flag values, and let the * NetBSD syscall do the real work. See if this operation @@ -236,7 +235,6 @@ linux_sys_open(struct lwp *l, const struct linux_sys_open_args *uap, register_t linux_open_ctty(l, fl, *retval); return 0; } -#endif int linux_sys_openat(struct lwp *l, const struct linux_sys_openat_args *uap, register_t *retval) @@ -612,7 +610,6 @@ linux_unlink_dircheck(const char *path) return error ? error : EPERM; } -#if !defined(__aarch64__) int linux_sys_unlink(struct lwp *l, const struct linux_sys_unlink_args *uap, register_t *retval) { @@ -627,7 +624,6 @@ linux_sys_unlink(struct lwp *l, const struct linux_sys_unlink_args *uap, registe return error; } -#endif int linux_sys_unlinkat(struct lwp *l, const struct linux_sys_unlinkat_args *uap, register_t *retval) @@ -651,7 +647,6 @@ linux_sys_unlinkat(struct lwp *l, const struct linux_sys_unlinkat_args *uap, reg return error; } -#if !defined(__aarch64__) int linux_sys_mknod(struct lwp *l, const struct linux_sys_mknod_args *uap, register_t *retval) { @@ -669,7 +664,6 @@ linux_sys_mknod(struct lwp *l, const struct linux_sys_mknod_args *uap, register_ return linux_sys_mknodat(l, &ua, retval); } -#endif int linux_sys_mknodat(struct lwp *l, const struct linux_sys_mknodat_args *uap, register_t *retval) diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c index e3b463589da..c459dd35f42 100644 --- a/sys/compat/linux/common/linux_misc.c +++ b/sys/compat/linux/common/linux_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.254 2021/09/23 06:56:27 ryo Exp $ */ +/* $NetBSD: linux_misc.c,v 1.255 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.254 2021/09/23 06:56:27 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.255 2021/11/25 03:08:04 ryo Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1616,7 +1616,6 @@ linux_do_eventfd2(struct lwp *l, unsigned int initval, int flags, return do_eventfd(l, initval, nflags, retval); } -#if !defined(__aarch64__) int linux_sys_eventfd(struct lwp *l, const struct linux_sys_eventfd_args *uap, register_t *retval) @@ -1627,7 +1626,6 @@ linux_sys_eventfd(struct lwp *l, const struct linux_sys_eventfd_args *uap, return linux_do_eventfd2(l, SCARG(uap, initval), 0, retval); } -#endif int linux_sys_eventfd2(struct lwp *l, const struct linux_sys_eventfd2_args *uap, diff --git a/sys/compat/linux/common/linux_misc_notalpha.c b/sys/compat/linux/common/linux_misc_notalpha.c index 7971df75b56..263cdc5ca38 100644 --- a/sys/compat/linux/common/linux_misc_notalpha.c +++ b/sys/compat/linux/common/linux_misc_notalpha.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc_notalpha.c,v 1.113 2021/09/23 11:28:47 christos Exp $ */ +/* $NetBSD: linux_misc_notalpha.c,v 1.114 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995, 1998, 2008, 2020 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.113 2021/09/23 11:28:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.114 2021/11/25 03:08:04 ryo Exp $"); /* * Note that we must NOT include "opt_compat_linux32.h" here, @@ -85,7 +85,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.113 2021/09/23 11:28:47 ch #endif #ifndef COMPAT_LINUX32 -#if !defined(__aarch64__) /* * Alarm. This is a libc call which uses setitimer(2) in NetBSD. * Do the same here. @@ -121,7 +120,6 @@ linux_sys_alarm(struct lwp *l, const struct linux_sys_alarm_args *uap, register_ *retval = oitv.it_value.tv_sec; return 0; } -#endif #endif /* !COMPAT_LINUX32 */ #if !defined(__aarch64__) && !defined(__amd64__) diff --git a/sys/compat/linux/common/linux_oldmmap.c b/sys/compat/linux/common/linux_oldmmap.c index a7808b1099b..5c5ab09e924 100644 --- a/sys/compat/linux/common/linux_oldmmap.c +++ b/sys/compat/linux/common/linux_oldmmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_oldmmap.c,v 1.73 2021/09/23 06:56:27 ryo Exp $ */ +/* $NetBSD: linux_oldmmap.c,v 1.74 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.73 2021/09/23 06:56:27 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.74 2021/11/25 03:08:04 ryo Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -58,8 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.73 2021/09/23 06:56:27 ryo Exp $ #include <compat/linux/linux_syscallargs.h> /* Used on: arm, i386, m68k */ -/* Used for linux32 on: amd64 */ -/* Not used on: aarch64, alpha, mips, pcc, sparc, sparc64 */ +/* Used for linux32 on: aarch64, amd64 */ +/* Not used on: alpha, mips, pcc, sparc, sparc64 */ #undef DPRINTF #ifdef DEBUG_LINUX diff --git a/sys/compat/linux/common/linux_sig_notalpha.c b/sys/compat/linux/common/linux_sig_notalpha.c index ccad2f6baa2..daf68648747 100644 --- a/sys/compat/linux/common/linux_sig_notalpha.c +++ b/sys/compat/linux/common/linux_sig_notalpha.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sig_notalpha.c,v 1.40 2021/09/23 06:56:27 ryo Exp $ */ +/* $NetBSD: linux_sig_notalpha.c,v 1.41 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.40 2021/09/23 06:56:27 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.41 2021/11/25 03:08:04 ryo Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -56,9 +56,10 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.40 2021/09/23 06:56:27 ryo #include <compat/linux/linux_syscallargs.h> /* Used on: arm, i386, m68k, mips, sparc, sparc64 */ -/* Not used on: aarch64, alpha */ +/* Partly used on: aarch64, amd64 */ +/* Not used on: alpha */ -#if !defined(__amd64__) +#if !defined(__aarch64__) && !defined(__amd64__) /* * The Linux signal() system call. I think that the signal() in the C * library actually calls sigaction, so I doubt this one is ever used. diff --git a/sys/compat/linux32/arch/Makefile b/sys/compat/linux32/arch/Makefile index c6ed399a056..976de4513e2 100644 --- a/sys/compat/linux32/arch/Makefile +++ b/sys/compat/linux32/arch/Makefile @@ -1,3 +1,3 @@ -# $NetBSD: Makefile,v 1.1 2017/01/16 17:39:22 christos Exp $ -SUBDIR= amd64 +# $NetBSD: Makefile,v 1.2 2021/11/25 03:08:04 ryo Exp $ +SUBDIR= aarch64 amd64 .include <bsd.subdir.mk> diff --git a/sys/compat/linux32/arch/aarch64/Makefile b/sys/compat/linux32/arch/aarch64/Makefile new file mode 100644 index 00000000000..89891be3186 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/Makefile @@ -0,0 +1,3 @@ +# $NetBSD: Makefile,v 1.1 2021/11/25 03:08:04 ryo Exp $ + +.include <../../Makefile.inc> diff --git a/sys/compat/linux32/arch/aarch64/files.linux32_aarch64 b/sys/compat/linux32/arch/aarch64/files.linux32_aarch64 new file mode 100644 index 00000000000..690340f5b65 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/files.linux32_aarch64 @@ -0,0 +1,11 @@ +# $NetBSD: files.linux32_aarch64,v 1.1 2021/11/25 03:08:04 ryo Exp $ + +file compat/linux32/arch/aarch64/linux32_syscalls.c compat_linux32 +file compat/linux32/arch/aarch64/linux32_sysent.c compat_linux32 +file compat/linux32/arch/aarch64/linux32_exec_machdep.c compat_linux32 +file compat/linux32/arch/aarch64/linux32_machdep.c compat_linux32 +file compat/linux32/arch/aarch64/linux32_missing.c compat_linux32 +file compat/linux32/arch/aarch64/linux32_sigcode.S compat_linux32 + +file compat/linux32/common/linux32_ipccall.c compat_linux32 +file compat/linux32/common/linux32_uid16.c compat_linux32 diff --git a/sys/compat/linux32/arch/aarch64/linux32_errno.h b/sys/compat/linux32/arch/aarch64/linux32_errno.h new file mode 100644 index 00000000000..e9735240153 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_errno.h @@ -0,0 +1,39 @@ +/* $NetBSD: linux32_errno.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_ERRNO_H_ +#define _AARCH64_LINUX32_ERRNO_H_ + +#include <compat/linux/common/linux_errno.h> + +#define native_to_linux32_errno native_to_linux_errno + +#endif /* _AARCH64_LINUX32_ERRNO_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_exec.h b/sys/compat/linux32/arch/aarch64/linux32_exec.h new file mode 100644 index 00000000000..eec91810809 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_exec.h @@ -0,0 +1,57 @@ +/* $NetBSD: linux32_exec.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_EXEC_H_ +#define _AARCH64_LINUX32_EXEC_H_ + +#include <sys/exec_elf.h> + +#define LINUX32_ELF_AUX_ENTRIES 20 +#define LINUX32_PLATFORM "v7l" + +/* The extra data (ELF auxiliary table and platform name) on stack */ +struct linux32_extra_stack_data { + Aux32Info ai[LINUX32_ELF_AUX_ENTRIES]; + uint32_t randbytes[4]; + char hw_platform[8]; /* sizeof(LINUX32_PLATFORM) + align */ +}; + +#define LINUX32_ELF_AUX_ARGSIZ sizeof(struct linux32_extra_stack_data) + +#define LINUX32_ARM_KUSER_HELPER_ADDR 0xffff0000 +#define LINUX32_ARM_KUSER_HELPER_SIZE 0x00001000 +/* avoid 0xffff0000-. linux/arm uses this area as kuser_helper */ +#define LINUX32_USRSTACK ((vaddr_t)0xfffef000) +#define LINUX32_MAXSSIZ MAXSSIZ32 /* from machine/vmparam.h */ + +int linux32_exec_setup_stack(struct lwp *, struct exec_package *); + +#endif /* _AARCH64_LINUX32_EXEC_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_exec_machdep.c b/sys/compat/linux32/arch/aarch64/linux32_exec_machdep.c new file mode 100644 index 00000000000..b925d4a5202 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_exec_machdep.c @@ -0,0 +1,142 @@ +/* $NetBSD: linux32_exec_machdep.c,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/* + * Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christopher G. Demetriou. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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. + */ + +#include <sys/cdefs.h> +__KERNEL_RCSID(0, "$NetBSD: linux32_exec_machdep.c,v 1.1 2021/11/25 03:08:04 ryo Exp $"); + +#include <sys/param.h> +#include <sys/types.h> +#include <sys/exec.h> +#include <sys/lwp.h> +#include <sys/syscallargs.h> +#include <sys/vnode.h> + +#include <machine/vmparam.h> + +#include <compat/linux/common/linux_types.h> +#include <compat/linux/common/linux_exec.h> +#include <compat/linux32/common/linux32_exec.h> + +#ifdef LINUX32_ARM_KUSER_HELPER_ADDR +static int +vmcmd_linux32_kuser_helper_map(struct lwp *l, struct exec_vmcmd *cmd) +{ + const struct proc *p = l->l_proc; + /* l->l_proc->p_emul still points to emul_netbsd at this point */ + const struct emul *e = &emul_linux32; + struct uvm_object *uobj; + vsize_t sz; + vaddr_t va; + int error; + + /* + * kuser_helper code share the page prepared for sigcode. + * See also sys/compat/linux32/arch/aarch64/linux32_sigcode.S + */ + if (e->e_sigobject == NULL) + return 0; + uobj = *e->e_sigobject; + if (uobj == NULL) + return 0; + + va = LINUX32_ARM_KUSER_HELPER_ADDR; + sz = LINUX32_ARM_KUSER_HELPER_SIZE; + + (*uobj->pgops->pgo_reference)(uobj); + error = uvm_map(&p->p_vmspace->vm_map, &va, round_page(sz), uobj, 0, 0, + UVM_MAPFLAG(UVM_PROT_RX, UVM_PROT_RX, + UVM_INH_SHARE, UVM_ADV_RANDOM, 0)); + if (error) { + (*uobj->pgops->pgo_detach)(uobj); + return error; + } + + return 0; +} +#endif + +int +linux32_exec_setup_stack(struct lwp *l, struct exec_package *epp) +{ + vaddr_t access_linear_min, noaccess_linear_min; + vsize_t access_size, noaccess_size; + vsize_t max_stack_size; + +#ifndef LINUX32_USRSTACK +#define LINUX32_USRSTACK USRSTACK32 +#endif +#ifndef LINUX32_MAXSSIZ +#define LINUX32_MAXSSIZ MAXSSIZ32 +#endif + + KASSERT((epp->ep_flags & EXEC_32) != 0); + epp->ep_minsaddr = LINUX32_USRSTACK; + max_stack_size = LINUX32_MAXSSIZ; + + epp->ep_ssize = + MIN(l->l_proc->p_rlimit[RLIMIT_STACK].rlim_cur, max_stack_size); + epp->ep_maxsaddr = + (vaddr_t)STACK_GROW(epp->ep_minsaddr, max_stack_size); + + l->l_proc->p_stackbase = epp->ep_minsaddr; + + /* + * set up commands for stack. note that this takes *two*, one to + * map the part of the stack which we can access, and one to map + * the part which we can't. + * + * arguably, it could be made into one, but that would require the + * addition of another mapping proc, which is unnecessary + */ + access_size = epp->ep_ssize; + access_linear_min = (vaddr_t)STACK_ALLOC(epp->ep_minsaddr, access_size); + noaccess_size = max_stack_size - access_size; + noaccess_linear_min = (vaddr_t)STACK_ALLOC(STACK_GROW(epp->ep_minsaddr, + access_size), noaccess_size); + + if (noaccess_size > 0 && noaccess_size <= max_stack_size) { + NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, noaccess_size, + noaccess_linear_min, NULLVP, 0, VM_PROT_NONE, VMCMD_STACK); + } + KASSERT(access_size > 0 && access_size <= max_stack_size); + NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, access_size, + access_linear_min, NULLVP, 0, VM_PROT_READ | VM_PROT_WRITE, + VMCMD_STACK); + +#ifdef LINUX32_ARM_KUSER_HELPER_ADDR + NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_linux32_kuser_helper_map, + LINUX32_ARM_KUSER_HELPER_SIZE, LINUX32_ARM_KUSER_HELPER_ADDR, + NULLVP, 0, VM_PROT_READ | VM_PROT_EXECUTE, 0); +#endif /* LINUX32_ARM_KUSER_HELPER_ADDR */ + + return 0; +} diff --git a/sys/compat/linux32/arch/aarch64/linux32_fcntl.h b/sys/compat/linux32/arch/aarch64/linux32_fcntl.h new file mode 100644 index 00000000000..7d35e353051 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_fcntl.h @@ -0,0 +1,42 @@ +/* $NetBSD: linux32_fcntl.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_FCNTL_H_ +#define _AARCH64_LINUX32_FCNTL_H_ + +#define LINUX32_F_GETLK 5 +#define LINUX32_F_SETLK 6 +#define LINUX32_F_SETLKW 7 +#define LINUX32_F_GETLK64 12 +#define LINUX32_F_SETLK64 13 +#define LINUX32_F_SETLKW64 14 + +#endif /* _AARCH64_LINUX32_FCNTL_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_ioctl.h b/sys/compat/linux32/arch/aarch64/linux32_ioctl.h new file mode 100644 index 00000000000..55a63536380 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_ioctl.h @@ -0,0 +1,47 @@ +/* $NetBSD: linux32_ioctl.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Emmanuel Dreyfus + * 4. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ +#ifndef _AARCH64_LINUX32_IOCTL_H_ +#define _AARCH64_LINUX32_IOCTL_H_ + +#define _LINUX32_IOC_NRBITS 8 +#define _LINUX32_IOC_TYPEBITS 8 +#define _LINUX32_IOC_SIZEBITS 14 +#define _LINUX32_IOC_DIRBITS 2 + +#define _LINUX32_IOC_NRSHIFT 0 + +#define _LINUX32_IOC_NONE 0U +#define _LINUX32_IOC_WRITE 1U +#define _LINUX32_IOC_READ 2U + +#endif /* _AARCH64_LINUX32_IOCTL_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_machdep.c b/sys/compat/linux32/arch/aarch64/linux32_machdep.c new file mode 100644 index 00000000000..bee345ffdc5 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_machdep.c @@ -0,0 +1,335 @@ +/* $NetBSD: linux32_machdep.c,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 Ryo Shimizu <ryo@nerv.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT 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. + */ + +#include <sys/cdefs.h> +__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.1 2021/11/25 03:08:04 ryo Exp $"); + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/proc.h> +#include <sys/exec.h> + +#include <compat/netbsd32/netbsd32.h> +#include <compat/netbsd32/netbsd32_exec.h> + +#include <compat/linux/common/linux_types.h> +#include <compat/linux/common/linux_signal.h> +#include <compat/linux/common/linux_errno.h> +#include <compat/linux/common/linux_machdep.h> + +#include <compat/linux32/common/linux32_types.h> +#include <compat/linux32/common/linux32_signal.h> +#include <compat/linux32/common/linux32_errno.h> +#include <compat/linux32/common/linux32_exec.h> +#include <compat/linux32/common/linux32_machdep.h> +#include <compat/linux32/linux32_syscall.h> +#include <compat/linux32/linux32_syscallargs.h> + +#include <machine/netbsd32_machdep.h> +#include <arm/vfpreg.h> + +static void +linux32_save_sigcontext(struct lwp *l, struct linux32_ucontext *luc) +{ + ucontext32_t uc; + __greg32_t *gr = uc.uc_mcontext.__gregs; + __vfpregset32_t *vfpregs = &uc.uc_mcontext.__vfpregs; + struct linux32_aux_sigframe *aux; + int i; + + cpu_getmcontext32(l, &uc.uc_mcontext, &uc.uc_flags); + + memset(luc, 0, sizeof(*luc)); + luc->luc_mcontext.arm_r0 = gr[_REG_R0]; + luc->luc_mcontext.arm_r1 = gr[_REG_R1]; + luc->luc_mcontext.arm_r2 = gr[_REG_R2]; + luc->luc_mcontext.arm_r3 = gr[_REG_R3]; + luc->luc_mcontext.arm_r4 = gr[_REG_R4]; + luc->luc_mcontext.arm_r5 = gr[_REG_R5]; + luc->luc_mcontext.arm_r6 = gr[_REG_R6]; + luc->luc_mcontext.arm_r7 = gr[_REG_R7]; + luc->luc_mcontext.arm_r8 = gr[_REG_R8]; + luc->luc_mcontext.arm_r9 = gr[_REG_R9]; + luc->luc_mcontext.arm_r10 = gr[_REG_R10]; + luc->luc_mcontext.arm_fp = gr[_REG_R11]; + luc->luc_mcontext.arm_ip = gr[_REG_R12]; + luc->luc_mcontext.arm_sp = gr[_REG_R13]; + luc->luc_mcontext.arm_lr = gr[_REG_R14]; + luc->luc_mcontext.arm_pc = gr[_REG_R15]; + luc->luc_mcontext.arm_cpsr = gr[_REG_CPSR]; + luc->luc_mcontext.trap_no = 0; + luc->luc_mcontext.error_code = 0; + luc->luc_mcontext.oldmask = 0; + luc->luc_mcontext.fault_address = 0; + + if (uc.uc_flags & _UC_FPU) { + aux = (struct linux32_aux_sigframe *)luc->luc_regspace; +#define LINUX32_VFP_MAGIC 0x56465001 + aux->vfp.magic = LINUX32_VFP_MAGIC; + aux->vfp.size = sizeof(struct linux32_vfp_sigframe); + + CTASSERT(__arraycount(aux->vfp.ufp.fpregs) == + __arraycount(vfpregs->__vfp_fstmx)); + for (i = 0; i < __arraycount(aux->vfp.ufp.fpregs); i++) + aux->vfp.ufp.fpregs[i] = vfpregs->__vfp_fstmx[i]; + aux->vfp.ufp.fpscr = vfpregs->__vfp_fpscr; + + aux->vfp.ufp_exc.fpexc = VFP_FPEXC_EN | VFP_FPEXC_VECITR; + aux->vfp.ufp_exc.fpinst = 0; + aux->vfp.ufp_exc.fpinst2 = 0; + aux->end_magic = 0 ; + } +} + +static int +linux32_restore_sigcontext(struct lwp *l, struct linux32_ucontext *luc) +{ + ucontext32_t uc; + __greg32_t *gr = uc.uc_mcontext.__gregs; + __vfpregset32_t *vfpregs = &uc.uc_mcontext.__vfpregs; + struct linux32_aux_sigframe *aux; + int i; + + memset(&uc, 0, sizeof(uc)); + gr[_REG_R0] = luc->luc_mcontext.arm_r0; + gr[_REG_R1] = luc->luc_mcontext.arm_r1; + gr[_REG_R2] = luc->luc_mcontext.arm_r2; + gr[_REG_R3] = luc->luc_mcontext.arm_r3; + gr[_REG_R4] = luc->luc_mcontext.arm_r4; + gr[_REG_R5] = luc->luc_mcontext.arm_r5; + gr[_REG_R6] = luc->luc_mcontext.arm_r6; + gr[_REG_R7] = luc->luc_mcontext.arm_r7; + gr[_REG_R8] = luc->luc_mcontext.arm_r8; + gr[_REG_R9] = luc->luc_mcontext.arm_r9; + gr[_REG_R10] = luc->luc_mcontext.arm_r10; + gr[_REG_R11] = luc->luc_mcontext.arm_fp; + gr[_REG_R12] = luc->luc_mcontext.arm_ip; + gr[_REG_R13] = luc->luc_mcontext.arm_sp; + gr[_REG_R14] = luc->luc_mcontext.arm_lr; + gr[_REG_R15] = luc->luc_mcontext.arm_pc; + gr[_REG_CPSR] = luc->luc_mcontext.arm_cpsr; + uc.uc_flags |= _UC_CPU; + + aux = (struct linux32_aux_sigframe *)luc->luc_regspace; + if (aux->vfp.magic == LINUX32_VFP_MAGIC && + aux->vfp.size == sizeof(struct linux32_vfp_sigframe)) { + + CTASSERT(__arraycount(vfpregs->__vfp_fstmx) == + __arraycount(aux->vfp.ufp.fpregs)); + for (i = 0; i < __arraycount(vfpregs->__vfp_fstmx); i++) + vfpregs->__vfp_fstmx[i] = aux->vfp.ufp.fpregs[i]; + vfpregs->__vfp_fpscr = aux->vfp.ufp.fpscr; + + uc.uc_flags |= _UC_FPU; + } + + return cpu_setmcontext32(l, &uc.uc_mcontext, uc.uc_flags); +} + +void +linux32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) +{ + struct lwp * const l = curlwp; + struct proc * const p = l->l_proc; + struct trapframe * const tf = lwp_trapframe(l); + stack_t * const ss = &l->l_sigstk; + const int sig = ksi->ksi_signo; + const sig_t handler = SIGACTION(p, sig).sa_handler; + struct linux32_rt_sigframe rt_sigframe_buf, *u_rt_sigframe; + struct linux32_sigframe *tmp_sigframe, *u_sigframe; + struct linux32_siginfo *tmp_siginfo, *u_siginfo; + vaddr_t sp; + int error; + const bool onstack_p = /* use signal stack? */ + (ss->ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 && + (SIGACTION(p, sig).sa_flags & SA_ONSTACK) != 0; + const bool rt_p = !!(SIGACTION(curproc, ksi->ksi_signo).sa_flags & + SA_SIGINFO); + + sp = onstack_p ? ((vaddr_t)ss->ss_sp + ss->ss_size) & -16 : + tf->tf_reg[13]; + + memset(&rt_sigframe_buf, 0, sizeof(rt_sigframe_buf)); + + if (rt_p) { + /* allocate rt_sigframe on stack */ + sp -= sizeof(struct linux32_rt_sigframe); + u_rt_sigframe = (struct linux32_rt_sigframe *)sp; + u_sigframe = &u_rt_sigframe->sig; + u_siginfo = &u_rt_sigframe->info; + tmp_sigframe = &rt_sigframe_buf.sig; + tmp_siginfo = &rt_sigframe_buf.info; + } else { + /* allocate sigframe on stack */ + sp -= sizeof(struct linux32_sigframe); + u_rt_sigframe = NULL; + u_sigframe = (struct linux32_sigframe *)sp; + u_siginfo = NULL; + tmp_sigframe = &rt_sigframe_buf.sig; + tmp_siginfo = NULL; + } + + if ((vaddr_t)sp >= VM_MAXUSER_ADDRESS32) { + sigexit(l, SIGILL); + return; + } + + /* build linux sigframe, and copyout to user stack */ + tmp_sigframe->uc.luc_flags = 0; + tmp_sigframe->uc.luc_link = NULL; + NETBSD32PTR32(tmp_sigframe->uc.luc_stack.ss_sp, ss->ss_sp); + tmp_sigframe->uc.luc_stack.ss_size = ss->ss_size; + tmp_sigframe->uc.luc_stack.ss_flags = 0; + if (ss->ss_flags & SS_ONSTACK) + tmp_sigframe->uc.luc_stack.ss_flags |= LINUX_SS_ONSTACK; + if (ss->ss_flags & SS_DISABLE) + tmp_sigframe->uc.luc_stack.ss_flags |= LINUX_SS_DISABLE; + native_to_linux32_sigset(&tmp_sigframe->uc.luc_sigmask, mask); + if (tmp_siginfo != NULL) + native_to_linux32_siginfo(tmp_siginfo, &ksi->ksi_info); + sendsig_reset(l, sig); + + mutex_exit(p->p_lock); + linux32_save_sigcontext(l, &tmp_sigframe->uc); + + /* copy linux sigframe onto the user stack */ + if (rt_p) { + error = copyout(&rt_sigframe_buf, u_rt_sigframe, + sizeof(rt_sigframe_buf)); + } else { + error = copyout(tmp_sigframe, u_sigframe, + sizeof(*tmp_sigframe)); + } + + mutex_enter(p->p_lock); + + if (error != 0 || (vaddr_t)handler >= VM_MAXUSER_ADDRESS32) { + sigexit(l, SIGILL); + return; + } + + /* build context to run handler in. */ + tf->tf_reg[0] = native_to_linux_signo[sig]; + tf->tf_reg[1] = NETBSD32PTR32I(u_siginfo); + tf->tf_reg[2] = NETBSD32PTR32I(&u_sigframe->uc); + tf->tf_pc = (uint64_t)handler; + tf->tf_reg[13] = sp; + + /* sigreturn trampoline */ + extern char linux32_sigcode[], linux32_rt_sigcode[]; + vsize_t linux_sigcode_offset; + if (rt_p) { + /* set return address to linux32_rt_sigcode() */ + linux_sigcode_offset = linux32_rt_sigcode - linux32_sigcode; + } else { + /* set return address to linux32_sigcode() */ + linux_sigcode_offset = linux32_sigcode - linux32_sigcode; + } + /* tf->tf_reg[14] is aarch32 lr */ + tf->tf_reg[14] = NETBSD32PTR32I((char *)p->p_sigctx.ps_sigcode + + linux_sigcode_offset); + + if (onstack_p) + ss->ss_flags |= SS_ONSTACK; +} + +int +linux32_sys_sigreturn(struct lwp *l, + const struct linux32_sys_sigreturn_args *uap, register_t *retval) +{ + struct trapframe * const tf = lwp_trapframe(l); + struct linux32_sigframe sigframe; + int error; + + error = copyin((void *)tf->tf_reg[13], &sigframe, sizeof(sigframe)); + if (error != 0) + goto done; + + error = linux32_restore_sigcontext(l, &sigframe.uc); + if (error != 0) + goto done; + error = EJUSTRETURN; + + done: + return error; +} + +int +linux32_sys_rt_sigreturn(struct lwp *l, + const struct linux32_sys_rt_sigreturn_args *uap, register_t *retval) +{ + struct trapframe * const tf = lwp_trapframe(l); + struct linux32_rt_sigframe rt_sigframe; + int error; + + error = copyin((void *)tf->tf_reg[13], &rt_sigframe, + sizeof(rt_sigframe)); + if (error != 0) + goto done; + + error = linux32_restore_sigcontext(l, &rt_sigframe.sig.uc); + if (error != 0) + goto done; + error = EJUSTRETURN; + + done: + return error; +} + +void +linux32_setregs(struct lwp *l, struct exec_package *pack, u_long stack) +{ + struct trapframe * const tf = lwp_trapframe(l); + + netbsd32_setregs(l, pack, stack); + + /* Same as netbsd32_setregs(), but some registers are set for linux */ + tf->tf_reg[0] = 0; + tf->tf_reg[12] = 0; + tf->tf_reg[13] = stack; /* sp */ + tf->tf_reg[14] = pack->ep_entry;/* lr */ + tf->tf_reg[18] = 0; + tf->tf_pc = pack->ep_entry; +} + +int +linux32_sys_set_tls(struct lwp *l, const struct linux32_sys_set_tls_args *uap, + register_t *retval) +{ + /* { + syscallarg(netbsd32_voidp) tls; + } */ + return lwp_setprivate(l, SCARG_P32(uap, tls)); +} + +int +linux32_sys_get_tls(struct lwp *l, const void *uap, register_t *retval) +{ + retval[0] = NETBSD32PTR32I(l->l_private); + return 0; +} diff --git a/sys/compat/linux32/arch/aarch64/linux32_machdep.h b/sys/compat/linux32/arch/aarch64/linux32_machdep.h new file mode 100644 index 00000000000..cbad941cefe --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_machdep.h @@ -0,0 +1,118 @@ +/* $NetBSD: linux32_machdep.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_MACHDEP_H_ +#define _AARCH64_LINUX32_MACHDEP_H_ + +#include <compat/linux32/arch/aarch64/linux32_missing.h> +#include <compat/linux32/arch/aarch64/linux32_siginfo.h> +#include <compat/linux32/arch/aarch64/linux32_signal.h> + +struct linux32_sigcontext { + uint32_t trap_no; + uint32_t error_code; + uint32_t oldmask; + uint32_t arm_r0; + uint32_t arm_r1; + uint32_t arm_r2; + uint32_t arm_r3; + uint32_t arm_r4; + uint32_t arm_r5; + uint32_t arm_r6; + uint32_t arm_r7; + uint32_t arm_r8; + uint32_t arm_r9; + uint32_t arm_r10; + uint32_t arm_fp; + uint32_t arm_ip; + uint32_t arm_sp; + uint32_t arm_lr; + uint32_t arm_pc; + uint32_t arm_cpsr; + uint32_t fault_address; +}; + +struct linux32_user_vfp { + uint64_t fpregs[32]; + uint32_t fpscr; +}; + +struct linux32_user_vfp_exc { + uint32_t fpexc; + uint32_t fpinst; + uint32_t fpinst2; +}; + +struct linux32_vfp_sigframe { + uint32_t magic; + uint32_t size; + struct linux32_user_vfp ufp; + struct linux32_user_vfp_exc ufp_exc; +} __aligned(8); + +struct linux32_aux_sigframe { + /* struct iwmmxt_sigframe iwmmxt; */ /* XXX: not supported */ + struct linux32_vfp_sigframe vfp; + uint32_t end_magic; +} __aligned(8); + +struct linux32_ucontext { + uint32_t luc_flags; + struct linux32_ucontext *luc_link; + linux32_stack_t luc_stack; + struct linux32_sigcontext luc_mcontext; + + linux32_sigset_t luc_sigmask; + int luc__unused[32 - (sizeof(linux32_sigset_t) / sizeof(int))]; + + uint32_t luc_regspace[128] __aligned(8); +}; + +struct linux32_sigframe { + struct linux32_ucontext uc; + uint32_t retcode[4]; +}; + +struct linux32_rt_sigframe { + struct linux32_siginfo info; + struct linux32_sigframe sig; +}; + +#undef LINUX_UNAME_ARCH +#define LINUX_UNAME_ARCH "armv7l" + +#ifdef _KERNEL +__BEGIN_DECLS +void linux32_syscall_intern(struct proc *); +__END_DECLS +#endif /* !_KERNEL */ + +#endif /* _AARCH64_LINUX32_MACHDEP_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_missing.c b/sys/compat/linux32/arch/aarch64/linux32_missing.c new file mode 100644 index 00000000000..b8a8758c940 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_missing.c @@ -0,0 +1,60 @@ +/* $NetBSD: linux32_missing.c,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#include <sys/cdefs.h> + +#ifdef _KERNEL_OPT +#include "opt_compat_linux32.h" +#endif + +#include <sys/types.h> +#include <sys/time.h> +#include <sys/param.h> +#include <sys/lwp.h> +#include <sys/ucred.h> +#include <sys/mount.h> +#include <sys/systm.h> +#include <sys/syscallargs.h> + +#include <compat/netbsd32/netbsd32.h> + +#include <compat/linux32/common/linux32_types.h> +#include <compat/linux32/common/linux32_signal.h> + +#include <compat/linux32/arch/aarch64/linux32_missing.h> +#include <compat/linux32/arch/aarch64/linux32_syscallargs.h> + +#include <compat/linux/common/linux_ipc.h> +#include <compat/linux/common/linux_sem.h> + +#include <compat/linux/common/linux_llseek.c> +#include <compat/linux/common/linux_oldmmap.c> +#include <compat/linux/common/linux_uid16.c> diff --git a/sys/compat/linux32/arch/aarch64/linux32_missing.h b/sys/compat/linux32/arch/aarch64/linux32_missing.h new file mode 100644 index 00000000000..bbdb795e483 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_missing.h @@ -0,0 +1,59 @@ +/* $NetBSD: linux32_missing.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_MISSING_H_ +#define _AARCH64_LINUX32_MISSING_H_ + +#include <compat/netbsd32/netbsd32.h> +#include <compat/linux/common/linux_types.h> +#include <compat/linux/common/linux_machdep.h> + +/* + * system calls not defined for COMPAT_LINUX/aarch64 + * but needed for COMPAT_LINUX32 + */ +struct linux_sys_old_mmap_args { + syscallarg(struct linux_oldmmap *) lmp; +}; +int linux_sys_old_mmap(struct lwp *, const struct linux_sys_old_mmap_args *, register_t *); + +struct linux_sys_getgroups16_args { + syscallarg(int) gidsetsize; + syscallarg(linux_gid16_t *) gidset; +}; +struct linux_sys_setgroups16_args { + syscallarg(int) gidsetsize; + syscallarg(linux_gid16_t *) gidset; +}; +int linux_sys_getgroups16(struct lwp *, const struct linux_sys_getgroups16_args *, register_t *); +int linux_sys_setgroups16(struct lwp *, const struct linux_sys_setgroups16_args *, register_t *); + +#endif /* _AARCH64_LINUX32_MISSING_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_sigcode.S b/sys/compat/linux32/arch/aarch64/linux32_sigcode.S new file mode 100644 index 00000000000..b5424ba4f38 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_sigcode.S @@ -0,0 +1,129 @@ +/* $NetBSD: linux32_sigcode.S,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 Ryo Shimizu <ryo@nerv.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT 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. + */ + +#include <machine/asm.h> + +RCSID("$NetBSD: linux32_sigcode.S,v 1.1 2021/11/25 03:08:04 ryo Exp $") + +#include <compat/linux32/linux32_syscall.h> + +/* + * linux aarch32 Signal trampoline code + */ + .text + .section .rodata + .align 12 + + .global _C_LABEL(linux32_sigcode) +_C_LABEL(linux32_sigcode): + /* mov r7, #LINUX32_SYS_sigreturn */ + .word 0xe3a07000 + LINUX32_SYS_sigreturn + .word 0xef000000 /* svc 0 */ + /* NOTREACHED */ + .word 0xe7f000f0 /* udf #0 */ + + .global _C_LABEL(linux32_rt_sigcode) +_C_LABEL(linux32_rt_sigcode): + /* mov r7, #LINUX32_SYS_rt_sigreturn */ + .word 0xe3a07000 + LINUX32_SYS_rt_sigreturn + .word 0xef000000 /* svc 0 */ + /* NOTREACHED */ + .word 0xe7f000f0 /* udf #0 */ + +/* + * linux/arm kuser_helper + * - should be mapped on userspace vaddr 0xffff0f60 + * - https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt + */ + +.kuser_helper_pad: +#define KUSER_HELPER_START 0x00000f60 + .space KUSER_HELPER_START - (.kuser_helper_pad - _C_LABEL(linux32_sigcode)) + +/* + * 0xffff0f60 + * int __kuser_cmpxchg64(const int64_t *oldval, const int64_t *newval, volatile int64_t *ptr); + */ +.__kuser_cmpxchg64: + .word 0xe92d00f0 /* push {r4, r5, r6, r7} */ + .word 0xf57ff05f /* dmb sy */ + .word 0xe1c040d0 /* ldrd r4, [r0] */ + .word 0xe1c160d0 /* ldrd r6, [r1] */ + .word 0xe1b20f9f /* ldrexd r0, [r2] */ + .word 0xe0500004 /* subs r0, r0, r4 */ + .word 0xe0c11005 /* sbc r1, r1, r5 */ + .word 0xe1900001 /* orrs r0, r0, r1 */ + .word 0x01a20f96 /* strexdeq r0, r6, [r2] */ + .word 0xf57ff05f /* dmb sy */ + .word 0xe8bd00f0 /* pop {r4, r5, r6, r7} */ + .word 0xe12fff1e /* bx lr */ + + .align 5 +/* + * 0xffff0fa0 + * void __kuser_memory_barrier(void); + */ +.__kuser_memory_barrier: + .word 0xf57ff05f /* dmb sy */ + .word 0xe12fff1e /* bx lr */ + + .align 5 +/* + * 0xffff0fc0 + * int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr); + */ +.__kuser_cmpxchg: + .word 0xf57ff05f /* dmb sy */ + .word 0xe1923f9f /* ldrex r3, [r2] */ + .word 0xe0530000 /* subs r0, r3, r0 */ + .word 0x01820f91 /* strexeq r0, r1, [r2] */ + .word 0xf57ff05f /* dmb sy */ + .word 0xe12fff1e /* bx lr */ + + + .align 5 +/* 0xffff0fe0 */ +.__kuser_get_tls: + .word 0xee1d0f70 /* mrc p15, 0, r0, c13, c0, 3 */ + .word 0xe12fff1e /* bx lr */ + + .align 4 +/* 0xffff0ff0 */ + .word 0 +/* 0xffff0ff4 */ + .word 0 +/* 0xffff0ff8 */ + .word 0 + +/* 0xffff0ffc */ +.__kuser_helper_version: + .word 2 + + + .global _C_LABEL(linux32_esigcode) +_C_LABEL(linux32_esigcode): diff --git a/sys/compat/linux32/arch/aarch64/linux32_siginfo.h b/sys/compat/linux32/arch/aarch64/linux32_siginfo.h new file mode 100644 index 00000000000..44b241f87be --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_siginfo.h @@ -0,0 +1,98 @@ +/* $NetBSD: linux32_siginfo.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_SIGINFO_H_ +#define _AARCH64_LINUX32_SIGINFO_H_ + +#include <compat/linux32/common/linux32_sigevent.h> + +#define SI_MAX_SIZE 128 +#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3) /* 3=signo,errno,pad */ + +typedef struct linux32_siginfo { + int lsi_signo; + int lsi_errno; + int lsi_code; + union { + int _pad[SI_PAD_SIZE]; + + /* kill() */ + struct { + linux32_pid_t _pid; + linux32_uid_t _uid; + } _kill; + + /* POSIX.1b timers */ + struct { + int _tid; + int _overrun; + linux32_sigval_t _sigval; + int _sys_private; + } _timer; + + /* POSIX.1b signals */ + struct { + linux32_pid_t _pid; + linux32_uid_t _uid; + linux32_sigval_t _sigval; + } _rt; + + /* SIGCHLD */ + struct { + linux32_pid_t _pid; + linux32_uid_t _uid; + int _status; + linux32_clock_t _utime; + linux32_clock_t _stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ + struct { + netbsd32_voidp _addr; + /* ... */ + } _sigfault; + + /* SIGPOLL */ + struct { + int _band; + int _fd; + } _sigpoll; + + /* SIGSYS */ + struct { + netbsd32_voidp _call_addr; + int _syscall; + unsigned int _arch; + } _sigsys; + } _sidata; +} linux32_siginfo_t; + +#endif /* _AARCH64_LINUX32_SIGINFO_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_signal.h b/sys/compat/linux32/arch/aarch64/linux32_signal.h new file mode 100644 index 00000000000..3b4a56e7a7e --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_signal.h @@ -0,0 +1,94 @@ +/* $NetBSD: linux32_signal.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_SIGNAL_H_ +#define _AARCH64_LINUX32_SIGNAL_H_ + +#define native_to_linux32_signo native_to_linux_signo +#define linux32_to_native_signo linux_to_native_signo + +typedef netbsd32_pointer_t linux32_handlerp_t; +typedef netbsd32_pointer_t linux32_restorer_t; +typedef netbsd32_pointer_t linux32_siginfop_t; +typedef netbsd32_pointer_t linux32_ucontextp_t; +typedef netbsd32_pointer_t linux32_sigcontextp_t; +typedef netbsd32_pointer_t linux32_fpstatep_t; +typedef u_int32_t linux32_old_sigset_t; + +#define LINUX32__NSIG 64 +#define LINUX32__NSIG_BPW 32 +#define LINUX32__NSIG_WORDS (LINUX32__NSIG / LINUX32__NSIG_BPW) + +#define LINUX32_SIG_BLOCK 0 +#define LINUX32_SIG_UNBLOCK 1 +#define LINUX32_SIG_SETMASK 2 + +#define LINUX32_SA_NOCLDSTOP 0x00000001 +#define LINUX32_SA_NOCLDWAIT 0x00000002 +#define LINUX32_SA_SIGINFO 0x00000004 +#define LINUX32_SA_ONSTACK 0x08000000 +#define LINUX32_SA_RESTART 0x10000000 +#define LINUX32_SA_INTERRUPT 0x20000000 +#define LINUX32_SA_NOMASK 0x40000000 +#define LINUX32_SA_ONESHOT 0x80000000 +#define LINUX32_SA_ALLBITS 0xf8000007 + +#define LINUX32_SS_ONSTACK 1 +#define LINUX32_SS_DISABLE 2 + +#define LINUX32_SIGILL LINUX_SIGILL +#define LINUX32_SIGFPE LINUX_SIGFPE +#define LINUX32_SIGSEGV LINUX_SIGSEGV +#define LINUX32_SIGBUS LINUX_SIGBUS +#define LINUX32_SIGTRAP LINUX_SIGTRAP +#define LINUX32_SIGCHLD LINUX_SIGCHLD +#define LINUX32_SIGIO LINUX_SIGIO +#define LINUX32_SIGALRM LINUX_SIGALRM +#define LINUX32_SIGRTMIN LINUX_SIGRTMIN + +typedef struct { + uint32_t sig[LINUX32__NSIG_WORDS]; +} linux32_sigset_t; + +struct linux32_sigaction { + linux32_handlerp_t linux_sa_handler; + int linux_sa_flags; + linux32_sigset_t linux_sa_mask; + linux32_restorer_t linux_sa_restorer; +}; + +typedef struct linux32_sigaltstack { + netbsd32_voidp ss_sp; + int ss_flags; + netbsd32_size_t ss_size; +} linux32_stack_t; + +#endif /* _AARCH64_LINUX32_SIGNAL_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_syscall.h b/sys/compat/linux32/arch/aarch64/linux32_syscall.h new file mode 100644 index 00000000000..0a55a41006e --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_syscall.h @@ -0,0 +1,783 @@ +/* $NetBSD: linux32_syscall.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/* + * System call numbers. + * + * DO NOT EDIT-- this file is automatically generated. + * created from NetBSD + */ + +#ifndef _LINUX32_SYS_SYSCALL_H_ +#define _LINUX32_SYS_SYSCALL_H_ + +#define LINUX32_SYS_MAXSYSARGS 8 + +/* syscall: "syscall" ret: "int" args: */ +#define LINUX32_SYS_syscall 0 + +/* syscall: "exit" ret: "int" args: "int" */ +#define LINUX32_SYS_exit 1 + +/* syscall: "fork" ret: "int" args: */ +#define LINUX32_SYS_fork 2 + +/* syscall: "netbsd32_read" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_read 3 + +/* syscall: "netbsd32_write" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_write 4 + +/* syscall: "open" ret: "int" args: "netbsd32_charp" "int" "linux_umode_t" */ +#define LINUX32_SYS_open 5 + +/* syscall: "netbsd32_close" ret: "int" args: "int" */ +#define LINUX32_SYS_netbsd32_close 6 + +/* syscall: "waitpid" ret: "int" args: "int" "netbsd32_intp" "int" */ +#define LINUX32_SYS_waitpid 7 + +/* syscall: "creat" ret: "int" args: "netbsd32_charp" "linux_umode_t" */ +#define LINUX32_SYS_creat 8 + +/* syscall: "netbsd32_link" ret: "int" args: "netbsd32_charp" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_link 9 + +/* syscall: "unlink" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_unlink 10 + +/* syscall: "netbsd32_execve" ret: "int" args: "netbsd32_charp" "netbsd32_charpp" "netbsd32_charpp" */ +#define LINUX32_SYS_netbsd32_execve 11 + +/* syscall: "netbsd32_chdir" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_chdir 12 + +/* syscall: "time" ret: "int" args: "linux32_timep_t" */ +#define LINUX32_SYS_time 13 + +/* syscall: "mknod" ret: "int" args: "netbsd32_charp" "linux_umode_t" "unsigned" */ +#define LINUX32_SYS_mknod 14 + +/* syscall: "netbsd32_chmod" ret: "int" args: "netbsd32_charp" "linux_umode_t" */ +#define LINUX32_SYS_netbsd32_chmod 15 + +/* syscall: "lchown16" ret: "int" args: "netbsd32_charp" "linux32_uid16_t" "linux32_gid16_t" */ +#define LINUX32_SYS_lchown16 16 + + /* 17 is obsolete break */ + /* 18 is obsolete ostat */ +/* syscall: "compat_43_netbsd32_olseek" ret: "netbsd32_long" args: "int" "netbsd32_long" "int" */ +#define LINUX32_SYS_compat_43_netbsd32_olseek 19 + +/* syscall: "getpid" ret: "pid_t" args: */ +#define LINUX32_SYS_getpid 20 + +/* syscall: "linux_setuid16" ret: "int" args: "uid_t" */ +#define LINUX32_SYS_linux_setuid16 23 + +/* syscall: "linux_getuid16" ret: "uid_t" args: */ +#define LINUX32_SYS_linux_getuid16 24 + +/* syscall: "stime" ret: "int" args: "linux32_timep_t" */ +#define LINUX32_SYS_stime 25 + +/* syscall: "ptrace" ret: "int" args: "int" "int" "int" "int" */ +#define LINUX32_SYS_ptrace 26 + +/* syscall: "alarm" ret: "int" args: "unsigned int" */ +#define LINUX32_SYS_alarm 27 + + /* 28 is obsolete ofstat */ +/* syscall: "pause" ret: "int" args: */ +#define LINUX32_SYS_pause 29 + +/* syscall: "utime" ret: "int" args: "netbsd32_charp" "linux32_utimbufp_t" */ +#define LINUX32_SYS_utime 30 + + /* 31 is obsolete stty */ + /* 32 is obsolete gtty */ +/* syscall: "netbsd32_access" ret: "int" args: "netbsd32_charp" "int" */ +#define LINUX32_SYS_netbsd32_access 33 + +/* syscall: "nice" ret: "int" args: "int" */ +#define LINUX32_SYS_nice 34 + + /* 35 is obsolete ftime */ +/* syscall: "sync" ret: "int" args: */ +#define LINUX32_SYS_sync 36 + +/* syscall: "kill" ret: "int" args: "int" "int" */ +#define LINUX32_SYS_kill 37 + +/* syscall: "netbsd32___posix_rename" ret: "int" args: "netbsd32_charp" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32___posix_rename 38 + +/* syscall: "netbsd32_mkdir" ret: "int" args: "netbsd32_charp" "linux_umode_t" */ +#define LINUX32_SYS_netbsd32_mkdir 39 + +/* syscall: "netbsd32_rmdir" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_rmdir 40 + +/* syscall: "netbsd32_dup" ret: "int" args: "int" */ +#define LINUX32_SYS_netbsd32_dup 41 + +/* syscall: "pipe" ret: "int" args: "netbsd32_intp" */ +#define LINUX32_SYS_pipe 42 + +/* syscall: "times" ret: "int" args: "linux32_tmsp_t" */ +#define LINUX32_SYS_times 43 + + /* 44 is obsolete prof */ +/* syscall: "brk" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_brk 45 + +/* syscall: "linux_setgid16" ret: "int" args: "gid_t" */ +#define LINUX32_SYS_linux_setgid16 46 + +/* syscall: "linux_getgid16" ret: "gid_t" args: */ +#define LINUX32_SYS_linux_getgid16 47 + +/* syscall: "signal" ret: "int" args: "int" "linux32_handlerp_t" */ +#define LINUX32_SYS_signal 48 + +/* syscall: "linux_geteuid16" ret: "uid_t" args: */ +#define LINUX32_SYS_linux_geteuid16 49 + +/* syscall: "linux_getegid16" ret: "gid_t" args: */ +#define LINUX32_SYS_linux_getegid16 50 + +/* syscall: "netbsd32_acct" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_acct 51 + + /* 52 is obsolete phys */ + /* 53 is obsolete lock */ +/* syscall: "ioctl" ret: "int" args: "int" "netbsd32_u_long" "netbsd32_charp" */ +#define LINUX32_SYS_ioctl 54 + +/* syscall: "fcntl" ret: "int" args: "int" "int" "netbsd32_voidp" */ +#define LINUX32_SYS_fcntl 55 + + /* 56 is obsolete mpx */ +/* syscall: "netbsd32_setpgid" ret: "int" args: "int" "int" */ +#define LINUX32_SYS_netbsd32_setpgid 57 + + /* 58 is obsolete ulimit */ +/* syscall: "oldolduname" ret: "int" args: "linux32_oldold_utsnamep_t" */ +#define LINUX32_SYS_oldolduname 59 + +/* syscall: "netbsd32_umask" ret: "int" args: "int" */ +#define LINUX32_SYS_netbsd32_umask 60 + +/* syscall: "netbsd32_chroot" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_chroot 61 + +/* syscall: "netbsd32_dup2" ret: "int" args: "int" "int" */ +#define LINUX32_SYS_netbsd32_dup2 63 + +/* syscall: "getppid" ret: "pid_t" args: */ +#define LINUX32_SYS_getppid 64 + +/* syscall: "getpgrp" ret: "int" args: */ +#define LINUX32_SYS_getpgrp 65 + +/* syscall: "setsid" ret: "int" args: */ +#define LINUX32_SYS_setsid 66 + +/* syscall: "siggetmask" ret: "int" args: */ +#define LINUX32_SYS_siggetmask 68 + +/* syscall: "sigsetmask" ret: "int" args: "linux32_old_sigset_t" */ +#define LINUX32_SYS_sigsetmask 69 + +/* syscall: "setreuid16" ret: "int" args: "linux32_uid16_t" "linux32_uid16_t" */ +#define LINUX32_SYS_setreuid16 70 + +/* syscall: "setregid16" ret: "int" args: "linux32_gid16_t" "linux32_gid16_t" */ +#define LINUX32_SYS_setregid16 71 + +/* syscall: "compat_43_netbsd32_osethostname" ret: "int" args: "netbsd32_charp" "u_int" */ +#define LINUX32_SYS_compat_43_netbsd32_osethostname 74 + +/* syscall: "setrlimit" ret: "int" args: "u_int" "netbsd32_orlimitp_t" */ +#define LINUX32_SYS_setrlimit 75 + +/* syscall: "getrlimit" ret: "int" args: "u_int" "netbsd32_orlimitp_t" */ +#define LINUX32_SYS_getrlimit 76 + +/* syscall: "compat_50_netbsd32_getrusage" ret: "int" args: "int" "netbsd32_rusage50p_t" */ +#define LINUX32_SYS_compat_50_netbsd32_getrusage 77 + +/* syscall: "gettimeofday" ret: "int" args: "netbsd32_timeval50p_t" "netbsd32_timezonep_t" */ +#define LINUX32_SYS_gettimeofday 78 + +/* syscall: "settimeofday" ret: "int" args: "netbsd32_timeval50p_t" "netbsd32_timezonep_t" */ +#define LINUX32_SYS_settimeofday 79 + +/* syscall: "getgroups16" ret: "int" args: "int" "linux32_gid16p_t" */ +#define LINUX32_SYS_getgroups16 80 + +/* syscall: "setgroups16" ret: "int" args: "int" "linux32_gid16p_t" */ +#define LINUX32_SYS_setgroups16 81 + +/* syscall: "oldselect" ret: "int" args: "linux32_oldselectp_t" */ +#define LINUX32_SYS_oldselect 82 + +/* syscall: "netbsd32_symlink" ret: "int" args: "netbsd32_charp" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_symlink 83 + +/* syscall: "compat_43_netbsd32_lstat43" ret: "int" args: "netbsd32_charp" "netbsd32_stat43p_t" */ +#define LINUX32_SYS_compat_43_netbsd32_lstat43 84 + +/* syscall: "netbsd32_readlink" ret: "int" args: "netbsd32_charp" "netbsd32_charp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_readlink 85 + +/* syscall: "swapon" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_swapon 87 + +/* syscall: "reboot" ret: "int" args: "int" "int" "int" "netbsd32_voidp" */ +#define LINUX32_SYS_reboot 88 + +/* syscall: "readdir" ret: "int" args: "int" "netbsd32_voidp" "unsigned int" */ +#define LINUX32_SYS_readdir 89 + +/* syscall: "old_mmap" ret: "int" args: "linux32_oldmmapp" */ +#define LINUX32_SYS_old_mmap 90 + +/* syscall: "netbsd32_munmap" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_munmap 91 + +/* syscall: "compat_43_netbsd32_otruncate" ret: "int" args: "netbsd32_charp" "netbsd32_long" */ +#define LINUX32_SYS_compat_43_netbsd32_otruncate 92 + +/* syscall: "compat_43_netbsd32_oftruncate" ret: "int" args: "int" "netbsd32_long" */ +#define LINUX32_SYS_compat_43_netbsd32_oftruncate 93 + +/* syscall: "netbsd32_fchmod" ret: "int" args: "int" "linux_umode_t" */ +#define LINUX32_SYS_netbsd32_fchmod 94 + +/* syscall: "fchown16" ret: "int" args: "int" "linux32_uid16_t" "linux32_gid16_t" */ +#define LINUX32_SYS_fchown16 95 + +/* syscall: "getpriority" ret: "int" args: "int" "int" */ +#define LINUX32_SYS_getpriority 96 + +/* syscall: "netbsd32_setpriority" ret: "int" args: "int" "int" "int" */ +#define LINUX32_SYS_netbsd32_setpriority 97 + +/* syscall: "netbsd32_profil" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" "netbsd32_u_long" "u_int" */ +#define LINUX32_SYS_netbsd32_profil 98 + +/* syscall: "statfs" ret: "int" args: "netbsd32_charp" "linux32_statfsp" */ +#define LINUX32_SYS_statfs 99 + +/* syscall: "fstatfs" ret: "int" args: "int" "linux32_statfsp" */ +#define LINUX32_SYS_fstatfs 100 + +/* syscall: "socketcall" ret: "int" args: "int" "netbsd32_voidp" */ +#define LINUX32_SYS_socketcall 102 + +/* syscall: "compat_50_netbsd32_setitimer" ret: "int" args: "int" "netbsd32_itimerval50p_t" "netbsd32_itimerval50p_t" */ +#define LINUX32_SYS_compat_50_netbsd32_setitimer 104 + +/* syscall: "compat_50_netbsd32_getitimer" ret: "int" args: "int" "netbsd32_itimerval50p_t" */ +#define LINUX32_SYS_compat_50_netbsd32_getitimer 105 + +/* syscall: "stat" ret: "int" args: "netbsd32_charp" "linux32_statp" */ +#define LINUX32_SYS_stat 106 + +/* syscall: "lstat" ret: "int" args: "netbsd32_charp" "linux32_statp" */ +#define LINUX32_SYS_lstat 107 + +/* syscall: "fstat" ret: "int" args: "int" "linux32_statp" */ +#define LINUX32_SYS_fstat 108 + +/* syscall: "olduname" ret: "int" args: "linux32_oldutsnamep_t" */ +#define LINUX32_SYS_olduname 109 + +/* syscall: "wait4" ret: "int" args: "int" "netbsd32_intp" "int" "netbsd32_rusage50p_t" */ +#define LINUX32_SYS_wait4 114 + +/* syscall: "swapoff" ret: "int" args: "netbsd32_charp" */ +#define LINUX32_SYS_swapoff 115 + +/* syscall: "sysinfo" ret: "int" args: "linux32_sysinfop_t" */ +#define LINUX32_SYS_sysinfo 116 + +/* syscall: "ipc" ret: "int" args: "int" "int" "int" "int" "netbsd32_voidp" */ +#define LINUX32_SYS_ipc 117 + +/* syscall: "netbsd32_fsync" ret: "int" args: "int" */ +#define LINUX32_SYS_netbsd32_fsync 118 + +/* syscall: "sigreturn" ret: "int" args: "linux32_sigcontextp_t" */ +#define LINUX32_SYS_sigreturn 119 + +/* syscall: "clone" ret: "int" args: "int" "netbsd32_voidp" "netbsd32_voidp" "netbsd32_voidp" "netbsd32_voidp" */ +#define LINUX32_SYS_clone 120 + +/* syscall: "setdomainname" ret: "int" args: "netbsd32_charp" "int" */ +#define LINUX32_SYS_setdomainname 121 + +/* syscall: "uname" ret: "int" args: "linux32_utsnamep" */ +#define LINUX32_SYS_uname 122 + +/* syscall: "mprotect" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" "int" */ +#define LINUX32_SYS_mprotect 125 + +/* syscall: "netbsd32_getpgid" ret: "int" args: "pid_t" */ +#define LINUX32_SYS_netbsd32_getpgid 132 + +/* syscall: "netbsd32_fchdir" ret: "int" args: "int" */ +#define LINUX32_SYS_netbsd32_fchdir 133 + +/* syscall: "personality" ret: "int" args: "netbsd32_u_long" */ +#define LINUX32_SYS_personality 136 + +/* syscall: "setfsuid16" ret: "int" args: "uid_t" */ +#define LINUX32_SYS_setfsuid16 138 + +/* syscall: "setfsgid16" ret: "int" args: "gid_t" */ +#define LINUX32_SYS_setfsgid16 139 + +/* syscall: "llseek" ret: "int" args: "int" "u_int32_t" "u_int32_t" "netbsd32_voidp" "int" */ +#define LINUX32_SYS_llseek 140 + +/* syscall: "getdents" ret: "int" args: "int" "linux32_direntp_t" "unsigned int" */ +#define LINUX32_SYS_getdents 141 + +/* syscall: "select" ret: "int" args: "int" "netbsd32_fd_setp_t" "netbsd32_fd_setp_t" "netbsd32_fd_setp_t" "netbsd32_timeval50p_t" */ +#define LINUX32_SYS_select 142 + +/* syscall: "netbsd32_flock" ret: "int" args: "int" "int" */ +#define LINUX32_SYS_netbsd32_flock 143 + +/* syscall: "netbsd32___msync13" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" "int" */ +#define LINUX32_SYS_netbsd32___msync13 144 + +/* syscall: "netbsd32_readv" ret: "int" args: "int" "netbsd32_iovecp_t" "int" */ +#define LINUX32_SYS_netbsd32_readv 145 + +/* syscall: "netbsd32_writev" ret: "netbsd32_ssize_t" args: "int" "netbsd32_iovecp_t" "int" */ +#define LINUX32_SYS_netbsd32_writev 146 + +/* syscall: "netbsd32_getsid" ret: "pid_t" args: "pid_t" */ +#define LINUX32_SYS_netbsd32_getsid 147 + +/* syscall: "fdatasync" ret: "int" args: "int" */ +#define LINUX32_SYS_fdatasync 148 + +/* syscall: "__sysctl" ret: "int" args: "linux32___sysctlp_t" */ +#define LINUX32_SYS___sysctl 149 + +/* syscall: "netbsd32_mlock" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_mlock 150 + +/* syscall: "netbsd32_munlock" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_munlock 151 + +/* syscall: "netbsd32_mlockall" ret: "int" args: "int" */ +#define LINUX32_SYS_netbsd32_mlockall 152 + +/* syscall: "munlockall" ret: "int" args: */ +#define LINUX32_SYS_munlockall 153 + +/* syscall: "sched_setparam" ret: "int" args: "pid_t" "const linux32_sched_paramp_t" */ +#define LINUX32_SYS_sched_setparam 154 + +/* syscall: "sched_getparam" ret: "int" args: "pid_t" "linux32_sched_paramp_t" */ +#define LINUX32_SYS_sched_getparam 155 + +/* syscall: "sched_setscheduler" ret: "int" args: "pid_t" "int" "linux32_sched_paramp_t" */ +#define LINUX32_SYS_sched_setscheduler 156 + +/* syscall: "sched_getscheduler" ret: "int" args: "pid_t" */ +#define LINUX32_SYS_sched_getscheduler 157 + +/* syscall: "sched_yield" ret: "int" args: */ +#define LINUX32_SYS_sched_yield 158 + +/* syscall: "sched_get_priority_max" ret: "int" args: "int" */ +#define LINUX32_SYS_sched_get_priority_max 159 + +/* syscall: "sched_get_priority_min" ret: "int" args: "int" */ +#define LINUX32_SYS_sched_get_priority_min 160 + +/* syscall: "nanosleep" ret: "int" args: "linux32_timespecp_t" "linux32_timespecp_t" */ +#define LINUX32_SYS_nanosleep 162 + +/* syscall: "mremap" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" "netbsd32_size_t" "netbsd32_u_long" */ +#define LINUX32_SYS_mremap 163 + +/* syscall: "setresuid16" ret: "int" args: "linux32_uid16_t" "linux32_uid16_t" "linux32_uid16_t" */ +#define LINUX32_SYS_setresuid16 164 + +/* syscall: "getresuid16" ret: "int" args: "linux32_uid16p_t" "linux32_uid16p_t" "linux32_uid16p_t" */ +#define LINUX32_SYS_getresuid16 165 + +/* syscall: "netbsd32_poll" ret: "int" args: "netbsd32_pollfdp_t" "u_int" "int" */ +#define LINUX32_SYS_netbsd32_poll 168 + +/* syscall: "setresgid16" ret: "int" args: "linux32_gid16_t" "linux32_gid16_t" "linux32_gid16_t" */ +#define LINUX32_SYS_setresgid16 170 + +/* syscall: "getresgid16" ret: "int" args: "linux32_gid16p_t" "linux32_gid16p_t" "linux32_gid16p_t" */ +#define LINUX32_SYS_getresgid16 171 + +/* syscall: "rt_sigreturn" ret: "int" args: "linux32_ucontextp_t" */ +#define LINUX32_SYS_rt_sigreturn 173 + +/* syscall: "rt_sigaction" ret: "int" args: "int" "linux32_sigactionp_t" "linux32_sigactionp_t" "netbsd32_size_t" */ +#define LINUX32_SYS_rt_sigaction 174 + +/* syscall: "rt_sigprocmask" ret: "int" args: "int" "linux32_sigsetp_t" "linux32_sigsetp_t" "netbsd32_size_t" */ +#define LINUX32_SYS_rt_sigprocmask 175 + +/* syscall: "rt_sigpending" ret: "int" args: "linux32_sigsetp_t" "netbsd32_size_t" */ +#define LINUX32_SYS_rt_sigpending 176 + +/* syscall: "rt_sigtimedwait" ret: "int" args: "const linux32_sigsetp_t" "linux32_siginfop_t" "const linux32_timespecp_t" */ +#define LINUX32_SYS_rt_sigtimedwait 177 + +/* syscall: "rt_queueinfo" ret: "int" args: "int" "int" "linux32_siginfop_t" */ +#define LINUX32_SYS_rt_queueinfo 178 + +/* syscall: "rt_sigsuspend" ret: "int" args: "linux32_sigsetp_t" "netbsd32_size_t" */ +#define LINUX32_SYS_rt_sigsuspend 179 + +/* syscall: "pread" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" "netbsd32_off_t" */ +#define LINUX32_SYS_pread 180 + +/* syscall: "pwrite" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" "netbsd32_off_t" */ +#define LINUX32_SYS_pwrite 181 + +/* syscall: "chown16" ret: "int" args: "netbsd32_charp" "linux32_uid16_t" "linux32_gid16_t" */ +#define LINUX32_SYS_chown16 182 + +/* syscall: "netbsd32___getcwd" ret: "int" args: "netbsd32_charp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32___getcwd 183 + +/* syscall: "__vfork14" ret: "int" args: */ +#define LINUX32_SYS___vfork14 190 + +/* syscall: "ugetrlimit" ret: "int" args: "int" "netbsd32_orlimitp_t" */ +#define LINUX32_SYS_ugetrlimit 191 + +/* syscall: "mmap2" ret: "linux32_off_t" args: "netbsd32_u_long" "netbsd32_size_t" "int" "int" "int" "linux32_off_t" */ +#define LINUX32_SYS_mmap2 192 + +/* syscall: "truncate64" ret: "int" args: "netbsd32_charp" "uint32_t" "uint32_t" */ +#define LINUX32_SYS_truncate64 193 + +/* syscall: "ftruncate64" ret: "int" args: "unsigned int" "uint32_t" "uint32_t" */ +#define LINUX32_SYS_ftruncate64 194 + +/* syscall: "stat64" ret: "int" args: "netbsd32_charp" "linux32_stat64p" */ +#define LINUX32_SYS_stat64 195 + +/* syscall: "lstat64" ret: "int" args: "netbsd32_charp" "linux32_stat64p" */ +#define LINUX32_SYS_lstat64 196 + +/* syscall: "fstat64" ret: "int" args: "int" "linux32_stat64p" */ +#define LINUX32_SYS_fstat64 197 + +/* syscall: "netbsd32___posix_lchown" ret: "int" args: "netbsd32_charp" "uid_t" "gid_t" */ +#define LINUX32_SYS_netbsd32___posix_lchown 198 + +/* syscall: "getuid" ret: "uid_t" args: */ +#define LINUX32_SYS_getuid 199 + +/* syscall: "getgid" ret: "gid_t" args: */ +#define LINUX32_SYS_getgid 200 + +/* syscall: "geteuid" ret: "uid_t" args: */ +#define LINUX32_SYS_geteuid 201 + +/* syscall: "getegid" ret: "gid_t" args: */ +#define LINUX32_SYS_getegid 202 + +/* syscall: "netbsd32_setreuid" ret: "int" args: "uid_t" "uid_t" */ +#define LINUX32_SYS_netbsd32_setreuid 203 + +/* syscall: "netbsd32_setregid" ret: "int" args: "gid_t" "gid_t" */ +#define LINUX32_SYS_netbsd32_setregid 204 + +/* syscall: "netbsd32_getgroups" ret: "int" args: "int" "netbsd32_gid_tp" */ +#define LINUX32_SYS_netbsd32_getgroups 205 + +/* syscall: "netbsd32_setgroups" ret: "int" args: "int" "netbsd32_gid_tp" */ +#define LINUX32_SYS_netbsd32_setgroups 206 + +/* syscall: "netbsd32___posix_fchown" ret: "int" args: "int" "uid_t" "gid_t" */ +#define LINUX32_SYS_netbsd32___posix_fchown 207 + +/* syscall: "setresuid" ret: "int" args: "uid_t" "uid_t" "uid_t" */ +#define LINUX32_SYS_setresuid 208 + +/* syscall: "getresuid" ret: "int" args: "linux32_uidp_t" "linux32_uidp_t" "linux32_uidp_t" */ +#define LINUX32_SYS_getresuid 209 + +/* syscall: "setresgid" ret: "int" args: "gid_t" "gid_t" "gid_t" */ +#define LINUX32_SYS_setresgid 210 + +/* syscall: "getresgid" ret: "int" args: "linux32_gidp_t" "linux32_gidp_t" "linux32_gidp_t" */ +#define LINUX32_SYS_getresgid 211 + +/* syscall: "netbsd32___posix_chown" ret: "int" args: "netbsd32_charp" "uid_t" "gid_t" */ +#define LINUX32_SYS_netbsd32___posix_chown 212 + +/* syscall: "netbsd32_setuid" ret: "int" args: "uid_t" */ +#define LINUX32_SYS_netbsd32_setuid 213 + +/* syscall: "netbsd32_setgid" ret: "int" args: "gid_t" */ +#define LINUX32_SYS_netbsd32_setgid 214 + +/* syscall: "setfsuid" ret: "int" args: "uid_t" */ +#define LINUX32_SYS_setfsuid 215 + +/* syscall: "setfsgid" ret: "int" args: "gid_t" */ +#define LINUX32_SYS_setfsgid 216 + +/* syscall: "getdents64" ret: "int" args: "int" "linux32_dirent64p_t" "unsigned int" */ +#define LINUX32_SYS_getdents64 217 + +/* syscall: "netbsd32_mincore" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_mincore 219 + +/* syscall: "netbsd32_madvise" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" "int" */ +#define LINUX32_SYS_netbsd32_madvise 220 + +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args +/* syscall: "fcntl64" ret: "int" args: "int" "int" "netbsd32_voidp" */ +#define LINUX32_SYS_fcntl64 221 + +/* syscall: "gettid" ret: "pid_t" args: */ +#define LINUX32_SYS_gettid 224 + +/* syscall: "netbsd32_setxattr" ret: "int" args: "netbsd32_charp" "netbsd32_charp" "netbsd32_voidp" "netbsd32_size_t" "int" */ +#define LINUX32_SYS_netbsd32_setxattr 226 + +/* syscall: "netbsd32_lsetxattr" ret: "int" args: "netbsd32_charp" "netbsd32_charp" "netbsd32_voidp" "netbsd32_size_t" "int" */ +#define LINUX32_SYS_netbsd32_lsetxattr 227 + +/* syscall: "netbsd32_fsetxattr" ret: "int" args: "int" "netbsd32_charp" "netbsd32_voidp" "netbsd32_size_t" "int" */ +#define LINUX32_SYS_netbsd32_fsetxattr 228 + +/* syscall: "netbsd32_getxattr" ret: "ssize_t" args: "netbsd32_charp" "netbsd32_charp" "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_getxattr 229 + +/* syscall: "netbsd32_lgetxattr" ret: "ssize_t" args: "netbsd32_charp" "netbsd32_charp" "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_lgetxattr 230 + +/* syscall: "netbsd32_fgetxattr" ret: "ssize_t" args: "int" "netbsd32_charp" "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_fgetxattr 231 + +/* syscall: "netbsd32_listxattr" ret: "ssize_t" args: "netbsd32_charp" "netbsd32_charp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_listxattr 232 + +/* syscall: "netbsd32_llistxattr" ret: "ssize_t" args: "netbsd32_charp" "netbsd32_charp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_llistxattr 233 + +/* syscall: "netbsd32_flistxattr" ret: "ssize_t" args: "int" "netbsd32_charp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32_flistxattr 234 + +/* syscall: "netbsd32_removexattr" ret: "int" args: "netbsd32_charp" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_removexattr 235 + +/* syscall: "netbsd32_lremovexattr" ret: "int" args: "netbsd32_charp" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_lremovexattr 236 + +/* syscall: "netbsd32_fremovexattr" ret: "int" args: "int" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_fremovexattr 237 + +/* syscall: "tkill" ret: "int" args: "int" "int" */ +#define LINUX32_SYS_tkill 238 + +/* syscall: "futex" ret: "int" args: "linux32_intp_t" "int" "int" "linux32_timespecp_t" "linux32_intp_t" "int" */ +#define LINUX32_SYS_futex 240 + +/* syscall: "sched_setaffinity" ret: "int" args: "pid_t" "unsigned int" "linux32_ulongp_t" */ +#define LINUX32_SYS_sched_setaffinity 241 + +/* syscall: "sched_getaffinity" ret: "int" args: "pid_t" "unsigned int" "linux32_ulongp_t" */ +#define LINUX32_SYS_sched_getaffinity 242 + +/* syscall: "exit_group" ret: "int" args: "int" */ +#define LINUX32_SYS_exit_group 248 + +/* syscall: "set_tid_address" ret: "int" args: "linux32_intp_t" */ +#define LINUX32_SYS_set_tid_address 256 + +/* syscall: "timer_create" ret: "int" args: "clockid_t" "struct linux32_sigevent *" "timer_t *" */ +#define LINUX32_SYS_timer_create 257 + +/* syscall: "timer_settime" ret: "int" args: "timer_t" "int" "const struct linux32_itimerspec *" "struct linux32_itimerspec *" */ +#define LINUX32_SYS_timer_settime 258 + +/* syscall: "timer_gettime" ret: "int" args: "timer_t" "struct linux32_itimerspec *" */ +#define LINUX32_SYS_timer_gettime 259 + +/* syscall: "timer_getoverrun" ret: "int" args: "timer_t" */ +#define LINUX32_SYS_timer_getoverrun 260 + +/* syscall: "timer_delete" ret: "int" args: "timer_t" */ +#define LINUX32_SYS_timer_delete 261 + +/* syscall: "clock_settime" ret: "int" args: "clockid_t" "linux32_timespecp_t" */ +#define LINUX32_SYS_clock_settime 262 + +/* syscall: "clock_gettime" ret: "int" args: "clockid_t" "linux32_timespecp_t" */ +#define LINUX32_SYS_clock_gettime 263 + +/* syscall: "clock_getres" ret: "int" args: "clockid_t" "linux32_timespecp_t" */ +#define LINUX32_SYS_clock_getres 264 + +/* syscall: "clock_nanosleep" ret: "int" args: "clockid_t" "int" "linux32_timespecp_t" "linux32_timespecp_t" */ +#define LINUX32_SYS_clock_nanosleep 265 + +/* syscall: "statfs64" ret: "int" args: "netbsd32_charp" "netbsd32_size_t" "linux32_statfs64p" */ +#define LINUX32_SYS_statfs64 266 + +/* syscall: "fstatfs64" ret: "int" args: "int" "netbsd32_size_t" "linux32_statfs64p" */ +#define LINUX32_SYS_fstatfs64 267 + +/* syscall: "tgkill" ret: "int" args: "int" "int" "int" */ +#define LINUX32_SYS_tgkill 268 + +/* syscall: "compat_50_netbsd32_utimes" ret: "int" args: "netbsd32_charp" "netbsd32_timeval50p_t" */ +#define LINUX32_SYS_compat_50_netbsd32_utimes 269 + +/* syscall: "fadvise64_64" ret: "int" args: "int" "uint32_t" "uint32_t" "uint32_t" "uint32_t" "int" */ +#define LINUX32_SYS_fadvise64_64 270 + +/* syscall: "socket" ret: "int" args: "int" "int" "int" */ +#define LINUX32_SYS_socket 281 + +/* syscall: "bind" ret: "int" args: "int" "netbsd32_osockaddrp_t" "int" */ +#define LINUX32_SYS_bind 282 + +/* syscall: "connect" ret: "int" args: "int" "netbsd32_osockaddrp_t" "int" */ +#define LINUX32_SYS_connect 283 + +/* syscall: "accept" ret: "int" args: "int" "netbsd32_osockaddrp_t" "netbsd32_intp" */ +#define LINUX32_SYS_accept 285 + +/* syscall: "getsockname" ret: "int" args: "int" "netbsd32_charp" "netbsd32_intp" */ +#define LINUX32_SYS_getsockname 286 + +/* syscall: "getpeername" ret: "int" args: "int" "netbsd32_sockaddrp_t" "netbsd32_intp" */ +#define LINUX32_SYS_getpeername 287 + +/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "netbsd32_intp" */ +#define LINUX32_SYS_socketpair 288 + +/* syscall: "send" ret: "int" args: "int" "netbsd32_voidp" "int" "int" */ +#define LINUX32_SYS_send 289 + +/* syscall: "sendto" ret: "int" args: "int" "netbsd32_voidp" "int" "int" "netbsd32_osockaddrp_t" "int" */ +#define LINUX32_SYS_sendto 290 + +/* syscall: "recv" ret: "int" args: "int" "netbsd32_voidp" "int" "int" */ +#define LINUX32_SYS_recv 291 + +/* syscall: "recvfrom" ret: "int" args: "int" "netbsd32_voidp" "netbsd32_size_t" "int" "netbsd32_osockaddrp_t" "netbsd32_intp" */ +#define LINUX32_SYS_recvfrom 292 + +/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "netbsd32_voidp" "int" */ +#define LINUX32_SYS_setsockopt 294 + +/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "netbsd32_voidp" "netbsd32_intp" */ +#define LINUX32_SYS_getsockopt 295 + +/* syscall: "openat" ret: "int" args: "int" "netbsd32_charp" "int" "..." */ +#define LINUX32_SYS_openat 322 + +/* syscall: "netbsd32_mkdirat" ret: "int" args: "int" "netbsd32_charp" "linux_umode_t" */ +#define LINUX32_SYS_netbsd32_mkdirat 323 + +/* syscall: "mknodat" ret: "int" args: "int" "netbsd32_charp" "linux_umode_t" "unsigned" */ +#define LINUX32_SYS_mknodat 324 + +/* syscall: "fchownat" ret: "int" args: "int" "netbsd32_charp" "uid_t" "gid_t" "int" */ +#define LINUX32_SYS_fchownat 325 + +/* syscall: "fstatat64" ret: "int" args: "int" "netbsd32_charp" "linux32_stat64p" "int" */ +#define LINUX32_SYS_fstatat64 327 + +/* syscall: "unlinkat" ret: "int" args: "int" "netbsd32_charp" "int" */ +#define LINUX32_SYS_unlinkat 328 + +/* syscall: "netbsd32_renameat" ret: "int" args: "int" "netbsd32_charp" "int" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_renameat 329 + +/* syscall: "linkat" ret: "int" args: "int" "netbsd32_charp" "int" "netbsd32_charp" "int" */ +#define LINUX32_SYS_linkat 330 + +/* syscall: "netbsd32_symlinkat" ret: "int" args: "netbsd32_charp" "int" "netbsd32_charp" */ +#define LINUX32_SYS_netbsd32_symlinkat 331 + +/* syscall: "netbsd32_readlinkat" ret: "int" args: "int" "netbsd32_charp" "netbsd32_charp" "linux32_size_t" */ +#define LINUX32_SYS_netbsd32_readlinkat 332 + +/* syscall: "fchmodat" ret: "int" args: "int" "netbsd32_charp" "linux_umode_t" */ +#define LINUX32_SYS_fchmodat 333 + +/* syscall: "faccessat" ret: "int" args: "int" "netbsd32_charp" "int" */ +#define LINUX32_SYS_faccessat 334 + +/* syscall: "ppoll" ret: "int" args: "netbsd32_pollfdp_t" "u_int" "linux32_timespecp_t" "linux32_sigsetp_t" */ +#define LINUX32_SYS_ppoll 336 + +/* syscall: "netbsd32___futex_set_robust_list" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" */ +#define LINUX32_SYS_netbsd32___futex_set_robust_list 338 + +/* syscall: "netbsd32___futex_get_robust_list" ret: "int" args: "lwpid_t" "netbsd32_voidp" "netbsd32_size_tp" */ +#define LINUX32_SYS_netbsd32___futex_get_robust_list 339 + +/* syscall: "utimensat" ret: "int" args: "int" "netbsd32_charp" "linux32_timespecp_t" "int" */ +#define LINUX32_SYS_utimensat 348 + +/* syscall: "timerfd_create" ret: "int" args: "clockid_t" "int" */ +#define LINUX32_SYS_timerfd_create 350 + +/* syscall: "eventfd" ret: "int" args: "unsigned int" */ +#define LINUX32_SYS_eventfd 351 + +/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */ +#define LINUX32_SYS_fallocate 352 + +/* syscall: "timerfd_settime" ret: "int" args: "int" "int" "const struct linux32_itimerspec *" "struct linux32_itimerspec *" */ +#define LINUX32_SYS_timerfd_settime 353 + +/* syscall: "timerfd_gettime" ret: "int" args: "int" "struct linux32_itimerspec *" */ +#define LINUX32_SYS_timerfd_gettime 354 + +/* syscall: "eventfd2" ret: "int" args: "unsigned int" "int" */ +#define LINUX32_SYS_eventfd2 356 + +/* syscall: "dup3" ret: "int" args: "int" "int" "int" */ +#define LINUX32_SYS_dup3 358 + +/* syscall: "pipe2" ret: "int" args: "netbsd32_intp" "int" */ +#define LINUX32_SYS_pipe2 359 + +/* syscall: "preadv" ret: "int" args: "int" "const netbsd32_iovecp_t" "int" "netbsd32_u_long" "netbsd32_u_long" */ +#define LINUX32_SYS_preadv 361 + +/* syscall: "pwritev" ret: "int" args: "int" "const netbsd32_iovecp_t" "int" "netbsd32_u_long" "netbsd32_u_long" */ +#define LINUX32_SYS_pwritev 362 + +/* syscall: "netbsd32_getrandom" ret: "netbsd32_ssize_t" args: "netbsd32_voidp" "netbsd32_size_t" "unsigned int" */ +#define LINUX32_SYS_netbsd32_getrandom 384 + +/* syscall: "statx" ret: "int" args: "int" "netbsd32_charp" "int" "unsigned int" "linux32_statxp" */ +#define LINUX32_SYS_statx 397 + +/* syscall: "set_tls" ret: "int" args: "netbsd32_voidp" */ +#define LINUX32_SYS_set_tls 485 + +/* syscall: "get_tls" ret: "linux32_off_t" args: */ +#define LINUX32_SYS_get_tls 486 + +#define LINUX32_SYS_MAXSYSCALL 487 +#define LINUX32_SYS_NSYSENT 512 +#endif /* _LINUX32_SYS_SYSCALL_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h b/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h new file mode 100644 index 00000000000..44de7804b55 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h @@ -0,0 +1,1597 @@ +/* $NetBSD: linux32_syscallargs.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/* + * System call argument lists. + * + * DO NOT EDIT-- this file is automatically generated. + * created from NetBSD + */ + +#ifndef _LINUX32_SYS_SYSCALLARGS_H_ +#define _LINUX32_SYS_SYSCALLARGS_H_ + +/* Forward declaration */ +struct lwp; + +#define LINUX32_SYS_MAXSYSARGS 8 + +#undef syscallarg +#define syscallarg(x) \ + union { \ + register32_t pad; \ + struct { x datum; } le; \ + struct { /* LINTED zero array dimension */ \ + int8_t pad[ /* CONSTCOND */ \ + (sizeof (register32_t) < sizeof (x)) \ + ? 0 \ + : sizeof (register32_t) - sizeof (x)]; \ + x datum; \ + } be; \ + } + +#undef check_syscall_args +#define check_syscall_args(call) /*LINTED*/ \ + typedef char call##_check_args[sizeof (struct call##_args) \ + <= LINUX32_SYS_MAXSYSARGS * sizeof (register32_t) ? 1 : -1]; + +struct linux32_sys_exit_args { + syscallarg(int) rval; +}; +check_syscall_args(linux32_sys_exit) + +struct netbsd32_read_args; + +struct netbsd32_write_args; + +struct linux32_sys_open_args { + syscallarg(netbsd32_charp) path; + syscallarg(int) flags; + syscallarg(linux_umode_t) mode; +}; +check_syscall_args(linux32_sys_open) + +struct netbsd32_close_args; + +struct linux32_sys_waitpid_args { + syscallarg(int) pid; + syscallarg(netbsd32_intp) status; + syscallarg(int) options; +}; +check_syscall_args(linux32_sys_waitpid) + +struct linux32_sys_creat_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux_umode_t) mode; +}; +check_syscall_args(linux32_sys_creat) + +struct netbsd32_link_args; + +struct linux32_sys_unlink_args { + syscallarg(netbsd32_charp) path; +}; +check_syscall_args(linux32_sys_unlink) + +struct netbsd32_execve_args; + +struct netbsd32_chdir_args; + +struct linux32_sys_time_args { + syscallarg(linux32_timep_t) t; +}; +check_syscall_args(linux32_sys_time) + +struct linux32_sys_mknod_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux_umode_t) mode; + syscallarg(unsigned) dev; +}; +check_syscall_args(linux32_sys_mknod) + +struct netbsd32_chmod_args; + +struct linux32_sys_lchown16_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_uid16_t) uid; + syscallarg(linux32_gid16_t) gid; +}; +check_syscall_args(linux32_sys_lchown16) + +struct compat_43_netbsd32_olseek_args; + +struct netbsd32_setuid_args; + +struct linux32_sys_stime_args { + syscallarg(linux32_timep_t) t; +}; +check_syscall_args(linux32_sys_stime) + +struct linux32_sys_ptrace_args { + syscallarg(int) request; + syscallarg(int) pid; + syscallarg(int) addr; + syscallarg(int) data; +}; +check_syscall_args(linux32_sys_ptrace) + +struct linux32_sys_alarm_args { + syscallarg(unsigned int) secs; +}; +check_syscall_args(linux32_sys_alarm) + +struct linux32_sys_utime_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_utimbufp_t) times; +}; +check_syscall_args(linux32_sys_utime) + +struct netbsd32_access_args; + +struct linux32_sys_nice_args { + syscallarg(int) incr; +}; +check_syscall_args(linux32_sys_nice) + +struct linux32_sys_kill_args { + syscallarg(int) pid; + syscallarg(int) signum; +}; +check_syscall_args(linux32_sys_kill) + +struct netbsd32___posix_rename_args; + +struct netbsd32_mkdir_args; + +struct netbsd32_rmdir_args; + +struct netbsd32_dup_args; + +struct linux32_sys_pipe_args { + syscallarg(netbsd32_intp) fd; +}; +check_syscall_args(linux32_sys_pipe) + +struct linux32_sys_times_args { + syscallarg(linux32_tmsp_t) tms; +}; +check_syscall_args(linux32_sys_times) + +struct linux32_sys_brk_args { + syscallarg(netbsd32_charp) nsize; +}; +check_syscall_args(linux32_sys_brk) + +struct netbsd32_setgid_args; + +struct linux32_sys_signal_args { + syscallarg(int) signum; + syscallarg(linux32_handlerp_t) handler; +}; +check_syscall_args(linux32_sys_signal) + +struct netbsd32_acct_args; + +struct linux32_sys_ioctl_args { + syscallarg(int) fd; + syscallarg(netbsd32_u_long) com; + syscallarg(netbsd32_charp) data; +}; +check_syscall_args(linux32_sys_ioctl) + +struct linux32_sys_fcntl_args { + syscallarg(int) fd; + syscallarg(int) cmd; + syscallarg(netbsd32_voidp) arg; +}; +check_syscall_args(linux32_sys_fcntl) + +struct netbsd32_setpgid_args; + +struct linux32_sys_oldolduname_args { + syscallarg(linux32_oldold_utsnamep_t) up; +}; +check_syscall_args(linux32_sys_oldolduname) + +struct netbsd32_umask_args; + +struct netbsd32_chroot_args; + +struct netbsd32_dup2_args; + +struct linux32_sys_sigsetmask_args { + syscallarg(linux32_old_sigset_t) mask; +}; +check_syscall_args(linux32_sys_sigsetmask) + +struct linux32_sys_setreuid16_args { + syscallarg(linux32_uid16_t) ruid; + syscallarg(linux32_uid16_t) euid; +}; +check_syscall_args(linux32_sys_setreuid16) + +struct linux32_sys_setregid16_args { + syscallarg(linux32_gid16_t) rgid; + syscallarg(linux32_gid16_t) egid; +}; +check_syscall_args(linux32_sys_setregid16) + +struct compat_43_netbsd32_osethostname_args; + +struct linux32_sys_setrlimit_args { + syscallarg(u_int) which; + syscallarg(netbsd32_orlimitp_t) rlp; +}; +check_syscall_args(linux32_sys_setrlimit) + +struct linux32_sys_getrlimit_args { + syscallarg(u_int) which; + syscallarg(netbsd32_orlimitp_t) rlp; +}; +check_syscall_args(linux32_sys_getrlimit) + +struct compat_50_netbsd32_getrusage_args; + +struct linux32_sys_gettimeofday_args { + syscallarg(netbsd32_timeval50p_t) tp; + syscallarg(netbsd32_timezonep_t) tzp; +}; +check_syscall_args(linux32_sys_gettimeofday) + +struct linux32_sys_settimeofday_args { + syscallarg(netbsd32_timeval50p_t) tp; + syscallarg(netbsd32_timezonep_t) tzp; +}; +check_syscall_args(linux32_sys_settimeofday) + +struct linux32_sys_getgroups16_args { + syscallarg(int) gidsetsize; + syscallarg(linux32_gid16p_t) gidset; +}; +check_syscall_args(linux32_sys_getgroups16) + +struct linux32_sys_setgroups16_args { + syscallarg(int) gidsetsize; + syscallarg(linux32_gid16p_t) gidset; +}; +check_syscall_args(linux32_sys_setgroups16) + +struct linux32_sys_oldselect_args { + syscallarg(linux32_oldselectp_t) lsp; +}; +check_syscall_args(linux32_sys_oldselect) + +struct netbsd32_symlink_args; + +struct compat_43_netbsd32_lstat43_args; + +struct netbsd32_readlink_args; + +struct linux32_sys_swapon_args { + syscallarg(netbsd32_charp) name; +}; +check_syscall_args(linux32_sys_swapon) + +struct linux32_sys_reboot_args { + syscallarg(int) magic1; + syscallarg(int) magic2; + syscallarg(int) cmd; + syscallarg(netbsd32_voidp) arg; +}; +check_syscall_args(linux32_sys_reboot) + +struct linux32_sys_readdir_args { + syscallarg(int) fd; + syscallarg(netbsd32_voidp) dent; + syscallarg(unsigned int) count; +}; +check_syscall_args(linux32_sys_readdir) + +struct linux32_sys_old_mmap_args { + syscallarg(linux32_oldmmapp) lmp; +}; +check_syscall_args(linux32_sys_old_mmap) + +struct netbsd32_munmap_args; + +struct compat_43_netbsd32_otruncate_args; + +struct compat_43_netbsd32_oftruncate_args; + +struct netbsd32_fchmod_args; + +struct linux32_sys_fchown16_args { + syscallarg(int) fd; + syscallarg(linux32_uid16_t) uid; + syscallarg(linux32_gid16_t) gid; +}; +check_syscall_args(linux32_sys_fchown16) + +struct linux32_sys_getpriority_args { + syscallarg(int) which; + syscallarg(int) who; +}; +check_syscall_args(linux32_sys_getpriority) + +struct netbsd32_setpriority_args; + +struct netbsd32_profil_args; + +struct linux32_sys_statfs_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_statfsp) sp; +}; +check_syscall_args(linux32_sys_statfs) + +struct linux32_sys_fstatfs_args { + syscallarg(int) fd; + syscallarg(linux32_statfsp) sp; +}; +check_syscall_args(linux32_sys_fstatfs) + +struct linux32_sys_socketcall_args { + syscallarg(int) what; + syscallarg(netbsd32_voidp) args; +}; +check_syscall_args(linux32_sys_socketcall) + +struct compat_50_netbsd32_setitimer_args; + +struct compat_50_netbsd32_getitimer_args; + +struct linux32_sys_stat_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_statp) sp; +}; +check_syscall_args(linux32_sys_stat) + +struct linux32_sys_lstat_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_statp) sp; +}; +check_syscall_args(linux32_sys_lstat) + +struct linux32_sys_fstat_args { + syscallarg(int) fd; + syscallarg(linux32_statp) sp; +}; +check_syscall_args(linux32_sys_fstat) + +struct linux32_sys_olduname_args { + syscallarg(linux32_oldutsnamep_t) up; +}; +check_syscall_args(linux32_sys_olduname) + +struct linux32_sys_wait4_args { + syscallarg(int) pid; + syscallarg(netbsd32_intp) status; + syscallarg(int) options; + syscallarg(netbsd32_rusage50p_t) rusage; +}; +check_syscall_args(linux32_sys_wait4) + +struct linux32_sys_swapoff_args { + syscallarg(netbsd32_charp) path; +}; +check_syscall_args(linux32_sys_swapoff) + +struct linux32_sys_sysinfo_args { + syscallarg(linux32_sysinfop_t) arg; +}; +check_syscall_args(linux32_sys_sysinfo) + +struct linux32_sys_ipc_args { + syscallarg(int) what; + syscallarg(int) a1; + syscallarg(int) a2; + syscallarg(int) a3; + syscallarg(netbsd32_voidp) ptr; +}; +check_syscall_args(linux32_sys_ipc) + +struct netbsd32_fsync_args; + +struct linux32_sys_sigreturn_args { + syscallarg(linux32_sigcontextp_t) scp; +}; +check_syscall_args(linux32_sys_sigreturn) + +struct linux32_sys_clone_args { + syscallarg(int) flags; + syscallarg(netbsd32_voidp) stack; + syscallarg(netbsd32_voidp) parent_tidptr; + syscallarg(netbsd32_voidp) tls; + syscallarg(netbsd32_voidp) child_tidptr; +}; +check_syscall_args(linux32_sys_clone) + +struct linux32_sys_setdomainname_args { + syscallarg(netbsd32_charp) domainname; + syscallarg(int) len; +}; +check_syscall_args(linux32_sys_setdomainname) + +struct linux32_sys_uname_args { + syscallarg(linux32_utsnamep) up; +}; +check_syscall_args(linux32_sys_uname) + +struct linux32_sys_mprotect_args { + syscallarg(netbsd32_voidp) start; + syscallarg(netbsd32_size_t) len; + syscallarg(int) prot; +}; +check_syscall_args(linux32_sys_mprotect) + +struct netbsd32_getpgid_args; + +struct netbsd32_fchdir_args; + +struct linux32_sys_personality_args { + syscallarg(netbsd32_u_long) per; +}; +check_syscall_args(linux32_sys_personality) + +struct linux32_sys_setfsuid_args; + +struct linux32_sys_setfsgid_args; + +struct linux32_sys_llseek_args { + syscallarg(int) fd; + syscallarg(u_int32_t) ohigh; + syscallarg(u_int32_t) olow; + syscallarg(netbsd32_voidp) res; + syscallarg(int) whence; +}; +check_syscall_args(linux32_sys_llseek) + +struct linux32_sys_getdents_args { + syscallarg(int) fd; + syscallarg(linux32_direntp_t) dent; + syscallarg(unsigned int) count; +}; +check_syscall_args(linux32_sys_getdents) + +struct linux32_sys_select_args { + syscallarg(int) nfds; + syscallarg(netbsd32_fd_setp_t) readfds; + syscallarg(netbsd32_fd_setp_t) writefds; + syscallarg(netbsd32_fd_setp_t) exceptfds; + syscallarg(netbsd32_timeval50p_t) timeout; +}; +check_syscall_args(linux32_sys_select) + +struct netbsd32_flock_args; + +struct netbsd32___msync13_args; + +struct netbsd32_readv_args; + +struct netbsd32_writev_args; + +struct netbsd32_getsid_args; + +struct linux32_sys_fdatasync_args { + syscallarg(int) fd; +}; +check_syscall_args(linux32_sys_fdatasync) + +struct linux32_sys___sysctl_args { + syscallarg(linux32___sysctlp_t) lsp; +}; +check_syscall_args(linux32_sys___sysctl) + +struct netbsd32_mlock_args; + +struct netbsd32_munlock_args; + +struct netbsd32_mlockall_args; + +struct linux32_sys_sched_setparam_args { + syscallarg(pid_t) pid; + syscallarg(const linux32_sched_paramp_t) sp; +}; +check_syscall_args(linux32_sys_sched_setparam) + +struct linux32_sys_sched_getparam_args { + syscallarg(pid_t) pid; + syscallarg(linux32_sched_paramp_t) sp; +}; +check_syscall_args(linux32_sys_sched_getparam) + +struct linux32_sys_sched_setscheduler_args { + syscallarg(pid_t) pid; + syscallarg(int) policy; + syscallarg(linux32_sched_paramp_t) sp; +}; +check_syscall_args(linux32_sys_sched_setscheduler) + +struct linux32_sys_sched_getscheduler_args { + syscallarg(pid_t) pid; +}; +check_syscall_args(linux32_sys_sched_getscheduler) + +struct linux32_sys_sched_get_priority_max_args { + syscallarg(int) policy; +}; +check_syscall_args(linux32_sys_sched_get_priority_max) + +struct linux32_sys_sched_get_priority_min_args { + syscallarg(int) policy; +}; +check_syscall_args(linux32_sys_sched_get_priority_min) + +struct linux32_sys_nanosleep_args { + syscallarg(linux32_timespecp_t) rqtp; + syscallarg(linux32_timespecp_t) rmtp; +}; +check_syscall_args(linux32_sys_nanosleep) + +struct linux32_sys_mremap_args { + syscallarg(netbsd32_voidp) old_address; + syscallarg(netbsd32_size_t) old_size; + syscallarg(netbsd32_size_t) new_size; + syscallarg(netbsd32_u_long) flags; +}; +check_syscall_args(linux32_sys_mremap) + +struct linux32_sys_setresuid16_args { + syscallarg(linux32_uid16_t) ruid; + syscallarg(linux32_uid16_t) euid; + syscallarg(linux32_uid16_t) suid; +}; +check_syscall_args(linux32_sys_setresuid16) + +struct linux32_sys_getresuid16_args { + syscallarg(linux32_uid16p_t) ruid; + syscallarg(linux32_uid16p_t) euid; + syscallarg(linux32_uid16p_t) suid; +}; +check_syscall_args(linux32_sys_getresuid16) + +struct netbsd32_poll_args; + +struct linux32_sys_setresgid16_args { + syscallarg(linux32_gid16_t) rgid; + syscallarg(linux32_gid16_t) egid; + syscallarg(linux32_gid16_t) sgid; +}; +check_syscall_args(linux32_sys_setresgid16) + +struct linux32_sys_getresgid16_args { + syscallarg(linux32_gid16p_t) rgid; + syscallarg(linux32_gid16p_t) egid; + syscallarg(linux32_gid16p_t) sgid; +}; +check_syscall_args(linux32_sys_getresgid16) + +struct linux32_sys_rt_sigreturn_args { + syscallarg(linux32_ucontextp_t) ucp; +}; +check_syscall_args(linux32_sys_rt_sigreturn) + +struct linux32_sys_rt_sigaction_args { + syscallarg(int) signum; + syscallarg(linux32_sigactionp_t) nsa; + syscallarg(linux32_sigactionp_t) osa; + syscallarg(netbsd32_size_t) sigsetsize; +}; +check_syscall_args(linux32_sys_rt_sigaction) + +struct linux32_sys_rt_sigprocmask_args { + syscallarg(int) how; + syscallarg(linux32_sigsetp_t) set; + syscallarg(linux32_sigsetp_t) oset; + syscallarg(netbsd32_size_t) sigsetsize; +}; +check_syscall_args(linux32_sys_rt_sigprocmask) + +struct linux32_sys_rt_sigpending_args { + syscallarg(linux32_sigsetp_t) set; + syscallarg(netbsd32_size_t) sigsetsize; +}; +check_syscall_args(linux32_sys_rt_sigpending) + +struct linux32_sys_rt_sigtimedwait_args { + syscallarg(const linux32_sigsetp_t) set; + syscallarg(linux32_siginfop_t) info; + syscallarg(const linux32_timespecp_t) timeout; +}; +check_syscall_args(linux32_sys_rt_sigtimedwait) + +struct linux32_sys_rt_queueinfo_args { + syscallarg(int) pid; + syscallarg(int) sig; + syscallarg(linux32_siginfop_t) uinfo; +}; +check_syscall_args(linux32_sys_rt_queueinfo) + +struct linux32_sys_rt_sigsuspend_args { + syscallarg(linux32_sigsetp_t) unewset; + syscallarg(netbsd32_size_t) sigsetsize; +}; +check_syscall_args(linux32_sys_rt_sigsuspend) + +struct linux32_sys_pread_args { + syscallarg(int) fd; + syscallarg(netbsd32_voidp) buf; + syscallarg(netbsd32_size_t) nbyte; + syscallarg(netbsd32_off_t) offset; +}; +check_syscall_args(linux32_sys_pread) + +struct linux32_sys_pwrite_args { + syscallarg(int) fd; + syscallarg(netbsd32_voidp) buf; + syscallarg(netbsd32_size_t) nbyte; + syscallarg(netbsd32_off_t) offset; +}; +check_syscall_args(linux32_sys_pwrite) + +struct linux32_sys_chown16_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_uid16_t) uid; + syscallarg(linux32_gid16_t) gid; +}; +check_syscall_args(linux32_sys_chown16) + +struct netbsd32___getcwd_args; + +struct linux32_sys_ugetrlimit_args { + syscallarg(int) which; + syscallarg(netbsd32_orlimitp_t) rlp; +}; +check_syscall_args(linux32_sys_ugetrlimit) + +struct linux32_sys_mmap2_args { + syscallarg(netbsd32_u_long) addr; + syscallarg(netbsd32_size_t) len; + syscallarg(int) prot; + syscallarg(int) flags; + syscallarg(int) fd; + syscallarg(linux32_off_t) offset; +}; +check_syscall_args(linux32_sys_mmap2) + +struct linux32_sys_truncate64_args { + syscallarg(netbsd32_charp) path; + syscallarg(uint32_t) lenlo; + syscallarg(uint32_t) lenhi; +}; +check_syscall_args(linux32_sys_truncate64) + +struct linux32_sys_ftruncate64_args { + syscallarg(unsigned int) fd; + syscallarg(uint32_t) lenlo; + syscallarg(uint32_t) lenhi; +}; +check_syscall_args(linux32_sys_ftruncate64) + +struct linux32_sys_stat64_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_stat64p) sp; +}; +check_syscall_args(linux32_sys_stat64) + +struct linux32_sys_lstat64_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_stat64p) sp; +}; +check_syscall_args(linux32_sys_lstat64) + +struct linux32_sys_fstat64_args { + syscallarg(int) fd; + syscallarg(linux32_stat64p) sp; +}; +check_syscall_args(linux32_sys_fstat64) + +struct netbsd32___posix_lchown_args; + +struct netbsd32_setreuid_args; + +struct netbsd32_setregid_args; + +struct netbsd32_getgroups_args; + +struct netbsd32_setgroups_args; + +struct netbsd32___posix_fchown_args; + +struct linux32_sys_setresuid_args { + syscallarg(uid_t) ruid; + syscallarg(uid_t) euid; + syscallarg(uid_t) suid; +}; +check_syscall_args(linux32_sys_setresuid) + +struct linux32_sys_getresuid_args { + syscallarg(linux32_uidp_t) ruid; + syscallarg(linux32_uidp_t) euid; + syscallarg(linux32_uidp_t) suid; +}; +check_syscall_args(linux32_sys_getresuid) + +struct linux32_sys_setresgid_args { + syscallarg(gid_t) rgid; + syscallarg(gid_t) egid; + syscallarg(gid_t) sgid; +}; +check_syscall_args(linux32_sys_setresgid) + +struct linux32_sys_getresgid_args { + syscallarg(linux32_gidp_t) rgid; + syscallarg(linux32_gidp_t) egid; + syscallarg(linux32_gidp_t) sgid; +}; +check_syscall_args(linux32_sys_getresgid) + +struct netbsd32___posix_chown_args; + +struct netbsd32_setuid_args; + +struct netbsd32_setgid_args; + +struct linux32_sys_setfsuid_args { + syscallarg(uid_t) uid; +}; +check_syscall_args(linux32_sys_setfsuid) + +struct linux32_sys_setfsgid_args { + syscallarg(gid_t) gid; +}; +check_syscall_args(linux32_sys_setfsgid) + +struct linux32_sys_getdents64_args { + syscallarg(int) fd; + syscallarg(linux32_dirent64p_t) dent; + syscallarg(unsigned int) count; +}; +check_syscall_args(linux32_sys_getdents64) + +struct netbsd32_mincore_args; + +struct netbsd32_madvise_args; +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args + +struct linux32_sys_fcntl64_args; + +struct netbsd32_setxattr_args; + +struct netbsd32_lsetxattr_args; + +struct netbsd32_fsetxattr_args; + +struct netbsd32_getxattr_args; + +struct netbsd32_lgetxattr_args; + +struct netbsd32_fgetxattr_args; + +struct netbsd32_listxattr_args; + +struct netbsd32_llistxattr_args; + +struct netbsd32_flistxattr_args; + +struct netbsd32_removexattr_args; + +struct netbsd32_lremovexattr_args; + +struct netbsd32_fremovexattr_args; + +struct linux32_sys_tkill_args { + syscallarg(int) tid; + syscallarg(int) sig; +}; +check_syscall_args(linux32_sys_tkill) + +struct linux32_sys_futex_args { + syscallarg(linux32_intp_t) uaddr; + syscallarg(int) op; + syscallarg(int) val; + syscallarg(linux32_timespecp_t) timeout; + syscallarg(linux32_intp_t) uaddr2; + syscallarg(int) val3; +}; +check_syscall_args(linux32_sys_futex) + +struct linux32_sys_sched_setaffinity_args { + syscallarg(pid_t) pid; + syscallarg(unsigned int) len; + syscallarg(linux32_ulongp_t) mask; +}; +check_syscall_args(linux32_sys_sched_setaffinity) + +struct linux32_sys_sched_getaffinity_args { + syscallarg(pid_t) pid; + syscallarg(unsigned int) len; + syscallarg(linux32_ulongp_t) mask; +}; +check_syscall_args(linux32_sys_sched_getaffinity) + +struct linux32_sys_exit_group_args { + syscallarg(int) error_code; +}; +check_syscall_args(linux32_sys_exit_group) + +struct linux32_sys_set_tid_address_args { + syscallarg(linux32_intp_t) tid; +}; +check_syscall_args(linux32_sys_set_tid_address) + +struct linux32_sys_timer_create_args { + syscallarg(clockid_t) clockid; + syscallarg(struct linux32_sigevent *) evp; + syscallarg(timer_t *) timerid; +}; +check_syscall_args(linux32_sys_timer_create) + +struct linux32_sys_timer_settime_args { + syscallarg(timer_t) timerid; + syscallarg(int) flags; + syscallarg(const struct linux32_itimerspec *) tim; + syscallarg(struct linux32_itimerspec *) otim; +}; +check_syscall_args(linux32_sys_timer_settime) + +struct linux32_sys_timer_gettime_args { + syscallarg(timer_t) timerid; + syscallarg(struct linux32_itimerspec *) tim; +}; +check_syscall_args(linux32_sys_timer_gettime) + +struct sys_timer_getoverrun_args; + +struct sys_timer_delete_args; + +struct linux32_sys_clock_settime_args { + syscallarg(clockid_t) which; + syscallarg(linux32_timespecp_t) tp; +}; +check_syscall_args(linux32_sys_clock_settime) + +struct linux32_sys_clock_gettime_args { + syscallarg(clockid_t) which; + syscallarg(linux32_timespecp_t) tp; +}; +check_syscall_args(linux32_sys_clock_gettime) + +struct linux32_sys_clock_getres_args { + syscallarg(clockid_t) which; + syscallarg(linux32_timespecp_t) tp; +}; +check_syscall_args(linux32_sys_clock_getres) + +struct linux32_sys_clock_nanosleep_args { + syscallarg(clockid_t) which; + syscallarg(int) flags; + syscallarg(linux32_timespecp_t) rqtp; + syscallarg(linux32_timespecp_t) rmtp; +}; +check_syscall_args(linux32_sys_clock_nanosleep) + +struct linux32_sys_statfs64_args { + syscallarg(netbsd32_charp) path; + syscallarg(netbsd32_size_t) sz; + syscallarg(linux32_statfs64p) sp; +}; +check_syscall_args(linux32_sys_statfs64) + +struct linux32_sys_fstatfs64_args { + syscallarg(int) fd; + syscallarg(netbsd32_size_t) sz; + syscallarg(linux32_statfs64p) sp; +}; +check_syscall_args(linux32_sys_fstatfs64) + +struct linux32_sys_tgkill_args { + syscallarg(int) tgid; + syscallarg(int) tid; + syscallarg(int) sig; +}; +check_syscall_args(linux32_sys_tgkill) + +struct compat_50_netbsd32_utimes_args; + +struct linux32_sys_fadvise64_64_args { + syscallarg(int) fd; + syscallarg(uint32_t) offlo; + syscallarg(uint32_t) offhi; + syscallarg(uint32_t) lenlo; + syscallarg(uint32_t) lenhi; + syscallarg(int) advice; +}; +check_syscall_args(linux32_sys_fadvise64_64) + +struct linux32_sys_socket_args; + +struct linux32_sys_bind_args; + +struct linux32_sys_connect_args; + +struct linux32_sys_accept_args; + +struct linux32_sys_getsockname_args; + +struct linux32_sys_getpeername_args; + +struct linux32_sys_socketpair_args; + +struct linux32_sys_send_args; + +struct linux32_sys_sendto_args; + +struct linux32_sys_recv_args; + +struct linux32_sys_recvfrom_args; + +struct linux32_sys_setsockopt_args; + +struct linux32_sys_getsockopt_args; + +struct linux32_sys_openat_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(int) flags; + syscallarg(linux_umode_t) mode; +}; +check_syscall_args(linux32_sys_openat) + +struct netbsd32_mkdirat_args; + +struct linux32_sys_mknodat_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(linux_umode_t) mode; + syscallarg(unsigned) dev; +}; +check_syscall_args(linux32_sys_mknodat) + +struct linux32_sys_fchownat_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(uid_t) owner; + syscallarg(gid_t) group; + syscallarg(int) flag; +}; +check_syscall_args(linux32_sys_fchownat) + +struct linux32_sys_fstatat64_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(linux32_stat64p) sp; + syscallarg(int) flag; +}; +check_syscall_args(linux32_sys_fstatat64) + +struct linux32_sys_unlinkat_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(int) flag; +}; +check_syscall_args(linux32_sys_unlinkat) + +struct netbsd32_renameat_args; + +struct linux32_sys_linkat_args { + syscallarg(int) fd1; + syscallarg(netbsd32_charp) name1; + syscallarg(int) fd2; + syscallarg(netbsd32_charp) name2; + syscallarg(int) flags; +}; +check_syscall_args(linux32_sys_linkat) + +struct netbsd32_symlinkat_args; + +struct netbsd32_readlinkat_args; + +struct linux32_sys_fchmodat_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(linux_umode_t) mode; +}; +check_syscall_args(linux32_sys_fchmodat) + +struct linux32_sys_faccessat_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(int) amode; +}; +check_syscall_args(linux32_sys_faccessat) + +struct linux32_sys_ppoll_args { + syscallarg(netbsd32_pollfdp_t) fds; + syscallarg(u_int) nfds; + syscallarg(linux32_timespecp_t) timeout; + syscallarg(linux32_sigsetp_t) sigset; +}; +check_syscall_args(linux32_sys_ppoll) + +struct netbsd32___futex_set_robust_list_args; + +struct netbsd32___futex_get_robust_list_args; + +struct linux32_sys_utimensat_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(linux32_timespecp_t) times; + syscallarg(int) flag; +}; +check_syscall_args(linux32_sys_utimensat) + +struct linux_sys_timerfd_create_args; + +struct linux32_sys_eventfd_args { + syscallarg(unsigned int) initval; +}; +check_syscall_args(linux32_sys_eventfd) + +struct linux32_sys_fallocate_args { + syscallarg(int) fd; + syscallarg(int) mode; + syscallarg(off_t) offset; + syscallarg(off_t) len; +}; +check_syscall_args(linux32_sys_fallocate) + +struct linux32_sys_timerfd_settime_args { + syscallarg(int) fd; + syscallarg(int) flags; + syscallarg(const struct linux32_itimerspec *) tim; + syscallarg(struct linux32_itimerspec *) otim; +}; +check_syscall_args(linux32_sys_timerfd_settime) + +struct linux32_sys_timerfd_gettime_args { + syscallarg(int) fd; + syscallarg(struct linux32_itimerspec *) tim; +}; +check_syscall_args(linux32_sys_timerfd_gettime) + +struct linux32_sys_eventfd2_args { + syscallarg(unsigned int) initval; + syscallarg(int) flags; +}; +check_syscall_args(linux32_sys_eventfd2) + +struct linux32_sys_dup3_args { + syscallarg(int) from; + syscallarg(int) to; + syscallarg(int) flags; +}; +check_syscall_args(linux32_sys_dup3) + +struct linux32_sys_pipe2_args { + syscallarg(netbsd32_intp) fd; + syscallarg(int) flags; +}; +check_syscall_args(linux32_sys_pipe2) + +struct linux32_sys_preadv_args { + syscallarg(int) fd; + syscallarg(const netbsd32_iovecp_t) iovp; + syscallarg(int) iovcnt; + syscallarg(netbsd32_u_long) off_lo; + syscallarg(netbsd32_u_long) off_hi; +}; +check_syscall_args(linux32_sys_preadv) + +struct linux32_sys_pwritev_args { + syscallarg(int) fd; + syscallarg(const netbsd32_iovecp_t) iovp; + syscallarg(int) iovcnt; + syscallarg(netbsd32_u_long) off_lo; + syscallarg(netbsd32_u_long) off_hi; +}; +check_syscall_args(linux32_sys_pwritev) + +struct netbsd32_getrandom_args; + +struct linux32_sys_statx_args { + syscallarg(int) fd; + syscallarg(netbsd32_charp) path; + syscallarg(int) flag; + syscallarg(unsigned int) mask; + syscallarg(linux32_statxp) sp; +}; +check_syscall_args(linux32_sys_statx) + +struct linux32_sys_set_tls_args { + syscallarg(netbsd32_voidp) tls; +}; +check_syscall_args(linux32_sys_set_tls) + +/* + * System call prototypes. + */ + +int linux_sys_nosys(struct lwp *, const void *, register_t *); + +int linux32_sys_exit(struct lwp *, const struct linux32_sys_exit_args *, register_t *); + +int sys_fork(struct lwp *, const void *, register_t *); + +int netbsd32_read(struct lwp *, const struct netbsd32_read_args *, register_t *); + +int netbsd32_write(struct lwp *, const struct netbsd32_write_args *, register_t *); + +int linux32_sys_open(struct lwp *, const struct linux32_sys_open_args *, register_t *); + +int netbsd32_close(struct lwp *, const struct netbsd32_close_args *, register_t *); + +int linux32_sys_waitpid(struct lwp *, const struct linux32_sys_waitpid_args *, register_t *); + +int linux32_sys_creat(struct lwp *, const struct linux32_sys_creat_args *, register_t *); + +int netbsd32_link(struct lwp *, const struct netbsd32_link_args *, register_t *); + +int linux32_sys_unlink(struct lwp *, const struct linux32_sys_unlink_args *, register_t *); + +int netbsd32_execve(struct lwp *, const struct netbsd32_execve_args *, register_t *); + +int netbsd32_chdir(struct lwp *, const struct netbsd32_chdir_args *, register_t *); + +int linux32_sys_time(struct lwp *, const struct linux32_sys_time_args *, register_t *); + +int linux32_sys_mknod(struct lwp *, const struct linux32_sys_mknod_args *, register_t *); + +int netbsd32_chmod(struct lwp *, const struct netbsd32_chmod_args *, register_t *); + +int linux32_sys_lchown16(struct lwp *, const struct linux32_sys_lchown16_args *, register_t *); + +int compat_43_netbsd32_olseek(struct lwp *, const struct compat_43_netbsd32_olseek_args *, register_t *); + +int sys_getpid(struct lwp *, const void *, register_t *); + +int netbsd32_setuid(struct lwp *, const struct netbsd32_setuid_args *, register_t *); + +int sys_getuid(struct lwp *, const void *, register_t *); + +int linux32_sys_stime(struct lwp *, const struct linux32_sys_stime_args *, register_t *); + +int linux32_sys_ptrace(struct lwp *, const struct linux32_sys_ptrace_args *, register_t *); + +int linux32_sys_alarm(struct lwp *, const struct linux32_sys_alarm_args *, register_t *); + +int linux_sys_pause(struct lwp *, const void *, register_t *); + +int linux32_sys_utime(struct lwp *, const struct linux32_sys_utime_args *, register_t *); + +int netbsd32_access(struct lwp *, const struct netbsd32_access_args *, register_t *); + +int linux32_sys_nice(struct lwp *, const struct linux32_sys_nice_args *, register_t *); + +int sys_sync(struct lwp *, const void *, register_t *); + +int linux32_sys_kill(struct lwp *, const struct linux32_sys_kill_args *, register_t *); + +int netbsd32___posix_rename(struct lwp *, const struct netbsd32___posix_rename_args *, register_t *); + +int netbsd32_mkdir(struct lwp *, const struct netbsd32_mkdir_args *, register_t *); + +int netbsd32_rmdir(struct lwp *, const struct netbsd32_rmdir_args *, register_t *); + +int netbsd32_dup(struct lwp *, const struct netbsd32_dup_args *, register_t *); + +int linux32_sys_pipe(struct lwp *, const struct linux32_sys_pipe_args *, register_t *); + +int linux32_sys_times(struct lwp *, const struct linux32_sys_times_args *, register_t *); + +int linux32_sys_brk(struct lwp *, const struct linux32_sys_brk_args *, register_t *); + +int netbsd32_setgid(struct lwp *, const struct netbsd32_setgid_args *, register_t *); + +int sys_getgid(struct lwp *, const void *, register_t *); + +int linux32_sys_signal(struct lwp *, const struct linux32_sys_signal_args *, register_t *); + +int sys_geteuid(struct lwp *, const void *, register_t *); + +int sys_getegid(struct lwp *, const void *, register_t *); + +int netbsd32_acct(struct lwp *, const struct netbsd32_acct_args *, register_t *); + +int linux32_sys_ioctl(struct lwp *, const struct linux32_sys_ioctl_args *, register_t *); + +int linux32_sys_fcntl(struct lwp *, const struct linux32_sys_fcntl_args *, register_t *); + +int netbsd32_setpgid(struct lwp *, const struct netbsd32_setpgid_args *, register_t *); + +int linux32_sys_oldolduname(struct lwp *, const struct linux32_sys_oldolduname_args *, register_t *); + +int netbsd32_umask(struct lwp *, const struct netbsd32_umask_args *, register_t *); + +int netbsd32_chroot(struct lwp *, const struct netbsd32_chroot_args *, register_t *); + +int netbsd32_dup2(struct lwp *, const struct netbsd32_dup2_args *, register_t *); + +int sys_getppid(struct lwp *, const void *, register_t *); + +int sys_getpgrp(struct lwp *, const void *, register_t *); + +int sys_setsid(struct lwp *, const void *, register_t *); + +int linux32_sys_siggetmask(struct lwp *, const void *, register_t *); + +int linux32_sys_sigsetmask(struct lwp *, const struct linux32_sys_sigsetmask_args *, register_t *); + +int linux32_sys_setreuid16(struct lwp *, const struct linux32_sys_setreuid16_args *, register_t *); + +int linux32_sys_setregid16(struct lwp *, const struct linux32_sys_setregid16_args *, register_t *); + +int compat_43_netbsd32_osethostname(struct lwp *, const struct compat_43_netbsd32_osethostname_args *, register_t *); + +int linux32_sys_setrlimit(struct lwp *, const struct linux32_sys_setrlimit_args *, register_t *); + +int linux32_sys_getrlimit(struct lwp *, const struct linux32_sys_getrlimit_args *, register_t *); + +int compat_50_netbsd32_getrusage(struct lwp *, const struct compat_50_netbsd32_getrusage_args *, register_t *); + +int linux32_sys_gettimeofday(struct lwp *, const struct linux32_sys_gettimeofday_args *, register_t *); + +int linux32_sys_settimeofday(struct lwp *, const struct linux32_sys_settimeofday_args *, register_t *); + +int linux32_sys_getgroups16(struct lwp *, const struct linux32_sys_getgroups16_args *, register_t *); + +int linux32_sys_setgroups16(struct lwp *, const struct linux32_sys_setgroups16_args *, register_t *); + +int linux32_sys_oldselect(struct lwp *, const struct linux32_sys_oldselect_args *, register_t *); + +int netbsd32_symlink(struct lwp *, const struct netbsd32_symlink_args *, register_t *); + +int compat_43_netbsd32_lstat43(struct lwp *, const struct compat_43_netbsd32_lstat43_args *, register_t *); + +int netbsd32_readlink(struct lwp *, const struct netbsd32_readlink_args *, register_t *); + +int linux32_sys_swapon(struct lwp *, const struct linux32_sys_swapon_args *, register_t *); + +int linux32_sys_reboot(struct lwp *, const struct linux32_sys_reboot_args *, register_t *); + +int linux32_sys_readdir(struct lwp *, const struct linux32_sys_readdir_args *, register_t *); + +int linux32_sys_old_mmap(struct lwp *, const struct linux32_sys_old_mmap_args *, register_t *); + +int netbsd32_munmap(struct lwp *, const struct netbsd32_munmap_args *, register_t *); + +int compat_43_netbsd32_otruncate(struct lwp *, const struct compat_43_netbsd32_otruncate_args *, register_t *); + +int compat_43_netbsd32_oftruncate(struct lwp *, const struct compat_43_netbsd32_oftruncate_args *, register_t *); + +int netbsd32_fchmod(struct lwp *, const struct netbsd32_fchmod_args *, register_t *); + +int linux32_sys_fchown16(struct lwp *, const struct linux32_sys_fchown16_args *, register_t *); + +int linux32_sys_getpriority(struct lwp *, const struct linux32_sys_getpriority_args *, register_t *); + +int netbsd32_setpriority(struct lwp *, const struct netbsd32_setpriority_args *, register_t *); + +int netbsd32_profil(struct lwp *, const struct netbsd32_profil_args *, register_t *); + +int linux32_sys_statfs(struct lwp *, const struct linux32_sys_statfs_args *, register_t *); + +int linux32_sys_fstatfs(struct lwp *, const struct linux32_sys_fstatfs_args *, register_t *); + +int linux32_sys_socketcall(struct lwp *, const struct linux32_sys_socketcall_args *, register_t *); + +int compat_50_netbsd32_setitimer(struct lwp *, const struct compat_50_netbsd32_setitimer_args *, register_t *); + +int compat_50_netbsd32_getitimer(struct lwp *, const struct compat_50_netbsd32_getitimer_args *, register_t *); + +int linux32_sys_stat(struct lwp *, const struct linux32_sys_stat_args *, register_t *); + +int linux32_sys_lstat(struct lwp *, const struct linux32_sys_lstat_args *, register_t *); + +int linux32_sys_fstat(struct lwp *, const struct linux32_sys_fstat_args *, register_t *); + +int linux32_sys_olduname(struct lwp *, const struct linux32_sys_olduname_args *, register_t *); + +int linux32_sys_wait4(struct lwp *, const struct linux32_sys_wait4_args *, register_t *); + +int linux32_sys_swapoff(struct lwp *, const struct linux32_sys_swapoff_args *, register_t *); + +int linux32_sys_sysinfo(struct lwp *, const struct linux32_sys_sysinfo_args *, register_t *); + +int linux32_sys_ipc(struct lwp *, const struct linux32_sys_ipc_args *, register_t *); + +int netbsd32_fsync(struct lwp *, const struct netbsd32_fsync_args *, register_t *); + +int linux32_sys_sigreturn(struct lwp *, const struct linux32_sys_sigreturn_args *, register_t *); + +int linux32_sys_clone(struct lwp *, const struct linux32_sys_clone_args *, register_t *); + +int linux32_sys_setdomainname(struct lwp *, const struct linux32_sys_setdomainname_args *, register_t *); + +int linux32_sys_uname(struct lwp *, const struct linux32_sys_uname_args *, register_t *); + +int linux32_sys_mprotect(struct lwp *, const struct linux32_sys_mprotect_args *, register_t *); + +int netbsd32_getpgid(struct lwp *, const struct netbsd32_getpgid_args *, register_t *); + +int netbsd32_fchdir(struct lwp *, const struct netbsd32_fchdir_args *, register_t *); + +int linux32_sys_personality(struct lwp *, const struct linux32_sys_personality_args *, register_t *); + +int linux32_sys_setfsuid(struct lwp *, const struct linux32_sys_setfsuid_args *, register_t *); + +int linux32_sys_setfsgid(struct lwp *, const struct linux32_sys_setfsgid_args *, register_t *); + +int linux32_sys_llseek(struct lwp *, const struct linux32_sys_llseek_args *, register_t *); + +int linux32_sys_getdents(struct lwp *, const struct linux32_sys_getdents_args *, register_t *); + +int linux32_sys_select(struct lwp *, const struct linux32_sys_select_args *, register_t *); + +int netbsd32_flock(struct lwp *, const struct netbsd32_flock_args *, register_t *); + +int netbsd32___msync13(struct lwp *, const struct netbsd32___msync13_args *, register_t *); + +int netbsd32_readv(struct lwp *, const struct netbsd32_readv_args *, register_t *); + +int netbsd32_writev(struct lwp *, const struct netbsd32_writev_args *, register_t *); + +int netbsd32_getsid(struct lwp *, const struct netbsd32_getsid_args *, register_t *); + +int linux32_sys_fdatasync(struct lwp *, const struct linux32_sys_fdatasync_args *, register_t *); + +int linux32_sys___sysctl(struct lwp *, const struct linux32_sys___sysctl_args *, register_t *); + +int netbsd32_mlock(struct lwp *, const struct netbsd32_mlock_args *, register_t *); + +int netbsd32_munlock(struct lwp *, const struct netbsd32_munlock_args *, register_t *); + +int netbsd32_mlockall(struct lwp *, const struct netbsd32_mlockall_args *, register_t *); + +int sys_munlockall(struct lwp *, const void *, register_t *); + +int linux32_sys_sched_setparam(struct lwp *, const struct linux32_sys_sched_setparam_args *, register_t *); + +int linux32_sys_sched_getparam(struct lwp *, const struct linux32_sys_sched_getparam_args *, register_t *); + +int linux32_sys_sched_setscheduler(struct lwp *, const struct linux32_sys_sched_setscheduler_args *, register_t *); + +int linux32_sys_sched_getscheduler(struct lwp *, const struct linux32_sys_sched_getscheduler_args *, register_t *); + +int linux_sys_sched_yield(struct lwp *, const void *, register_t *); + +int linux32_sys_sched_get_priority_max(struct lwp *, const struct linux32_sys_sched_get_priority_max_args *, register_t *); + +int linux32_sys_sched_get_priority_min(struct lwp *, const struct linux32_sys_sched_get_priority_min_args *, register_t *); + +int linux32_sys_nanosleep(struct lwp *, const struct linux32_sys_nanosleep_args *, register_t *); + +int linux32_sys_mremap(struct lwp *, const struct linux32_sys_mremap_args *, register_t *); + +int linux32_sys_setresuid16(struct lwp *, const struct linux32_sys_setresuid16_args *, register_t *); + +int linux32_sys_getresuid16(struct lwp *, const struct linux32_sys_getresuid16_args *, register_t *); + +int netbsd32_poll(struct lwp *, const struct netbsd32_poll_args *, register_t *); + +int linux32_sys_setresgid16(struct lwp *, const struct linux32_sys_setresgid16_args *, register_t *); + +int linux32_sys_getresgid16(struct lwp *, const struct linux32_sys_getresgid16_args *, register_t *); + +int linux32_sys_rt_sigreturn(struct lwp *, const struct linux32_sys_rt_sigreturn_args *, register_t *); + +int linux32_sys_rt_sigaction(struct lwp *, const struct linux32_sys_rt_sigaction_args *, register_t *); + +int linux32_sys_rt_sigprocmask(struct lwp *, const struct linux32_sys_rt_sigprocmask_args *, register_t *); + +int linux32_sys_rt_sigpending(struct lwp *, const struct linux32_sys_rt_sigpending_args *, register_t *); + +int linux32_sys_rt_sigtimedwait(struct lwp *, const struct linux32_sys_rt_sigtimedwait_args *, register_t *); + +int linux32_sys_rt_queueinfo(struct lwp *, const struct linux32_sys_rt_queueinfo_args *, register_t *); + +int linux32_sys_rt_sigsuspend(struct lwp *, const struct linux32_sys_rt_sigsuspend_args *, register_t *); + +int linux32_sys_pread(struct lwp *, const struct linux32_sys_pread_args *, register_t *); + +int linux32_sys_pwrite(struct lwp *, const struct linux32_sys_pwrite_args *, register_t *); + +int linux32_sys_chown16(struct lwp *, const struct linux32_sys_chown16_args *, register_t *); + +int netbsd32___getcwd(struct lwp *, const struct netbsd32___getcwd_args *, register_t *); + +int sys___vfork14(struct lwp *, const void *, register_t *); + +int linux32_sys_ugetrlimit(struct lwp *, const struct linux32_sys_ugetrlimit_args *, register_t *); + +int linux32_sys_mmap2(struct lwp *, const struct linux32_sys_mmap2_args *, register_t *); + +int linux32_sys_truncate64(struct lwp *, const struct linux32_sys_truncate64_args *, register_t *); + +int linux32_sys_ftruncate64(struct lwp *, const struct linux32_sys_ftruncate64_args *, register_t *); + +int linux32_sys_stat64(struct lwp *, const struct linux32_sys_stat64_args *, register_t *); + +int linux32_sys_lstat64(struct lwp *, const struct linux32_sys_lstat64_args *, register_t *); + +int linux32_sys_fstat64(struct lwp *, const struct linux32_sys_fstat64_args *, register_t *); + +int netbsd32___posix_lchown(struct lwp *, const struct netbsd32___posix_lchown_args *, register_t *); + +int netbsd32_setreuid(struct lwp *, const struct netbsd32_setreuid_args *, register_t *); + +int netbsd32_setregid(struct lwp *, const struct netbsd32_setregid_args *, register_t *); + +int netbsd32_getgroups(struct lwp *, const struct netbsd32_getgroups_args *, register_t *); + +int netbsd32_setgroups(struct lwp *, const struct netbsd32_setgroups_args *, register_t *); + +int netbsd32___posix_fchown(struct lwp *, const struct netbsd32___posix_fchown_args *, register_t *); + +int linux32_sys_setresuid(struct lwp *, const struct linux32_sys_setresuid_args *, register_t *); + +int linux32_sys_getresuid(struct lwp *, const struct linux32_sys_getresuid_args *, register_t *); + +int linux32_sys_setresgid(struct lwp *, const struct linux32_sys_setresgid_args *, register_t *); + +int linux32_sys_getresgid(struct lwp *, const struct linux32_sys_getresgid_args *, register_t *); + +int netbsd32___posix_chown(struct lwp *, const struct netbsd32___posix_chown_args *, register_t *); + +int linux32_sys_getdents64(struct lwp *, const struct linux32_sys_getdents64_args *, register_t *); + +int netbsd32_mincore(struct lwp *, const struct netbsd32_mincore_args *, register_t *); + +int netbsd32_madvise(struct lwp *, const struct netbsd32_madvise_args *, register_t *); + +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args +int linux32_sys_fcntl64(struct lwp *, const struct linux32_sys_fcntl64_args *, register_t *); + +int linux_sys_gettid(struct lwp *, const void *, register_t *); + +int netbsd32_setxattr(struct lwp *, const struct netbsd32_setxattr_args *, register_t *); + +int netbsd32_lsetxattr(struct lwp *, const struct netbsd32_lsetxattr_args *, register_t *); + +int netbsd32_fsetxattr(struct lwp *, const struct netbsd32_fsetxattr_args *, register_t *); + +int netbsd32_getxattr(struct lwp *, const struct netbsd32_getxattr_args *, register_t *); + +int netbsd32_lgetxattr(struct lwp *, const struct netbsd32_lgetxattr_args *, register_t *); + +int netbsd32_fgetxattr(struct lwp *, const struct netbsd32_fgetxattr_args *, register_t *); + +int netbsd32_listxattr(struct lwp *, const struct netbsd32_listxattr_args *, register_t *); + +int netbsd32_llistxattr(struct lwp *, const struct netbsd32_llistxattr_args *, register_t *); + +int netbsd32_flistxattr(struct lwp *, const struct netbsd32_flistxattr_args *, register_t *); + +int netbsd32_removexattr(struct lwp *, const struct netbsd32_removexattr_args *, register_t *); + +int netbsd32_lremovexattr(struct lwp *, const struct netbsd32_lremovexattr_args *, register_t *); + +int netbsd32_fremovexattr(struct lwp *, const struct netbsd32_fremovexattr_args *, register_t *); + +int linux32_sys_tkill(struct lwp *, const struct linux32_sys_tkill_args *, register_t *); + +int linux32_sys_futex(struct lwp *, const struct linux32_sys_futex_args *, register_t *); + +int linux32_sys_sched_setaffinity(struct lwp *, const struct linux32_sys_sched_setaffinity_args *, register_t *); + +int linux32_sys_sched_getaffinity(struct lwp *, const struct linux32_sys_sched_getaffinity_args *, register_t *); + +int linux32_sys_exit_group(struct lwp *, const struct linux32_sys_exit_group_args *, register_t *); + +int linux32_sys_set_tid_address(struct lwp *, const struct linux32_sys_set_tid_address_args *, register_t *); + +int linux32_sys_timer_create(struct lwp *, const struct linux32_sys_timer_create_args *, register_t *); + +int linux32_sys_timer_settime(struct lwp *, const struct linux32_sys_timer_settime_args *, register_t *); + +int linux32_sys_timer_gettime(struct lwp *, const struct linux32_sys_timer_gettime_args *, register_t *); + +int sys_timer_getoverrun(struct lwp *, const struct sys_timer_getoverrun_args *, register_t *); + +int sys_timer_delete(struct lwp *, const struct sys_timer_delete_args *, register_t *); + +int linux32_sys_clock_settime(struct lwp *, const struct linux32_sys_clock_settime_args *, register_t *); + +int linux32_sys_clock_gettime(struct lwp *, const struct linux32_sys_clock_gettime_args *, register_t *); + +int linux32_sys_clock_getres(struct lwp *, const struct linux32_sys_clock_getres_args *, register_t *); + +int linux32_sys_clock_nanosleep(struct lwp *, const struct linux32_sys_clock_nanosleep_args *, register_t *); + +int linux32_sys_statfs64(struct lwp *, const struct linux32_sys_statfs64_args *, register_t *); + +int linux32_sys_fstatfs64(struct lwp *, const struct linux32_sys_fstatfs64_args *, register_t *); + +int linux32_sys_tgkill(struct lwp *, const struct linux32_sys_tgkill_args *, register_t *); + +int compat_50_netbsd32_utimes(struct lwp *, const struct compat_50_netbsd32_utimes_args *, register_t *); + +int linux32_sys_fadvise64_64(struct lwp *, const struct linux32_sys_fadvise64_64_args *, register_t *); + +int linux32_sys_socket(struct lwp *, const struct linux32_sys_socket_args *, register_t *); + +int linux32_sys_bind(struct lwp *, const struct linux32_sys_bind_args *, register_t *); + +int linux32_sys_connect(struct lwp *, const struct linux32_sys_connect_args *, register_t *); + +int linux32_sys_accept(struct lwp *, const struct linux32_sys_accept_args *, register_t *); + +int linux32_sys_getsockname(struct lwp *, const struct linux32_sys_getsockname_args *, register_t *); + +int linux32_sys_getpeername(struct lwp *, const struct linux32_sys_getpeername_args *, register_t *); + +int linux32_sys_socketpair(struct lwp *, const struct linux32_sys_socketpair_args *, register_t *); + +int linux32_sys_send(struct lwp *, const struct linux32_sys_send_args *, register_t *); + +int linux32_sys_sendto(struct lwp *, const struct linux32_sys_sendto_args *, register_t *); + +int linux32_sys_recv(struct lwp *, const struct linux32_sys_recv_args *, register_t *); + +int linux32_sys_recvfrom(struct lwp *, const struct linux32_sys_recvfrom_args *, register_t *); + +int linux32_sys_setsockopt(struct lwp *, const struct linux32_sys_setsockopt_args *, register_t *); + +int linux32_sys_getsockopt(struct lwp *, const struct linux32_sys_getsockopt_args *, register_t *); + +int linux32_sys_openat(struct lwp *, const struct linux32_sys_openat_args *, register_t *); + +int netbsd32_mkdirat(struct lwp *, const struct netbsd32_mkdirat_args *, register_t *); + +int linux32_sys_mknodat(struct lwp *, const struct linux32_sys_mknodat_args *, register_t *); + +int linux32_sys_fchownat(struct lwp *, const struct linux32_sys_fchownat_args *, register_t *); + +int linux32_sys_fstatat64(struct lwp *, const struct linux32_sys_fstatat64_args *, register_t *); + +int linux32_sys_unlinkat(struct lwp *, const struct linux32_sys_unlinkat_args *, register_t *); + +int netbsd32_renameat(struct lwp *, const struct netbsd32_renameat_args *, register_t *); + +int linux32_sys_linkat(struct lwp *, const struct linux32_sys_linkat_args *, register_t *); + +int netbsd32_symlinkat(struct lwp *, const struct netbsd32_symlinkat_args *, register_t *); + +int netbsd32_readlinkat(struct lwp *, const struct netbsd32_readlinkat_args *, register_t *); + +int linux32_sys_fchmodat(struct lwp *, const struct linux32_sys_fchmodat_args *, register_t *); + +int linux32_sys_faccessat(struct lwp *, const struct linux32_sys_faccessat_args *, register_t *); + +int linux32_sys_ppoll(struct lwp *, const struct linux32_sys_ppoll_args *, register_t *); + +int netbsd32___futex_set_robust_list(struct lwp *, const struct netbsd32___futex_set_robust_list_args *, register_t *); + +int netbsd32___futex_get_robust_list(struct lwp *, const struct netbsd32___futex_get_robust_list_args *, register_t *); + +int linux32_sys_utimensat(struct lwp *, const struct linux32_sys_utimensat_args *, register_t *); + +int linux_sys_timerfd_create(struct lwp *, const struct linux_sys_timerfd_create_args *, register_t *); + +int linux32_sys_eventfd(struct lwp *, const struct linux32_sys_eventfd_args *, register_t *); + +int linux32_sys_fallocate(struct lwp *, const struct linux32_sys_fallocate_args *, register_t *); + +int linux32_sys_timerfd_settime(struct lwp *, const struct linux32_sys_timerfd_settime_args *, register_t *); + +int linux32_sys_timerfd_gettime(struct lwp *, const struct linux32_sys_timerfd_gettime_args *, register_t *); + +int linux32_sys_eventfd2(struct lwp *, const struct linux32_sys_eventfd2_args *, register_t *); + +int linux32_sys_dup3(struct lwp *, const struct linux32_sys_dup3_args *, register_t *); + +int linux32_sys_pipe2(struct lwp *, const struct linux32_sys_pipe2_args *, register_t *); + +int linux32_sys_preadv(struct lwp *, const struct linux32_sys_preadv_args *, register_t *); + +int linux32_sys_pwritev(struct lwp *, const struct linux32_sys_pwritev_args *, register_t *); + +int netbsd32_getrandom(struct lwp *, const struct netbsd32_getrandom_args *, register_t *); + +int linux32_sys_statx(struct lwp *, const struct linux32_sys_statx_args *, register_t *); + +int linux32_sys_set_tls(struct lwp *, const struct linux32_sys_set_tls_args *, register_t *); + +int linux32_sys_get_tls(struct lwp *, const void *, register_t *); + +#endif /* _LINUX32_SYS_SYSCALLARGS_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_syscalls.c b/sys/compat/linux32/arch/aarch64/linux32_syscalls.c new file mode 100644 index 00000000000..53b9d50b3b9 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_syscalls.c @@ -0,0 +1,1070 @@ +/* $NetBSD: linux32_syscalls.c,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/* + * System call names. + * + * DO NOT EDIT-- this file is automatically generated. + * created from NetBSD + */ + +#include <sys/cdefs.h> +__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.1 2021/11/25 03:08:04 ryo Exp $"); + +#if defined(_KERNEL_OPT) +#include <sys/param.h> +#include <sys/syscallargs.h> +#include <machine/netbsd32_machdep.h> +#include <compat/netbsd32/netbsd32.h> +#include <compat/netbsd32/netbsd32_syscallargs.h> +#include <compat/linux/common/linux_types.h> +#include <compat/linux/common/linux_mmap.h> +#include <compat/linux/common/linux_signal.h> +#include <compat/linux/common/linux_siginfo.h> +#include <compat/linux/common/linux_machdep.h> +#include <compat/linux/common/linux_ipc.h> +#include <compat/linux/common/linux_sem.h> +#include <compat/linux/linux_syscallargs.h> +#include <compat/linux32/common/linux32_types.h> +#include <compat/linux32/common/linux32_signal.h> +#include <compat/linux32/common/linux32_socketcall.h> +#include <compat/linux32/arch/aarch64/linux32_missing.h> +#include <compat/linux32/linux32_syscallargs.h> +#else /* _KERNEL_OPT */ +#include <sys/null.h> +#endif /* _KERNEL_OPT */ + +const char *const linux32_syscallnames[] = { + /* 0 */ "syscall", + /* 1 */ "exit", + /* 2 */ "fork", + /* 3 */ "netbsd32_read", + /* 4 */ "netbsd32_write", + /* 5 */ "open", + /* 6 */ "netbsd32_close", + /* 7 */ "waitpid", + /* 8 */ "creat", + /* 9 */ "netbsd32_link", + /* 10 */ "unlink", + /* 11 */ "netbsd32_execve", + /* 12 */ "netbsd32_chdir", + /* 13 */ "time", + /* 14 */ "mknod", + /* 15 */ "netbsd32_chmod", + /* 16 */ "lchown16", + /* 17 */ "#17 (obsolete break)", + /* 18 */ "#18 (obsolete ostat)", + /* 19 */ "compat_43_netbsd32_olseek", + /* 20 */ "getpid", + /* 21 */ "#21 (unimplemented mount)", + /* 22 */ "#22 (unimplemented umount)", + /* 23 */ "linux_setuid16", + /* 24 */ "linux_getuid16", + /* 25 */ "stime", + /* 26 */ "ptrace", + /* 27 */ "alarm", + /* 28 */ "#28 (obsolete ofstat)", + /* 29 */ "pause", + /* 30 */ "utime", + /* 31 */ "#31 (obsolete stty)", + /* 32 */ "#32 (obsolete gtty)", + /* 33 */ "netbsd32_access", + /* 34 */ "nice", + /* 35 */ "#35 (obsolete ftime)", + /* 36 */ "sync", + /* 37 */ "kill", + /* 38 */ "netbsd32___posix_rename", + /* 39 */ "netbsd32_mkdir", + /* 40 */ "netbsd32_rmdir", + /* 41 */ "netbsd32_dup", + /* 42 */ "pipe", + /* 43 */ "times", + /* 44 */ "#44 (obsolete prof)", + /* 45 */ "brk", + /* 46 */ "linux_setgid16", + /* 47 */ "linux_getgid16", + /* 48 */ "signal", + /* 49 */ "linux_geteuid16", + /* 50 */ "linux_getegid16", + /* 51 */ "netbsd32_acct", + /* 52 */ "#52 (obsolete phys)", + /* 53 */ "#53 (obsolete lock)", + /* 54 */ "ioctl", + /* 55 */ "fcntl", + /* 56 */ "#56 (obsolete mpx)", + /* 57 */ "netbsd32_setpgid", + /* 58 */ "#58 (obsolete ulimit)", + /* 59 */ "oldolduname", + /* 60 */ "netbsd32_umask", + /* 61 */ "netbsd32_chroot", + /* 62 */ "#62 (unimplemented ustat)", + /* 63 */ "netbsd32_dup2", + /* 64 */ "getppid", + /* 65 */ "getpgrp", + /* 66 */ "setsid", + /* 67 */ "#67 (unimplemented sigaction)", + /* 68 */ "siggetmask", + /* 69 */ "sigsetmask", + /* 70 */ "setreuid16", + /* 71 */ "setregid16", + /* 72 */ "#72 (unimplemented sigsuspend)", + /* 73 */ "#73 (unimplemented sigpending)", + /* 74 */ "compat_43_netbsd32_osethostname", + /* 75 */ "setrlimit", + /* 76 */ "getrlimit", + /* 77 */ "compat_50_netbsd32_getrusage", + /* 78 */ "gettimeofday", + /* 79 */ "settimeofday", + /* 80 */ "getgroups16", + /* 81 */ "setgroups16", + /* 82 */ "oldselect", + /* 83 */ "netbsd32_symlink", + /* 84 */ "compat_43_netbsd32_lstat43", + /* 85 */ "netbsd32_readlink", + /* 86 */ "#86 (unimplemented uselib)", + /* 87 */ "swapon", + /* 88 */ "reboot", + /* 89 */ "readdir", + /* 90 */ "old_mmap", + /* 91 */ "netbsd32_munmap", + /* 92 */ "compat_43_netbsd32_otruncate", + /* 93 */ "compat_43_netbsd32_oftruncate", + /* 94 */ "netbsd32_fchmod", + /* 95 */ "fchown16", + /* 96 */ "getpriority", + /* 97 */ "netbsd32_setpriority", + /* 98 */ "netbsd32_profil", + /* 99 */ "statfs", + /* 100 */ "fstatfs", + /* 101 */ "#101 (unimplemented ioperm)", + /* 102 */ "socketcall", + /* 103 */ "#103 (unimplemented syslog)", + /* 104 */ "compat_50_netbsd32_setitimer", + /* 105 */ "compat_50_netbsd32_getitimer", + /* 106 */ "stat", + /* 107 */ "lstat", + /* 108 */ "fstat", + /* 109 */ "olduname", + /* 110 */ "#110 (unimplemented iopl)", + /* 111 */ "#111 (unimplemented vhangup)", + /* 112 */ "#112 (unimplemented idle)", + /* 113 */ "#113 (unimplemented syscall)", + /* 114 */ "wait4", + /* 115 */ "swapoff", + /* 116 */ "sysinfo", + /* 117 */ "ipc", + /* 118 */ "netbsd32_fsync", + /* 119 */ "sigreturn", + /* 120 */ "clone", + /* 121 */ "setdomainname", + /* 122 */ "uname", + /* 123 */ "#123 (unimplemented modify_ldt)", + /* 124 */ "#124 (unimplemented adjtimex)", + /* 125 */ "mprotect", + /* 126 */ "#126 (unimplemented sigprocmask)", + /* 127 */ "#127 (unimplemented create_module)", + /* 128 */ "#128 (unimplemented init_module)", + /* 129 */ "#129 (unimplemented delete_module)", + /* 130 */ "#130 (unimplemented get_kernel_syms)", + /* 131 */ "#131 (unimplemented quotactl)", + /* 132 */ "netbsd32_getpgid", + /* 133 */ "netbsd32_fchdir", + /* 134 */ "#134 (unimplemented bdflush)", + /* 135 */ "#135 (unimplemented sysfs)", + /* 136 */ "personality", + /* 137 */ "#137 (unimplemented afs_syscall)", + /* 138 */ "setfsuid16", + /* 139 */ "setfsgid16", + /* 140 */ "llseek", + /* 141 */ "getdents", + /* 142 */ "select", + /* 143 */ "netbsd32_flock", + /* 144 */ "netbsd32___msync13", + /* 145 */ "netbsd32_readv", + /* 146 */ "netbsd32_writev", + /* 147 */ "netbsd32_getsid", + /* 148 */ "fdatasync", + /* 149 */ "__sysctl", + /* 150 */ "netbsd32_mlock", + /* 151 */ "netbsd32_munlock", + /* 152 */ "netbsd32_mlockall", + /* 153 */ "munlockall", + /* 154 */ "sched_setparam", + /* 155 */ "sched_getparam", + /* 156 */ "sched_setscheduler", + /* 157 */ "sched_getscheduler", + /* 158 */ "sched_yield", + /* 159 */ "sched_get_priority_max", + /* 160 */ "sched_get_priority_min", + /* 161 */ "#161 (unimplemented sched_rr_get_interval)", + /* 162 */ "nanosleep", + /* 163 */ "mremap", + /* 164 */ "setresuid16", + /* 165 */ "getresuid16", + /* 166 */ "#166 (unimplemented vm86)", + /* 167 */ "#167 (unimplemented query_module)", + /* 168 */ "netbsd32_poll", + /* 169 */ "#169 (unimplemented nfsservctl)", + /* 170 */ "setresgid16", + /* 171 */ "getresgid16", + /* 172 */ "#172 (unimplemented prctl)", + /* 173 */ "rt_sigreturn", + /* 174 */ "rt_sigaction", + /* 175 */ "rt_sigprocmask", + /* 176 */ "rt_sigpending", + /* 177 */ "rt_sigtimedwait", + /* 178 */ "rt_queueinfo", + /* 179 */ "rt_sigsuspend", + /* 180 */ "pread", + /* 181 */ "pwrite", + /* 182 */ "chown16", + /* 183 */ "netbsd32___getcwd", + /* 184 */ "#184 (unimplemented capget)", + /* 185 */ "#185 (unimplemented capset)", + /* 186 */ "#186 (unimplemented sigaltstack)", + /* 187 */ "#187 (unimplemented sendfile)", + /* 188 */ "#188 (unimplemented getpmsg)", + /* 189 */ "#189 (unimplemented putpmsg)", + /* 190 */ "__vfork14", + /* 191 */ "ugetrlimit", + /* 192 */ "mmap2", + /* 193 */ "truncate64", + /* 194 */ "ftruncate64", + /* 195 */ "stat64", + /* 196 */ "lstat64", + /* 197 */ "fstat64", + /* 198 */ "netbsd32___posix_lchown", + /* 199 */ "getuid", + /* 200 */ "getgid", + /* 201 */ "geteuid", + /* 202 */ "getegid", + /* 203 */ "netbsd32_setreuid", + /* 204 */ "netbsd32_setregid", + /* 205 */ "netbsd32_getgroups", + /* 206 */ "netbsd32_setgroups", + /* 207 */ "netbsd32___posix_fchown", + /* 208 */ "setresuid", + /* 209 */ "getresuid", + /* 210 */ "setresgid", + /* 211 */ "getresgid", + /* 212 */ "netbsd32___posix_chown", + /* 213 */ "netbsd32_setuid", + /* 214 */ "netbsd32_setgid", + /* 215 */ "setfsuid", + /* 216 */ "setfsgid", + /* 217 */ "getdents64", + /* 218 */ "#218 (unimplemented pivot_root)", + /* 219 */ "netbsd32_mincore", + /* 220 */ "netbsd32_madvise", +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args + /* 221 */ "fcntl64", + /* 222 */ "#222 (unimplemented / * unused * /)", + /* 223 */ "#223 (unimplemented / * unused * /)", + /* 224 */ "gettid", + /* 225 */ "#225 (unimplemented readahead)", + /* 226 */ "netbsd32_setxattr", + /* 227 */ "netbsd32_lsetxattr", + /* 228 */ "netbsd32_fsetxattr", + /* 229 */ "netbsd32_getxattr", + /* 230 */ "netbsd32_lgetxattr", + /* 231 */ "netbsd32_fgetxattr", + /* 232 */ "netbsd32_listxattr", + /* 233 */ "netbsd32_llistxattr", + /* 234 */ "netbsd32_flistxattr", + /* 235 */ "netbsd32_removexattr", + /* 236 */ "netbsd32_lremovexattr", + /* 237 */ "netbsd32_fremovexattr", + /* 238 */ "tkill", + /* 239 */ "#239 (unimplemented sendfile64)", + /* 240 */ "futex", + /* 241 */ "sched_setaffinity", + /* 242 */ "sched_getaffinity", + /* 243 */ "#243 (unimplemented io_setup)", + /* 244 */ "#244 (unimplemented io_destroy)", + /* 245 */ "#245 (unimplemented io_getevents)", + /* 246 */ "#246 (unimplemented io_submit)", + /* 247 */ "#247 (unimplemented io_cancel)", + /* 248 */ "exit_group", + /* 249 */ "#249 (unimplemented lookup_dcookie)", + /* 250 */ "#250 (unimplemented epoll_create)", + /* 251 */ "#251 (unimplemented epoll_ctl)", + /* 252 */ "#252 (unimplemented epoll_wait)", + /* 253 */ "#253 (unimplemented remap_file_pages)", + /* 254 */ "#254 (unimplemented set_thread_area)", + /* 255 */ "#255 (unimplemented get_thread_area)", + /* 256 */ "set_tid_address", + /* 257 */ "timer_create", + /* 258 */ "timer_settime", + /* 259 */ "timer_gettime", + /* 260 */ "timer_getoverrun", + /* 261 */ "timer_delete", + /* 262 */ "clock_settime", + /* 263 */ "clock_gettime", + /* 264 */ "clock_getres", + /* 265 */ "clock_nanosleep", + /* 266 */ "statfs64", + /* 267 */ "fstatfs64", + /* 268 */ "tgkill", + /* 269 */ "compat_50_netbsd32_utimes", + /* 270 */ "fadvise64_64", + /* 271 */ "#271 (unimplemented pciconfig_iobase)", + /* 272 */ "#272 (unimplemented pciconfig_read)", + /* 273 */ "#273 (unimplemented pciconfig_write)", + /* 274 */ "#274 (unimplemented mq_open)", + /* 275 */ "#275 (unimplemented mq_unlink)", + /* 276 */ "#276 (unimplemented mq_timedsend)", + /* 277 */ "#277 (unimplemented mq_timedreceive)", + /* 278 */ "#278 (unimplemented mq_notify)", + /* 279 */ "#279 (unimplemented mq_getsetattr)", + /* 280 */ "#280 (unimplemented waitid)", + /* 281 */ "socket", + /* 282 */ "bind", + /* 283 */ "connect", + /* 284 */ "#284 (unimplemented listen)", + /* 285 */ "accept", + /* 286 */ "getsockname", + /* 287 */ "getpeername", + /* 288 */ "socketpair", + /* 289 */ "send", + /* 290 */ "sendto", + /* 291 */ "recv", + /* 292 */ "recvfrom", + /* 293 */ "#293 (unimplemented shutdown)", + /* 294 */ "setsockopt", + /* 295 */ "getsockopt", + /* 296 */ "#296 (unimplemented sendmsg)", + /* 297 */ "#297 (unimplemented recvmsg)", + /* 298 */ "#298 (unimplemented semop)", + /* 299 */ "#299 (unimplemented semget)", + /* 300 */ "#300 (unimplemented semctl)", + /* 301 */ "#301 (unimplemented msgsnd)", + /* 302 */ "#302 (unimplemented msgrcv)", + /* 303 */ "#303 (unimplemented msgget)", + /* 304 */ "#304 (unimplemented msgctl)", + /* 305 */ "#305 (unimplemented shmat)", + /* 306 */ "#306 (unimplemented shmdt)", + /* 307 */ "#307 (unimplemented shmget)", + /* 308 */ "#308 (unimplemented shmctl)", + /* 309 */ "#309 (unimplemented add_key)", + /* 310 */ "#310 (unimplemented request_key)", + /* 311 */ "#311 (unimplemented keyctl)", + /* 312 */ "#312 (unimplemented semtimedop)", + /* 313 */ "#313 (unimplemented vserver)", + /* 314 */ "#314 (unimplemented ioptio_set)", + /* 315 */ "#315 (unimplemented ioptio_get)", + /* 316 */ "#316 (unimplemented inotify_init)", + /* 317 */ "#317 (unimplemented inotify_add_watch)", + /* 318 */ "#318 (unimplemented inotify_rm_watch)", + /* 319 */ "#319 (unimplemented mbind)", + /* 320 */ "#320 (unimplemented get_mempolicy)", + /* 321 */ "#321 (unimplemented set_mempolicy)", + /* 322 */ "openat", + /* 323 */ "netbsd32_mkdirat", + /* 324 */ "mknodat", + /* 325 */ "fchownat", + /* 326 */ "#326 (unimplemented futimesat)", + /* 327 */ "fstatat64", + /* 328 */ "unlinkat", + /* 329 */ "netbsd32_renameat", + /* 330 */ "linkat", + /* 331 */ "netbsd32_symlinkat", + /* 332 */ "netbsd32_readlinkat", + /* 333 */ "fchmodat", + /* 334 */ "faccessat", + /* 335 */ "#335 (unimplemented pselect6)", + /* 336 */ "ppoll", + /* 337 */ "#337 (unimplemented unshare)", + /* 338 */ "netbsd32___futex_set_robust_list", + /* 339 */ "netbsd32___futex_get_robust_list", + /* 340 */ "#340 (unimplemented splice)", + /* 341 */ "#341 (unimplemented sync_file_range)", + /* 342 */ "#342 (unimplemented tee)", + /* 343 */ "#343 (unimplemented vmsplice)", + /* 344 */ "#344 (unimplemented move_pages)", + /* 345 */ "#345 (unimplemented getcpu)", + /* 346 */ "#346 (unimplemented epoll_wait)", + /* 347 */ "#347 (unimplemented kexec_load)", + /* 348 */ "utimensat", + /* 349 */ "#349 (unimplemented signalfd)", + /* 350 */ "timerfd_create", + /* 351 */ "eventfd", + /* 352 */ "fallocate", + /* 353 */ "timerfd_settime", + /* 354 */ "timerfd_gettime", + /* 355 */ "#355 (unimplemented signalfd4)", + /* 356 */ "eventfd2", + /* 357 */ "#357 (unimplemented epoll_create1)", + /* 358 */ "dup3", + /* 359 */ "pipe2", + /* 360 */ "#360 (unimplemented inotify_init1)", + /* 361 */ "preadv", + /* 362 */ "pwritev", + /* 363 */ "#363 (unimplemented rt_tgsigqueueinfo)", + /* 364 */ "#364 (unimplemented perf_counter_open)", + /* 365 */ "#365 (unimplemented recvmmsg)", + /* 366 */ "#366 (unimplemented accept4)", + /* 367 */ "#367 (unimplemented fanotify_init)", + /* 368 */ "#368 (unimplemented fanotify_mark)", + /* 369 */ "#369 (unimplemented prlimit64)", + /* 370 */ "#370 (unimplemented name_to_handle_at)", + /* 371 */ "#371 (unimplemented open_by_handle_at)", + /* 372 */ "#372 (unimplemented clock_adjtime)", + /* 373 */ "#373 (unimplemented syncfs)", + /* 374 */ "#374 (unimplemented sendmmsg)", + /* 375 */ "#375 (unimplemented setns)", + /* 376 */ "#376 (unimplemented process_vm_readv)", + /* 377 */ "#377 (unimplemented process_vm_writev)", + /* 378 */ "#378 (unimplemented kcmp)", + /* 379 */ "#379 (unimplemented finit_module)", + /* 380 */ "#380 (unimplemented sched_setattr)", + /* 381 */ "#381 (unimplemented sched_getattr)", + /* 382 */ "#382 (unimplemented renameat2)", + /* 383 */ "#383 (unimplemented seccomp)", + /* 384 */ "netbsd32_getrandom", + /* 385 */ "#385 (unimplemented memfd_create)", + /* 386 */ "#386 (unimplemented bpf)", + /* 387 */ "#387 (unimplemented execveat)", + /* 388 */ "#388 (unimplemented userfaultfd)", + /* 389 */ "#389 (unimplemented membarrier)", + /* 390 */ "#390 (unimplemented mlock2)", + /* 391 */ "#391 (unimplemented copy_file_range)", + /* 392 */ "#392 (unimplemented preadv2)", + /* 393 */ "#393 (unimplemented pwritev2)", + /* 394 */ "#394 (unimplemented pkey_mprotect)", + /* 395 */ "#395 (unimplemented pkey_alloc)", + /* 396 */ "#396 (unimplemented pkey_free)", + /* 397 */ "statx", + /* 398 */ "#398 (unimplemented rseq)", + /* 399 */ "#399 (unimplemented io_pgetevents)", + /* 400 */ "#400 (unimplemented migrate_pages)", + /* 401 */ "#401 (unimplemented kexec_file_load)", + /* 402 */ "#402 (unimplemented / * unused * /)", + /* 403 */ "#403 (unimplemented clock_gettime64)", + /* 404 */ "#404 (unimplemented clock_settime64)", + /* 405 */ "#405 (unimplemented clock_adjtime64)", + /* 406 */ "#406 (unimplemented clock_getres_time64)", + /* 407 */ "#407 (unimplemented clock_nanosleep_time64)", + /* 408 */ "#408 (unimplemented timer_gettime64)", + /* 409 */ "#409 (unimplemented timer_settime64)", + /* 410 */ "#410 (unimplemented timerfd_gettime64)", + /* 411 */ "#411 (unimplemented timerfd_settime64)", + /* 412 */ "#412 (unimplemented utimensat_time64)", + /* 413 */ "#413 (unimplemented pselect6_time64)", + /* 414 */ "#414 (unimplemented ppoll_time64)", + /* 415 */ "#415 (unimplemented / * unused? * /)", + /* 416 */ "#416 (unimplemented io_pgetevents_time64)", + /* 417 */ "#417 (unimplemented recvmmsg_time64)", + /* 418 */ "#418 (unimplemented mq_timedsend_time64)", + /* 419 */ "#419 (unimplemented mq_timedreceive_time64)", + /* 420 */ "#420 (unimplemented semtimedop_time64)", + /* 421 */ "#421 (unimplemented rt_sigtimedwait_time64)", + /* 422 */ "#422 (unimplemented futex_time64)", + /* 423 */ "#423 (unimplemented sched_rr_get_interval_time64)", + /* 424 */ "#424 (unimplemented pidfd_send_signal)", + /* 425 */ "#425 (unimplemented io_uring_setup)", + /* 426 */ "#426 (unimplemented io_uring_enter)", + /* 427 */ "#427 (unimplemented io_uring_register)", + /* 428 */ "#428 (unimplemented open_tree)", + /* 429 */ "#429 (unimplemented move_mount)", + /* 430 */ "#430 (unimplemented fsopen)", + /* 431 */ "#431 (unimplemented fsconfig)", + /* 432 */ "#432 (unimplemented fsmount)", + /* 433 */ "#433 (unimplemented fspick)", + /* 434 */ "#434 (unimplemented pidfd_open)", + /* 435 */ "#435 (unimplemented clone3)", + /* 436 */ "#436 (unimplemented close_range)", + /* 437 */ "#437 (unimplemented openat2)", + /* 438 */ "#438 (unimplemented pidfd_getfd)", + /* 439 */ "#439 (unimplemented faccessat2)", + /* 440 */ "#440 (unimplemented process_madvise)", + /* 441 */ "#441 (unimplemented epoll_pwait2)", + /* 442 */ "#442 (unimplemented mount_setattr)", + /* 443 */ "#443 (unimplemented quotactl_fd)", + /* 444 */ "#444 (unimplemented landlock_create_ruleset)", + /* 445 */ "#445 (unimplemented landlock_add_rule)", + /* 446 */ "#446 (unimplemented landlock_restrict_self)", + /* 447 */ "#447 (unimplemented)", + /* 448 */ "#448 (unimplemented)", + /* 449 */ "#449 (unimplemented)", + /* 450 */ "#450 (unimplemented)", + /* 451 */ "#451 (unimplemented)", + /* 452 */ "#452 (unimplemented)", + /* 453 */ "#453 (unimplemented)", + /* 454 */ "#454 (unimplemented)", + /* 455 */ "#455 (unimplemented)", + /* 456 */ "#456 (unimplemented)", + /* 457 */ "#457 (unimplemented)", + /* 458 */ "#458 (unimplemented)", + /* 459 */ "#459 (unimplemented)", + /* 460 */ "#460 (unimplemented)", + /* 461 */ "#461 (unimplemented)", + /* 462 */ "#462 (unimplemented)", + /* 463 */ "#463 (unimplemented)", + /* 464 */ "#464 (unimplemented)", + /* 465 */ "#465 (unimplemented)", + /* 466 */ "#466 (unimplemented)", + /* 467 */ "#467 (unimplemented)", + /* 468 */ "#468 (unimplemented)", + /* 469 */ "#469 (unimplemented)", + /* 470 */ "#470 (unimplemented)", + /* 471 */ "#471 (unimplemented)", + /* 472 */ "#472 (unimplemented)", + /* 473 */ "#473 (unimplemented)", + /* 474 */ "#474 (unimplemented)", + /* 475 */ "#475 (unimplemented)", + /* 476 */ "#476 (unimplemented)", + /* 477 */ "#477 (unimplemented)", + /* 478 */ "#478 (unimplemented)", + /* 479 */ "#479 (unimplemented)", + /* 480 */ "#480 (unimplemented / * base. actually 0x0f0000 * /)", + /* 481 */ "#481 (unimplemented breakpoint)", + /* 482 */ "#482 (unimplemented cacheflush)", + /* 483 */ "#483 (unimplemented usr26)", + /* 484 */ "#484 (unimplemented usr32)", + /* 485 */ "set_tls", + /* 486 */ "get_tls", + /* 487 */ "# filler", + /* 488 */ "# filler", + /* 489 */ "# filler", + /* 490 */ "# filler", + /* 491 */ "# filler", + /* 492 */ "# filler", + /* 493 */ "# filler", + /* 494 */ "# filler", + /* 495 */ "# filler", + /* 496 */ "# filler", + /* 497 */ "# filler", + /* 498 */ "# filler", + /* 499 */ "# filler", + /* 500 */ "# filler", + /* 501 */ "# filler", + /* 502 */ "# filler", + /* 503 */ "# filler", + /* 504 */ "# filler", + /* 505 */ "# filler", + /* 506 */ "# filler", + /* 507 */ "# filler", + /* 508 */ "# filler", + /* 509 */ "# filler", + /* 510 */ "# filler", + /* 511 */ "# filler", +}; + + +/* libc style syscall names */ +const char *const altlinux32_syscallnames[] = { + /* 0 */ "nosys", + /* 1 */ NULL, /* exit */ + /* 2 */ NULL, /* fork */ + /* 3 */ "read", + /* 4 */ "write", + /* 5 */ NULL, /* open */ + /* 6 */ "close", + /* 7 */ NULL, /* waitpid */ + /* 8 */ NULL, /* creat */ + /* 9 */ "link", + /* 10 */ NULL, /* unlink */ + /* 11 */ "execve", + /* 12 */ "chdir", + /* 13 */ NULL, /* time */ + /* 14 */ NULL, /* mknod */ + /* 15 */ "chmod", + /* 16 */ NULL, /* lchown16 */ + /* 17 */ NULL, /* obsolete break */ + /* 18 */ NULL, /* obsolete ostat */ + /* 19 */ "olseek", + /* 20 */ NULL, /* getpid */ + /* 21 */ NULL, /* unimplemented mount */ + /* 22 */ NULL, /* unimplemented umount */ + /* 23 */ "setuid", + /* 24 */ "getuid", + /* 25 */ NULL, /* stime */ + /* 26 */ NULL, /* ptrace */ + /* 27 */ NULL, /* alarm */ + /* 28 */ NULL, /* obsolete ofstat */ + /* 29 */ NULL, /* pause */ + /* 30 */ NULL, /* utime */ + /* 31 */ NULL, /* obsolete stty */ + /* 32 */ NULL, /* obsolete gtty */ + /* 33 */ "access", + /* 34 */ NULL, /* nice */ + /* 35 */ NULL, /* obsolete ftime */ + /* 36 */ NULL, /* sync */ + /* 37 */ NULL, /* kill */ + /* 38 */ "__posix_rename", + /* 39 */ "mkdir", + /* 40 */ "rmdir", + /* 41 */ "dup", + /* 42 */ NULL, /* pipe */ + /* 43 */ NULL, /* times */ + /* 44 */ NULL, /* obsolete prof */ + /* 45 */ NULL, /* brk */ + /* 46 */ "setgid", + /* 47 */ "getgid", + /* 48 */ NULL, /* signal */ + /* 49 */ "geteuid", + /* 50 */ "getegid", + /* 51 */ "acct", + /* 52 */ NULL, /* obsolete phys */ + /* 53 */ NULL, /* obsolete lock */ + /* 54 */ NULL, /* ioctl */ + /* 55 */ NULL, /* fcntl */ + /* 56 */ NULL, /* obsolete mpx */ + /* 57 */ "setpgid", + /* 58 */ NULL, /* obsolete ulimit */ + /* 59 */ NULL, /* oldolduname */ + /* 60 */ "umask", + /* 61 */ "chroot", + /* 62 */ NULL, /* unimplemented ustat */ + /* 63 */ "dup2", + /* 64 */ NULL, /* getppid */ + /* 65 */ NULL, /* getpgrp */ + /* 66 */ NULL, /* setsid */ + /* 67 */ NULL, /* unimplemented sigaction */ + /* 68 */ NULL, /* siggetmask */ + /* 69 */ NULL, /* sigsetmask */ + /* 70 */ NULL, /* setreuid16 */ + /* 71 */ NULL, /* setregid16 */ + /* 72 */ NULL, /* unimplemented sigsuspend */ + /* 73 */ NULL, /* unimplemented sigpending */ + /* 74 */ "osethostname", + /* 75 */ NULL, /* setrlimit */ + /* 76 */ NULL, /* getrlimit */ + /* 77 */ "getrusage", + /* 78 */ NULL, /* gettimeofday */ + /* 79 */ NULL, /* settimeofday */ + /* 80 */ NULL, /* getgroups16 */ + /* 81 */ NULL, /* setgroups16 */ + /* 82 */ NULL, /* oldselect */ + /* 83 */ "symlink", + /* 84 */ "lstat43", + /* 85 */ "readlink", + /* 86 */ NULL, /* unimplemented uselib */ + /* 87 */ NULL, /* swapon */ + /* 88 */ NULL, /* reboot */ + /* 89 */ NULL, /* readdir */ + /* 90 */ NULL, /* old_mmap */ + /* 91 */ "munmap", + /* 92 */ "otruncate", + /* 93 */ "oftruncate", + /* 94 */ "fchmod", + /* 95 */ NULL, /* fchown16 */ + /* 96 */ NULL, /* getpriority */ + /* 97 */ "setpriority", + /* 98 */ "profil", + /* 99 */ NULL, /* statfs */ + /* 100 */ NULL, /* fstatfs */ + /* 101 */ NULL, /* unimplemented ioperm */ + /* 102 */ NULL, /* socketcall */ + /* 103 */ NULL, /* unimplemented syslog */ + /* 104 */ "setitimer", + /* 105 */ "getitimer", + /* 106 */ NULL, /* stat */ + /* 107 */ NULL, /* lstat */ + /* 108 */ NULL, /* fstat */ + /* 109 */ NULL, /* olduname */ + /* 110 */ NULL, /* unimplemented iopl */ + /* 111 */ NULL, /* unimplemented vhangup */ + /* 112 */ NULL, /* unimplemented idle */ + /* 113 */ NULL, /* unimplemented syscall */ + /* 114 */ NULL, /* wait4 */ + /* 115 */ NULL, /* swapoff */ + /* 116 */ NULL, /* sysinfo */ + /* 117 */ NULL, /* ipc */ + /* 118 */ "fsync", + /* 119 */ NULL, /* sigreturn */ + /* 120 */ NULL, /* clone */ + /* 121 */ NULL, /* setdomainname */ + /* 122 */ NULL, /* uname */ + /* 123 */ NULL, /* unimplemented modify_ldt */ + /* 124 */ NULL, /* unimplemented adjtimex */ + /* 125 */ NULL, /* mprotect */ + /* 126 */ NULL, /* unimplemented sigprocmask */ + /* 127 */ NULL, /* unimplemented create_module */ + /* 128 */ NULL, /* unimplemented init_module */ + /* 129 */ NULL, /* unimplemented delete_module */ + /* 130 */ NULL, /* unimplemented get_kernel_syms */ + /* 131 */ NULL, /* unimplemented quotactl */ + /* 132 */ "getpgid", + /* 133 */ "fchdir", + /* 134 */ NULL, /* unimplemented bdflush */ + /* 135 */ NULL, /* unimplemented sysfs */ + /* 136 */ NULL, /* personality */ + /* 137 */ NULL, /* unimplemented afs_syscall */ + /* 138 */ "setfsuid", + /* 139 */ "setfsgid", + /* 140 */ NULL, /* llseek */ + /* 141 */ NULL, /* getdents */ + /* 142 */ NULL, /* select */ + /* 143 */ "flock", + /* 144 */ "msync", + /* 145 */ "readv", + /* 146 */ "writev", + /* 147 */ "getsid", + /* 148 */ NULL, /* fdatasync */ + /* 149 */ NULL, /* __sysctl */ + /* 150 */ "mlock", + /* 151 */ "munlock", + /* 152 */ "mlockall", + /* 153 */ NULL, /* munlockall */ + /* 154 */ NULL, /* sched_setparam */ + /* 155 */ NULL, /* sched_getparam */ + /* 156 */ NULL, /* sched_setscheduler */ + /* 157 */ NULL, /* sched_getscheduler */ + /* 158 */ NULL, /* sched_yield */ + /* 159 */ NULL, /* sched_get_priority_max */ + /* 160 */ NULL, /* sched_get_priority_min */ + /* 161 */ NULL, /* unimplemented sched_rr_get_interval */ + /* 162 */ NULL, /* nanosleep */ + /* 163 */ NULL, /* mremap */ + /* 164 */ NULL, /* setresuid16 */ + /* 165 */ NULL, /* getresuid16 */ + /* 166 */ NULL, /* unimplemented vm86 */ + /* 167 */ NULL, /* unimplemented query_module */ + /* 168 */ "poll", + /* 169 */ NULL, /* unimplemented nfsservctl */ + /* 170 */ NULL, /* setresgid16 */ + /* 171 */ NULL, /* getresgid16 */ + /* 172 */ NULL, /* unimplemented prctl */ + /* 173 */ NULL, /* rt_sigreturn */ + /* 174 */ NULL, /* rt_sigaction */ + /* 175 */ NULL, /* rt_sigprocmask */ + /* 176 */ NULL, /* rt_sigpending */ + /* 177 */ NULL, /* rt_sigtimedwait */ + /* 178 */ NULL, /* rt_queueinfo */ + /* 179 */ NULL, /* rt_sigsuspend */ + /* 180 */ NULL, /* pread */ + /* 181 */ NULL, /* pwrite */ + /* 182 */ NULL, /* chown16 */ + /* 183 */ "__getcwd", + /* 184 */ NULL, /* unimplemented capget */ + /* 185 */ NULL, /* unimplemented capset */ + /* 186 */ NULL, /* unimplemented sigaltstack */ + /* 187 */ NULL, /* unimplemented sendfile */ + /* 188 */ NULL, /* unimplemented getpmsg */ + /* 189 */ NULL, /* unimplemented putpmsg */ + /* 190 */ "vfork", + /* 191 */ NULL, /* ugetrlimit */ + /* 192 */ NULL, /* mmap2 */ + /* 193 */ NULL, /* truncate64 */ + /* 194 */ NULL, /* ftruncate64 */ + /* 195 */ NULL, /* stat64 */ + /* 196 */ NULL, /* lstat64 */ + /* 197 */ NULL, /* fstat64 */ + /* 198 */ "__posix_lchown", + /* 199 */ NULL, /* getuid */ + /* 200 */ NULL, /* getgid */ + /* 201 */ NULL, /* geteuid */ + /* 202 */ NULL, /* getegid */ + /* 203 */ "setreuid", + /* 204 */ "setregid", + /* 205 */ "getgroups", + /* 206 */ "setgroups", + /* 207 */ "__posix_fchown", + /* 208 */ NULL, /* setresuid */ + /* 209 */ NULL, /* getresuid */ + /* 210 */ NULL, /* setresgid */ + /* 211 */ NULL, /* getresgid */ + /* 212 */ "__posix_chown", + /* 213 */ "setuid", + /* 214 */ "setgid", + /* 215 */ NULL, /* setfsuid */ + /* 216 */ NULL, /* setfsgid */ + /* 217 */ NULL, /* getdents64 */ + /* 218 */ NULL, /* unimplemented pivot_root */ + /* 219 */ "mincore", + /* 220 */ "madvise", +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args + /* 221 */ NULL, /* fcntl64 */ + /* 222 */ NULL, /* unimplemented / * unused * / */ + /* 223 */ NULL, /* unimplemented / * unused * / */ + /* 224 */ NULL, /* gettid */ + /* 225 */ NULL, /* unimplemented readahead */ + /* 226 */ "setxattr", + /* 227 */ "lsetxattr", + /* 228 */ "fsetxattr", + /* 229 */ "getxattr", + /* 230 */ "lgetxattr", + /* 231 */ "fgetxattr", + /* 232 */ "listxattr", + /* 233 */ "llistxattr", + /* 234 */ "flistxattr", + /* 235 */ "removexattr", + /* 236 */ "lremovexattr", + /* 237 */ "fremovexattr", + /* 238 */ NULL, /* tkill */ + /* 239 */ NULL, /* unimplemented sendfile64 */ + /* 240 */ NULL, /* futex */ + /* 241 */ NULL, /* sched_setaffinity */ + /* 242 */ NULL, /* sched_getaffinity */ + /* 243 */ NULL, /* unimplemented io_setup */ + /* 244 */ NULL, /* unimplemented io_destroy */ + /* 245 */ NULL, /* unimplemented io_getevents */ + /* 246 */ NULL, /* unimplemented io_submit */ + /* 247 */ NULL, /* unimplemented io_cancel */ + /* 248 */ NULL, /* exit_group */ + /* 249 */ NULL, /* unimplemented lookup_dcookie */ + /* 250 */ NULL, /* unimplemented epoll_create */ + /* 251 */ NULL, /* unimplemented epoll_ctl */ + /* 252 */ NULL, /* unimplemented epoll_wait */ + /* 253 */ NULL, /* unimplemented remap_file_pages */ + /* 254 */ NULL, /* unimplemented set_thread_area */ + /* 255 */ NULL, /* unimplemented get_thread_area */ + /* 256 */ NULL, /* set_tid_address */ + /* 257 */ NULL, /* timer_create */ + /* 258 */ NULL, /* timer_settime */ + /* 259 */ NULL, /* timer_gettime */ + /* 260 */ NULL, /* timer_getoverrun */ + /* 261 */ NULL, /* timer_delete */ + /* 262 */ NULL, /* clock_settime */ + /* 263 */ NULL, /* clock_gettime */ + /* 264 */ NULL, /* clock_getres */ + /* 265 */ NULL, /* clock_nanosleep */ + /* 266 */ NULL, /* statfs64 */ + /* 267 */ NULL, /* fstatfs64 */ + /* 268 */ NULL, /* tgkill */ + /* 269 */ "utimes", + /* 270 */ NULL, /* fadvise64_64 */ + /* 271 */ NULL, /* unimplemented pciconfig_iobase */ + /* 272 */ NULL, /* unimplemented pciconfig_read */ + /* 273 */ NULL, /* unimplemented pciconfig_write */ + /* 274 */ NULL, /* unimplemented mq_open */ + /* 275 */ NULL, /* unimplemented mq_unlink */ + /* 276 */ NULL, /* unimplemented mq_timedsend */ + /* 277 */ NULL, /* unimplemented mq_timedreceive */ + /* 278 */ NULL, /* unimplemented mq_notify */ + /* 279 */ NULL, /* unimplemented mq_getsetattr */ + /* 280 */ NULL, /* unimplemented waitid */ + /* 281 */ NULL, /* socket */ + /* 282 */ NULL, /* bind */ + /* 283 */ NULL, /* connect */ + /* 284 */ NULL, /* unimplemented listen */ + /* 285 */ NULL, /* accept */ + /* 286 */ NULL, /* getsockname */ + /* 287 */ NULL, /* getpeername */ + /* 288 */ NULL, /* socketpair */ + /* 289 */ NULL, /* send */ + /* 290 */ NULL, /* sendto */ + /* 291 */ NULL, /* recv */ + /* 292 */ NULL, /* recvfrom */ + /* 293 */ NULL, /* unimplemented shutdown */ + /* 294 */ NULL, /* setsockopt */ + /* 295 */ NULL, /* getsockopt */ + /* 296 */ NULL, /* unimplemented sendmsg */ + /* 297 */ NULL, /* unimplemented recvmsg */ + /* 298 */ NULL, /* unimplemented semop */ + /* 299 */ NULL, /* unimplemented semget */ + /* 300 */ NULL, /* unimplemented semctl */ + /* 301 */ NULL, /* unimplemented msgsnd */ + /* 302 */ NULL, /* unimplemented msgrcv */ + /* 303 */ NULL, /* unimplemented msgget */ + /* 304 */ NULL, /* unimplemented msgctl */ + /* 305 */ NULL, /* unimplemented shmat */ + /* 306 */ NULL, /* unimplemented shmdt */ + /* 307 */ NULL, /* unimplemented shmget */ + /* 308 */ NULL, /* unimplemented shmctl */ + /* 309 */ NULL, /* unimplemented add_key */ + /* 310 */ NULL, /* unimplemented request_key */ + /* 311 */ NULL, /* unimplemented keyctl */ + /* 312 */ NULL, /* unimplemented semtimedop */ + /* 313 */ NULL, /* unimplemented vserver */ + /* 314 */ NULL, /* unimplemented ioptio_set */ + /* 315 */ NULL, /* unimplemented ioptio_get */ + /* 316 */ NULL, /* unimplemented inotify_init */ + /* 317 */ NULL, /* unimplemented inotify_add_watch */ + /* 318 */ NULL, /* unimplemented inotify_rm_watch */ + /* 319 */ NULL, /* unimplemented mbind */ + /* 320 */ NULL, /* unimplemented get_mempolicy */ + /* 321 */ NULL, /* unimplemented set_mempolicy */ + /* 322 */ NULL, /* openat */ + /* 323 */ "mkdirat", + /* 324 */ NULL, /* mknodat */ + /* 325 */ NULL, /* fchownat */ + /* 326 */ NULL, /* unimplemented futimesat */ + /* 327 */ NULL, /* fstatat64 */ + /* 328 */ NULL, /* unlinkat */ + /* 329 */ "renameat", + /* 330 */ NULL, /* linkat */ + /* 331 */ "symlinkat", + /* 332 */ "readlinkat", + /* 333 */ NULL, /* fchmodat */ + /* 334 */ NULL, /* faccessat */ + /* 335 */ NULL, /* unimplemented pselect6 */ + /* 336 */ NULL, /* ppoll */ + /* 337 */ NULL, /* unimplemented unshare */ + /* 338 */ "__futex_set_robust_list", + /* 339 */ "__futex_get_robust_list", + /* 340 */ NULL, /* unimplemented splice */ + /* 341 */ NULL, /* unimplemented sync_file_range */ + /* 342 */ NULL, /* unimplemented tee */ + /* 343 */ NULL, /* unimplemented vmsplice */ + /* 344 */ NULL, /* unimplemented move_pages */ + /* 345 */ NULL, /* unimplemented getcpu */ + /* 346 */ NULL, /* unimplemented epoll_wait */ + /* 347 */ NULL, /* unimplemented kexec_load */ + /* 348 */ NULL, /* utimensat */ + /* 349 */ NULL, /* unimplemented signalfd */ + /* 350 */ NULL, /* timerfd_create */ + /* 351 */ NULL, /* eventfd */ + /* 352 */ NULL, /* fallocate */ + /* 353 */ NULL, /* timerfd_settime */ + /* 354 */ NULL, /* timerfd_gettime */ + /* 355 */ NULL, /* unimplemented signalfd4 */ + /* 356 */ NULL, /* eventfd2 */ + /* 357 */ NULL, /* unimplemented epoll_create1 */ + /* 358 */ NULL, /* dup3 */ + /* 359 */ NULL, /* pipe2 */ + /* 360 */ NULL, /* unimplemented inotify_init1 */ + /* 361 */ NULL, /* preadv */ + /* 362 */ NULL, /* pwritev */ + /* 363 */ NULL, /* unimplemented rt_tgsigqueueinfo */ + /* 364 */ NULL, /* unimplemented perf_counter_open */ + /* 365 */ NULL, /* unimplemented recvmmsg */ + /* 366 */ NULL, /* unimplemented accept4 */ + /* 367 */ NULL, /* unimplemented fanotify_init */ + /* 368 */ NULL, /* unimplemented fanotify_mark */ + /* 369 */ NULL, /* unimplemented prlimit64 */ + /* 370 */ NULL, /* unimplemented name_to_handle_at */ + /* 371 */ NULL, /* unimplemented open_by_handle_at */ + /* 372 */ NULL, /* unimplemented clock_adjtime */ + /* 373 */ NULL, /* unimplemented syncfs */ + /* 374 */ NULL, /* unimplemented sendmmsg */ + /* 375 */ NULL, /* unimplemented setns */ + /* 376 */ NULL, /* unimplemented process_vm_readv */ + /* 377 */ NULL, /* unimplemented process_vm_writev */ + /* 378 */ NULL, /* unimplemented kcmp */ + /* 379 */ NULL, /* unimplemented finit_module */ + /* 380 */ NULL, /* unimplemented sched_setattr */ + /* 381 */ NULL, /* unimplemented sched_getattr */ + /* 382 */ NULL, /* unimplemented renameat2 */ + /* 383 */ NULL, /* unimplemented seccomp */ + /* 384 */ "getrandom", + /* 385 */ NULL, /* unimplemented memfd_create */ + /* 386 */ NULL, /* unimplemented bpf */ + /* 387 */ NULL, /* unimplemented execveat */ + /* 388 */ NULL, /* unimplemented userfaultfd */ + /* 389 */ NULL, /* unimplemented membarrier */ + /* 390 */ NULL, /* unimplemented mlock2 */ + /* 391 */ NULL, /* unimplemented copy_file_range */ + /* 392 */ NULL, /* unimplemented preadv2 */ + /* 393 */ NULL, /* unimplemented pwritev2 */ + /* 394 */ NULL, /* unimplemented pkey_mprotect */ + /* 395 */ NULL, /* unimplemented pkey_alloc */ + /* 396 */ NULL, /* unimplemented pkey_free */ + /* 397 */ NULL, /* statx */ + /* 398 */ NULL, /* unimplemented rseq */ + /* 399 */ NULL, /* unimplemented io_pgetevents */ + /* 400 */ NULL, /* unimplemented migrate_pages */ + /* 401 */ NULL, /* unimplemented kexec_file_load */ + /* 402 */ NULL, /* unimplemented / * unused * / */ + /* 403 */ NULL, /* unimplemented clock_gettime64 */ + /* 404 */ NULL, /* unimplemented clock_settime64 */ + /* 405 */ NULL, /* unimplemented clock_adjtime64 */ + /* 406 */ NULL, /* unimplemented clock_getres_time64 */ + /* 407 */ NULL, /* unimplemented clock_nanosleep_time64 */ + /* 408 */ NULL, /* unimplemented timer_gettime64 */ + /* 409 */ NULL, /* unimplemented timer_settime64 */ + /* 410 */ NULL, /* unimplemented timerfd_gettime64 */ + /* 411 */ NULL, /* unimplemented timerfd_settime64 */ + /* 412 */ NULL, /* unimplemented utimensat_time64 */ + /* 413 */ NULL, /* unimplemented pselect6_time64 */ + /* 414 */ NULL, /* unimplemented ppoll_time64 */ + /* 415 */ NULL, /* unimplemented / * unused? * / */ + /* 416 */ NULL, /* unimplemented io_pgetevents_time64 */ + /* 417 */ NULL, /* unimplemented recvmmsg_time64 */ + /* 418 */ NULL, /* unimplemented mq_timedsend_time64 */ + /* 419 */ NULL, /* unimplemented mq_timedreceive_time64 */ + /* 420 */ NULL, /* unimplemented semtimedop_time64 */ + /* 421 */ NULL, /* unimplemented rt_sigtimedwait_time64 */ + /* 422 */ NULL, /* unimplemented futex_time64 */ + /* 423 */ NULL, /* unimplemented sched_rr_get_interval_time64 */ + /* 424 */ NULL, /* unimplemented pidfd_send_signal */ + /* 425 */ NULL, /* unimplemented io_uring_setup */ + /* 426 */ NULL, /* unimplemented io_uring_enter */ + /* 427 */ NULL, /* unimplemented io_uring_register */ + /* 428 */ NULL, /* unimplemented open_tree */ + /* 429 */ NULL, /* unimplemented move_mount */ + /* 430 */ NULL, /* unimplemented fsopen */ + /* 431 */ NULL, /* unimplemented fsconfig */ + /* 432 */ NULL, /* unimplemented fsmount */ + /* 433 */ NULL, /* unimplemented fspick */ + /* 434 */ NULL, /* unimplemented pidfd_open */ + /* 435 */ NULL, /* unimplemented clone3 */ + /* 436 */ NULL, /* unimplemented close_range */ + /* 437 */ NULL, /* unimplemented openat2 */ + /* 438 */ NULL, /* unimplemented pidfd_getfd */ + /* 439 */ NULL, /* unimplemented faccessat2 */ + /* 440 */ NULL, /* unimplemented process_madvise */ + /* 441 */ NULL, /* unimplemented epoll_pwait2 */ + /* 442 */ NULL, /* unimplemented mount_setattr */ + /* 443 */ NULL, /* unimplemented quotactl_fd */ + /* 444 */ NULL, /* unimplemented landlock_create_ruleset */ + /* 445 */ NULL, /* unimplemented landlock_add_rule */ + /* 446 */ NULL, /* unimplemented landlock_restrict_self */ + /* 447 */ NULL, /* unimplemented */ + /* 448 */ NULL, /* unimplemented */ + /* 449 */ NULL, /* unimplemented */ + /* 450 */ NULL, /* unimplemented */ + /* 451 */ NULL, /* unimplemented */ + /* 452 */ NULL, /* unimplemented */ + /* 453 */ NULL, /* unimplemented */ + /* 454 */ NULL, /* unimplemented */ + /* 455 */ NULL, /* unimplemented */ + /* 456 */ NULL, /* unimplemented */ + /* 457 */ NULL, /* unimplemented */ + /* 458 */ NULL, /* unimplemented */ + /* 459 */ NULL, /* unimplemented */ + /* 460 */ NULL, /* unimplemented */ + /* 461 */ NULL, /* unimplemented */ + /* 462 */ NULL, /* unimplemented */ + /* 463 */ NULL, /* unimplemented */ + /* 464 */ NULL, /* unimplemented */ + /* 465 */ NULL, /* unimplemented */ + /* 466 */ NULL, /* unimplemented */ + /* 467 */ NULL, /* unimplemented */ + /* 468 */ NULL, /* unimplemented */ + /* 469 */ NULL, /* unimplemented */ + /* 470 */ NULL, /* unimplemented */ + /* 471 */ NULL, /* unimplemented */ + /* 472 */ NULL, /* unimplemented */ + /* 473 */ NULL, /* unimplemented */ + /* 474 */ NULL, /* unimplemented */ + /* 475 */ NULL, /* unimplemented */ + /* 476 */ NULL, /* unimplemented */ + /* 477 */ NULL, /* unimplemented */ + /* 478 */ NULL, /* unimplemented */ + /* 479 */ NULL, /* unimplemented */ + /* 480 */ NULL, /* unimplemented / * base. actually 0x0f0000 * / */ + /* 481 */ NULL, /* unimplemented breakpoint */ + /* 482 */ NULL, /* unimplemented cacheflush */ + /* 483 */ NULL, /* unimplemented usr26 */ + /* 484 */ NULL, /* unimplemented usr32 */ + /* 485 */ NULL, /* set_tls */ + /* 486 */ NULL, /* get_tls */ + /* 487 */ NULL, /* filler */ + /* 488 */ NULL, /* filler */ + /* 489 */ NULL, /* filler */ + /* 490 */ NULL, /* filler */ + /* 491 */ NULL, /* filler */ + /* 492 */ NULL, /* filler */ + /* 493 */ NULL, /* filler */ + /* 494 */ NULL, /* filler */ + /* 495 */ NULL, /* filler */ + /* 496 */ NULL, /* filler */ + /* 497 */ NULL, /* filler */ + /* 498 */ NULL, /* filler */ + /* 499 */ NULL, /* filler */ + /* 500 */ NULL, /* filler */ + /* 501 */ NULL, /* filler */ + /* 502 */ NULL, /* filler */ + /* 503 */ NULL, /* filler */ + /* 504 */ NULL, /* filler */ + /* 505 */ NULL, /* filler */ + /* 506 */ NULL, /* filler */ + /* 507 */ NULL, /* filler */ + /* 508 */ NULL, /* filler */ + /* 509 */ NULL, /* filler */ + /* 510 */ NULL, /* filler */ + /* 511 */ NULL, /* filler */ +}; diff --git a/sys/compat/linux32/arch/aarch64/linux32_sysent.c b/sys/compat/linux32/arch/aarch64/linux32_sysent.c new file mode 100644 index 00000000000..4786e9ae980 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_sysent.c @@ -0,0 +1,1831 @@ +/* $NetBSD: linux32_sysent.c,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/* + * System call switch table. + * + * DO NOT EDIT-- this file is automatically generated. + * created from NetBSD + */ + +#include <sys/cdefs.h> +__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.1 2021/11/25 03:08:04 ryo Exp $"); + +#include <sys/param.h> +#include <sys/syscallargs.h> +#include <machine/netbsd32_machdep.h> +#include <compat/netbsd32/netbsd32.h> +#include <compat/netbsd32/netbsd32_syscallargs.h> +#include <compat/linux/common/linux_types.h> +#include <compat/linux/common/linux_mmap.h> +#include <compat/linux/common/linux_signal.h> +#include <compat/linux/common/linux_siginfo.h> +#include <compat/linux/common/linux_machdep.h> +#include <compat/linux/common/linux_ipc.h> +#include <compat/linux/common/linux_sem.h> +#include <compat/linux/linux_syscallargs.h> +#include <compat/linux32/common/linux32_types.h> +#include <compat/linux32/common/linux32_signal.h> +#include <compat/linux32/common/linux32_socketcall.h> +#include <compat/linux32/arch/aarch64/linux32_missing.h> +#include <compat/linux32/linux32_syscallargs.h> + +#define s(type) sizeof(type) +#define n(type) (sizeof(type)/sizeof (register32_t)) +#define ns(type) .sy_narg = n(type), .sy_argsize = s(type) + +struct sysent linux32_sysent[] = { + { + .sy_call = (sy_call_t *)linux_sys_nosys + }, /* 0 = syscall */ + { + ns(struct linux32_sys_exit_args), + .sy_call = (sy_call_t *)linux32_sys_exit + }, /* 1 = exit */ + { + .sy_call = (sy_call_t *)sys_fork + }, /* 2 = fork */ + { + ns(struct netbsd32_read_args), + .sy_call = (sy_call_t *)netbsd32_read + }, /* 3 = netbsd32_read */ + { + ns(struct netbsd32_write_args), + .sy_call = (sy_call_t *)netbsd32_write + }, /* 4 = netbsd32_write */ + { + ns(struct linux32_sys_open_args), + .sy_call = (sy_call_t *)linux32_sys_open + }, /* 5 = open */ + { + ns(struct netbsd32_close_args), + .sy_call = (sy_call_t *)netbsd32_close + }, /* 6 = netbsd32_close */ + { + ns(struct linux32_sys_waitpid_args), + .sy_call = (sy_call_t *)linux32_sys_waitpid + }, /* 7 = waitpid */ + { + ns(struct linux32_sys_creat_args), + .sy_call = (sy_call_t *)linux32_sys_creat + }, /* 8 = creat */ + { + ns(struct netbsd32_link_args), + .sy_call = (sy_call_t *)netbsd32_link + }, /* 9 = netbsd32_link */ + { + ns(struct linux32_sys_unlink_args), + .sy_call = (sy_call_t *)linux32_sys_unlink + }, /* 10 = unlink */ + { + ns(struct netbsd32_execve_args), + .sy_call = (sy_call_t *)netbsd32_execve + }, /* 11 = netbsd32_execve */ + { + ns(struct netbsd32_chdir_args), + .sy_call = (sy_call_t *)netbsd32_chdir + }, /* 12 = netbsd32_chdir */ + { + ns(struct linux32_sys_time_args), + .sy_call = (sy_call_t *)linux32_sys_time + }, /* 13 = time */ + { + ns(struct linux32_sys_mknod_args), + .sy_call = (sy_call_t *)linux32_sys_mknod + }, /* 14 = mknod */ + { + ns(struct netbsd32_chmod_args), + .sy_call = (sy_call_t *)netbsd32_chmod + }, /* 15 = netbsd32_chmod */ + { + ns(struct linux32_sys_lchown16_args), + .sy_call = (sy_call_t *)linux32_sys_lchown16 + }, /* 16 = lchown16 */ + { + .sy_call = linux_sys_nosys, + }, /* 17 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 18 = filler */ + { + ns(struct compat_43_netbsd32_olseek_args), + .sy_call = (sy_call_t *)compat_43_netbsd32_olseek + }, /* 19 = compat_43_netbsd32_olseek */ + { + .sy_call = (sy_call_t *)sys_getpid + }, /* 20 = getpid */ + { + .sy_call = linux_sys_nosys, + }, /* 21 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 22 = filler */ + { + ns(struct netbsd32_setuid_args), + .sy_call = (sy_call_t *)netbsd32_setuid + }, /* 23 = linux_setuid16 */ + { + .sy_call = (sy_call_t *)sys_getuid + }, /* 24 = linux_getuid16 */ + { + ns(struct linux32_sys_stime_args), + .sy_call = (sy_call_t *)linux32_sys_stime + }, /* 25 = stime */ + { + ns(struct linux32_sys_ptrace_args), + .sy_call = (sy_call_t *)linux32_sys_ptrace + }, /* 26 = ptrace */ + { + ns(struct linux32_sys_alarm_args), + .sy_call = (sy_call_t *)linux32_sys_alarm + }, /* 27 = alarm */ + { + .sy_call = linux_sys_nosys, + }, /* 28 = filler */ + { + .sy_call = (sy_call_t *)linux_sys_pause + }, /* 29 = pause */ + { + ns(struct linux32_sys_utime_args), + .sy_call = (sy_call_t *)linux32_sys_utime + }, /* 30 = utime */ + { + .sy_call = linux_sys_nosys, + }, /* 31 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 32 = filler */ + { + ns(struct netbsd32_access_args), + .sy_call = (sy_call_t *)netbsd32_access + }, /* 33 = netbsd32_access */ + { + ns(struct linux32_sys_nice_args), + .sy_call = (sy_call_t *)linux32_sys_nice + }, /* 34 = nice */ + { + .sy_call = linux_sys_nosys, + }, /* 35 = filler */ + { + .sy_call = (sy_call_t *)sys_sync + }, /* 36 = sync */ + { + ns(struct linux32_sys_kill_args), + .sy_call = (sy_call_t *)linux32_sys_kill + }, /* 37 = kill */ + { + ns(struct netbsd32___posix_rename_args), + .sy_call = (sy_call_t *)netbsd32___posix_rename + }, /* 38 = netbsd32___posix_rename */ + { + ns(struct netbsd32_mkdir_args), + .sy_call = (sy_call_t *)netbsd32_mkdir + }, /* 39 = netbsd32_mkdir */ + { + ns(struct netbsd32_rmdir_args), + .sy_call = (sy_call_t *)netbsd32_rmdir + }, /* 40 = netbsd32_rmdir */ + { + ns(struct netbsd32_dup_args), + .sy_call = (sy_call_t *)netbsd32_dup + }, /* 41 = netbsd32_dup */ + { + ns(struct linux32_sys_pipe_args), + .sy_call = (sy_call_t *)linux32_sys_pipe + }, /* 42 = pipe */ + { + ns(struct linux32_sys_times_args), + .sy_call = (sy_call_t *)linux32_sys_times + }, /* 43 = times */ + { + .sy_call = linux_sys_nosys, + }, /* 44 = filler */ + { + ns(struct linux32_sys_brk_args), + .sy_call = (sy_call_t *)linux32_sys_brk + }, /* 45 = brk */ + { + ns(struct netbsd32_setgid_args), + .sy_call = (sy_call_t *)netbsd32_setgid + }, /* 46 = linux_setgid16 */ + { + .sy_call = (sy_call_t *)sys_getgid + }, /* 47 = linux_getgid16 */ + { + ns(struct linux32_sys_signal_args), + .sy_call = (sy_call_t *)linux32_sys_signal + }, /* 48 = signal */ + { + .sy_call = (sy_call_t *)sys_geteuid + }, /* 49 = linux_geteuid16 */ + { + .sy_call = (sy_call_t *)sys_getegid + }, /* 50 = linux_getegid16 */ + { + ns(struct netbsd32_acct_args), + .sy_call = (sy_call_t *)netbsd32_acct + }, /* 51 = netbsd32_acct */ + { + .sy_call = linux_sys_nosys, + }, /* 52 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 53 = filler */ + { + ns(struct linux32_sys_ioctl_args), + .sy_call = (sy_call_t *)linux32_sys_ioctl + }, /* 54 = ioctl */ + { + ns(struct linux32_sys_fcntl_args), + .sy_call = (sy_call_t *)linux32_sys_fcntl + }, /* 55 = fcntl */ + { + .sy_call = linux_sys_nosys, + }, /* 56 = filler */ + { + ns(struct netbsd32_setpgid_args), + .sy_call = (sy_call_t *)netbsd32_setpgid + }, /* 57 = netbsd32_setpgid */ + { + .sy_call = linux_sys_nosys, + }, /* 58 = filler */ + { + ns(struct linux32_sys_oldolduname_args), + .sy_call = (sy_call_t *)linux32_sys_oldolduname + }, /* 59 = oldolduname */ + { + ns(struct netbsd32_umask_args), + .sy_call = (sy_call_t *)netbsd32_umask + }, /* 60 = netbsd32_umask */ + { + ns(struct netbsd32_chroot_args), + .sy_call = (sy_call_t *)netbsd32_chroot + }, /* 61 = netbsd32_chroot */ + { + .sy_call = linux_sys_nosys, + }, /* 62 = filler */ + { + ns(struct netbsd32_dup2_args), + .sy_call = (sy_call_t *)netbsd32_dup2 + }, /* 63 = netbsd32_dup2 */ + { + .sy_call = (sy_call_t *)sys_getppid + }, /* 64 = getppid */ + { + .sy_call = (sy_call_t *)sys_getpgrp + }, /* 65 = getpgrp */ + { + .sy_call = (sy_call_t *)sys_setsid + }, /* 66 = setsid */ + { + .sy_call = linux_sys_nosys, + }, /* 67 = filler */ + { + .sy_call = (sy_call_t *)linux32_sys_siggetmask + }, /* 68 = siggetmask */ + { + ns(struct linux32_sys_sigsetmask_args), + .sy_call = (sy_call_t *)linux32_sys_sigsetmask + }, /* 69 = sigsetmask */ + { + ns(struct linux32_sys_setreuid16_args), + .sy_call = (sy_call_t *)linux32_sys_setreuid16 + }, /* 70 = setreuid16 */ + { + ns(struct linux32_sys_setregid16_args), + .sy_call = (sy_call_t *)linux32_sys_setregid16 + }, /* 71 = setregid16 */ + { + .sy_call = linux_sys_nosys, + }, /* 72 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 73 = filler */ + { + ns(struct compat_43_netbsd32_osethostname_args), + .sy_call = (sy_call_t *)compat_43_netbsd32_osethostname + }, /* 74 = compat_43_netbsd32_osethostname */ + { + ns(struct linux32_sys_setrlimit_args), + .sy_call = (sy_call_t *)linux32_sys_setrlimit + }, /* 75 = setrlimit */ + { + ns(struct linux32_sys_getrlimit_args), + .sy_call = (sy_call_t *)linux32_sys_getrlimit + }, /* 76 = getrlimit */ + { + ns(struct compat_50_netbsd32_getrusage_args), + .sy_call = (sy_call_t *)compat_50_netbsd32_getrusage + }, /* 77 = compat_50_netbsd32_getrusage */ + { + ns(struct linux32_sys_gettimeofday_args), + .sy_call = (sy_call_t *)linux32_sys_gettimeofday + }, /* 78 = gettimeofday */ + { + ns(struct linux32_sys_settimeofday_args), + .sy_call = (sy_call_t *)linux32_sys_settimeofday + }, /* 79 = settimeofday */ + { + ns(struct linux32_sys_getgroups16_args), + .sy_call = (sy_call_t *)linux32_sys_getgroups16 + }, /* 80 = getgroups16 */ + { + ns(struct linux32_sys_setgroups16_args), + .sy_call = (sy_call_t *)linux32_sys_setgroups16 + }, /* 81 = setgroups16 */ + { + ns(struct linux32_sys_oldselect_args), + .sy_call = (sy_call_t *)linux32_sys_oldselect + }, /* 82 = oldselect */ + { + ns(struct netbsd32_symlink_args), + .sy_call = (sy_call_t *)netbsd32_symlink + }, /* 83 = netbsd32_symlink */ + { + ns(struct compat_43_netbsd32_lstat43_args), + .sy_call = (sy_call_t *)compat_43_netbsd32_lstat43 + }, /* 84 = compat_43_netbsd32_lstat43 */ + { + ns(struct netbsd32_readlink_args), + .sy_call = (sy_call_t *)netbsd32_readlink + }, /* 85 = netbsd32_readlink */ + { + .sy_call = linux_sys_nosys, + }, /* 86 = filler */ + { + ns(struct linux32_sys_swapon_args), + .sy_call = (sy_call_t *)linux32_sys_swapon + }, /* 87 = swapon */ + { + ns(struct linux32_sys_reboot_args), + .sy_call = (sy_call_t *)linux32_sys_reboot + }, /* 88 = reboot */ + { + ns(struct linux32_sys_readdir_args), + .sy_call = (sy_call_t *)linux32_sys_readdir + }, /* 89 = readdir */ + { + ns(struct linux32_sys_old_mmap_args), + .sy_call = (sy_call_t *)linux32_sys_old_mmap + }, /* 90 = old_mmap */ + { + ns(struct netbsd32_munmap_args), + .sy_call = (sy_call_t *)netbsd32_munmap + }, /* 91 = netbsd32_munmap */ + { + ns(struct compat_43_netbsd32_otruncate_args), + .sy_call = (sy_call_t *)compat_43_netbsd32_otruncate + }, /* 92 = compat_43_netbsd32_otruncate */ + { + ns(struct compat_43_netbsd32_oftruncate_args), + .sy_call = (sy_call_t *)compat_43_netbsd32_oftruncate + }, /* 93 = compat_43_netbsd32_oftruncate */ + { + ns(struct netbsd32_fchmod_args), + .sy_call = (sy_call_t *)netbsd32_fchmod + }, /* 94 = netbsd32_fchmod */ + { + ns(struct linux32_sys_fchown16_args), + .sy_call = (sy_call_t *)linux32_sys_fchown16 + }, /* 95 = fchown16 */ + { + ns(struct linux32_sys_getpriority_args), + .sy_call = (sy_call_t *)linux32_sys_getpriority + }, /* 96 = getpriority */ + { + ns(struct netbsd32_setpriority_args), + .sy_call = (sy_call_t *)netbsd32_setpriority + }, /* 97 = netbsd32_setpriority */ + { + ns(struct netbsd32_profil_args), + .sy_call = (sy_call_t *)netbsd32_profil + }, /* 98 = netbsd32_profil */ + { + ns(struct linux32_sys_statfs_args), + .sy_call = (sy_call_t *)linux32_sys_statfs + }, /* 99 = statfs */ + { + ns(struct linux32_sys_fstatfs_args), + .sy_call = (sy_call_t *)linux32_sys_fstatfs + }, /* 100 = fstatfs */ + { + .sy_call = linux_sys_nosys, + }, /* 101 = filler */ + { + ns(struct linux32_sys_socketcall_args), + .sy_call = (sy_call_t *)linux32_sys_socketcall + }, /* 102 = socketcall */ + { + .sy_call = linux_sys_nosys, + }, /* 103 = filler */ + { + ns(struct compat_50_netbsd32_setitimer_args), + .sy_call = (sy_call_t *)compat_50_netbsd32_setitimer + }, /* 104 = compat_50_netbsd32_setitimer */ + { + ns(struct compat_50_netbsd32_getitimer_args), + .sy_call = (sy_call_t *)compat_50_netbsd32_getitimer + }, /* 105 = compat_50_netbsd32_getitimer */ + { + ns(struct linux32_sys_stat_args), + .sy_call = (sy_call_t *)linux32_sys_stat + }, /* 106 = stat */ + { + ns(struct linux32_sys_lstat_args), + .sy_call = (sy_call_t *)linux32_sys_lstat + }, /* 107 = lstat */ + { + ns(struct linux32_sys_fstat_args), + .sy_call = (sy_call_t *)linux32_sys_fstat + }, /* 108 = fstat */ + { + ns(struct linux32_sys_olduname_args), + .sy_call = (sy_call_t *)linux32_sys_olduname + }, /* 109 = olduname */ + { + .sy_call = linux_sys_nosys, + }, /* 110 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 111 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 112 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 113 = filler */ + { + ns(struct linux32_sys_wait4_args), + .sy_call = (sy_call_t *)linux32_sys_wait4 + }, /* 114 = wait4 */ + { + ns(struct linux32_sys_swapoff_args), + .sy_call = (sy_call_t *)linux32_sys_swapoff + }, /* 115 = swapoff */ + { + ns(struct linux32_sys_sysinfo_args), + .sy_call = (sy_call_t *)linux32_sys_sysinfo + }, /* 116 = sysinfo */ + { + ns(struct linux32_sys_ipc_args), + .sy_call = (sy_call_t *)linux32_sys_ipc + }, /* 117 = ipc */ + { + ns(struct netbsd32_fsync_args), + .sy_call = (sy_call_t *)netbsd32_fsync + }, /* 118 = netbsd32_fsync */ + { + ns(struct linux32_sys_sigreturn_args), + .sy_call = (sy_call_t *)linux32_sys_sigreturn + }, /* 119 = sigreturn */ + { + ns(struct linux32_sys_clone_args), + .sy_call = (sy_call_t *)linux32_sys_clone + }, /* 120 = clone */ + { + ns(struct linux32_sys_setdomainname_args), + .sy_call = (sy_call_t *)linux32_sys_setdomainname + }, /* 121 = setdomainname */ + { + ns(struct linux32_sys_uname_args), + .sy_call = (sy_call_t *)linux32_sys_uname + }, /* 122 = uname */ + { + .sy_call = linux_sys_nosys, + }, /* 123 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 124 = filler */ + { + ns(struct linux32_sys_mprotect_args), + .sy_call = (sy_call_t *)linux32_sys_mprotect + }, /* 125 = mprotect */ + { + .sy_call = linux_sys_nosys, + }, /* 126 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 127 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 128 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 129 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 130 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 131 = filler */ + { + ns(struct netbsd32_getpgid_args), + .sy_call = (sy_call_t *)netbsd32_getpgid + }, /* 132 = netbsd32_getpgid */ + { + ns(struct netbsd32_fchdir_args), + .sy_call = (sy_call_t *)netbsd32_fchdir + }, /* 133 = netbsd32_fchdir */ + { + .sy_call = linux_sys_nosys, + }, /* 134 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 135 = filler */ + { + ns(struct linux32_sys_personality_args), + .sy_call = (sy_call_t *)linux32_sys_personality + }, /* 136 = personality */ + { + .sy_call = linux_sys_nosys, + }, /* 137 = filler */ + { + ns(struct linux32_sys_setfsuid_args), + .sy_call = (sy_call_t *)linux32_sys_setfsuid + }, /* 138 = setfsuid16 */ + { + ns(struct linux32_sys_setfsgid_args), + .sy_call = (sy_call_t *)linux32_sys_setfsgid + }, /* 139 = setfsgid16 */ + { + ns(struct linux32_sys_llseek_args), + .sy_call = (sy_call_t *)linux32_sys_llseek + }, /* 140 = llseek */ + { + ns(struct linux32_sys_getdents_args), + .sy_call = (sy_call_t *)linux32_sys_getdents + }, /* 141 = getdents */ + { + ns(struct linux32_sys_select_args), + .sy_call = (sy_call_t *)linux32_sys_select + }, /* 142 = select */ + { + ns(struct netbsd32_flock_args), + .sy_call = (sy_call_t *)netbsd32_flock + }, /* 143 = netbsd32_flock */ + { + ns(struct netbsd32___msync13_args), + .sy_call = (sy_call_t *)netbsd32___msync13 + }, /* 144 = netbsd32___msync13 */ + { + ns(struct netbsd32_readv_args), + .sy_call = (sy_call_t *)netbsd32_readv + }, /* 145 = netbsd32_readv */ + { + ns(struct netbsd32_writev_args), + .sy_call = (sy_call_t *)netbsd32_writev + }, /* 146 = netbsd32_writev */ + { + ns(struct netbsd32_getsid_args), + .sy_call = (sy_call_t *)netbsd32_getsid + }, /* 147 = netbsd32_getsid */ + { + ns(struct linux32_sys_fdatasync_args), + .sy_call = (sy_call_t *)linux32_sys_fdatasync + }, /* 148 = fdatasync */ + { + ns(struct linux32_sys___sysctl_args), + .sy_call = (sy_call_t *)linux32_sys___sysctl + }, /* 149 = __sysctl */ + { + ns(struct netbsd32_mlock_args), + .sy_call = (sy_call_t *)netbsd32_mlock + }, /* 150 = netbsd32_mlock */ + { + ns(struct netbsd32_munlock_args), + .sy_call = (sy_call_t *)netbsd32_munlock + }, /* 151 = netbsd32_munlock */ + { + ns(struct netbsd32_mlockall_args), + .sy_call = (sy_call_t *)netbsd32_mlockall + }, /* 152 = netbsd32_mlockall */ + { + .sy_call = (sy_call_t *)sys_munlockall + }, /* 153 = munlockall */ + { + ns(struct linux32_sys_sched_setparam_args), + .sy_call = (sy_call_t *)linux32_sys_sched_setparam + }, /* 154 = sched_setparam */ + { + ns(struct linux32_sys_sched_getparam_args), + .sy_call = (sy_call_t *)linux32_sys_sched_getparam + }, /* 155 = sched_getparam */ + { + ns(struct linux32_sys_sched_setscheduler_args), + .sy_call = (sy_call_t *)linux32_sys_sched_setscheduler + }, /* 156 = sched_setscheduler */ + { + ns(struct linux32_sys_sched_getscheduler_args), + .sy_call = (sy_call_t *)linux32_sys_sched_getscheduler + }, /* 157 = sched_getscheduler */ + { + .sy_call = (sy_call_t *)linux_sys_sched_yield + }, /* 158 = sched_yield */ + { + ns(struct linux32_sys_sched_get_priority_max_args), + .sy_call = (sy_call_t *)linux32_sys_sched_get_priority_max + }, /* 159 = sched_get_priority_max */ + { + ns(struct linux32_sys_sched_get_priority_min_args), + .sy_call = (sy_call_t *)linux32_sys_sched_get_priority_min + }, /* 160 = sched_get_priority_min */ + { + .sy_call = linux_sys_nosys, + }, /* 161 = filler */ + { + ns(struct linux32_sys_nanosleep_args), + .sy_call = (sy_call_t *)linux32_sys_nanosleep + }, /* 162 = nanosleep */ + { + ns(struct linux32_sys_mremap_args), + .sy_call = (sy_call_t *)linux32_sys_mremap + }, /* 163 = mremap */ + { + ns(struct linux32_sys_setresuid16_args), + .sy_call = (sy_call_t *)linux32_sys_setresuid16 + }, /* 164 = setresuid16 */ + { + ns(struct linux32_sys_getresuid16_args), + .sy_call = (sy_call_t *)linux32_sys_getresuid16 + }, /* 165 = getresuid16 */ + { + .sy_call = linux_sys_nosys, + }, /* 166 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 167 = filler */ + { + ns(struct netbsd32_poll_args), + .sy_call = (sy_call_t *)netbsd32_poll + }, /* 168 = netbsd32_poll */ + { + .sy_call = linux_sys_nosys, + }, /* 169 = filler */ + { + ns(struct linux32_sys_setresgid16_args), + .sy_call = (sy_call_t *)linux32_sys_setresgid16 + }, /* 170 = setresgid16 */ + { + ns(struct linux32_sys_getresgid16_args), + .sy_call = (sy_call_t *)linux32_sys_getresgid16 + }, /* 171 = getresgid16 */ + { + .sy_call = linux_sys_nosys, + }, /* 172 = filler */ + { + ns(struct linux32_sys_rt_sigreturn_args), + .sy_call = (sy_call_t *)linux32_sys_rt_sigreturn + }, /* 173 = rt_sigreturn */ + { + ns(struct linux32_sys_rt_sigaction_args), + .sy_call = (sy_call_t *)linux32_sys_rt_sigaction + }, /* 174 = rt_sigaction */ + { + ns(struct linux32_sys_rt_sigprocmask_args), + .sy_call = (sy_call_t *)linux32_sys_rt_sigprocmask + }, /* 175 = rt_sigprocmask */ + { + ns(struct linux32_sys_rt_sigpending_args), + .sy_call = (sy_call_t *)linux32_sys_rt_sigpending + }, /* 176 = rt_sigpending */ + { + ns(struct linux32_sys_rt_sigtimedwait_args), + .sy_call = (sy_call_t *)linux32_sys_rt_sigtimedwait + }, /* 177 = rt_sigtimedwait */ + { + ns(struct linux32_sys_rt_queueinfo_args), + .sy_call = (sy_call_t *)linux32_sys_rt_queueinfo + }, /* 178 = rt_queueinfo */ + { + ns(struct linux32_sys_rt_sigsuspend_args), + .sy_call = (sy_call_t *)linux32_sys_rt_sigsuspend + }, /* 179 = rt_sigsuspend */ + { + ns(struct linux32_sys_pread_args), + .sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG3_64, + .sy_call = (sy_call_t *)linux32_sys_pread + }, /* 180 = pread */ + { + ns(struct linux32_sys_pwrite_args), + .sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG3_64, + .sy_call = (sy_call_t *)linux32_sys_pwrite + }, /* 181 = pwrite */ + { + ns(struct linux32_sys_chown16_args), + .sy_call = (sy_call_t *)linux32_sys_chown16 + }, /* 182 = chown16 */ + { + ns(struct netbsd32___getcwd_args), + .sy_call = (sy_call_t *)netbsd32___getcwd + }, /* 183 = netbsd32___getcwd */ + { + .sy_call = linux_sys_nosys, + }, /* 184 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 185 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 186 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 187 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 188 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 189 = filler */ + { + .sy_call = (sy_call_t *)sys___vfork14 + }, /* 190 = __vfork14 */ + { + ns(struct linux32_sys_ugetrlimit_args), + .sy_call = (sy_call_t *)linux32_sys_ugetrlimit + }, /* 191 = ugetrlimit */ + { + ns(struct linux32_sys_mmap2_args), + .sy_call = (sy_call_t *)linux32_sys_mmap2 + }, /* 192 = mmap2 */ + { + ns(struct linux32_sys_truncate64_args), + .sy_call = (sy_call_t *)linux32_sys_truncate64 + }, /* 193 = truncate64 */ + { + ns(struct linux32_sys_ftruncate64_args), + .sy_call = (sy_call_t *)linux32_sys_ftruncate64 + }, /* 194 = ftruncate64 */ + { + ns(struct linux32_sys_stat64_args), + .sy_call = (sy_call_t *)linux32_sys_stat64 + }, /* 195 = stat64 */ + { + ns(struct linux32_sys_lstat64_args), + .sy_call = (sy_call_t *)linux32_sys_lstat64 + }, /* 196 = lstat64 */ + { + ns(struct linux32_sys_fstat64_args), + .sy_call = (sy_call_t *)linux32_sys_fstat64 + }, /* 197 = fstat64 */ + { + ns(struct netbsd32___posix_lchown_args), + .sy_call = (sy_call_t *)netbsd32___posix_lchown + }, /* 198 = netbsd32___posix_lchown */ + { + .sy_call = (sy_call_t *)sys_getuid + }, /* 199 = getuid */ + { + .sy_call = (sy_call_t *)sys_getgid + }, /* 200 = getgid */ + { + .sy_call = (sy_call_t *)sys_geteuid + }, /* 201 = geteuid */ + { + .sy_call = (sy_call_t *)sys_getegid + }, /* 202 = getegid */ + { + ns(struct netbsd32_setreuid_args), + .sy_call = (sy_call_t *)netbsd32_setreuid + }, /* 203 = netbsd32_setreuid */ + { + ns(struct netbsd32_setregid_args), + .sy_call = (sy_call_t *)netbsd32_setregid + }, /* 204 = netbsd32_setregid */ + { + ns(struct netbsd32_getgroups_args), + .sy_call = (sy_call_t *)netbsd32_getgroups + }, /* 205 = netbsd32_getgroups */ + { + ns(struct netbsd32_setgroups_args), + .sy_call = (sy_call_t *)netbsd32_setgroups + }, /* 206 = netbsd32_setgroups */ + { + ns(struct netbsd32___posix_fchown_args), + .sy_call = (sy_call_t *)netbsd32___posix_fchown + }, /* 207 = netbsd32___posix_fchown */ + { + ns(struct linux32_sys_setresuid_args), + .sy_call = (sy_call_t *)linux32_sys_setresuid + }, /* 208 = setresuid */ + { + ns(struct linux32_sys_getresuid_args), + .sy_call = (sy_call_t *)linux32_sys_getresuid + }, /* 209 = getresuid */ + { + ns(struct linux32_sys_setresgid_args), + .sy_call = (sy_call_t *)linux32_sys_setresgid + }, /* 210 = setresgid */ + { + ns(struct linux32_sys_getresgid_args), + .sy_call = (sy_call_t *)linux32_sys_getresgid + }, /* 211 = getresgid */ + { + ns(struct netbsd32___posix_chown_args), + .sy_call = (sy_call_t *)netbsd32___posix_chown + }, /* 212 = netbsd32___posix_chown */ + { + ns(struct netbsd32_setuid_args), + .sy_call = (sy_call_t *)netbsd32_setuid + }, /* 213 = netbsd32_setuid */ + { + ns(struct netbsd32_setgid_args), + .sy_call = (sy_call_t *)netbsd32_setgid + }, /* 214 = netbsd32_setgid */ + { + ns(struct linux32_sys_setfsuid_args), + .sy_call = (sy_call_t *)linux32_sys_setfsuid + }, /* 215 = setfsuid */ + { + ns(struct linux32_sys_setfsgid_args), + .sy_call = (sy_call_t *)linux32_sys_setfsgid + }, /* 216 = setfsgid */ + { + ns(struct linux32_sys_getdents64_args), + .sy_call = (sy_call_t *)linux32_sys_getdents64 + }, /* 217 = getdents64 */ + { + .sy_call = linux_sys_nosys, + }, /* 218 = filler */ + { + ns(struct netbsd32_mincore_args), + .sy_call = (sy_call_t *)netbsd32_mincore + }, /* 219 = netbsd32_mincore */ + { + ns(struct netbsd32_madvise_args), + .sy_call = (sy_call_t *)netbsd32_madvise + }, /* 220 = netbsd32_madvise */ +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args + { + ns(struct linux32_sys_fcntl64_args), + .sy_call = (sy_call_t *)linux32_sys_fcntl64 + }, /* 221 = fcntl64 */ + { + .sy_call = linux_sys_nosys, + }, /* 222 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 223 = filler */ + { + .sy_call = (sy_call_t *)linux_sys_gettid + }, /* 224 = gettid */ + { + .sy_call = linux_sys_nosys, + }, /* 225 = filler */ + { + ns(struct netbsd32_setxattr_args), + .sy_call = (sy_call_t *)netbsd32_setxattr + }, /* 226 = netbsd32_setxattr */ + { + ns(struct netbsd32_lsetxattr_args), + .sy_call = (sy_call_t *)netbsd32_lsetxattr + }, /* 227 = netbsd32_lsetxattr */ + { + ns(struct netbsd32_fsetxattr_args), + .sy_call = (sy_call_t *)netbsd32_fsetxattr + }, /* 228 = netbsd32_fsetxattr */ + { + ns(struct netbsd32_getxattr_args), + .sy_call = (sy_call_t *)netbsd32_getxattr + }, /* 229 = netbsd32_getxattr */ + { + ns(struct netbsd32_lgetxattr_args), + .sy_call = (sy_call_t *)netbsd32_lgetxattr + }, /* 230 = netbsd32_lgetxattr */ + { + ns(struct netbsd32_fgetxattr_args), + .sy_call = (sy_call_t *)netbsd32_fgetxattr + }, /* 231 = netbsd32_fgetxattr */ + { + ns(struct netbsd32_listxattr_args), + .sy_call = (sy_call_t *)netbsd32_listxattr + }, /* 232 = netbsd32_listxattr */ + { + ns(struct netbsd32_llistxattr_args), + .sy_call = (sy_call_t *)netbsd32_llistxattr + }, /* 233 = netbsd32_llistxattr */ + { + ns(struct netbsd32_flistxattr_args), + .sy_call = (sy_call_t *)netbsd32_flistxattr + }, /* 234 = netbsd32_flistxattr */ + { + ns(struct netbsd32_removexattr_args), + .sy_call = (sy_call_t *)netbsd32_removexattr + }, /* 235 = netbsd32_removexattr */ + { + ns(struct netbsd32_lremovexattr_args), + .sy_call = (sy_call_t *)netbsd32_lremovexattr + }, /* 236 = netbsd32_lremovexattr */ + { + ns(struct netbsd32_fremovexattr_args), + .sy_call = (sy_call_t *)netbsd32_fremovexattr + }, /* 237 = netbsd32_fremovexattr */ + { + ns(struct linux32_sys_tkill_args), + .sy_call = (sy_call_t *)linux32_sys_tkill + }, /* 238 = tkill */ + { + .sy_call = linux_sys_nosys, + }, /* 239 = filler */ + { + ns(struct linux32_sys_futex_args), + .sy_call = (sy_call_t *)linux32_sys_futex + }, /* 240 = futex */ + { + ns(struct linux32_sys_sched_setaffinity_args), + .sy_call = (sy_call_t *)linux32_sys_sched_setaffinity + }, /* 241 = sched_setaffinity */ + { + ns(struct linux32_sys_sched_getaffinity_args), + .sy_call = (sy_call_t *)linux32_sys_sched_getaffinity + }, /* 242 = sched_getaffinity */ + { + .sy_call = linux_sys_nosys, + }, /* 243 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 244 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 245 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 246 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 247 = filler */ + { + ns(struct linux32_sys_exit_group_args), + .sy_call = (sy_call_t *)linux32_sys_exit_group + }, /* 248 = exit_group */ + { + .sy_call = linux_sys_nosys, + }, /* 249 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 250 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 251 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 252 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 253 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 254 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 255 = filler */ + { + ns(struct linux32_sys_set_tid_address_args), + .sy_call = (sy_call_t *)linux32_sys_set_tid_address + }, /* 256 = set_tid_address */ + { + ns(struct linux32_sys_timer_create_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux32_sys_timer_create + }, /* 257 = timer_create */ + { + ns(struct linux32_sys_timer_settime_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux32_sys_timer_settime + }, /* 258 = timer_settime */ + { + ns(struct linux32_sys_timer_gettime_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux32_sys_timer_gettime + }, /* 259 = timer_gettime */ + { + ns(struct sys_timer_getoverrun_args), + .sy_call = (sy_call_t *)sys_timer_getoverrun + }, /* 260 = timer_getoverrun */ + { + ns(struct sys_timer_delete_args), + .sy_call = (sy_call_t *)sys_timer_delete + }, /* 261 = timer_delete */ + { + ns(struct linux32_sys_clock_settime_args), + .sy_call = (sy_call_t *)linux32_sys_clock_settime + }, /* 262 = clock_settime */ + { + ns(struct linux32_sys_clock_gettime_args), + .sy_call = (sy_call_t *)linux32_sys_clock_gettime + }, /* 263 = clock_gettime */ + { + ns(struct linux32_sys_clock_getres_args), + .sy_call = (sy_call_t *)linux32_sys_clock_getres + }, /* 264 = clock_getres */ + { + ns(struct linux32_sys_clock_nanosleep_args), + .sy_call = (sy_call_t *)linux32_sys_clock_nanosleep + }, /* 265 = clock_nanosleep */ + { + ns(struct linux32_sys_statfs64_args), + .sy_call = (sy_call_t *)linux32_sys_statfs64 + }, /* 266 = statfs64 */ + { + ns(struct linux32_sys_fstatfs64_args), + .sy_call = (sy_call_t *)linux32_sys_fstatfs64 + }, /* 267 = fstatfs64 */ + { + ns(struct linux32_sys_tgkill_args), + .sy_call = (sy_call_t *)linux32_sys_tgkill + }, /* 268 = tgkill */ + { + ns(struct compat_50_netbsd32_utimes_args), + .sy_call = (sy_call_t *)compat_50_netbsd32_utimes + }, /* 269 = compat_50_netbsd32_utimes */ + { + ns(struct linux32_sys_fadvise64_64_args), + .sy_call = (sy_call_t *)linux32_sys_fadvise64_64 + }, /* 270 = fadvise64_64 */ + { + .sy_call = linux_sys_nosys, + }, /* 271 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 272 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 273 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 274 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 275 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 276 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 277 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 278 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 279 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 280 = filler */ + { + ns(struct linux32_sys_socket_args), + .sy_call = (sy_call_t *)linux32_sys_socket + }, /* 281 = socket */ + { + ns(struct linux32_sys_bind_args), + .sy_call = (sy_call_t *)linux32_sys_bind + }, /* 282 = bind */ + { + ns(struct linux32_sys_connect_args), + .sy_call = (sy_call_t *)linux32_sys_connect + }, /* 283 = connect */ + { + .sy_call = linux_sys_nosys, + }, /* 284 = filler */ + { + ns(struct linux32_sys_accept_args), + .sy_call = (sy_call_t *)linux32_sys_accept + }, /* 285 = accept */ + { + ns(struct linux32_sys_getsockname_args), + .sy_call = (sy_call_t *)linux32_sys_getsockname + }, /* 286 = getsockname */ + { + ns(struct linux32_sys_getpeername_args), + .sy_call = (sy_call_t *)linux32_sys_getpeername + }, /* 287 = getpeername */ + { + ns(struct linux32_sys_socketpair_args), + .sy_call = (sy_call_t *)linux32_sys_socketpair + }, /* 288 = socketpair */ + { + ns(struct linux32_sys_send_args), + .sy_call = (sy_call_t *)linux32_sys_send + }, /* 289 = send */ + { + ns(struct linux32_sys_sendto_args), + .sy_call = (sy_call_t *)linux32_sys_sendto + }, /* 290 = sendto */ + { + ns(struct linux32_sys_recv_args), + .sy_call = (sy_call_t *)linux32_sys_recv + }, /* 291 = recv */ + { + ns(struct linux32_sys_recvfrom_args), + .sy_call = (sy_call_t *)linux32_sys_recvfrom + }, /* 292 = recvfrom */ + { + .sy_call = linux_sys_nosys, + }, /* 293 = filler */ + { + ns(struct linux32_sys_setsockopt_args), + .sy_call = (sy_call_t *)linux32_sys_setsockopt + }, /* 294 = setsockopt */ + { + ns(struct linux32_sys_getsockopt_args), + .sy_call = (sy_call_t *)linux32_sys_getsockopt + }, /* 295 = getsockopt */ + { + .sy_call = linux_sys_nosys, + }, /* 296 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 297 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 298 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 299 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 300 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 301 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 302 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 303 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 304 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 305 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 306 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 307 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 308 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 309 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 310 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 311 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 312 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 313 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 314 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 315 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 316 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 317 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 318 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 319 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 320 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 321 = filler */ + { + ns(struct linux32_sys_openat_args), + .sy_call = (sy_call_t *)linux32_sys_openat + }, /* 322 = openat */ + { + ns(struct netbsd32_mkdirat_args), + .sy_call = (sy_call_t *)netbsd32_mkdirat + }, /* 323 = netbsd32_mkdirat */ + { + ns(struct linux32_sys_mknodat_args), + .sy_call = (sy_call_t *)linux32_sys_mknodat + }, /* 324 = mknodat */ + { + ns(struct linux32_sys_fchownat_args), + .sy_call = (sy_call_t *)linux32_sys_fchownat + }, /* 325 = fchownat */ + { + .sy_call = linux_sys_nosys, + }, /* 326 = filler */ + { + ns(struct linux32_sys_fstatat64_args), + .sy_call = (sy_call_t *)linux32_sys_fstatat64 + }, /* 327 = fstatat64 */ + { + ns(struct linux32_sys_unlinkat_args), + .sy_call = (sy_call_t *)linux32_sys_unlinkat + }, /* 328 = unlinkat */ + { + ns(struct netbsd32_renameat_args), + .sy_call = (sy_call_t *)netbsd32_renameat + }, /* 329 = netbsd32_renameat */ + { + ns(struct linux32_sys_linkat_args), + .sy_call = (sy_call_t *)linux32_sys_linkat + }, /* 330 = linkat */ + { + ns(struct netbsd32_symlinkat_args), + .sy_call = (sy_call_t *)netbsd32_symlinkat + }, /* 331 = netbsd32_symlinkat */ + { + ns(struct netbsd32_readlinkat_args), + .sy_call = (sy_call_t *)netbsd32_readlinkat + }, /* 332 = netbsd32_readlinkat */ + { + ns(struct linux32_sys_fchmodat_args), + .sy_call = (sy_call_t *)linux32_sys_fchmodat + }, /* 333 = fchmodat */ + { + ns(struct linux32_sys_faccessat_args), + .sy_call = (sy_call_t *)linux32_sys_faccessat + }, /* 334 = faccessat */ + { + .sy_call = linux_sys_nosys, + }, /* 335 = filler */ + { + ns(struct linux32_sys_ppoll_args), + .sy_call = (sy_call_t *)linux32_sys_ppoll + }, /* 336 = ppoll */ + { + .sy_call = linux_sys_nosys, + }, /* 337 = filler */ + { + ns(struct netbsd32___futex_set_robust_list_args), + .sy_call = (sy_call_t *)netbsd32___futex_set_robust_list + }, /* 338 = netbsd32___futex_set_robust_list */ + { + ns(struct netbsd32___futex_get_robust_list_args), + .sy_call = (sy_call_t *)netbsd32___futex_get_robust_list + }, /* 339 = netbsd32___futex_get_robust_list */ + { + .sy_call = linux_sys_nosys, + }, /* 340 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 341 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 342 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 343 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 344 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 345 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 346 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 347 = filler */ + { + ns(struct linux32_sys_utimensat_args), + .sy_call = (sy_call_t *)linux32_sys_utimensat + }, /* 348 = utimensat */ + { + .sy_call = linux_sys_nosys, + }, /* 349 = filler */ + { + ns(struct linux_sys_timerfd_create_args), + .sy_call = (sy_call_t *)linux_sys_timerfd_create + }, /* 350 = timerfd_create */ + { + ns(struct linux32_sys_eventfd_args), + .sy_call = (sy_call_t *)linux32_sys_eventfd + }, /* 351 = eventfd */ + { + ns(struct linux32_sys_fallocate_args), + .sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64, + .sy_call = (sy_call_t *)linux32_sys_fallocate + }, /* 352 = fallocate */ + { + ns(struct linux32_sys_timerfd_settime_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux32_sys_timerfd_settime + }, /* 353 = timerfd_settime */ + { + ns(struct linux32_sys_timerfd_gettime_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux32_sys_timerfd_gettime + }, /* 354 = timerfd_gettime */ + { + .sy_call = linux_sys_nosys, + }, /* 355 = filler */ + { + ns(struct linux32_sys_eventfd2_args), + .sy_call = (sy_call_t *)linux32_sys_eventfd2 + }, /* 356 = eventfd2 */ + { + .sy_call = linux_sys_nosys, + }, /* 357 = filler */ + { + ns(struct linux32_sys_dup3_args), + .sy_call = (sy_call_t *)linux32_sys_dup3 + }, /* 358 = dup3 */ + { + ns(struct linux32_sys_pipe2_args), + .sy_call = (sy_call_t *)linux32_sys_pipe2 + }, /* 359 = pipe2 */ + { + .sy_call = linux_sys_nosys, + }, /* 360 = filler */ + { + ns(struct linux32_sys_preadv_args), + .sy_call = (sy_call_t *)linux32_sys_preadv + }, /* 361 = preadv */ + { + ns(struct linux32_sys_pwritev_args), + .sy_call = (sy_call_t *)linux32_sys_pwritev + }, /* 362 = pwritev */ + { + .sy_call = linux_sys_nosys, + }, /* 363 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 364 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 365 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 366 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 367 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 368 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 369 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 370 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 371 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 372 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 373 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 374 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 375 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 376 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 377 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 378 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 379 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 380 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 381 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 382 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 383 = filler */ + { + ns(struct netbsd32_getrandom_args), + .sy_call = (sy_call_t *)netbsd32_getrandom + }, /* 384 = netbsd32_getrandom */ + { + .sy_call = linux_sys_nosys, + }, /* 385 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 386 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 387 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 388 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 389 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 390 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 391 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 392 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 393 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 394 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 395 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 396 = filler */ + { + ns(struct linux32_sys_statx_args), + .sy_call = (sy_call_t *)linux32_sys_statx + }, /* 397 = statx */ + { + .sy_call = linux_sys_nosys, + }, /* 398 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 399 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 400 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 401 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 402 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 403 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 404 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 405 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 406 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 407 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 408 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 409 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 410 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 411 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 412 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 413 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 414 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 415 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 416 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 417 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 418 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 419 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 420 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 421 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 422 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 423 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 424 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 425 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 426 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 427 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 428 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 429 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 430 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 431 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 432 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 433 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 434 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 435 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 436 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 437 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 438 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 439 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 440 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 441 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 442 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 443 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 444 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 445 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 446 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 447 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 448 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 449 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 450 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 451 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 452 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 453 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 454 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 455 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 456 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 457 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 458 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 459 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 460 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 461 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 462 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 463 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 464 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 465 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 466 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 467 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 468 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 469 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 470 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 471 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 472 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 473 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 474 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 475 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 476 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 477 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 478 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 479 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 480 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 481 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 482 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 483 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 484 = filler */ + { + ns(struct linux32_sys_set_tls_args), + .sy_call = (sy_call_t *)linux32_sys_set_tls + }, /* 485 = set_tls */ + { + .sy_call = (sy_call_t *)linux32_sys_get_tls + }, /* 486 = get_tls */ + { + .sy_call = linux_sys_nosys, + }, /* 487 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 488 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 489 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 490 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 491 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 492 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 493 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 494 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 495 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 496 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 497 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 498 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 499 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 500 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 501 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 502 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 503 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 504 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 505 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 506 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 507 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 508 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 509 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 510 = filler */ + { + .sy_call = linux_sys_nosys, + }, /* 511 = filler */ +}; + +const uint32_t linux32_sysent_nomodbits[] = { + 0x00000000, /* syscalls 0- 31 */ + 0x00000000, /* syscalls 32- 63 */ + 0x00000000, /* syscalls 64- 95 */ + 0x00000000, /* syscalls 96-127 */ + 0x00000000, /* syscalls 128-159 */ + 0x00000000, /* syscalls 160-191 */ + 0x00000000, /* syscalls 192-223 */ + 0x00000000, /* syscalls 224-255 */ + 0x00000000, /* syscalls 256-287 */ + 0x00000000, /* syscalls 288-319 */ + 0x00000000, /* syscalls 320-351 */ + 0x00000000, /* syscalls 352-383 */ + 0x00000000, /* syscalls 384-415 */ + 0x00000000, /* syscalls 416-447 */ + 0x00000000, /* syscalls 448-479 */ + 0x00000000, /* syscalls 480-511 */ +}; diff --git a/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c b/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c new file mode 100644 index 00000000000..0c5809f5be6 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c @@ -0,0 +1,6729 @@ +/* $NetBSD: linux32_systrace_args.c,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/* + * System call argument to DTrace register array conversion. + * + * DO NOT EDIT-- this file is automatically generated. + * This file is part of the DTrace syscall provider. + */ + +static void +systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_args) +{ + intptr_t *iarg = (intptr_t *)uarg; + switch (sysnum) { + /* linux_sys_nosys */ + case 0: { + *n_args = 0; + break; + } + /* linux32_sys_exit */ + case 1: { + const struct linux32_sys_exit_args *p = params; + iarg[0] = SCARG(p, rval); /* int */ + *n_args = 1; + break; + } + /* sys_fork */ + case 2: { + *n_args = 0; + break; + } + /* netbsd32_read */ + case 3: { + const struct netbsd32_read_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, nbyte); /* netbsd32_size_t */ + *n_args = 3; + break; + } + /* netbsd32_write */ + case 4: { + const struct netbsd32_write_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, nbyte); /* netbsd32_size_t */ + *n_args = 3; + break; + } + /* linux32_sys_open */ + case 5: { + const struct linux32_sys_open_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, flags); /* int */ + iarg[2] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 3; + break; + } + /* netbsd32_close */ + case 6: { + const struct netbsd32_close_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + *n_args = 1; + break; + } + /* linux32_sys_waitpid */ + case 7: { + const struct linux32_sys_waitpid_args *p = params; + iarg[0] = SCARG(p, pid); /* int */ + uarg[1] = (intptr_t) SCARG(p, status).i32; /* netbsd32_intp */ + iarg[2] = SCARG(p, options); /* int */ + *n_args = 3; + break; + } + /* linux32_sys_creat */ + case 8: { + const struct linux32_sys_creat_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 2; + break; + } + /* netbsd32_link */ + case 9: { + const struct netbsd32_link_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, link).i32; /* netbsd32_charp */ + *n_args = 2; + break; + } + /* linux32_sys_unlink */ + case 10: { + const struct linux32_sys_unlink_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* netbsd32_execve */ + case 11: { + const struct netbsd32_execve_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, argp).i32; /* netbsd32_charpp */ + uarg[2] = (intptr_t) SCARG(p, envp).i32; /* netbsd32_charpp */ + *n_args = 3; + break; + } + /* netbsd32_chdir */ + case 12: { + const struct netbsd32_chdir_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* linux32_sys_time */ + case 13: { + const struct linux32_sys_time_args *p = params; + uarg[0] = (intptr_t) SCARG(p, t).i32; /* linux32_timep_t */ + *n_args = 1; + break; + } + /* linux32_sys_mknod */ + case 14: { + const struct linux32_sys_mknod_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, mode); /* linux_umode_t */ + uarg[2] = SCARG(p, dev); /* unsigned */ + *n_args = 3; + break; + } + /* netbsd32_chmod */ + case 15: { + const struct netbsd32_chmod_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 2; + break; + } + /* linux32_sys_lchown16 */ + case 16: { + const struct linux32_sys_lchown16_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, uid); /* linux32_uid16_t */ + iarg[2] = SCARG(p, gid); /* linux32_gid16_t */ + *n_args = 3; + break; + } + /* compat_43_netbsd32_olseek */ + case 19: { + const struct compat_43_netbsd32_olseek_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, offset); /* netbsd32_long */ + iarg[2] = SCARG(p, whence); /* int */ + *n_args = 3; + break; + } + /* sys_getpid */ + case 20: { + *n_args = 0; + break; + } + /* netbsd32_setuid */ + case 23: { + const struct netbsd32_setuid_args *p = params; + uarg[0] = SCARG(p, uid); /* uid_t */ + *n_args = 1; + break; + } + /* sys_getuid */ + case 24: { + *n_args = 0; + break; + } + /* linux32_sys_stime */ + case 25: { + const struct linux32_sys_stime_args *p = params; + uarg[0] = (intptr_t) SCARG(p, t).i32; /* linux32_timep_t */ + *n_args = 1; + break; + } + /* linux32_sys_ptrace */ + case 26: { + const struct linux32_sys_ptrace_args *p = params; + iarg[0] = SCARG(p, request); /* int */ + iarg[1] = SCARG(p, pid); /* int */ + iarg[2] = SCARG(p, addr); /* int */ + iarg[3] = SCARG(p, data); /* int */ + *n_args = 4; + break; + } + /* linux32_sys_alarm */ + case 27: { + const struct linux32_sys_alarm_args *p = params; + uarg[0] = SCARG(p, secs); /* unsigned int */ + *n_args = 1; + break; + } + /* linux_sys_pause */ + case 29: { + *n_args = 0; + break; + } + /* linux32_sys_utime */ + case 30: { + const struct linux32_sys_utime_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, times).i32; /* linux32_utimbufp_t */ + *n_args = 2; + break; + } + /* netbsd32_access */ + case 33: { + const struct netbsd32_access_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, flags); /* int */ + *n_args = 2; + break; + } + /* linux32_sys_nice */ + case 34: { + const struct linux32_sys_nice_args *p = params; + iarg[0] = SCARG(p, incr); /* int */ + *n_args = 1; + break; + } + /* sys_sync */ + case 36: { + *n_args = 0; + break; + } + /* linux32_sys_kill */ + case 37: { + const struct linux32_sys_kill_args *p = params; + iarg[0] = SCARG(p, pid); /* int */ + iarg[1] = SCARG(p, signum); /* int */ + *n_args = 2; + break; + } + /* netbsd32___posix_rename */ + case 38: { + const struct netbsd32___posix_rename_args *p = params; + uarg[0] = (intptr_t) SCARG(p, from).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, to).i32; /* netbsd32_charp */ + *n_args = 2; + break; + } + /* netbsd32_mkdir */ + case 39: { + const struct netbsd32_mkdir_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 2; + break; + } + /* netbsd32_rmdir */ + case 40: { + const struct netbsd32_rmdir_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* netbsd32_dup */ + case 41: { + const struct netbsd32_dup_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + *n_args = 1; + break; + } + /* linux32_sys_pipe */ + case 42: { + const struct linux32_sys_pipe_args *p = params; + uarg[0] = (intptr_t) SCARG(p, fd).i32; /* netbsd32_intp */ + *n_args = 1; + break; + } + /* linux32_sys_times */ + case 43: { + const struct linux32_sys_times_args *p = params; + uarg[0] = (intptr_t) SCARG(p, tms).i32; /* linux32_tmsp_t */ + *n_args = 1; + break; + } + /* linux32_sys_brk */ + case 45: { + const struct linux32_sys_brk_args *p = params; + uarg[0] = (intptr_t) SCARG(p, nsize).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* netbsd32_setgid */ + case 46: { + const struct netbsd32_setgid_args *p = params; + iarg[0] = SCARG(p, gid); /* gid_t */ + *n_args = 1; + break; + } + /* sys_getgid */ + case 47: { + *n_args = 0; + break; + } + /* linux32_sys_signal */ + case 48: { + const struct linux32_sys_signal_args *p = params; + iarg[0] = SCARG(p, signum); /* int */ + uarg[1] = (intptr_t) SCARG(p, handler).i32; /* linux32_handlerp_t */ + *n_args = 2; + break; + } + /* sys_geteuid */ + case 49: { + *n_args = 0; + break; + } + /* sys_getegid */ + case 50: { + *n_args = 0; + break; + } + /* netbsd32_acct */ + case 51: { + const struct netbsd32_acct_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* linux32_sys_ioctl */ + case 54: { + const struct linux32_sys_ioctl_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, com); /* netbsd32_u_long */ + uarg[2] = (intptr_t) SCARG(p, data).i32; /* netbsd32_charp */ + *n_args = 3; + break; + } + /* linux32_sys_fcntl */ + case 55: { + const struct linux32_sys_fcntl_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, cmd); /* int */ + uarg[2] = (intptr_t) SCARG(p, arg).i32; /* netbsd32_voidp */ + *n_args = 3; + break; + } + /* netbsd32_setpgid */ + case 57: { + const struct netbsd32_setpgid_args *p = params; + iarg[0] = SCARG(p, pid); /* int */ + iarg[1] = SCARG(p, pgid); /* int */ + *n_args = 2; + break; + } + /* linux32_sys_oldolduname */ + case 59: { + const struct linux32_sys_oldolduname_args *p = params; + uarg[0] = (intptr_t) SCARG(p, up).i32; /* linux32_oldold_utsnamep_t */ + *n_args = 1; + break; + } + /* netbsd32_umask */ + case 60: { + const struct netbsd32_umask_args *p = params; + iarg[0] = SCARG(p, newmask); /* int */ + *n_args = 1; + break; + } + /* netbsd32_chroot */ + case 61: { + const struct netbsd32_chroot_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* netbsd32_dup2 */ + case 63: { + const struct netbsd32_dup2_args *p = params; + iarg[0] = SCARG(p, from); /* int */ + iarg[1] = SCARG(p, to); /* int */ + *n_args = 2; + break; + } + /* sys_getppid */ + case 64: { + *n_args = 0; + break; + } + /* sys_getpgrp */ + case 65: { + *n_args = 0; + break; + } + /* sys_setsid */ + case 66: { + *n_args = 0; + break; + } + /* linux32_sys_siggetmask */ + case 68: { + *n_args = 0; + break; + } + /* linux32_sys_sigsetmask */ + case 69: { + const struct linux32_sys_sigsetmask_args *p = params; + iarg[0] = SCARG(p, mask); /* linux32_old_sigset_t */ + *n_args = 1; + break; + } + /* linux32_sys_setreuid16 */ + case 70: { + const struct linux32_sys_setreuid16_args *p = params; + iarg[0] = SCARG(p, ruid); /* linux32_uid16_t */ + iarg[1] = SCARG(p, euid); /* linux32_uid16_t */ + *n_args = 2; + break; + } + /* linux32_sys_setregid16 */ + case 71: { + const struct linux32_sys_setregid16_args *p = params; + iarg[0] = SCARG(p, rgid); /* linux32_gid16_t */ + iarg[1] = SCARG(p, egid); /* linux32_gid16_t */ + *n_args = 2; + break; + } + /* compat_43_netbsd32_osethostname */ + case 74: { + const struct compat_43_netbsd32_osethostname_args *p = params; + uarg[0] = (intptr_t) SCARG(p, hostname).i32; /* netbsd32_charp */ + uarg[1] = SCARG(p, len); /* u_int */ + *n_args = 2; + break; + } + /* linux32_sys_setrlimit */ + case 75: { + const struct linux32_sys_setrlimit_args *p = params; + uarg[0] = SCARG(p, which); /* u_int */ + uarg[1] = (intptr_t) SCARG(p, rlp).i32; /* netbsd32_orlimitp_t */ + *n_args = 2; + break; + } + /* linux32_sys_getrlimit */ + case 76: { + const struct linux32_sys_getrlimit_args *p = params; + uarg[0] = SCARG(p, which); /* u_int */ + uarg[1] = (intptr_t) SCARG(p, rlp).i32; /* netbsd32_orlimitp_t */ + *n_args = 2; + break; + } + /* compat_50_netbsd32_getrusage */ + case 77: { + const struct compat_50_netbsd32_getrusage_args *p = params; + iarg[0] = SCARG(p, who); /* int */ + uarg[1] = (intptr_t) SCARG(p, rusage).i32; /* netbsd32_rusage50p_t */ + *n_args = 2; + break; + } + /* linux32_sys_gettimeofday */ + case 78: { + const struct linux32_sys_gettimeofday_args *p = params; + uarg[0] = (intptr_t) SCARG(p, tp).i32; /* netbsd32_timeval50p_t */ + uarg[1] = (intptr_t) SCARG(p, tzp).i32; /* netbsd32_timezonep_t */ + *n_args = 2; + break; + } + /* linux32_sys_settimeofday */ + case 79: { + const struct linux32_sys_settimeofday_args *p = params; + uarg[0] = (intptr_t) SCARG(p, tp).i32; /* netbsd32_timeval50p_t */ + uarg[1] = (intptr_t) SCARG(p, tzp).i32; /* netbsd32_timezonep_t */ + *n_args = 2; + break; + } + /* linux32_sys_getgroups16 */ + case 80: { + const struct linux32_sys_getgroups16_args *p = params; + iarg[0] = SCARG(p, gidsetsize); /* int */ + uarg[1] = (intptr_t) SCARG(p, gidset).i32; /* linux32_gid16p_t */ + *n_args = 2; + break; + } + /* linux32_sys_setgroups16 */ + case 81: { + const struct linux32_sys_setgroups16_args *p = params; + iarg[0] = SCARG(p, gidsetsize); /* int */ + uarg[1] = (intptr_t) SCARG(p, gidset).i32; /* linux32_gid16p_t */ + *n_args = 2; + break; + } + /* linux32_sys_oldselect */ + case 82: { + const struct linux32_sys_oldselect_args *p = params; + uarg[0] = (intptr_t) SCARG(p, lsp).i32; /* linux32_oldselectp_t */ + *n_args = 1; + break; + } + /* netbsd32_symlink */ + case 83: { + const struct netbsd32_symlink_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, link).i32; /* netbsd32_charp */ + *n_args = 2; + break; + } + /* compat_43_netbsd32_lstat43 */ + case 84: { + const struct compat_43_netbsd32_lstat43_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, ub).i32; /* netbsd32_stat43p_t */ + *n_args = 2; + break; + } + /* netbsd32_readlink */ + case 85: { + const struct netbsd32_readlink_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, count); /* netbsd32_size_t */ + *n_args = 3; + break; + } + /* linux32_sys_swapon */ + case 87: { + const struct linux32_sys_swapon_args *p = params; + uarg[0] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* linux32_sys_reboot */ + case 88: { + const struct linux32_sys_reboot_args *p = params; + iarg[0] = SCARG(p, magic1); /* int */ + iarg[1] = SCARG(p, magic2); /* int */ + iarg[2] = SCARG(p, cmd); /* int */ + uarg[3] = (intptr_t) SCARG(p, arg).i32; /* netbsd32_voidp */ + *n_args = 4; + break; + } + /* linux32_sys_readdir */ + case 89: { + const struct linux32_sys_readdir_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, dent).i32; /* netbsd32_voidp */ + uarg[2] = SCARG(p, count); /* unsigned int */ + *n_args = 3; + break; + } + /* linux32_sys_old_mmap */ + case 90: { + const struct linux32_sys_old_mmap_args *p = params; + uarg[0] = (intptr_t) SCARG(p, lmp).i32; /* linux32_oldmmapp */ + *n_args = 1; + break; + } + /* netbsd32_munmap */ + case 91: { + const struct netbsd32_munmap_args *p = params; + uarg[0] = (intptr_t) SCARG(p, addr).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + *n_args = 2; + break; + } + /* compat_43_netbsd32_otruncate */ + case 92: { + const struct compat_43_netbsd32_otruncate_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, length); /* netbsd32_long */ + *n_args = 2; + break; + } + /* compat_43_netbsd32_oftruncate */ + case 93: { + const struct compat_43_netbsd32_oftruncate_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, length); /* netbsd32_long */ + *n_args = 2; + break; + } + /* netbsd32_fchmod */ + case 94: { + const struct netbsd32_fchmod_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 2; + break; + } + /* linux32_sys_fchown16 */ + case 95: { + const struct linux32_sys_fchown16_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, uid); /* linux32_uid16_t */ + iarg[2] = SCARG(p, gid); /* linux32_gid16_t */ + *n_args = 3; + break; + } + /* linux32_sys_getpriority */ + case 96: { + const struct linux32_sys_getpriority_args *p = params; + iarg[0] = SCARG(p, which); /* int */ + iarg[1] = SCARG(p, who); /* int */ + *n_args = 2; + break; + } + /* netbsd32_setpriority */ + case 97: { + const struct netbsd32_setpriority_args *p = params; + iarg[0] = SCARG(p, which); /* int */ + iarg[1] = SCARG(p, who); /* int */ + iarg[2] = SCARG(p, prio); /* int */ + *n_args = 3; + break; + } + /* netbsd32_profil */ + case 98: { + const struct netbsd32_profil_args *p = params; + uarg[0] = (intptr_t) SCARG(p, samples).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, size); /* netbsd32_size_t */ + iarg[2] = SCARG(p, offset); /* netbsd32_u_long */ + uarg[3] = SCARG(p, scale); /* u_int */ + *n_args = 4; + break; + } + /* linux32_sys_statfs */ + case 99: { + const struct linux32_sys_statfs_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_statfsp */ + *n_args = 2; + break; + } + /* linux32_sys_fstatfs */ + case 100: { + const struct linux32_sys_fstatfs_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_statfsp */ + *n_args = 2; + break; + } + /* linux32_sys_socketcall */ + case 102: { + const struct linux32_sys_socketcall_args *p = params; + iarg[0] = SCARG(p, what); /* int */ + uarg[1] = (intptr_t) SCARG(p, args).i32; /* netbsd32_voidp */ + *n_args = 2; + break; + } + /* compat_50_netbsd32_setitimer */ + case 104: { + const struct compat_50_netbsd32_setitimer_args *p = params; + iarg[0] = SCARG(p, which); /* int */ + uarg[1] = (intptr_t) SCARG(p, itv).i32; /* netbsd32_itimerval50p_t */ + uarg[2] = (intptr_t) SCARG(p, oitv).i32; /* netbsd32_itimerval50p_t */ + *n_args = 3; + break; + } + /* compat_50_netbsd32_getitimer */ + case 105: { + const struct compat_50_netbsd32_getitimer_args *p = params; + iarg[0] = SCARG(p, which); /* int */ + uarg[1] = (intptr_t) SCARG(p, itv).i32; /* netbsd32_itimerval50p_t */ + *n_args = 2; + break; + } + /* linux32_sys_stat */ + case 106: { + const struct linux32_sys_stat_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_statp */ + *n_args = 2; + break; + } + /* linux32_sys_lstat */ + case 107: { + const struct linux32_sys_lstat_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_statp */ + *n_args = 2; + break; + } + /* linux32_sys_fstat */ + case 108: { + const struct linux32_sys_fstat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_statp */ + *n_args = 2; + break; + } + /* linux32_sys_olduname */ + case 109: { + const struct linux32_sys_olduname_args *p = params; + uarg[0] = (intptr_t) SCARG(p, up).i32; /* linux32_oldutsnamep_t */ + *n_args = 1; + break; + } + /* linux32_sys_wait4 */ + case 114: { + const struct linux32_sys_wait4_args *p = params; + iarg[0] = SCARG(p, pid); /* int */ + uarg[1] = (intptr_t) SCARG(p, status).i32; /* netbsd32_intp */ + iarg[2] = SCARG(p, options); /* int */ + uarg[3] = (intptr_t) SCARG(p, rusage).i32; /* netbsd32_rusage50p_t */ + *n_args = 4; + break; + } + /* linux32_sys_swapoff */ + case 115: { + const struct linux32_sys_swapoff_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + *n_args = 1; + break; + } + /* linux32_sys_sysinfo */ + case 116: { + const struct linux32_sys_sysinfo_args *p = params; + uarg[0] = (intptr_t) SCARG(p, arg).i32; /* linux32_sysinfop_t */ + *n_args = 1; + break; + } + /* linux32_sys_ipc */ + case 117: { + const struct linux32_sys_ipc_args *p = params; + iarg[0] = SCARG(p, what); /* int */ + iarg[1] = SCARG(p, a1); /* int */ + iarg[2] = SCARG(p, a2); /* int */ + iarg[3] = SCARG(p, a3); /* int */ + uarg[4] = (intptr_t) SCARG(p, ptr).i32; /* netbsd32_voidp */ + *n_args = 5; + break; + } + /* netbsd32_fsync */ + case 118: { + const struct netbsd32_fsync_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + *n_args = 1; + break; + } + /* linux32_sys_sigreturn */ + case 119: { + const struct linux32_sys_sigreturn_args *p = params; + uarg[0] = (intptr_t) SCARG(p, scp).i32; /* linux32_sigcontextp_t */ + *n_args = 1; + break; + } + /* linux32_sys_clone */ + case 120: { + const struct linux32_sys_clone_args *p = params; + iarg[0] = SCARG(p, flags); /* int */ + uarg[1] = (intptr_t) SCARG(p, stack).i32; /* netbsd32_voidp */ + uarg[2] = (intptr_t) SCARG(p, parent_tidptr).i32; /* netbsd32_voidp */ + uarg[3] = (intptr_t) SCARG(p, tls).i32; /* netbsd32_voidp */ + uarg[4] = (intptr_t) SCARG(p, child_tidptr).i32; /* netbsd32_voidp */ + *n_args = 5; + break; + } + /* linux32_sys_setdomainname */ + case 121: { + const struct linux32_sys_setdomainname_args *p = params; + uarg[0] = (intptr_t) SCARG(p, domainname).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, len); /* int */ + *n_args = 2; + break; + } + /* linux32_sys_uname */ + case 122: { + const struct linux32_sys_uname_args *p = params; + uarg[0] = (intptr_t) SCARG(p, up).i32; /* linux32_utsnamep */ + *n_args = 1; + break; + } + /* linux32_sys_mprotect */ + case 125: { + const struct linux32_sys_mprotect_args *p = params; + uarg[0] = (intptr_t) SCARG(p, start).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + iarg[2] = SCARG(p, prot); /* int */ + *n_args = 3; + break; + } + /* netbsd32_getpgid */ + case 132: { + const struct netbsd32_getpgid_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + *n_args = 1; + break; + } + /* netbsd32_fchdir */ + case 133: { + const struct netbsd32_fchdir_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + *n_args = 1; + break; + } + /* linux32_sys_personality */ + case 136: { + const struct linux32_sys_personality_args *p = params; + iarg[0] = SCARG(p, per); /* netbsd32_u_long */ + *n_args = 1; + break; + } + /* linux32_sys_setfsuid */ + case 138: { + const struct linux32_sys_setfsuid_args *p = params; + uarg[0] = SCARG(p, uid); /* uid_t */ + *n_args = 1; + break; + } + /* linux32_sys_setfsgid */ + case 139: { + const struct linux32_sys_setfsgid_args *p = params; + iarg[0] = SCARG(p, gid); /* gid_t */ + *n_args = 1; + break; + } + /* linux32_sys_llseek */ + case 140: { + const struct linux32_sys_llseek_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = SCARG(p, ohigh); /* u_int32_t */ + uarg[2] = SCARG(p, olow); /* u_int32_t */ + uarg[3] = (intptr_t) SCARG(p, res).i32; /* netbsd32_voidp */ + iarg[4] = SCARG(p, whence); /* int */ + *n_args = 5; + break; + } + /* linux32_sys_getdents */ + case 141: { + const struct linux32_sys_getdents_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, dent).i32; /* linux32_direntp_t */ + uarg[2] = SCARG(p, count); /* unsigned int */ + *n_args = 3; + break; + } + /* linux32_sys_select */ + case 142: { + const struct linux32_sys_select_args *p = params; + iarg[0] = SCARG(p, nfds); /* int */ + uarg[1] = (intptr_t) SCARG(p, readfds).i32; /* netbsd32_fd_setp_t */ + uarg[2] = (intptr_t) SCARG(p, writefds).i32; /* netbsd32_fd_setp_t */ + uarg[3] = (intptr_t) SCARG(p, exceptfds).i32; /* netbsd32_fd_setp_t */ + uarg[4] = (intptr_t) SCARG(p, timeout).i32; /* netbsd32_timeval50p_t */ + *n_args = 5; + break; + } + /* netbsd32_flock */ + case 143: { + const struct netbsd32_flock_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, how); /* int */ + *n_args = 2; + break; + } + /* netbsd32___msync13 */ + case 144: { + const struct netbsd32___msync13_args *p = params; + uarg[0] = (intptr_t) SCARG(p, addr).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + iarg[2] = SCARG(p, flags); /* int */ + *n_args = 3; + break; + } + /* netbsd32_readv */ + case 145: { + const struct netbsd32_readv_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, iovp).i32; /* netbsd32_iovecp_t */ + iarg[2] = SCARG(p, iovcnt); /* int */ + *n_args = 3; + break; + } + /* netbsd32_writev */ + case 146: { + const struct netbsd32_writev_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, iovp).i32; /* netbsd32_iovecp_t */ + iarg[2] = SCARG(p, iovcnt); /* int */ + *n_args = 3; + break; + } + /* netbsd32_getsid */ + case 147: { + const struct netbsd32_getsid_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + *n_args = 1; + break; + } + /* linux32_sys_fdatasync */ + case 148: { + const struct linux32_sys_fdatasync_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + *n_args = 1; + break; + } + /* linux32_sys___sysctl */ + case 149: { + const struct linux32_sys___sysctl_args *p = params; + uarg[0] = (intptr_t) SCARG(p, lsp).i32; /* linux32___sysctlp_t */ + *n_args = 1; + break; + } + /* netbsd32_mlock */ + case 150: { + const struct netbsd32_mlock_args *p = params; + uarg[0] = (intptr_t) SCARG(p, addr).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + *n_args = 2; + break; + } + /* netbsd32_munlock */ + case 151: { + const struct netbsd32_munlock_args *p = params; + uarg[0] = (intptr_t) SCARG(p, addr).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + *n_args = 2; + break; + } + /* netbsd32_mlockall */ + case 152: { + const struct netbsd32_mlockall_args *p = params; + iarg[0] = SCARG(p, flags); /* int */ + *n_args = 1; + break; + } + /* sys_munlockall */ + case 153: { + *n_args = 0; + break; + } + /* linux32_sys_sched_setparam */ + case 154: { + const struct linux32_sys_sched_setparam_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* const linux32_sched_paramp_t */ + *n_args = 2; + break; + } + /* linux32_sys_sched_getparam */ + case 155: { + const struct linux32_sys_sched_getparam_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_sched_paramp_t */ + *n_args = 2; + break; + } + /* linux32_sys_sched_setscheduler */ + case 156: { + const struct linux32_sys_sched_setscheduler_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + iarg[1] = SCARG(p, policy); /* int */ + uarg[2] = (intptr_t) SCARG(p, sp).i32; /* linux32_sched_paramp_t */ + *n_args = 3; + break; + } + /* linux32_sys_sched_getscheduler */ + case 157: { + const struct linux32_sys_sched_getscheduler_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + *n_args = 1; + break; + } + /* linux_sys_sched_yield */ + case 158: { + *n_args = 0; + break; + } + /* linux32_sys_sched_get_priority_max */ + case 159: { + const struct linux32_sys_sched_get_priority_max_args *p = params; + iarg[0] = SCARG(p, policy); /* int */ + *n_args = 1; + break; + } + /* linux32_sys_sched_get_priority_min */ + case 160: { + const struct linux32_sys_sched_get_priority_min_args *p = params; + iarg[0] = SCARG(p, policy); /* int */ + *n_args = 1; + break; + } + /* linux32_sys_nanosleep */ + case 162: { + const struct linux32_sys_nanosleep_args *p = params; + uarg[0] = (intptr_t) SCARG(p, rqtp).i32; /* linux32_timespecp_t */ + uarg[1] = (intptr_t) SCARG(p, rmtp).i32; /* linux32_timespecp_t */ + *n_args = 2; + break; + } + /* linux32_sys_mremap */ + case 163: { + const struct linux32_sys_mremap_args *p = params; + uarg[0] = (intptr_t) SCARG(p, old_address).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, old_size); /* netbsd32_size_t */ + iarg[2] = SCARG(p, new_size); /* netbsd32_size_t */ + iarg[3] = SCARG(p, flags); /* netbsd32_u_long */ + *n_args = 4; + break; + } + /* linux32_sys_setresuid16 */ + case 164: { + const struct linux32_sys_setresuid16_args *p = params; + iarg[0] = SCARG(p, ruid); /* linux32_uid16_t */ + iarg[1] = SCARG(p, euid); /* linux32_uid16_t */ + iarg[2] = SCARG(p, suid); /* linux32_uid16_t */ + *n_args = 3; + break; + } + /* linux32_sys_getresuid16 */ + case 165: { + const struct linux32_sys_getresuid16_args *p = params; + uarg[0] = (intptr_t) SCARG(p, ruid).i32; /* linux32_uid16p_t */ + uarg[1] = (intptr_t) SCARG(p, euid).i32; /* linux32_uid16p_t */ + uarg[2] = (intptr_t) SCARG(p, suid).i32; /* linux32_uid16p_t */ + *n_args = 3; + break; + } + /* netbsd32_poll */ + case 168: { + const struct netbsd32_poll_args *p = params; + uarg[0] = (intptr_t) SCARG(p, fds).i32; /* netbsd32_pollfdp_t */ + uarg[1] = SCARG(p, nfds); /* u_int */ + iarg[2] = SCARG(p, timeout); /* int */ + *n_args = 3; + break; + } + /* linux32_sys_setresgid16 */ + case 170: { + const struct linux32_sys_setresgid16_args *p = params; + iarg[0] = SCARG(p, rgid); /* linux32_gid16_t */ + iarg[1] = SCARG(p, egid); /* linux32_gid16_t */ + iarg[2] = SCARG(p, sgid); /* linux32_gid16_t */ + *n_args = 3; + break; + } + /* linux32_sys_getresgid16 */ + case 171: { + const struct linux32_sys_getresgid16_args *p = params; + uarg[0] = (intptr_t) SCARG(p, rgid).i32; /* linux32_gid16p_t */ + uarg[1] = (intptr_t) SCARG(p, egid).i32; /* linux32_gid16p_t */ + uarg[2] = (intptr_t) SCARG(p, sgid).i32; /* linux32_gid16p_t */ + *n_args = 3; + break; + } + /* linux32_sys_rt_sigreturn */ + case 173: { + const struct linux32_sys_rt_sigreturn_args *p = params; + uarg[0] = (intptr_t) SCARG(p, ucp).i32; /* linux32_ucontextp_t */ + *n_args = 1; + break; + } + /* linux32_sys_rt_sigaction */ + case 174: { + const struct linux32_sys_rt_sigaction_args *p = params; + iarg[0] = SCARG(p, signum); /* int */ + uarg[1] = (intptr_t) SCARG(p, nsa).i32; /* linux32_sigactionp_t */ + uarg[2] = (intptr_t) SCARG(p, osa).i32; /* linux32_sigactionp_t */ + iarg[3] = SCARG(p, sigsetsize); /* netbsd32_size_t */ + *n_args = 4; + break; + } + /* linux32_sys_rt_sigprocmask */ + case 175: { + const struct linux32_sys_rt_sigprocmask_args *p = params; + iarg[0] = SCARG(p, how); /* int */ + uarg[1] = (intptr_t) SCARG(p, set).i32; /* linux32_sigsetp_t */ + uarg[2] = (intptr_t) SCARG(p, oset).i32; /* linux32_sigsetp_t */ + iarg[3] = SCARG(p, sigsetsize); /* netbsd32_size_t */ + *n_args = 4; + break; + } + /* linux32_sys_rt_sigpending */ + case 176: { + const struct linux32_sys_rt_sigpending_args *p = params; + uarg[0] = (intptr_t) SCARG(p, set).i32; /* linux32_sigsetp_t */ + iarg[1] = SCARG(p, sigsetsize); /* netbsd32_size_t */ + *n_args = 2; + break; + } + /* linux32_sys_rt_sigtimedwait */ + case 177: { + const struct linux32_sys_rt_sigtimedwait_args *p = params; + uarg[0] = (intptr_t) SCARG(p, set).i32; /* const linux32_sigsetp_t */ + uarg[1] = (intptr_t) SCARG(p, info).i32; /* linux32_siginfop_t */ + uarg[2] = (intptr_t) SCARG(p, timeout).i32; /* const linux32_timespecp_t */ + *n_args = 3; + break; + } + /* linux32_sys_rt_queueinfo */ + case 178: { + const struct linux32_sys_rt_queueinfo_args *p = params; + iarg[0] = SCARG(p, pid); /* int */ + iarg[1] = SCARG(p, sig); /* int */ + uarg[2] = (intptr_t) SCARG(p, uinfo).i32; /* linux32_siginfop_t */ + *n_args = 3; + break; + } + /* linux32_sys_rt_sigsuspend */ + case 179: { + const struct linux32_sys_rt_sigsuspend_args *p = params; + uarg[0] = (intptr_t) SCARG(p, unewset).i32; /* linux32_sigsetp_t */ + iarg[1] = SCARG(p, sigsetsize); /* netbsd32_size_t */ + *n_args = 2; + break; + } + /* linux32_sys_pread */ + case 180: { + const struct linux32_sys_pread_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, nbyte); /* netbsd32_size_t */ + iarg[3] = SCARG(p, offset); /* netbsd32_off_t */ + *n_args = 4; + break; + } + /* linux32_sys_pwrite */ + case 181: { + const struct linux32_sys_pwrite_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, nbyte); /* netbsd32_size_t */ + iarg[3] = SCARG(p, offset); /* netbsd32_off_t */ + *n_args = 4; + break; + } + /* linux32_sys_chown16 */ + case 182: { + const struct linux32_sys_chown16_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, uid); /* linux32_uid16_t */ + iarg[2] = SCARG(p, gid); /* linux32_gid16_t */ + *n_args = 3; + break; + } + /* netbsd32___getcwd */ + case 183: { + const struct netbsd32___getcwd_args *p = params; + uarg[0] = (intptr_t) SCARG(p, bufp).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, length); /* netbsd32_size_t */ + *n_args = 2; + break; + } + /* sys___vfork14 */ + case 190: { + *n_args = 0; + break; + } + /* linux32_sys_ugetrlimit */ + case 191: { + const struct linux32_sys_ugetrlimit_args *p = params; + iarg[0] = SCARG(p, which); /* int */ + uarg[1] = (intptr_t) SCARG(p, rlp).i32; /* netbsd32_orlimitp_t */ + *n_args = 2; + break; + } + /* linux32_sys_mmap2 */ + case 192: { + const struct linux32_sys_mmap2_args *p = params; + iarg[0] = SCARG(p, addr); /* netbsd32_u_long */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + iarg[2] = SCARG(p, prot); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + iarg[4] = SCARG(p, fd); /* int */ + iarg[5] = SCARG(p, offset); /* linux32_off_t */ + *n_args = 6; + break; + } + /* linux32_sys_truncate64 */ + case 193: { + const struct linux32_sys_truncate64_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = SCARG(p, lenlo); /* uint32_t */ + uarg[2] = SCARG(p, lenhi); /* uint32_t */ + *n_args = 3; + break; + } + /* linux32_sys_ftruncate64 */ + case 194: { + const struct linux32_sys_ftruncate64_args *p = params; + uarg[0] = SCARG(p, fd); /* unsigned int */ + uarg[1] = SCARG(p, lenlo); /* uint32_t */ + uarg[2] = SCARG(p, lenhi); /* uint32_t */ + *n_args = 3; + break; + } + /* linux32_sys_stat64 */ + case 195: { + const struct linux32_sys_stat64_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_stat64p */ + *n_args = 2; + break; + } + /* linux32_sys_lstat64 */ + case 196: { + const struct linux32_sys_lstat64_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_stat64p */ + *n_args = 2; + break; + } + /* linux32_sys_fstat64 */ + case 197: { + const struct linux32_sys_fstat64_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, sp).i32; /* linux32_stat64p */ + *n_args = 2; + break; + } + /* netbsd32___posix_lchown */ + case 198: { + const struct netbsd32___posix_lchown_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = SCARG(p, uid); /* uid_t */ + iarg[2] = SCARG(p, gid); /* gid_t */ + *n_args = 3; + break; + } + /* sys_getuid */ + case 199: { + *n_args = 0; + break; + } + /* sys_getgid */ + case 200: { + *n_args = 0; + break; + } + /* sys_geteuid */ + case 201: { + *n_args = 0; + break; + } + /* sys_getegid */ + case 202: { + *n_args = 0; + break; + } + /* netbsd32_setreuid */ + case 203: { + const struct netbsd32_setreuid_args *p = params; + uarg[0] = SCARG(p, ruid); /* uid_t */ + uarg[1] = SCARG(p, euid); /* uid_t */ + *n_args = 2; + break; + } + /* netbsd32_setregid */ + case 204: { + const struct netbsd32_setregid_args *p = params; + iarg[0] = SCARG(p, rgid); /* gid_t */ + iarg[1] = SCARG(p, egid); /* gid_t */ + *n_args = 2; + break; + } + /* netbsd32_getgroups */ + case 205: { + const struct netbsd32_getgroups_args *p = params; + iarg[0] = SCARG(p, gidsetsize); /* int */ + uarg[1] = (intptr_t) SCARG(p, gidset).i32; /* netbsd32_gid_tp */ + *n_args = 2; + break; + } + /* netbsd32_setgroups */ + case 206: { + const struct netbsd32_setgroups_args *p = params; + iarg[0] = SCARG(p, gidsetsize); /* int */ + uarg[1] = (intptr_t) SCARG(p, gidset).i32; /* netbsd32_gid_tp */ + *n_args = 2; + break; + } + /* netbsd32___posix_fchown */ + case 207: { + const struct netbsd32___posix_fchown_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = SCARG(p, uid); /* uid_t */ + iarg[2] = SCARG(p, gid); /* gid_t */ + *n_args = 3; + break; + } + /* linux32_sys_setresuid */ + case 208: { + const struct linux32_sys_setresuid_args *p = params; + uarg[0] = SCARG(p, ruid); /* uid_t */ + uarg[1] = SCARG(p, euid); /* uid_t */ + uarg[2] = SCARG(p, suid); /* uid_t */ + *n_args = 3; + break; + } + /* linux32_sys_getresuid */ + case 209: { + const struct linux32_sys_getresuid_args *p = params; + uarg[0] = (intptr_t) SCARG(p, ruid).i32; /* linux32_uidp_t */ + uarg[1] = (intptr_t) SCARG(p, euid).i32; /* linux32_uidp_t */ + uarg[2] = (intptr_t) SCARG(p, suid).i32; /* linux32_uidp_t */ + *n_args = 3; + break; + } + /* linux32_sys_setresgid */ + case 210: { + const struct linux32_sys_setresgid_args *p = params; + iarg[0] = SCARG(p, rgid); /* gid_t */ + iarg[1] = SCARG(p, egid); /* gid_t */ + iarg[2] = SCARG(p, sgid); /* gid_t */ + *n_args = 3; + break; + } + /* linux32_sys_getresgid */ + case 211: { + const struct linux32_sys_getresgid_args *p = params; + uarg[0] = (intptr_t) SCARG(p, rgid).i32; /* linux32_gidp_t */ + uarg[1] = (intptr_t) SCARG(p, egid).i32; /* linux32_gidp_t */ + uarg[2] = (intptr_t) SCARG(p, sgid).i32; /* linux32_gidp_t */ + *n_args = 3; + break; + } + /* netbsd32___posix_chown */ + case 212: { + const struct netbsd32___posix_chown_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = SCARG(p, uid); /* uid_t */ + iarg[2] = SCARG(p, gid); /* gid_t */ + *n_args = 3; + break; + } + /* netbsd32_setuid */ + case 213: { + const struct netbsd32_setuid_args *p = params; + uarg[0] = SCARG(p, uid); /* uid_t */ + *n_args = 1; + break; + } + /* netbsd32_setgid */ + case 214: { + const struct netbsd32_setgid_args *p = params; + iarg[0] = SCARG(p, gid); /* gid_t */ + *n_args = 1; + break; + } + /* linux32_sys_setfsuid */ + case 215: { + const struct linux32_sys_setfsuid_args *p = params; + uarg[0] = SCARG(p, uid); /* uid_t */ + *n_args = 1; + break; + } + /* linux32_sys_setfsgid */ + case 216: { + const struct linux32_sys_setfsgid_args *p = params; + iarg[0] = SCARG(p, gid); /* gid_t */ + *n_args = 1; + break; + } + /* linux32_sys_getdents64 */ + case 217: { + const struct linux32_sys_getdents64_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, dent).i32; /* linux32_dirent64p_t */ + uarg[2] = SCARG(p, count); /* unsigned int */ + *n_args = 3; + break; + } + /* netbsd32_mincore */ + case 219: { + const struct netbsd32_mincore_args *p = params; + uarg[0] = (intptr_t) SCARG(p, addr).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + uarg[2] = (intptr_t) SCARG(p, vec).i32; /* netbsd32_charp */ + *n_args = 3; + break; + } + /* netbsd32_madvise */ + case 220: { + const struct netbsd32_madvise_args *p = params; + uarg[0] = (intptr_t) SCARG(p, addr).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + iarg[2] = SCARG(p, behav); /* int */ + *n_args = 3; + break; + } +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args + /* linux32_sys_fcntl64 */ + case 221: { + const struct linux32_sys_fcntl64_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, cmd); /* int */ + uarg[2] = (intptr_t) SCARG(p, arg).i32; /* netbsd32_voidp */ + *n_args = 3; + break; + } + /* linux_sys_gettid */ + case 224: { + *n_args = 0; + break; + } + /* netbsd32_setxattr */ + case 226: { + const struct netbsd32_setxattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, value).i32; /* netbsd32_voidp */ + iarg[3] = SCARG(p, size); /* netbsd32_size_t */ + iarg[4] = SCARG(p, flags); /* int */ + *n_args = 5; + break; + } + /* netbsd32_lsetxattr */ + case 227: { + const struct netbsd32_lsetxattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, value).i32; /* netbsd32_voidp */ + iarg[3] = SCARG(p, size); /* netbsd32_size_t */ + iarg[4] = SCARG(p, flags); /* int */ + *n_args = 5; + break; + } + /* netbsd32_fsetxattr */ + case 228: { + const struct netbsd32_fsetxattr_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, value).i32; /* netbsd32_voidp */ + iarg[3] = SCARG(p, size); /* netbsd32_size_t */ + iarg[4] = SCARG(p, flags); /* int */ + *n_args = 5; + break; + } + /* netbsd32_getxattr */ + case 229: { + const struct netbsd32_getxattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, value).i32; /* netbsd32_voidp */ + iarg[3] = SCARG(p, size); /* netbsd32_size_t */ + *n_args = 4; + break; + } + /* netbsd32_lgetxattr */ + case 230: { + const struct netbsd32_lgetxattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, value).i32; /* netbsd32_voidp */ + iarg[3] = SCARG(p, size); /* netbsd32_size_t */ + *n_args = 4; + break; + } + /* netbsd32_fgetxattr */ + case 231: { + const struct netbsd32_fgetxattr_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, value).i32; /* netbsd32_voidp */ + iarg[3] = SCARG(p, size); /* netbsd32_size_t */ + *n_args = 4; + break; + } + /* netbsd32_listxattr */ + case 232: { + const struct netbsd32_listxattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, list).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, size); /* netbsd32_size_t */ + *n_args = 3; + break; + } + /* netbsd32_llistxattr */ + case 233: { + const struct netbsd32_llistxattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, list).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, size); /* netbsd32_size_t */ + *n_args = 3; + break; + } + /* netbsd32_flistxattr */ + case 234: { + const struct netbsd32_flistxattr_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, list).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, size); /* netbsd32_size_t */ + *n_args = 3; + break; + } + /* netbsd32_removexattr */ + case 235: { + const struct netbsd32_removexattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + *n_args = 2; + break; + } + /* netbsd32_lremovexattr */ + case 236: { + const struct netbsd32_lremovexattr_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + *n_args = 2; + break; + } + /* netbsd32_fremovexattr */ + case 237: { + const struct netbsd32_fremovexattr_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_charp */ + *n_args = 2; + break; + } + /* linux32_sys_tkill */ + case 238: { + const struct linux32_sys_tkill_args *p = params; + iarg[0] = SCARG(p, tid); /* int */ + iarg[1] = SCARG(p, sig); /* int */ + *n_args = 2; + break; + } + /* linux32_sys_futex */ + case 240: { + const struct linux32_sys_futex_args *p = params; + uarg[0] = (intptr_t) SCARG(p, uaddr).i32; /* linux32_intp_t */ + iarg[1] = SCARG(p, op); /* int */ + iarg[2] = SCARG(p, val); /* int */ + uarg[3] = (intptr_t) SCARG(p, timeout).i32; /* linux32_timespecp_t */ + uarg[4] = (intptr_t) SCARG(p, uaddr2).i32; /* linux32_intp_t */ + iarg[5] = SCARG(p, val3); /* int */ + *n_args = 6; + break; + } + /* linux32_sys_sched_setaffinity */ + case 241: { + const struct linux32_sys_sched_setaffinity_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + uarg[1] = SCARG(p, len); /* unsigned int */ + uarg[2] = (intptr_t) SCARG(p, mask).i32; /* linux32_ulongp_t */ + *n_args = 3; + break; + } + /* linux32_sys_sched_getaffinity */ + case 242: { + const struct linux32_sys_sched_getaffinity_args *p = params; + iarg[0] = SCARG(p, pid); /* pid_t */ + uarg[1] = SCARG(p, len); /* unsigned int */ + uarg[2] = (intptr_t) SCARG(p, mask).i32; /* linux32_ulongp_t */ + *n_args = 3; + break; + } + /* linux32_sys_exit_group */ + case 248: { + const struct linux32_sys_exit_group_args *p = params; + iarg[0] = SCARG(p, error_code); /* int */ + *n_args = 1; + break; + } + /* linux32_sys_set_tid_address */ + case 256: { + const struct linux32_sys_set_tid_address_args *p = params; + uarg[0] = (intptr_t) SCARG(p, tid).i32; /* linux32_intp_t */ + *n_args = 1; + break; + } + /* linux32_sys_timer_create */ + case 257: { + const struct linux32_sys_timer_create_args *p = params; + iarg[0] = SCARG(p, clockid); /* clockid_t */ + uarg[1] = (intptr_t) SCARG(p, evp); /* struct linux32_sigevent * */ + uarg[2] = (intptr_t) SCARG(p, timerid); /* timer_t * */ + *n_args = 3; + break; + } + /* linux32_sys_timer_settime */ + case 258: { + const struct linux32_sys_timer_settime_args *p = params; + iarg[0] = SCARG(p, timerid); /* timer_t */ + iarg[1] = SCARG(p, flags); /* int */ + uarg[2] = (intptr_t) SCARG(p, tim); /* const struct linux32_itimerspec * */ + uarg[3] = (intptr_t) SCARG(p, otim); /* struct linux32_itimerspec * */ + *n_args = 4; + break; + } + /* linux32_sys_timer_gettime */ + case 259: { + const struct linux32_sys_timer_gettime_args *p = params; + iarg[0] = SCARG(p, timerid); /* timer_t */ + uarg[1] = (intptr_t) SCARG(p, tim); /* struct linux32_itimerspec * */ + *n_args = 2; + break; + } + /* sys_timer_getoverrun */ + case 260: { + const struct sys_timer_getoverrun_args *p = params; + iarg[0] = SCARG(p, timerid); /* timer_t */ + *n_args = 1; + break; + } + /* sys_timer_delete */ + case 261: { + const struct sys_timer_delete_args *p = params; + iarg[0] = SCARG(p, timerid); /* timer_t */ + *n_args = 1; + break; + } + /* linux32_sys_clock_settime */ + case 262: { + const struct linux32_sys_clock_settime_args *p = params; + iarg[0] = SCARG(p, which); /* clockid_t */ + uarg[1] = (intptr_t) SCARG(p, tp).i32; /* linux32_timespecp_t */ + *n_args = 2; + break; + } + /* linux32_sys_clock_gettime */ + case 263: { + const struct linux32_sys_clock_gettime_args *p = params; + iarg[0] = SCARG(p, which); /* clockid_t */ + uarg[1] = (intptr_t) SCARG(p, tp).i32; /* linux32_timespecp_t */ + *n_args = 2; + break; + } + /* linux32_sys_clock_getres */ + case 264: { + const struct linux32_sys_clock_getres_args *p = params; + iarg[0] = SCARG(p, which); /* clockid_t */ + uarg[1] = (intptr_t) SCARG(p, tp).i32; /* linux32_timespecp_t */ + *n_args = 2; + break; + } + /* linux32_sys_clock_nanosleep */ + case 265: { + const struct linux32_sys_clock_nanosleep_args *p = params; + iarg[0] = SCARG(p, which); /* clockid_t */ + iarg[1] = SCARG(p, flags); /* int */ + uarg[2] = (intptr_t) SCARG(p, rqtp).i32; /* linux32_timespecp_t */ + uarg[3] = (intptr_t) SCARG(p, rmtp).i32; /* linux32_timespecp_t */ + *n_args = 4; + break; + } + /* linux32_sys_statfs64 */ + case 266: { + const struct linux32_sys_statfs64_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, sz); /* netbsd32_size_t */ + uarg[2] = (intptr_t) SCARG(p, sp).i32; /* linux32_statfs64p */ + *n_args = 3; + break; + } + /* linux32_sys_fstatfs64 */ + case 267: { + const struct linux32_sys_fstatfs64_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, sz); /* netbsd32_size_t */ + uarg[2] = (intptr_t) SCARG(p, sp).i32; /* linux32_statfs64p */ + *n_args = 3; + break; + } + /* linux32_sys_tgkill */ + case 268: { + const struct linux32_sys_tgkill_args *p = params; + iarg[0] = SCARG(p, tgid); /* int */ + iarg[1] = SCARG(p, tid); /* int */ + iarg[2] = SCARG(p, sig); /* int */ + *n_args = 3; + break; + } + /* compat_50_netbsd32_utimes */ + case 269: { + const struct compat_50_netbsd32_utimes_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[1] = (intptr_t) SCARG(p, tptr).i32; /* netbsd32_timeval50p_t */ + *n_args = 2; + break; + } + /* linux32_sys_fadvise64_64 */ + case 270: { + const struct linux32_sys_fadvise64_64_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = SCARG(p, offlo); /* uint32_t */ + uarg[2] = SCARG(p, offhi); /* uint32_t */ + uarg[3] = SCARG(p, lenlo); /* uint32_t */ + uarg[4] = SCARG(p, lenhi); /* uint32_t */ + iarg[5] = SCARG(p, advice); /* int */ + *n_args = 6; + break; + } + /* linux32_sys_socket */ + case 281: { + const struct linux32_sys_socket_args *p = params; + iarg[0] = SCARG(p, domain); /* int */ + iarg[1] = SCARG(p, type); /* int */ + iarg[2] = SCARG(p, protocol); /* int */ + *n_args = 3; + break; + } + /* linux32_sys_bind */ + case 282: { + const struct linux32_sys_bind_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_osockaddrp_t */ + iarg[2] = SCARG(p, namelen); /* int */ + *n_args = 3; + break; + } + /* linux32_sys_connect */ + case 283: { + const struct linux32_sys_connect_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_osockaddrp_t */ + iarg[2] = SCARG(p, namelen); /* int */ + *n_args = 3; + break; + } + /* linux32_sys_accept */ + case 285: { + const struct linux32_sys_accept_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + uarg[1] = (intptr_t) SCARG(p, name).i32; /* netbsd32_osockaddrp_t */ + uarg[2] = (intptr_t) SCARG(p, anamelen).i32; /* netbsd32_intp */ + *n_args = 3; + break; + } + /* linux32_sys_getsockname */ + case 286: { + const struct linux32_sys_getsockname_args *p = params; + iarg[0] = SCARG(p, fdec); /* int */ + uarg[1] = (intptr_t) SCARG(p, asa).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, alen).i32; /* netbsd32_intp */ + *n_args = 3; + break; + } + /* linux32_sys_getpeername */ + case 287: { + const struct linux32_sys_getpeername_args *p = params; + iarg[0] = SCARG(p, fdes); /* int */ + uarg[1] = (intptr_t) SCARG(p, asa).i32; /* netbsd32_sockaddrp_t */ + uarg[2] = (intptr_t) SCARG(p, alen).i32; /* netbsd32_intp */ + *n_args = 3; + break; + } + /* linux32_sys_socketpair */ + case 288: { + const struct linux32_sys_socketpair_args *p = params; + iarg[0] = SCARG(p, domain); /* int */ + iarg[1] = SCARG(p, type); /* int */ + iarg[2] = SCARG(p, protocol); /* int */ + uarg[3] = (intptr_t) SCARG(p, rsv).i32; /* netbsd32_intp */ + *n_args = 4; + break; + } + /* linux32_sys_send */ + case 289: { + const struct linux32_sys_send_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, len); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + *n_args = 4; + break; + } + /* linux32_sys_sendto */ + case 290: { + const struct linux32_sys_sendto_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + uarg[1] = (intptr_t) SCARG(p, msg).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, len); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + uarg[4] = (intptr_t) SCARG(p, to).i32; /* netbsd32_osockaddrp_t */ + iarg[5] = SCARG(p, tolen); /* int */ + *n_args = 6; + break; + } + /* linux32_sys_recv */ + case 291: { + const struct linux32_sys_recv_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, len); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + *n_args = 4; + break; + } + /* linux32_sys_recvfrom */ + case 292: { + const struct linux32_sys_recvfrom_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + uarg[1] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[2] = SCARG(p, len); /* netbsd32_size_t */ + iarg[3] = SCARG(p, flags); /* int */ + uarg[4] = (intptr_t) SCARG(p, from).i32; /* netbsd32_osockaddrp_t */ + uarg[5] = (intptr_t) SCARG(p, fromlenaddr).i32; /* netbsd32_intp */ + *n_args = 6; + break; + } + /* linux32_sys_setsockopt */ + case 294: { + const struct linux32_sys_setsockopt_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + iarg[1] = SCARG(p, level); /* int */ + iarg[2] = SCARG(p, optname); /* int */ + uarg[3] = (intptr_t) SCARG(p, optval).i32; /* netbsd32_voidp */ + iarg[4] = SCARG(p, optlen); /* int */ + *n_args = 5; + break; + } + /* linux32_sys_getsockopt */ + case 295: { + const struct linux32_sys_getsockopt_args *p = params; + iarg[0] = SCARG(p, s); /* int */ + iarg[1] = SCARG(p, level); /* int */ + iarg[2] = SCARG(p, optname); /* int */ + uarg[3] = (intptr_t) SCARG(p, optval).i32; /* netbsd32_voidp */ + uarg[4] = (intptr_t) SCARG(p, optlen).i32; /* netbsd32_intp */ + *n_args = 5; + break; + } + /* linux32_sys_openat */ + case 322: { + const struct linux32_sys_openat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, flags); /* int */ + iarg[3] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 4; + break; + } + /* netbsd32_mkdirat */ + case 323: { + const struct netbsd32_mkdirat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 3; + break; + } + /* linux32_sys_mknodat */ + case 324: { + const struct linux32_sys_mknodat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, mode); /* linux_umode_t */ + uarg[3] = SCARG(p, dev); /* unsigned */ + *n_args = 4; + break; + } + /* linux32_sys_fchownat */ + case 325: { + const struct linux32_sys_fchownat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[2] = SCARG(p, owner); /* uid_t */ + iarg[3] = SCARG(p, group); /* gid_t */ + iarg[4] = SCARG(p, flag); /* int */ + *n_args = 5; + break; + } + /* linux32_sys_fstatat64 */ + case 327: { + const struct linux32_sys_fstatat64_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, sp).i32; /* linux32_stat64p */ + iarg[3] = SCARG(p, flag); /* int */ + *n_args = 4; + break; + } + /* linux32_sys_unlinkat */ + case 328: { + const struct linux32_sys_unlinkat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, flag); /* int */ + *n_args = 3; + break; + } + /* netbsd32_renameat */ + case 329: { + const struct netbsd32_renameat_args *p = params; + iarg[0] = SCARG(p, fromfd); /* int */ + uarg[1] = (intptr_t) SCARG(p, from).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, tofd); /* int */ + uarg[3] = (intptr_t) SCARG(p, to).i32; /* netbsd32_charp */ + *n_args = 4; + break; + } + /* linux32_sys_linkat */ + case 330: { + const struct linux32_sys_linkat_args *p = params; + iarg[0] = SCARG(p, fd1); /* int */ + uarg[1] = (intptr_t) SCARG(p, name1).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, fd2); /* int */ + uarg[3] = (intptr_t) SCARG(p, name2).i32; /* netbsd32_charp */ + iarg[4] = SCARG(p, flags); /* int */ + *n_args = 5; + break; + } + /* netbsd32_symlinkat */ + case 331: { + const struct netbsd32_symlinkat_args *p = params; + uarg[0] = (intptr_t) SCARG(p, path1).i32; /* netbsd32_charp */ + iarg[1] = SCARG(p, fd); /* int */ + uarg[2] = (intptr_t) SCARG(p, path2).i32; /* netbsd32_charp */ + *n_args = 3; + break; + } + /* netbsd32_readlinkat */ + case 332: { + const struct netbsd32_readlinkat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_charp */ + iarg[3] = SCARG(p, bufsize); /* linux32_size_t */ + *n_args = 4; + break; + } + /* linux32_sys_fchmodat */ + case 333: { + const struct linux32_sys_fchmodat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, mode); /* linux_umode_t */ + *n_args = 3; + break; + } + /* linux32_sys_faccessat */ + case 334: { + const struct linux32_sys_faccessat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, amode); /* int */ + *n_args = 3; + break; + } + /* linux32_sys_ppoll */ + case 336: { + const struct linux32_sys_ppoll_args *p = params; + uarg[0] = (intptr_t) SCARG(p, fds).i32; /* netbsd32_pollfdp_t */ + uarg[1] = SCARG(p, nfds); /* u_int */ + uarg[2] = (intptr_t) SCARG(p, timeout).i32; /* linux32_timespecp_t */ + uarg[3] = (intptr_t) SCARG(p, sigset).i32; /* linux32_sigsetp_t */ + *n_args = 4; + break; + } + /* netbsd32___futex_set_robust_list */ + case 338: { + const struct netbsd32___futex_set_robust_list_args *p = params; + uarg[0] = (intptr_t) SCARG(p, head).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, len); /* netbsd32_size_t */ + *n_args = 2; + break; + } + /* netbsd32___futex_get_robust_list */ + case 339: { + const struct netbsd32___futex_get_robust_list_args *p = params; + iarg[0] = SCARG(p, lwpid); /* lwpid_t */ + uarg[1] = (intptr_t) SCARG(p, headp).i32; /* netbsd32_voidp */ + uarg[2] = (intptr_t) SCARG(p, lenp).i32; /* netbsd32_size_tp */ + *n_args = 3; + break; + } + /* linux32_sys_utimensat */ + case 348: { + const struct linux32_sys_utimensat_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + uarg[2] = (intptr_t) SCARG(p, times).i32; /* linux32_timespecp_t */ + iarg[3] = SCARG(p, flag); /* int */ + *n_args = 4; + break; + } + /* linux_sys_timerfd_create */ + case 350: { + const struct linux_sys_timerfd_create_args *p = params; + iarg[0] = SCARG(p, clock_id); /* clockid_t */ + iarg[1] = SCARG(p, flags); /* int */ + *n_args = 2; + break; + } + /* linux32_sys_eventfd */ + case 351: { + const struct linux32_sys_eventfd_args *p = params; + uarg[0] = SCARG(p, initval); /* unsigned int */ + *n_args = 1; + break; + } + /* linux32_sys_fallocate */ + case 352: { + const struct linux32_sys_fallocate_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, mode); /* int */ + iarg[2] = SCARG(p, offset); /* off_t */ + iarg[3] = SCARG(p, len); /* off_t */ + *n_args = 4; + break; + } + /* linux32_sys_timerfd_settime */ + case 353: { + const struct linux32_sys_timerfd_settime_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + iarg[1] = SCARG(p, flags); /* int */ + uarg[2] = (intptr_t) SCARG(p, tim); /* const struct linux32_itimerspec * */ + uarg[3] = (intptr_t) SCARG(p, otim); /* struct linux32_itimerspec * */ + *n_args = 4; + break; + } + /* linux32_sys_timerfd_gettime */ + case 354: { + const struct linux32_sys_timerfd_gettime_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, tim); /* struct linux32_itimerspec * */ + *n_args = 2; + break; + } + /* linux32_sys_eventfd2 */ + case 356: { + const struct linux32_sys_eventfd2_args *p = params; + uarg[0] = SCARG(p, initval); /* unsigned int */ + iarg[1] = SCARG(p, flags); /* int */ + *n_args = 2; + break; + } + /* linux32_sys_dup3 */ + case 358: { + const struct linux32_sys_dup3_args *p = params; + iarg[0] = SCARG(p, from); /* int */ + iarg[1] = SCARG(p, to); /* int */ + iarg[2] = SCARG(p, flags); /* int */ + *n_args = 3; + break; + } + /* linux32_sys_pipe2 */ + case 359: { + const struct linux32_sys_pipe2_args *p = params; + uarg[0] = (intptr_t) SCARG(p, fd).i32; /* netbsd32_intp */ + iarg[1] = SCARG(p, flags); /* int */ + *n_args = 2; + break; + } + /* linux32_sys_preadv */ + case 361: { + const struct linux32_sys_preadv_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, iovp).i32; /* const netbsd32_iovecp_t */ + iarg[2] = SCARG(p, iovcnt); /* int */ + iarg[3] = SCARG(p, off_lo); /* netbsd32_u_long */ + iarg[4] = SCARG(p, off_hi); /* netbsd32_u_long */ + *n_args = 5; + break; + } + /* linux32_sys_pwritev */ + case 362: { + const struct linux32_sys_pwritev_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, iovp).i32; /* const netbsd32_iovecp_t */ + iarg[2] = SCARG(p, iovcnt); /* int */ + iarg[3] = SCARG(p, off_lo); /* netbsd32_u_long */ + iarg[4] = SCARG(p, off_hi); /* netbsd32_u_long */ + *n_args = 5; + break; + } + /* netbsd32_getrandom */ + case 384: { + const struct netbsd32_getrandom_args *p = params; + uarg[0] = (intptr_t) SCARG(p, buf).i32; /* netbsd32_voidp */ + iarg[1] = SCARG(p, buflen); /* netbsd32_size_t */ + uarg[2] = SCARG(p, flags); /* unsigned int */ + *n_args = 3; + break; + } + /* linux32_sys_statx */ + case 397: { + const struct linux32_sys_statx_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path).i32; /* netbsd32_charp */ + iarg[2] = SCARG(p, flag); /* int */ + uarg[3] = SCARG(p, mask); /* unsigned int */ + uarg[4] = (intptr_t) SCARG(p, sp).i32; /* linux32_statxp */ + *n_args = 5; + break; + } + /* linux32_sys_set_tls */ + case 485: { + const struct linux32_sys_set_tls_args *p = params; + uarg[0] = (intptr_t) SCARG(p, tls).i32; /* netbsd32_voidp */ + *n_args = 1; + break; + } + /* linux32_sys_get_tls */ + case 486: { + *n_args = 0; + break; + } + default: + *n_args = 0; + break; + }; +} +static void +systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) +{ + const char *p = NULL; + switch (sysnum) { + /* linux_sys_nosys */ + case 0: + break; + /* linux32_sys_exit */ + case 1: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* sys_fork */ + case 2: + break; + /* netbsd32_read */ + case 3: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_write */ + case 4: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* linux32_sys_open */ + case 5: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "int"; + break; + case 2: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* netbsd32_close */ + case 6: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_waitpid */ + case 7: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_intp"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_creat */ + case 8: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* netbsd32_link */ + case 9: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_unlink */ + case 10: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_execve */ + case 11: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charpp"; + break; + case 2: + p = "netbsd32_charpp"; + break; + default: + break; + }; + break; + /* netbsd32_chdir */ + case 12: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_time */ + case 13: + switch(ndx) { + case 0: + p = "linux32_timep_t"; + break; + default: + break; + }; + break; + /* linux32_sys_mknod */ + case 14: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux_umode_t"; + break; + case 2: + p = "unsigned"; + break; + default: + break; + }; + break; + /* netbsd32_chmod */ + case 15: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* linux32_sys_lchown16 */ + case 16: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_uid16_t"; + break; + case 2: + p = "linux32_gid16_t"; + break; + default: + break; + }; + break; + /* compat_43_netbsd32_olseek */ + case 19: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_long"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* sys_getpid */ + case 20: + break; + /* netbsd32_setuid */ + case 23: + switch(ndx) { + case 0: + p = "uid_t"; + break; + default: + break; + }; + break; + /* sys_getuid */ + case 24: + break; + /* linux32_sys_stime */ + case 25: + switch(ndx) { + case 0: + p = "linux32_timep_t"; + break; + default: + break; + }; + break; + /* linux32_sys_ptrace */ + case 26: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_alarm */ + case 27: + switch(ndx) { + case 0: + p = "unsigned int"; + break; + default: + break; + }; + break; + /* linux_sys_pause */ + case 29: + break; + /* linux32_sys_utime */ + case 30: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_utimbufp_t"; + break; + default: + break; + }; + break; + /* netbsd32_access */ + case 33: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_nice */ + case 34: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* sys_sync */ + case 36: + break; + /* linux32_sys_kill */ + case 37: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32___posix_rename */ + case 38: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_mkdir */ + case 39: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* netbsd32_rmdir */ + case 40: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_dup */ + case 41: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_pipe */ + case 42: + switch(ndx) { + case 0: + p = "netbsd32_intp"; + break; + default: + break; + }; + break; + /* linux32_sys_times */ + case 43: + switch(ndx) { + case 0: + p = "linux32_tmsp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_brk */ + case 45: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_setgid */ + case 46: + switch(ndx) { + case 0: + p = "gid_t"; + break; + default: + break; + }; + break; + /* sys_getgid */ + case 47: + break; + /* linux32_sys_signal */ + case 48: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_handlerp_t"; + break; + default: + break; + }; + break; + /* sys_geteuid */ + case 49: + break; + /* sys_getegid */ + case 50: + break; + /* netbsd32_acct */ + case 51: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_ioctl */ + case 54: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_u_long"; + break; + case 2: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_fcntl */ + case 55: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "netbsd32_voidp"; + break; + default: + break; + }; + break; + /* netbsd32_setpgid */ + case 57: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_oldolduname */ + case 59: + switch(ndx) { + case 0: + p = "linux32_oldold_utsnamep_t"; + break; + default: + break; + }; + break; + /* netbsd32_umask */ + case 60: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_chroot */ + case 61: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_dup2 */ + case 63: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* sys_getppid */ + case 64: + break; + /* sys_getpgrp */ + case 65: + break; + /* sys_setsid */ + case 66: + break; + /* linux32_sys_siggetmask */ + case 68: + break; + /* linux32_sys_sigsetmask */ + case 69: + switch(ndx) { + case 0: + p = "linux32_old_sigset_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setreuid16 */ + case 70: + switch(ndx) { + case 0: + p = "linux32_uid16_t"; + break; + case 1: + p = "linux32_uid16_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setregid16 */ + case 71: + switch(ndx) { + case 0: + p = "linux32_gid16_t"; + break; + case 1: + p = "linux32_gid16_t"; + break; + default: + break; + }; + break; + /* compat_43_netbsd32_osethostname */ + case 74: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "u_int"; + break; + default: + break; + }; + break; + /* linux32_sys_setrlimit */ + case 75: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "netbsd32_orlimitp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getrlimit */ + case 76: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "netbsd32_orlimitp_t"; + break; + default: + break; + }; + break; + /* compat_50_netbsd32_getrusage */ + case 77: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_rusage50p_t"; + break; + default: + break; + }; + break; + /* linux32_sys_gettimeofday */ + case 78: + switch(ndx) { + case 0: + p = "netbsd32_timeval50p_t"; + break; + case 1: + p = "netbsd32_timezonep_t"; + break; + default: + break; + }; + break; + /* linux32_sys_settimeofday */ + case 79: + switch(ndx) { + case 0: + p = "netbsd32_timeval50p_t"; + break; + case 1: + p = "netbsd32_timezonep_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getgroups16 */ + case 80: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_gid16p_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setgroups16 */ + case 81: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_gid16p_t"; + break; + default: + break; + }; + break; + /* linux32_sys_oldselect */ + case 82: + switch(ndx) { + case 0: + p = "linux32_oldselectp_t"; + break; + default: + break; + }; + break; + /* netbsd32_symlink */ + case 83: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* compat_43_netbsd32_lstat43 */ + case 84: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_stat43p_t"; + break; + default: + break; + }; + break; + /* netbsd32_readlink */ + case 85: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* linux32_sys_swapon */ + case 87: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_reboot */ + case 88: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_voidp"; + break; + default: + break; + }; + break; + /* linux32_sys_readdir */ + case 89: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "unsigned int"; + break; + default: + break; + }; + break; + /* linux32_sys_old_mmap */ + case 90: + switch(ndx) { + case 0: + p = "linux32_oldmmapp"; + break; + default: + break; + }; + break; + /* netbsd32_munmap */ + case 91: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* compat_43_netbsd32_otruncate */ + case 92: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_long"; + break; + default: + break; + }; + break; + /* compat_43_netbsd32_oftruncate */ + case 93: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_long"; + break; + default: + break; + }; + break; + /* netbsd32_fchmod */ + case 94: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* linux32_sys_fchown16 */ + case 95: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_uid16_t"; + break; + case 2: + p = "linux32_gid16_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getpriority */ + case 96: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_setpriority */ + case 97: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_profil */ + case 98: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "netbsd32_u_long"; + break; + case 3: + p = "u_int"; + break; + default: + break; + }; + break; + /* linux32_sys_statfs */ + case 99: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_statfsp"; + break; + default: + break; + }; + break; + /* linux32_sys_fstatfs */ + case 100: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_statfsp"; + break; + default: + break; + }; + break; + /* linux32_sys_socketcall */ + case 102: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + default: + break; + }; + break; + /* compat_50_netbsd32_setitimer */ + case 104: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_itimerval50p_t"; + break; + case 2: + p = "netbsd32_itimerval50p_t"; + break; + default: + break; + }; + break; + /* compat_50_netbsd32_getitimer */ + case 105: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_itimerval50p_t"; + break; + default: + break; + }; + break; + /* linux32_sys_stat */ + case 106: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_statp"; + break; + default: + break; + }; + break; + /* linux32_sys_lstat */ + case 107: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_statp"; + break; + default: + break; + }; + break; + /* linux32_sys_fstat */ + case 108: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_statp"; + break; + default: + break; + }; + break; + /* linux32_sys_olduname */ + case 109: + switch(ndx) { + case 0: + p = "linux32_oldutsnamep_t"; + break; + default: + break; + }; + break; + /* linux32_sys_wait4 */ + case 114: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_intp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_rusage50p_t"; + break; + default: + break; + }; + break; + /* linux32_sys_swapoff */ + case 115: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_sysinfo */ + case 116: + switch(ndx) { + case 0: + p = "linux32_sysinfop_t"; + break; + default: + break; + }; + break; + /* linux32_sys_ipc */ + case 117: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + case 4: + p = "netbsd32_voidp"; + break; + default: + break; + }; + break; + /* netbsd32_fsync */ + case 118: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_sigreturn */ + case 119: + switch(ndx) { + case 0: + p = "linux32_sigcontextp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_clone */ + case 120: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "netbsd32_voidp"; + break; + case 3: + p = "netbsd32_voidp"; + break; + case 4: + p = "netbsd32_voidp"; + break; + default: + break; + }; + break; + /* linux32_sys_setdomainname */ + case 121: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_uname */ + case 122: + switch(ndx) { + case 0: + p = "linux32_utsnamep"; + break; + default: + break; + }; + break; + /* linux32_sys_mprotect */ + case 125: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_getpgid */ + case 132: + switch(ndx) { + case 0: + p = "pid_t"; + break; + default: + break; + }; + break; + /* netbsd32_fchdir */ + case 133: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_personality */ + case 136: + switch(ndx) { + case 0: + p = "netbsd32_u_long"; + break; + default: + break; + }; + break; + /* linux32_sys_setfsuid */ + case 138: + switch(ndx) { + case 0: + p = "uid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setfsgid */ + case 139: + switch(ndx) { + case 0: + p = "gid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_llseek */ + case 140: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "u_int32_t"; + break; + case 2: + p = "u_int32_t"; + break; + case 3: + p = "netbsd32_voidp"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_getdents */ + case 141: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_direntp_t"; + break; + case 2: + p = "unsigned int"; + break; + default: + break; + }; + break; + /* linux32_sys_select */ + case 142: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_fd_setp_t"; + break; + case 2: + p = "netbsd32_fd_setp_t"; + break; + case 3: + p = "netbsd32_fd_setp_t"; + break; + case 4: + p = "netbsd32_timeval50p_t"; + break; + default: + break; + }; + break; + /* netbsd32_flock */ + case 143: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32___msync13 */ + case 144: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_readv */ + case 145: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_iovecp_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_writev */ + case 146: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_iovecp_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_getsid */ + case 147: + switch(ndx) { + case 0: + p = "pid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_fdatasync */ + case 148: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys___sysctl */ + case 149: + switch(ndx) { + case 0: + p = "linux32___sysctlp_t"; + break; + default: + break; + }; + break; + /* netbsd32_mlock */ + case 150: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_munlock */ + case 151: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_mlockall */ + case 152: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* sys_munlockall */ + case 153: + break; + /* linux32_sys_sched_setparam */ + case 154: + switch(ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "const linux32_sched_paramp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_sched_getparam */ + case 155: + switch(ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "linux32_sched_paramp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_sched_setscheduler */ + case 156: + switch(ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "linux32_sched_paramp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_sched_getscheduler */ + case 157: + switch(ndx) { + case 0: + p = "pid_t"; + break; + default: + break; + }; + break; + /* linux_sys_sched_yield */ + case 158: + break; + /* linux32_sys_sched_get_priority_max */ + case 159: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_sched_get_priority_min */ + case 160: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_nanosleep */ + case 162: + switch(ndx) { + case 0: + p = "linux32_timespecp_t"; + break; + case 1: + p = "linux32_timespecp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_mremap */ + case 163: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "netbsd32_size_t"; + break; + case 3: + p = "netbsd32_u_long"; + break; + default: + break; + }; + break; + /* linux32_sys_setresuid16 */ + case 164: + switch(ndx) { + case 0: + p = "linux32_uid16_t"; + break; + case 1: + p = "linux32_uid16_t"; + break; + case 2: + p = "linux32_uid16_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getresuid16 */ + case 165: + switch(ndx) { + case 0: + p = "linux32_uid16p_t"; + break; + case 1: + p = "linux32_uid16p_t"; + break; + case 2: + p = "linux32_uid16p_t"; + break; + default: + break; + }; + break; + /* netbsd32_poll */ + case 168: + switch(ndx) { + case 0: + p = "netbsd32_pollfdp_t"; + break; + case 1: + p = "u_int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_setresgid16 */ + case 170: + switch(ndx) { + case 0: + p = "linux32_gid16_t"; + break; + case 1: + p = "linux32_gid16_t"; + break; + case 2: + p = "linux32_gid16_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getresgid16 */ + case 171: + switch(ndx) { + case 0: + p = "linux32_gid16p_t"; + break; + case 1: + p = "linux32_gid16p_t"; + break; + case 2: + p = "linux32_gid16p_t"; + break; + default: + break; + }; + break; + /* linux32_sys_rt_sigreturn */ + case 173: + switch(ndx) { + case 0: + p = "linux32_ucontextp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_rt_sigaction */ + case 174: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_sigactionp_t"; + break; + case 2: + p = "linux32_sigactionp_t"; + break; + case 3: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* linux32_sys_rt_sigprocmask */ + case 175: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_sigsetp_t"; + break; + case 2: + p = "linux32_sigsetp_t"; + break; + case 3: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* linux32_sys_rt_sigpending */ + case 176: + switch(ndx) { + case 0: + p = "linux32_sigsetp_t"; + break; + case 1: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* linux32_sys_rt_sigtimedwait */ + case 177: + switch(ndx) { + case 0: + p = "const linux32_sigsetp_t"; + break; + case 1: + p = "linux32_siginfop_t"; + break; + case 2: + p = "const linux32_timespecp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_rt_queueinfo */ + case 178: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "linux32_siginfop_t"; + break; + default: + break; + }; + break; + /* linux32_sys_rt_sigsuspend */ + case 179: + switch(ndx) { + case 0: + p = "linux32_sigsetp_t"; + break; + case 1: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* linux32_sys_pread */ + case 180: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + case 3: + p = "netbsd32_off_t"; + break; + default: + break; + }; + break; + /* linux32_sys_pwrite */ + case 181: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + case 3: + p = "netbsd32_off_t"; + break; + default: + break; + }; + break; + /* linux32_sys_chown16 */ + case 182: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_uid16_t"; + break; + case 2: + p = "linux32_gid16_t"; + break; + default: + break; + }; + break; + /* netbsd32___getcwd */ + case 183: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* sys___vfork14 */ + case 190: + break; + /* linux32_sys_ugetrlimit */ + case 191: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_orlimitp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_mmap2 */ + case 192: + switch(ndx) { + case 0: + p = "netbsd32_u_long"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + case 4: + p = "int"; + break; + case 5: + p = "linux32_off_t"; + break; + default: + break; + }; + break; + /* linux32_sys_truncate64 */ + case 193: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "uint32_t"; + break; + default: + break; + }; + break; + /* linux32_sys_ftruncate64 */ + case 194: + switch(ndx) { + case 0: + p = "unsigned int"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "uint32_t"; + break; + default: + break; + }; + break; + /* linux32_sys_stat64 */ + case 195: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_stat64p"; + break; + default: + break; + }; + break; + /* linux32_sys_lstat64 */ + case 196: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "linux32_stat64p"; + break; + default: + break; + }; + break; + /* linux32_sys_fstat64 */ + case 197: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_stat64p"; + break; + default: + break; + }; + break; + /* netbsd32___posix_lchown */ + case 198: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "uid_t"; + break; + case 2: + p = "gid_t"; + break; + default: + break; + }; + break; + /* sys_getuid */ + case 199: + break; + /* sys_getgid */ + case 200: + break; + /* sys_geteuid */ + case 201: + break; + /* sys_getegid */ + case 202: + break; + /* netbsd32_setreuid */ + case 203: + switch(ndx) { + case 0: + p = "uid_t"; + break; + case 1: + p = "uid_t"; + break; + default: + break; + }; + break; + /* netbsd32_setregid */ + case 204: + switch(ndx) { + case 0: + p = "gid_t"; + break; + case 1: + p = "gid_t"; + break; + default: + break; + }; + break; + /* netbsd32_getgroups */ + case 205: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_gid_tp"; + break; + default: + break; + }; + break; + /* netbsd32_setgroups */ + case 206: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_gid_tp"; + break; + default: + break; + }; + break; + /* netbsd32___posix_fchown */ + case 207: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "uid_t"; + break; + case 2: + p = "gid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setresuid */ + case 208: + switch(ndx) { + case 0: + p = "uid_t"; + break; + case 1: + p = "uid_t"; + break; + case 2: + p = "uid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getresuid */ + case 209: + switch(ndx) { + case 0: + p = "linux32_uidp_t"; + break; + case 1: + p = "linux32_uidp_t"; + break; + case 2: + p = "linux32_uidp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setresgid */ + case 210: + switch(ndx) { + case 0: + p = "gid_t"; + break; + case 1: + p = "gid_t"; + break; + case 2: + p = "gid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getresgid */ + case 211: + switch(ndx) { + case 0: + p = "linux32_gidp_t"; + break; + case 1: + p = "linux32_gidp_t"; + break; + case 2: + p = "linux32_gidp_t"; + break; + default: + break; + }; + break; + /* netbsd32___posix_chown */ + case 212: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "uid_t"; + break; + case 2: + p = "gid_t"; + break; + default: + break; + }; + break; + /* netbsd32_setuid */ + case 213: + switch(ndx) { + case 0: + p = "uid_t"; + break; + default: + break; + }; + break; + /* netbsd32_setgid */ + case 214: + switch(ndx) { + case 0: + p = "gid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setfsuid */ + case 215: + switch(ndx) { + case 0: + p = "uid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_setfsgid */ + case 216: + switch(ndx) { + case 0: + p = "gid_t"; + break; + default: + break; + }; + break; + /* linux32_sys_getdents64 */ + case 217: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "linux32_dirent64p_t"; + break; + case 2: + p = "unsigned int"; + break; + default: + break; + }; + break; + /* netbsd32_mincore */ + case 219: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_madvise */ + case 220: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args + /* linux32_sys_fcntl64 */ + case 221: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "netbsd32_voidp"; + break; + default: + break; + }; + break; + /* linux_sys_gettid */ + case 224: + break; + /* netbsd32_setxattr */ + case 226: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_voidp"; + break; + case 3: + p = "netbsd32_size_t"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_lsetxattr */ + case 227: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_voidp"; + break; + case 3: + p = "netbsd32_size_t"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_fsetxattr */ + case 228: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_voidp"; + break; + case 3: + p = "netbsd32_size_t"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_getxattr */ + case 229: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_voidp"; + break; + case 3: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_lgetxattr */ + case 230: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_voidp"; + break; + case 3: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_fgetxattr */ + case 231: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_voidp"; + break; + case 3: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_listxattr */ + case 232: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_llistxattr */ + case 233: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_flistxattr */ + case 234: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32_removexattr */ + case 235: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_lremovexattr */ + case 236: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_fremovexattr */ + case 237: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_tkill */ + case 238: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_futex */ + case 240: + switch(ndx) { + case 0: + p = "linux32_intp_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "linux32_timespecp_t"; + break; + case 4: + p = "linux32_intp_t"; + break; + case 5: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_sched_setaffinity */ + case 241: + switch(ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "unsigned int"; + break; + case 2: + p = "linux32_ulongp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_sched_getaffinity */ + case 242: + switch(ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "unsigned int"; + break; + case 2: + p = "linux32_ulongp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_exit_group */ + case 248: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_set_tid_address */ + case 256: + switch(ndx) { + case 0: + p = "linux32_intp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_timer_create */ + case 257: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "struct linux32_sigevent *"; + break; + case 2: + p = "timer_t *"; + break; + default: + break; + }; + break; + /* linux32_sys_timer_settime */ + case 258: + switch(ndx) { + case 0: + p = "timer_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "const struct linux32_itimerspec *"; + break; + case 3: + p = "struct linux32_itimerspec *"; + break; + default: + break; + }; + break; + /* linux32_sys_timer_gettime */ + case 259: + switch(ndx) { + case 0: + p = "timer_t"; + break; + case 1: + p = "struct linux32_itimerspec *"; + break; + default: + break; + }; + break; + /* sys_timer_getoverrun */ + case 260: + switch(ndx) { + case 0: + p = "timer_t"; + break; + default: + break; + }; + break; + /* sys_timer_delete */ + case 261: + switch(ndx) { + case 0: + p = "timer_t"; + break; + default: + break; + }; + break; + /* linux32_sys_clock_settime */ + case 262: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "linux32_timespecp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_clock_gettime */ + case 263: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "linux32_timespecp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_clock_getres */ + case 264: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "linux32_timespecp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_clock_nanosleep */ + case 265: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "linux32_timespecp_t"; + break; + case 3: + p = "linux32_timespecp_t"; + break; + default: + break; + }; + break; + /* linux32_sys_statfs64 */ + case 266: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "linux32_statfs64p"; + break; + default: + break; + }; + break; + /* linux32_sys_fstatfs64 */ + case 267: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "linux32_statfs64p"; + break; + default: + break; + }; + break; + /* linux32_sys_tgkill */ + case 268: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* compat_50_netbsd32_utimes */ + case 269: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "netbsd32_timeval50p_t"; + break; + default: + break; + }; + break; + /* linux32_sys_fadvise64_64 */ + case 270: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "uint32_t"; + break; + case 4: + p = "uint32_t"; + break; + case 5: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_socket */ + case 281: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_bind */ + case 282: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_osockaddrp_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_connect */ + case 283: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_osockaddrp_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_accept */ + case 285: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_osockaddrp_t"; + break; + case 2: + p = "netbsd32_intp"; + break; + default: + break; + }; + break; + /* linux32_sys_getsockname */ + case 286: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_intp"; + break; + default: + break; + }; + break; + /* linux32_sys_getpeername */ + case 287: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_sockaddrp_t"; + break; + case 2: + p = "netbsd32_intp"; + break; + default: + break; + }; + break; + /* linux32_sys_socketpair */ + case 288: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_intp"; + break; + default: + break; + }; + break; + /* linux32_sys_send */ + case 289: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_sendto */ + case 290: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + case 4: + p = "netbsd32_osockaddrp_t"; + break; + case 5: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_recv */ + case 291: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_recvfrom */ + case 292: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "netbsd32_size_t"; + break; + case 3: + p = "int"; + break; + case 4: + p = "netbsd32_osockaddrp_t"; + break; + case 5: + p = "netbsd32_intp"; + break; + default: + break; + }; + break; + /* linux32_sys_setsockopt */ + case 294: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_voidp"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_getsockopt */ + case 295: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_voidp"; + break; + case 4: + p = "netbsd32_intp"; + break; + default: + break; + }; + break; + /* linux32_sys_openat */ + case 322: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* netbsd32_mkdirat */ + case 323: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* linux32_sys_mknodat */ + case 324: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "linux_umode_t"; + break; + case 3: + p = "unsigned"; + break; + default: + break; + }; + break; + /* linux32_sys_fchownat */ + case 325: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "uid_t"; + break; + case 3: + p = "gid_t"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_fstatat64 */ + case 327: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "linux32_stat64p"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_unlinkat */ + case 328: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_renameat */ + case 329: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* linux32_sys_linkat */ + case 330: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_charp"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; + /* netbsd32_symlinkat */ + case 331: + switch(ndx) { + case 0: + p = "netbsd32_charp"; + break; + case 1: + p = "int"; + break; + case 2: + p = "netbsd32_charp"; + break; + default: + break; + }; + break; + /* netbsd32_readlinkat */ + case 332: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "netbsd32_charp"; + break; + case 3: + p = "linux32_size_t"; + break; + default: + break; + }; + break; + /* linux32_sys_fchmodat */ + case 333: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "linux_umode_t"; + break; + default: + break; + }; + break; + /* linux32_sys_faccessat */ + case 334: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_ppoll */ + case 336: + switch(ndx) { + case 0: + p = "netbsd32_pollfdp_t"; + break; + case 1: + p = "u_int"; + break; + case 2: + p = "linux32_timespecp_t"; + break; + case 3: + p = "linux32_sigsetp_t"; + break; + default: + break; + }; + break; + /* netbsd32___futex_set_robust_list */ + case 338: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + default: + break; + }; + break; + /* netbsd32___futex_get_robust_list */ + case 339: + switch(ndx) { + case 0: + p = "lwpid_t"; + break; + case 1: + p = "netbsd32_voidp"; + break; + case 2: + p = "netbsd32_size_tp"; + break; + default: + break; + }; + break; + /* linux32_sys_utimensat */ + case 348: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "linux32_timespecp_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* linux_sys_timerfd_create */ + case 350: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_eventfd */ + case 351: + switch(ndx) { + case 0: + p = "unsigned int"; + break; + default: + break; + }; + break; + /* linux32_sys_fallocate */ + case 352: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "off_t"; + break; + case 3: + p = "off_t"; + break; + default: + break; + }; + break; + /* linux32_sys_timerfd_settime */ + case 353: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "const struct linux32_itimerspec *"; + break; + case 3: + p = "struct linux32_itimerspec *"; + break; + default: + break; + }; + break; + /* linux32_sys_timerfd_gettime */ + case 354: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct linux32_itimerspec *"; + break; + default: + break; + }; + break; + /* linux32_sys_eventfd2 */ + case 356: + switch(ndx) { + case 0: + p = "unsigned int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_dup3 */ + case 358: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_pipe2 */ + case 359: + switch(ndx) { + case 0: + p = "netbsd32_intp"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* linux32_sys_preadv */ + case 361: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const netbsd32_iovecp_t"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_u_long"; + break; + case 4: + p = "netbsd32_u_long"; + break; + default: + break; + }; + break; + /* linux32_sys_pwritev */ + case 362: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const netbsd32_iovecp_t"; + break; + case 2: + p = "int"; + break; + case 3: + p = "netbsd32_u_long"; + break; + case 4: + p = "netbsd32_u_long"; + break; + default: + break; + }; + break; + /* netbsd32_getrandom */ + case 384: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + case 1: + p = "netbsd32_size_t"; + break; + case 2: + p = "unsigned int"; + break; + default: + break; + }; + break; + /* linux32_sys_statx */ + case 397: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "netbsd32_charp"; + break; + case 2: + p = "int"; + break; + case 3: + p = "unsigned int"; + break; + case 4: + p = "linux32_statxp"; + break; + default: + break; + }; + break; + /* linux32_sys_set_tls */ + case 485: + switch(ndx) { + case 0: + p = "netbsd32_voidp"; + break; + default: + break; + }; + break; + /* linux32_sys_get_tls */ + case 486: + break; + default: + break; + }; + if (p != NULL) + strlcpy(desc, p, descsz); +} +static void +systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) +{ + const char *p = NULL; + switch (sysnum) { + /* linux_sys_nosys */ + case 0: + /* linux32_sys_exit */ + case 1: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_fork */ + case 2: + /* netbsd32_read */ + case 3: + if (ndx == 0 || ndx == 1) + p = "netbsd32_ssize_t"; + break; + /* netbsd32_write */ + case 4: + if (ndx == 0 || ndx == 1) + p = "netbsd32_ssize_t"; + break; + /* linux32_sys_open */ + case 5: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_close */ + case 6: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_waitpid */ + case 7: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_creat */ + case 8: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_link */ + case 9: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_unlink */ + case 10: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_execve */ + case 11: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_chdir */ + case 12: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_time */ + case 13: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_mknod */ + case 14: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_chmod */ + case 15: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_lchown16 */ + case 16: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_43_netbsd32_olseek */ + case 19: + if (ndx == 0 || ndx == 1) + p = "netbsd32_long"; + break; + /* sys_getpid */ + case 20: + /* netbsd32_setuid */ + case 23: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_getuid */ + case 24: + /* linux32_sys_stime */ + case 25: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_ptrace */ + case 26: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_alarm */ + case 27: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux_sys_pause */ + case 29: + /* linux32_sys_utime */ + case 30: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_access */ + case 33: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_nice */ + case 34: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_sync */ + case 36: + /* linux32_sys_kill */ + case 37: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___posix_rename */ + case 38: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_mkdir */ + case 39: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_rmdir */ + case 40: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_dup */ + case 41: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_pipe */ + case 42: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_times */ + case 43: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_brk */ + case 45: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_setgid */ + case 46: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_getgid */ + case 47: + /* linux32_sys_signal */ + case 48: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_geteuid */ + case 49: + /* sys_getegid */ + case 50: + /* netbsd32_acct */ + case 51: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_ioctl */ + case 54: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fcntl */ + case 55: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_setpgid */ + case 57: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_oldolduname */ + case 59: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_umask */ + case 60: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_chroot */ + case 61: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_dup2 */ + case 63: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_getppid */ + case 64: + /* sys_getpgrp */ + case 65: + /* sys_setsid */ + case 66: + /* linux32_sys_siggetmask */ + case 68: + /* linux32_sys_sigsetmask */ + case 69: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setreuid16 */ + case 70: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setregid16 */ + case 71: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_43_netbsd32_osethostname */ + case 74: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setrlimit */ + case 75: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getrlimit */ + case 76: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_50_netbsd32_getrusage */ + case 77: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_gettimeofday */ + case 78: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_settimeofday */ + case 79: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getgroups16 */ + case 80: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setgroups16 */ + case 81: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_oldselect */ + case 82: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_symlink */ + case 83: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_43_netbsd32_lstat43 */ + case 84: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_readlink */ + case 85: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_swapon */ + case 87: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_reboot */ + case 88: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_readdir */ + case 89: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_old_mmap */ + case 90: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_munmap */ + case 91: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_43_netbsd32_otruncate */ + case 92: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_43_netbsd32_oftruncate */ + case 93: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_fchmod */ + case 94: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fchown16 */ + case 95: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getpriority */ + case 96: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_setpriority */ + case 97: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_profil */ + case 98: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_statfs */ + case 99: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fstatfs */ + case 100: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_socketcall */ + case 102: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_50_netbsd32_setitimer */ + case 104: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_50_netbsd32_getitimer */ + case 105: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_stat */ + case 106: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_lstat */ + case 107: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fstat */ + case 108: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_olduname */ + case 109: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_wait4 */ + case 114: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_swapoff */ + case 115: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sysinfo */ + case 116: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_ipc */ + case 117: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_fsync */ + case 118: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sigreturn */ + case 119: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_clone */ + case 120: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setdomainname */ + case 121: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_uname */ + case 122: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_mprotect */ + case 125: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_getpgid */ + case 132: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_fchdir */ + case 133: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_personality */ + case 136: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setfsuid */ + case 138: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setfsgid */ + case 139: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_llseek */ + case 140: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getdents */ + case 141: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_select */ + case 142: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_flock */ + case 143: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___msync13 */ + case 144: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_readv */ + case 145: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_writev */ + case 146: + if (ndx == 0 || ndx == 1) + p = "netbsd32_ssize_t"; + break; + /* netbsd32_getsid */ + case 147: + if (ndx == 0 || ndx == 1) + p = "pid_t"; + break; + /* linux32_sys_fdatasync */ + case 148: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys___sysctl */ + case 149: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_mlock */ + case 150: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_munlock */ + case 151: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_mlockall */ + case 152: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_munlockall */ + case 153: + /* linux32_sys_sched_setparam */ + case 154: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sched_getparam */ + case 155: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sched_setscheduler */ + case 156: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sched_getscheduler */ + case 157: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux_sys_sched_yield */ + case 158: + /* linux32_sys_sched_get_priority_max */ + case 159: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sched_get_priority_min */ + case 160: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_nanosleep */ + case 162: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_mremap */ + case 163: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setresuid16 */ + case 164: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getresuid16 */ + case 165: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_poll */ + case 168: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setresgid16 */ + case 170: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getresgid16 */ + case 171: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_rt_sigreturn */ + case 173: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_rt_sigaction */ + case 174: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_rt_sigprocmask */ + case 175: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_rt_sigpending */ + case 176: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_rt_sigtimedwait */ + case 177: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_rt_queueinfo */ + case 178: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_rt_sigsuspend */ + case 179: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_pread */ + case 180: + if (ndx == 0 || ndx == 1) + p = "netbsd32_ssize_t"; + break; + /* linux32_sys_pwrite */ + case 181: + if (ndx == 0 || ndx == 1) + p = "netbsd32_ssize_t"; + break; + /* linux32_sys_chown16 */ + case 182: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___getcwd */ + case 183: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys___vfork14 */ + case 190: + /* linux32_sys_ugetrlimit */ + case 191: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_mmap2 */ + case 192: + if (ndx == 0 || ndx == 1) + p = "linux32_off_t"; + break; + /* linux32_sys_truncate64 */ + case 193: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_ftruncate64 */ + case 194: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_stat64 */ + case 195: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_lstat64 */ + case 196: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fstat64 */ + case 197: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___posix_lchown */ + case 198: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_getuid */ + case 199: + /* sys_getgid */ + case 200: + /* sys_geteuid */ + case 201: + /* sys_getegid */ + case 202: + /* netbsd32_setreuid */ + case 203: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_setregid */ + case 204: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_getgroups */ + case 205: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_setgroups */ + case 206: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___posix_fchown */ + case 207: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setresuid */ + case 208: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getresuid */ + case 209: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setresgid */ + case 210: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getresgid */ + case 211: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___posix_chown */ + case 212: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_setuid */ + case 213: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_setgid */ + case 214: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setfsuid */ + case 215: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setfsgid */ + case 216: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getdents64 */ + case 217: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_mincore */ + case 219: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_madvise */ + case 220: + if (ndx == 0 || ndx == 1) + p = "int"; + break; +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args + /* linux32_sys_fcntl64 */ + case 221: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux_sys_gettid */ + case 224: + /* netbsd32_setxattr */ + case 226: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_lsetxattr */ + case 227: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_fsetxattr */ + case 228: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_getxattr */ + case 229: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; + /* netbsd32_lgetxattr */ + case 230: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; + /* netbsd32_fgetxattr */ + case 231: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; + /* netbsd32_listxattr */ + case 232: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; + /* netbsd32_llistxattr */ + case 233: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; + /* netbsd32_flistxattr */ + case 234: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; + /* netbsd32_removexattr */ + case 235: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_lremovexattr */ + case 236: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_fremovexattr */ + case 237: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_tkill */ + case 238: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_futex */ + case 240: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sched_setaffinity */ + case 241: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sched_getaffinity */ + case 242: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_exit_group */ + case 248: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_set_tid_address */ + case 256: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_timer_create */ + case 257: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_timer_settime */ + case 258: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_timer_gettime */ + case 259: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_timer_getoverrun */ + case 260: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sys_timer_delete */ + case 261: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_clock_settime */ + case 262: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_clock_gettime */ + case 263: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_clock_getres */ + case 264: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_clock_nanosleep */ + case 265: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_statfs64 */ + case 266: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fstatfs64 */ + case 267: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_tgkill */ + case 268: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* compat_50_netbsd32_utimes */ + case 269: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fadvise64_64 */ + case 270: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_socket */ + case 281: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_bind */ + case 282: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_connect */ + case 283: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_accept */ + case 285: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getsockname */ + case 286: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getpeername */ + case 287: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_socketpair */ + case 288: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_send */ + case 289: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_sendto */ + case 290: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_recv */ + case 291: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_recvfrom */ + case 292: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_setsockopt */ + case 294: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_getsockopt */ + case 295: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_openat */ + case 322: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_mkdirat */ + case 323: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_mknodat */ + case 324: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fchownat */ + case 325: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fstatat64 */ + case 327: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_unlinkat */ + case 328: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_renameat */ + case 329: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_linkat */ + case 330: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_symlinkat */ + case 331: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_readlinkat */ + case 332: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fchmodat */ + case 333: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_faccessat */ + case 334: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_ppoll */ + case 336: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___futex_set_robust_list */ + case 338: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32___futex_get_robust_list */ + case 339: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_utimensat */ + case 348: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux_sys_timerfd_create */ + case 350: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_eventfd */ + case 351: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_fallocate */ + case 352: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_timerfd_settime */ + case 353: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_timerfd_gettime */ + case 354: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_eventfd2 */ + case 356: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_dup3 */ + case 358: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_pipe2 */ + case 359: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_preadv */ + case 361: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_pwritev */ + case 362: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* netbsd32_getrandom */ + case 384: + if (ndx == 0 || ndx == 1) + p = "netbsd32_ssize_t"; + break; + /* linux32_sys_statx */ + case 397: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_set_tls */ + case 485: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux32_sys_get_tls */ + case 486: + default: + break; + }; + if (p != NULL) + strlcpy(desc, p, descsz); +} diff --git a/sys/compat/linux32/arch/aarch64/linux32_termios.h b/sys/compat/linux32/arch/aarch64/linux32_termios.h new file mode 100644 index 00000000000..270472092fc --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_termios.h @@ -0,0 +1,240 @@ +/* $NetBSD: linux32_termios.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Emmanuel Dreyfus + * 4. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_TERMIOS_H_ +#define _AARCH64_LINUX32_TERMIOS_H_ + +typedef unsigned char linux32_cc_t; +typedef netbsd32_long linux32_speed_t; +typedef netbsd32_long linux32_tcflag_t; + +#define LINUX32_NCC 8 +#define LINUX32_NCCS 19 + +#define LINUX32_TCGETS _LINUX32_IO('T', 1) +#define LINUX32_TCSETS _LINUX32_IO('T', 2) +#define LINUX32_TCSETSW _LINUX32_IO('T', 3) +#define LINUX32_TCSETSF _LINUX32_IO('T', 4) +#define LINUX32_TCGETA _LINUX32_IO('T', 5) +#define LINUX32_TCSETA _LINUX32_IO('T', 6) +#define LINUX32_TCSETAW _LINUX32_IO('T', 7) +#define LINUX32_TCSETAF _LINUX32_IO('T', 8) +#define LINUX32_TCSBRK _LINUX32_IO('T', 9) +#define LINUX32_TCXONC _LINUX32_IO('T', 10) +#define LINUX32_TCFLSH _LINUX32_IO('T', 11) +#define LINUX32_TIOCEXCL _LINUX32_IO('T', 12) +#define LINUX32_TIOCNXCL _LINUX32_IO('T', 13) +#define LINUX32_TIOCSCTTY _LINUX32_IO('T', 14) +#define LINUX32_TIOCGPGRP _LINUX32_IO('T', 15) +#define LINUX32_TIOCSPGRP _LINUX32_IO('T', 16) +#define LINUX32_TIOCOUTQ _LINUX32_IO('T', 17) +#define LINUX32_TIOCSTI _LINUX32_IO('T', 18) +#define LINUX32_TIOCGWINSZ _LINUX32_IO('T', 19) +#define LINUX32_TIOCSWINSZ _LINUX32_IO('T', 20) +#define LINUX32_TIOCMGET _LINUX32_IO('T', 21) +#define LINUX32_TIOCMBIS _LINUX32_IO('T', 22) +#define LINUX32_TIOCMBIC _LINUX32_IO('T', 23) +#define LINUX32_TIOCMSET _LINUX32_IO('T', 24) +#define LINUX32_TIOCGSOFTCAR _LINUX32_IO('T', 25) +#define LINUX32_TIOCSSOFTCAR _LINUX32_IO('T', 26) +#define LINUX32_FIONREAD _LINUX32_IO('T', 27) +#define LINUX32_TIOCINQ LINUX32_FIONREAD +#define LINUX32_TIOCLINUX _LINUX32_IO('T', 28) +#define LINUX32_TIOCCONS _LINUX32_IO('T', 29) +#define LINUX32_TIOCGSERIAL _LINUX32_IO('T', 30) +#define LINUX32_TIOCSSERIAL _LINUX32_IO('T', 31) +#define LINUX32_TIOCPKT _LINUX32_IO('T', 32) +#define LINUX32_FIONBIO _LINUX32_IO('T', 33) +#define LINUX32_TIOCNOTTY _LINUX32_IO('T', 34) +#define LINUX32_TIOCSETD _LINUX32_IO('T', 35) +#define LINUX32_TIOCGETD _LINUX32_IO('T', 36) +#define LINUX32_TCSBRKP _LINUX32_IO('T', 37) +#define LINUX32_TIOCTTYGSTRUCT _LINUX32_IO('T', 38) + +#define LINUX32_TIOCGPTN _LINUX32_IOR('T', 48, unsigned int) +#define LINUX32_TIOCSPTLCK _LINUX32_IOW('T', 49, int) + +#define LINUX32_FIONCLEX _LINUX32_IO('T', 80) +#define LINUX32_FIOCLEX _LINUX32_IO('T', 81) +#define LINUX32_FIOASYNC _LINUX32_IO('T', 82) +#define LINUX32_TIOCSERCONFIG _LINUX32_IO('T', 83) +#define LINUX32_TIOCSERGWILD _LINUX32_IO('T', 84) +#define LINUX32_TIOCSERSWILD _LINUX32_IO('T', 85) +#define LINUX32_TIOCGLCKTRMIOS _LINUX32_IO('T', 86) +#define LINUX32_TIOCSLCKTRMIOS _LINUX32_IO('T', 87) +#define LINUX32_TIOCSERGSTRUCT _LINUX32_IO('T', 88) +#define LINUX32_TIOCSERGETLSR _LINUX32_IO('T', 89) + +/* linux32_termios c_cc chars: */ +#define LINUX32_VINTR 0 +#define LINUX32_VQUIT 1 +#define LINUX32_VERASE 2 +#define LINUX32_VKILL 3 +#define LINUX32_VEOF 4 +#define LINUX32_VTIME 5 +#define LINUX32_VMIN 6 +#define LINUX32_VSWTC 7 +#define LINUX32_VSTART 8 +#define LINUX32_VSTOP 9 +#define LINUX32_VSUSP 10 +#define LINUX32_VEOL 11 +#define LINUX32_VREPRINT 12 +#define LINUX32_VDISCARD 13 +#define LINUX32_VWERASE 14 +#define LINUX32_VLNEXT 15 +#define LINUX32_VEOL2 16 + +/* Old style linux_termio */ +#define LINUX32_OLD_VINTR LINUX32_VINTR +#define LINUX32_OLD_VQUIT LINUX32_VQUIT +#define LINUX32_OLD_VERASE LINUX32_VERASE +#define LINUX32_OLD_VKILL LINUX32_VKILL +#define LINUX32_OLD_VEOF LINUX32_VEOF +#define LINUX32_OLD_VMIN LINUX32_VMIN +#define LINUX32_OLD_VEOL LINUX32_VEOL +#define LINUX32_OLD_VTIME LINUX32_VTIME +#define LINUX32_OLD_VEOL2 LINUX32_VEOL2 +#define LINUX32_OLD_VSWTC LINUX32_VSWTC + +/* Linux c_iflag masks */ +#define LINUX32_IGNBRK 0x0000001 +#define LINUX32_BRKINT 0x0000002 +#define LINUX32_IGNPAR 0x0000004 +#define LINUX32_PARMRK 0x0000008 +#define LINUX32_INPCK 0x0000010 +#define LINUX32_ISTRIP 0x0000020 +#define LINUX32_INLCR 0x0000040 +#define LINUX32_IGNCR 0x0000080 +#define LINUX32_ICRNL 0x0000100 +#define LINUX32_IUCLC 0x0000200 +#define LINUX32_IXON 0x0000400 +#define LINUX32_IXANY 0x0000800 +#define LINUX32_IXOFF 0x0001000 +#define LINUX32_IMAXBEL 0x0002000 + +/* Linux c_oflag masks */ +#define LINUX32_OPOST 0x0000001 +#define LINUX32_OLCUC 0x0000002 +#define LINUX32_ONLCR 0x0000004 +#define LINUX32_OCRNL 0x0000008 +#define LINUX32_ONOCR 0x0000010 +#define LINUX32_ONLRET 0x0000020 +#define LINUX32_OFILL 0x0000040 +#define LINUX32_OFDEL 0x0000080 +#define LINUX32_NLDLY 0x0000100 + +#define LINUX32_NL0 0x0000000 +#define LINUX32_NL1 0x0000100 +#define LINUX32_CRDLY 0x0000600 +#define LINUX32_CR0 0x0000000 +#define LINUX32_CR1 0x0000200 +#define LINUX32_CR2 0x0000400 +#define LINUX32_CR3 0x0000600 +#define LINUX32_TABDLY 0x0001800 +#define LINUX32_TAB0 0x0000000 +#define LINUX32_TAB1 0x0000800 +#define LINUX32_TAB2 0x0001000 +#define LINUX32_TAB3 0x0001800 +#define LINUX32_XTABS 0x0001800 +#define LINUX32_BSDLY 0x0002000 +#define LINUX32_BS0 0x0000000 +#define LINUX32_BS1 0x0002000 +#define LINUX32_VTDLY 0x0004000 +#define LINUX32_VT0 0x0000000 +#define LINUX32_VT1 0x0004000 +#define LINUX32_FFDLY 0x0008000 +#define LINUX32_FF0 0x0000000 +#define LINUX32_FF1 0x0008000 + +/* Linux c_cflag bit masks */ + +#define LINUX32_NSPEEDS 16 +#define LINUX32_NXSPEEDS 3 /* XXX Add B460800, NXSPEEDS=4 */ + +#define LINUX32_CBAUD 0x0000100f + +#define LINUX32_B0 0x00000000 +#define LINUX32_B50 0x00000001 +#define LINUX32_B75 0x00000002 +#define LINUX32_B110 0x00000003 +#define LINUX32_B134 0x00000004 +#define LINUX32_B150 0x00000005 +#define LINUX32_B200 0x00000006 +#define LINUX32_B300 0x00000007 +#define LINUX32_B600 0x00000008 +#define LINUX32_B1200 0x00000009 +#define LINUX32_B1800 0x0000000a +#define LINUX32_B2400 0x0000000b +#define LINUX32_B4800 0x0000000c +#define LINUX32_B9600 0x0000000d +#define LINUX32_B19200 0x0000000e +#define LINUX32_B38400 0x0000000f +#define LINUX32_EXTA LINUX32_B19200 +#define LINUX32_EXTB LINUX32_B38400 +#define LINUX32_CBAUDEX 0x00001000 +#define LINUX32_B57600 0x00001001 +#define LINUX32_B115200 0x00001002 +#define LINUX32_B230400 0x00001003 + +#define LINUX32_CSIZE 0x00000030 +#define LINUX32_CS5 0x00000000 +#define LINUX32_CS6 0x00000010 +#define LINUX32_CS7 0x00000020 +#define LINUX32_CS8 0x00000030 +#define LINUX32_CSTOPB 0x00000040 +#define LINUX32_CREAD 0x00000080 +#define LINUX32_PARENB 0x00000100 +#define LINUX32_PARODD 0x00000200 +#define LINUX32_HUPCL 0x00000400 +#define LINUX32_CLOCAL 0x00000800 + +#define LINUX32_CRTSCTS 0x80000000 + +/* Linux c_lflag masks */ +#define LINUX32_ISIG 0x00000001 +#define LINUX32_ICANON 0x00000002 +#define LINUX32_XCASE 0x00000004 +#define LINUX32_ECHO 0x00000008 +#define LINUX32_ECHOE 0x00000010 +#define LINUX32_ECHOK 0x00000020 +#define LINUX32_ECHONL 0x00000040 +#define LINUX32_NOFLSH 0x00000080 +#define LINUX32_TOSTOP 0x00000100 +#define LINUX32_ECHOCTL 0x00000200 +#define LINUX32_ECHOPRT 0x00000400 +#define LINUX32_ECHOKE 0x00000800 +#define LINUX32_FLUSHO 0x00001000 +#define LINUX32_PENDIN 0x00002000 +#define LINUX32_IEXTEN 0x00008000 + +#endif /* _AARCH64_LINUX32_TERMIOS_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_types.h b/sys/compat/linux32/arch/aarch64/linux32_types.h new file mode 100644 index 00000000000..6c8781ae1a6 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/linux32_types.h @@ -0,0 +1,99 @@ +/* $NetBSD: linux32_types.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ryo Shimizu. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT 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. + */ + +#ifndef _AARCH64_LINUX32_TYPES_H_ +#define _AARCH64_LINUX32_TYPES_H_ + +typedef uint16_t linux32_uid_t; /* arm: unsigned short */ +typedef uint16_t linux32_gid_t; /* arm: unsigned short */ +typedef uint32_t linux32_ino_t; /* arm: unsigned long */ +typedef uint32_t linux32_size_t; /* arm: size_t */ +typedef int32_t linux32_time_t; /* arm: long */ +typedef int32_t linux32_clock_t; /* arm: long */ +typedef int32_t linux32_off_t; /* arm: long */ +typedef int32_t linux32_pid_t; /* arm: int */ + +typedef netbsd32_pointer_t linux32_ulongp_t; +typedef netbsd32_pointer_t linux32_user_descp_t; + +struct linux32_stat { + uint16_t lst_dev; + uint16_t pad1; + linux32_ino_t lst_ino; + uint16_t lst_mode; + uint16_t lst_nlink; + linux32_uid_t lst_uid; + linux32_gid_t lst_gid; + uint16_t lst_rdev; + uint16_t pad2; + linux32_off_t lst_size; + linux32_size_t lst_blksize; + uint32_t lst_blocks; + linux32_time_t lst_atime; + uint32_t unused1; + linux32_time_t lst_mtime; + uint32_t unused2; + linux32_time_t lst_ctime; + uint32_t unused3; + uint32_t unused4; + uint32_t unused5; +} __packed; + +struct linux32_stat64 { + unsigned long long lst_dev; +#define LINUX32_STAT64_HAS_BROKEN_ST_INO + unsigned long long __lst_ino; + uint32_t lst_mode; + uint32_t lst_nlink; + uint32_t lst_uid; + uint32_t lst_gid; + unsigned long long lst_rdev; + unsigned long long __pad1; + long long lst_size; + uint32_t lst_blksize; + uint32_t __pad2; + unsigned long long lst_blocks; +#define LINUX32_STAT64_HAS_NSEC + uint32_t lst_atime; + uint32_t lst_atime_nsec; + uint32_t lst_mtime; + uint32_t lst_mtime_nsec; + uint32_t lst_ctime; + uint32_t lst_ctime_nsec; + unsigned long long lst_ino; +} __packed; + +struct linux32_utimbuf { + linux32_time_t l_actime; + linux32_time_t l_modtime; +}; + +#endif /* _AARCH64_LINUX32_TYPES_H_ */ diff --git a/sys/compat/linux32/arch/aarch64/syscalls.conf b/sys/compat/linux32/arch/aarch64/syscalls.conf new file mode 100644 index 00000000000..efb408fa5c1 --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/syscalls.conf @@ -0,0 +1,17 @@ +# $NetBSD: syscalls.conf,v 1.1 2021/11/25 03:08:04 ryo Exp $ + +sysnames="linux32_syscalls.c" +sysnumhdr="linux32_syscall.h" +syssw="linux32_sysent.c" +sysarghdr="linux32_syscallargs.h" +systrace="linux32_systrace_args.c" +compatopts="" +libcompatopts="" + +switchname="linux32_sysent" +namesname="linux32_syscallnames" +constprefix="LINUX32_SYS_" +registertype="register32_t" +nsysent=512 + +sys_nosys="linux_sys_nosys" diff --git a/sys/compat/linux32/arch/aarch64/syscalls.master b/sys/compat/linux32/arch/aarch64/syscalls.master new file mode 100644 index 00000000000..20d77a2c48f --- /dev/null +++ b/sys/compat/linux32/arch/aarch64/syscalls.master @@ -0,0 +1,775 @@ + $NetBSD: syscalls.master,v 1.1 2021/11/25 03:08:04 ryo Exp $ + +; NetBSD aarch64 COMPAT_LINUX32 system call name/number "master" file. +; +; The system call numbers are defined by $LINUXSRC/arch/arm/tools/syscall.tbl, +; but linux/arm has multiple syscall tables, these are laid out +; consecutively in this table. +; See the comments at the bottom of this file for details. +; +; (See syscalls.conf to see what it is processed into.) +; +; Fields: number type [type-dependent ...] +; number system call number, must be in order +; type one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of +; the compatibility options defined in syscalls.conf. +; +; Optional fields are specified after the type field +; (NOTE! they *must* be specified in this order): +; MODULAR modname :attempt to autoload system call module if not present +; RUMP: generate rump syscall entry point +; +; types: +; STD always included +; OBSOL obsolete, not included in system +; IGNORED syscall is a null op, but always succeeds +; UNIMPL unimplemented, not included in system +; EXCL implemented, but not included in system +; NODEF included, but don't define the syscall number +; NOARGS included, but don't define the syscall args structure +; INDIR included, but don't define the syscall args structure, +; and allow it to be "really" varargs. +; NOERR included, syscall does not set errno +; EXTERN implemented, but as 3rd party module +; +; arguments: +; PAD argument not part of the C interface, used only for padding +; +; The compat options are defined in the syscalls.conf file, and the +; compat option name is prefixed to the syscall name. Other than +; that, they're like NODEF (for 'compat' options), or STD (for +; 'libcompat' options). +; +; The type-dependent arguments are as follows: +; For STD, NODEF, NOARGS, and compat syscalls: +; { return_type|prefix|compat(optional)|basename(pseudo-proto); } [alias] +; For other syscalls: +; [comment] +; +; #ifdef's, etc. may be included, and are copied to the output files. +; #include's are copied to the syscall names and switch definition files only. + +#include <sys/param.h> +#include <sys/syscallargs.h> + +#include <machine/netbsd32_machdep.h> + +#include <compat/netbsd32/netbsd32.h> +#include <compat/netbsd32/netbsd32_syscallargs.h> + +#include <compat/linux/common/linux_types.h> +#include <compat/linux/common/linux_mmap.h> +#include <compat/linux/common/linux_signal.h> +#include <compat/linux/common/linux_siginfo.h> +#include <compat/linux/common/linux_machdep.h> +#include <compat/linux/common/linux_ipc.h> +#include <compat/linux/common/linux_sem.h> +#include <compat/linux/linux_syscallargs.h> + +#include <compat/linux32/common/linux32_types.h> +#include <compat/linux32/common/linux32_signal.h> +#include <compat/linux32/common/linux32_socketcall.h> +#include <compat/linux32/arch/aarch64/linux32_missing.h> +#include <compat/linux32/linux32_syscallargs.h> + +%% + +0 NOARGS { int|linux_sys||nosys(void); } syscall +1 STD { int|linux32_sys||exit(int rval); } +2 NOARGS { int|sys||fork(void); } +3 NOARGS { netbsd32_ssize_t|netbsd32||read(int fd, \ + netbsd32_voidp buf, netbsd32_size_t nbyte); } +4 NOARGS { netbsd32_ssize_t|netbsd32||write(int fd, \ + netbsd32_voidp buf, netbsd32_size_t nbyte); } +5 STD { int|linux32_sys||open(netbsd32_charp path, int flags, \ + linux_umode_t mode); } +6 NOARGS { int|netbsd32||close(int fd); } +7 STD { int|linux32_sys||waitpid(int pid, netbsd32_intp status, \ + int options);} +8 STD { int|linux32_sys||creat(netbsd32_charp path, \ + linux_umode_t mode); } +9 NOARGS { int|netbsd32||link(netbsd32_charp path, \ + netbsd32_charp link); } +10 STD { int|linux32_sys||unlink(netbsd32_charp path); } +11 NOARGS { int|netbsd32||execve(netbsd32_charp path, \ + netbsd32_charpp argp, netbsd32_charpp envp); } +12 NOARGS { int|netbsd32||chdir(netbsd32_charp path); } +13 STD { int|linux32_sys||time(linux32_timep_t t); } +14 STD { int|linux32_sys||mknod(netbsd32_charp path, \ + linux_umode_t mode, unsigned dev); } +15 NOARGS { int|netbsd32||chmod(netbsd32_charp path, \ + linux_umode_t mode); } +16 STD { int|linux32_sys||lchown16(netbsd32_charp path, \ + linux32_uid16_t uid, linux32_gid16_t gid); } +17 OBSOL break +18 OBSOL ostat +19 NOARGS { netbsd32_long|compat_43_netbsd32||olseek(int fd, \ + netbsd32_long offset, int whence); } +20 NOARGS { pid_t|sys||getpid(void); } +21 UNIMPL mount +22 UNIMPL umount +23 NOARGS linux_setuid16 { int|netbsd32||setuid(uid_t uid); } +24 NOARGS linux_getuid16 { uid_t|sys||getuid(void); } +25 STD { int|linux32_sys||stime(linux32_timep_t t); } +26 STD { int|linux32_sys||ptrace(int request, int pid, \ + int addr, int data); } +27 STD { int|linux32_sys||alarm(unsigned int secs); } +28 OBSOL ofstat +29 NOARGS { int|linux_sys||pause(void); } +30 STD { int|linux32_sys||utime(netbsd32_charp path, \ + linux32_utimbufp_t times); } +31 OBSOL stty +32 OBSOL gtty +33 NOARGS { int|netbsd32||access(netbsd32_charp path, \ + int flags); } +34 STD { int|linux32_sys||nice(int incr); } +35 OBSOL ftime +36 NOARGS { int|sys||sync(void); } +37 STD { int|linux32_sys||kill(int pid, int signum); } +38 NOARGS { int|netbsd32||__posix_rename(netbsd32_charp from, \ + netbsd32_charp to); } +39 NOARGS { int|netbsd32||mkdir(netbsd32_charp path, \ + linux_umode_t mode); } +40 NOARGS { int|netbsd32||rmdir(netbsd32_charp path); } +41 NOARGS { int|netbsd32||dup(int fd); } +42 STD { int|linux32_sys||pipe(netbsd32_intp fd); } +43 STD { int|linux32_sys||times(linux32_tmsp_t tms); } +44 OBSOL prof +45 STD { int|linux32_sys||brk(netbsd32_charp nsize); } +46 NOARGS linux_setgid16 { int|netbsd32||setgid(gid_t gid); } +47 NOARGS linux_getgid16 { gid_t|sys||getgid(void); } +48 STD { int|linux32_sys||signal(int signum, \ + linux32_handlerp_t handler); } +49 NOARGS linux_geteuid16 { uid_t|sys||geteuid(void); } +50 NOARGS linux_getegid16 { gid_t|sys||getegid(void); } +51 NOARGS { int|netbsd32||acct(netbsd32_charp path); } +52 OBSOL phys +53 OBSOL lock +54 STD { int|linux32_sys||ioctl(int fd, netbsd32_u_long com, \ + netbsd32_charp data); } +55 STD { int|linux32_sys||fcntl(int fd, \ + int cmd, netbsd32_voidp arg); } +56 OBSOL mpx +57 NOARGS { int|netbsd32||setpgid(int pid, int pgid); } +58 OBSOL ulimit +59 STD { int|linux32_sys||oldolduname( \ + linux32_oldold_utsnamep_t up); } +60 NOARGS { int|netbsd32||umask(int newmask); } +61 NOARGS { int|netbsd32||chroot(netbsd32_charp path); } +62 UNIMPL ustat +63 NOARGS { int|netbsd32||dup2(int from, int to); } +64 NOARGS { pid_t|sys||getppid(void); } +65 NOARGS { int|sys||getpgrp(void); } +66 NOARGS { int|sys||setsid(void); } +67 UNIMPL sigaction +68 STD { int|linux32_sys||siggetmask(void); } +69 STD { int|linux32_sys||sigsetmask(linux32_old_sigset_t mask); } +70 STD { int|linux32_sys||setreuid16(linux32_uid16_t ruid, \ + linux32_uid16_t euid); } +71 STD { int|linux32_sys||setregid16(linux32_gid16_t rgid, \ + linux32_gid16_t egid); } +72 UNIMPL sigsuspend +73 UNIMPL sigpending +74 NOARGS { int|compat_43_netbsd32||osethostname( \ + netbsd32_charp hostname, u_int len); } +75 STD { int|linux32_sys||setrlimit(u_int which, \ + netbsd32_orlimitp_t rlp); } +76 STD { int|linux32_sys||getrlimit(u_int which, \ + netbsd32_orlimitp_t rlp); } +77 NOARGS { int|compat_50_netbsd32||getrusage(int who, \ + netbsd32_rusage50p_t rusage); } +78 STD { int|linux32_sys||gettimeofday(netbsd32_timeval50p_t tp, \ + netbsd32_timezonep_t tzp); } +79 STD { int|linux32_sys||settimeofday(netbsd32_timeval50p_t tp, \ + netbsd32_timezonep_t tzp); } +80 STD { int|linux32_sys||getgroups16(int gidsetsize, \ + linux32_gid16p_t gidset); } +81 STD { int|linux32_sys||setgroups16(int gidsetsize, \ + linux32_gid16p_t gidset); } +82 STD { int|linux32_sys||oldselect(linux32_oldselectp_t lsp); } +83 NOARGS { int|netbsd32||symlink(netbsd32_charp path, \ + netbsd32_charp link); } +84 NOARGS { int|compat_43_netbsd32||lstat43(netbsd32_charp \ + path, netbsd32_stat43p_t ub); } +85 NOARGS { int|netbsd32||readlink(netbsd32_charp path, \ + netbsd32_charp buf, netbsd32_size_t count); } +86 UNIMPL uselib +87 STD { int|linux32_sys||swapon(netbsd32_charp name); } +88 STD { int|linux32_sys||reboot(int magic1, int magic2, int cmd, \ + netbsd32_voidp arg); } +89 STD { int|linux32_sys||readdir(int fd, netbsd32_voidp dent, \ + unsigned int count); } +90 STD { int|linux32_sys||old_mmap(linux32_oldmmapp lmp); } +91 NOARGS { int|netbsd32||munmap(netbsd32_voidp addr, \ + netbsd32_size_t len); } +92 NOARGS { int|compat_43_netbsd32||otruncate(netbsd32_charp path, \ + netbsd32_long length); } +93 NOARGS { int|compat_43_netbsd32||oftruncate(int fd, \ + netbsd32_long length); } +94 NOARGS { int|netbsd32||fchmod(int fd, linux_umode_t mode); } +95 STD { int|linux32_sys||fchown16(int fd, linux32_uid16_t uid, \ + linux32_gid16_t gid); } +96 STD { int|linux32_sys||getpriority(int which, int who); } +97 NOARGS { int|netbsd32||setpriority(int which, int who, int prio); } +98 NOARGS { int|netbsd32||profil(netbsd32_voidp samples, \ + netbsd32_size_t size, netbsd32_u_long offset, \ + u_int scale); } +99 STD { int|linux32_sys||statfs(netbsd32_charp path, \ + linux32_statfsp sp); } +100 STD { int|linux32_sys||fstatfs(int fd, linux32_statfsp sp); } +101 UNIMPL ioperm +102 STD { int|linux32_sys||socketcall(int what, netbsd32_voidp args); } +103 UNIMPL syslog +104 NOARGS { int|compat_50_netbsd32||setitimer(int which, \ + netbsd32_itimerval50p_t itv, \ + netbsd32_itimerval50p_t oitv); } +105 NOARGS { int|compat_50_netbsd32||getitimer(int which, \ + netbsd32_itimerval50p_t itv); } +106 STD { int|linux32_sys||stat(netbsd32_charp path, \ + linux32_statp sp); } +107 STD { int|linux32_sys||lstat(netbsd32_charp path, \ + linux32_statp sp); } +108 STD { int|linux32_sys||fstat(int fd, \ + linux32_statp sp); } +109 STD { int|linux32_sys||olduname(linux32_oldutsnamep_t up); } +110 UNIMPL iopl +111 UNIMPL vhangup +112 UNIMPL idle +113 UNIMPL syscall +114 STD { int|linux32_sys||wait4(int pid, netbsd32_intp status, \ + int options, netbsd32_rusage50p_t rusage); } +115 STD { int|linux32_sys||swapoff(netbsd32_charp path); } +116 STD { int|linux32_sys||sysinfo(linux32_sysinfop_t arg); } +117 STD { int|linux32_sys||ipc(int what, int a1, int a2, int a3, \ + netbsd32_voidp ptr); } +118 NOARGS { int|netbsd32||fsync(int fd); } +119 STD { int|linux32_sys||sigreturn(linux32_sigcontextp_t scp); } +120 STD { int|linux32_sys||clone(int flags, netbsd32_voidp stack, \ + netbsd32_voidp parent_tidptr, netbsd32_voidp tls, \ + netbsd32_voidp child_tidptr); } +121 STD { int|linux32_sys||setdomainname(netbsd32_charp domainname, \ + int len); } +122 STD { int|linux32_sys||uname(linux32_utsnamep up); } +123 UNIMPL modify_ldt +124 UNIMPL adjtimex +125 STD { int|linux32_sys||mprotect(netbsd32_voidp start, \ + netbsd32_size_t len, int prot); } +126 UNIMPL sigprocmask +127 UNIMPL create_module +128 UNIMPL init_module +129 UNIMPL delete_module +130 UNIMPL get_kernel_syms +131 UNIMPL quotactl +132 NOARGS { int|netbsd32||getpgid(pid_t pid); } +133 NOARGS { int|netbsd32||fchdir(int fd); } +134 UNIMPL bdflush +135 UNIMPL sysfs +136 STD { int|linux32_sys||personality(netbsd32_u_long per); } +137 UNIMPL afs_syscall +138 NOARGS setfsuid16 { int|linux32_sys||setfsuid(uid_t uid); } +139 NOARGS setfsgid16 { int|linux32_sys||setfsgid(gid_t gid); } +140 STD { int|linux32_sys||llseek(int fd, u_int32_t ohigh, \ + u_int32_t olow, netbsd32_voidp res, int whence); } +141 STD { int|linux32_sys||getdents(int fd, \ + linux32_direntp_t dent, unsigned int count); } +142 STD { int|linux32_sys||select(int nfds, \ + netbsd32_fd_setp_t readfds, \ + netbsd32_fd_setp_t writefds, \ + netbsd32_fd_setp_t exceptfds, \ + netbsd32_timeval50p_t timeout); } +143 NOARGS { int|netbsd32||flock(int fd, int how); } +144 NOARGS { int|netbsd32|13|msync(netbsd32_voidp addr, \ + netbsd32_size_t len, int flags); } +145 NOARGS { int|netbsd32||readv(int fd, \ + netbsd32_iovecp_t iovp, int iovcnt); } +146 NOARGS { netbsd32_ssize_t|netbsd32||writev(int fd, \ + netbsd32_iovecp_t iovp, int iovcnt); } +147 NOARGS { pid_t|netbsd32||getsid(pid_t pid); } +148 STD { int|linux32_sys||fdatasync(int fd); } +149 STD { int|linux32_sys||__sysctl(linux32___sysctlp_t lsp); } +150 NOARGS { int|netbsd32||mlock(netbsd32_voidp addr, \ + netbsd32_size_t len); } +151 NOARGS { int|netbsd32||munlock(netbsd32_voidp addr, \ + netbsd32_size_t len); } +152 NOARGS { int|netbsd32||mlockall(int flags); } +153 NOARGS { int|sys||munlockall(void); } +154 STD { int|linux32_sys||sched_setparam(pid_t pid, \ + const linux32_sched_paramp_t sp); } +155 STD { int|linux32_sys||sched_getparam(pid_t pid, \ + linux32_sched_paramp_t sp); } +156 STD { int|linux32_sys||sched_setscheduler(pid_t pid, \ + int policy, linux32_sched_paramp_t sp); } +157 STD { int|linux32_sys||sched_getscheduler(pid_t pid); } +158 NOARGS { int|linux_sys||sched_yield(void); } +159 STD { int|linux32_sys||sched_get_priority_max(int policy); } +160 STD { int|linux32_sys||sched_get_priority_min(int policy); } +161 UNIMPL sched_rr_get_interval +162 STD { int|linux32_sys||nanosleep(linux32_timespecp_t rqtp, \ + linux32_timespecp_t rmtp); } +163 STD { int|linux32_sys||mremap(netbsd32_voidp old_address, \ + netbsd32_size_t old_size, netbsd32_size_t new_size, \ + netbsd32_u_long flags); } +164 STD { int|linux32_sys||setresuid16(linux32_uid16_t ruid, \ + linux32_uid16_t euid, linux32_uid16_t suid); } +165 STD { int|linux32_sys||getresuid16(linux32_uid16p_t ruid, \ + linux32_uid16p_t euid, linux32_uid16p_t suid); } +166 UNIMPL vm86 +167 UNIMPL query_module +168 NOARGS { int|netbsd32||poll(netbsd32_pollfdp_t fds, u_int nfds, \ + int timeout); } +169 UNIMPL nfsservctl +170 STD { int|linux32_sys||setresgid16(linux32_gid16_t rgid, \ + linux32_gid16_t egid, linux32_gid16_t sgid); } +171 STD { int|linux32_sys||getresgid16(linux32_gid16p_t rgid, \ + linux32_gid16p_t egid, linux32_gid16p_t sgid); } +172 UNIMPL prctl +173 STD { int|linux32_sys||rt_sigreturn(linux32_ucontextp_t ucp); } +174 STD { int|linux32_sys||rt_sigaction(int signum, \ + linux32_sigactionp_t nsa, \ + linux32_sigactionp_t osa, \ + netbsd32_size_t sigsetsize); } +175 STD { int|linux32_sys||rt_sigprocmask(int how, \ + linux32_sigsetp_t set, \ + linux32_sigsetp_t oset, \ + netbsd32_size_t sigsetsize); } +176 STD { int|linux32_sys||rt_sigpending(linux32_sigsetp_t set, \ + netbsd32_size_t sigsetsize); } +177 STD { int|linux32_sys||rt_sigtimedwait( \ + const linux32_sigsetp_t set, \ + linux32_siginfop_t info, \ + const linux32_timespecp_t timeout); } +178 STD { int|linux32_sys||rt_queueinfo(int pid, int sig, \ + linux32_siginfop_t uinfo); } +179 STD { int|linux32_sys||rt_sigsuspend(linux32_sigsetp_t unewset, \ + netbsd32_size_t sigsetsize); } +180 STD { netbsd32_ssize_t|linux32_sys||pread(int fd, \ + netbsd32_voidp buf, netbsd32_size_t nbyte, \ + netbsd32_off_t offset); } +181 STD { netbsd32_ssize_t|linux32_sys||pwrite(int fd, \ + netbsd32_voidp buf, netbsd32_size_t nbyte, \ + netbsd32_off_t offset); } +182 STD { int|linux32_sys||chown16(netbsd32_charp path, \ + linux32_uid16_t uid, linux32_gid16_t gid); } +183 NOARGS { int|netbsd32||__getcwd(netbsd32_charp bufp, \ + netbsd32_size_t length); } +184 UNIMPL capget +185 UNIMPL capset +186 UNIMPL sigaltstack +187 UNIMPL sendfile +188 UNIMPL getpmsg +189 UNIMPL putpmsg +190 NOARGS { int|sys|14|vfork(void); } +191 STD { int|linux32_sys||ugetrlimit(int which, \ + netbsd32_orlimitp_t rlp); } +192 STD { linux32_off_t|linux32_sys||mmap2(netbsd32_u_long addr, \ + netbsd32_size_t len, int prot, int flags, int fd, \ + linux32_off_t offset); } +193 STD { int|linux32_sys||truncate64(netbsd32_charp path, \ + uint32_t lenlo, uint32_t lenhi); } +194 STD { int|linux32_sys||ftruncate64(unsigned int fd, \ + uint32_t lenlo, uint32_t lenhi); } +195 STD { int|linux32_sys||stat64(netbsd32_charp path, \ + linux32_stat64p sp); } +196 STD { int|linux32_sys||lstat64(netbsd32_charp path, \ + linux32_stat64p sp); } +197 STD { int|linux32_sys||fstat64(int fd, \ + linux32_stat64p sp); } +198 NOARGS { int|netbsd32||__posix_lchown(netbsd32_charp path, \ + uid_t uid, gid_t gid); } +199 NOARGS { uid_t|sys||getuid(void); } +200 NOARGS { gid_t|sys||getgid(void); } +201 NOARGS { uid_t|sys||geteuid(void); } +202 NOARGS { gid_t|sys||getegid(void); } +203 NOARGS { int|netbsd32||setreuid(uid_t ruid, uid_t euid); } +204 NOARGS { int|netbsd32||setregid(gid_t rgid, gid_t egid); } +205 NOARGS { int|netbsd32||getgroups(int gidsetsize, \ + netbsd32_gid_tp gidset); } +206 NOARGS { int|netbsd32||setgroups(int gidsetsize, \ + netbsd32_gid_tp gidset); } +207 NOARGS { int|netbsd32||__posix_fchown(int fd, uid_t uid, gid_t gid); } +208 STD { int|linux32_sys||setresuid(uid_t ruid, uid_t euid, \ + uid_t suid); } +209 STD { int|linux32_sys||getresuid(linux32_uidp_t ruid, \ + linux32_uidp_t euid, linux32_uidp_t suid); } +210 STD { int|linux32_sys||setresgid(gid_t rgid, gid_t egid, \ + gid_t sgid); } +211 STD { int|linux32_sys||getresgid(linux32_gidp_t rgid, \ + linux32_gidp_t egid, linux32_gidp_t sgid); } +212 NOARGS { int|netbsd32||__posix_chown(netbsd32_charp path, \ + uid_t uid, gid_t gid); } +213 NOARGS { int|netbsd32||setuid(uid_t uid); } +214 NOARGS { int|netbsd32||setgid(gid_t gid); } +215 STD { int|linux32_sys||setfsuid(uid_t uid); } +216 STD { int|linux32_sys||setfsgid(gid_t gid); } +217 STD { int|linux32_sys||getdents64(int fd, \ + linux32_dirent64p_t dent, unsigned int count); } +218 UNIMPL pivot_root +219 NOARGS { int|netbsd32||mincore(netbsd32_voidp addr, \ + netbsd32_size_t len, netbsd32_charp vec); } +220 NOARGS { int|netbsd32||madvise(netbsd32_voidp addr, \ + netbsd32_size_t len, int behav); } +; fcntl64() - Exactly the same as fcntl() +#define linux32_sys_fcntl64 linux32_sys_fcntl +#define linux32_sys_fcntl64_args linux32_sys_fcntl_args +221 NOARGS { int|linux32_sys||fcntl64(int fd, \ + int cmd, netbsd32_voidp arg); } +222 UNIMPL /* unused */ +223 UNIMPL /* unused */ +224 NOARGS { pid_t|linux_sys||gettid(void); } +225 UNIMPL readahead +226 NOARGS { int|netbsd32||setxattr(netbsd32_charp path, \ + netbsd32_charp name, netbsd32_voidp value, \ + netbsd32_size_t size, int flags); } +227 NOARGS { int|netbsd32||lsetxattr(netbsd32_charp path, \ + netbsd32_charp name, netbsd32_voidp value, \ + netbsd32_size_t size, int flags); } +228 NOARGS { int|netbsd32||fsetxattr(int fd, netbsd32_charp name, \ + netbsd32_voidp value, netbsd32_size_t size, int flags); } +229 NOARGS { ssize_t|netbsd32||getxattr(netbsd32_charp path, \ + netbsd32_charp name, netbsd32_voidp value, \ + netbsd32_size_t size); } +230 NOARGS { ssize_t|netbsd32||lgetxattr(netbsd32_charp path, \ + netbsd32_charp name, netbsd32_voidp value, \ + netbsd32_size_t size); } +231 NOARGS { ssize_t|netbsd32||fgetxattr(int fd, netbsd32_charp name, \ + netbsd32_voidp value, netbsd32_size_t size); } +232 NOARGS { ssize_t|netbsd32||listxattr(netbsd32_charp path, \ + netbsd32_charp list, netbsd32_size_t size); } +233 NOARGS { ssize_t|netbsd32||llistxattr(netbsd32_charp path, \ + netbsd32_charp list, netbsd32_size_t size); } +234 NOARGS { ssize_t|netbsd32||flistxattr(int fd, netbsd32_charp list, \ + netbsd32_size_t size); } +235 NOARGS { int|netbsd32||removexattr(netbsd32_charp path, \ + netbsd32_charp name); } +236 NOARGS { int|netbsd32||lremovexattr(netbsd32_charp path, \ + netbsd32_charp name); } +237 NOARGS { int|netbsd32||fremovexattr(int fd, netbsd32_charp name); } +238 STD { int|linux32_sys||tkill(int tid, int sig); } +239 UNIMPL sendfile64 +240 STD { int|linux32_sys||futex(linux32_intp_t uaddr, int op, \ + int val, linux32_timespecp_t timeout, \ + linux32_intp_t uaddr2, int val3); } +241 STD { int|linux32_sys||sched_setaffinity(pid_t pid, \ + unsigned int len, linux32_ulongp_t mask); } +242 STD { int|linux32_sys||sched_getaffinity(pid_t pid, \ + unsigned int len, linux32_ulongp_t mask); } +243 UNIMPL io_setup +244 UNIMPL io_destroy +245 UNIMPL io_getevents +246 UNIMPL io_submit +247 UNIMPL io_cancel +248 STD { int|linux32_sys||exit_group(int error_code); } +249 UNIMPL lookup_dcookie +250 UNIMPL epoll_create +251 UNIMPL epoll_ctl +252 UNIMPL epoll_wait +253 UNIMPL remap_file_pages +254 UNIMPL set_thread_area +255 UNIMPL get_thread_area +256 STD { int|linux32_sys||set_tid_address(linux32_intp_t tid); } +257 STD { int|linux32_sys||timer_create(clockid_t clockid, \ + struct linux32_sigevent *evp, timer_t *timerid); } +258 STD { int|linux32_sys||timer_settime(timer_t timerid, \ + int flags, const struct linux32_itimerspec *tim, \ + struct linux32_itimerspec *otim); } +259 STD { int|linux32_sys||timer_gettime(timer_t timerid, \ + struct linux32_itimerspec *tim); } +260 NOARGS { int|sys||timer_getoverrun(timer_t timerid); } +261 NOARGS { int|sys||timer_delete(timer_t timerid); } +262 STD { int|linux32_sys||clock_settime(clockid_t which, \ + linux32_timespecp_t tp); } +263 STD { int|linux32_sys||clock_gettime(clockid_t which, \ + linux32_timespecp_t tp); } +264 STD { int|linux32_sys||clock_getres(clockid_t which, \ + linux32_timespecp_t tp); } +265 STD { int|linux32_sys||clock_nanosleep(clockid_t which, int flags, \ + linux32_timespecp_t rqtp, linux32_timespecp_t rmtp); } +266 STD { int|linux32_sys||statfs64(netbsd32_charp path, \ + netbsd32_size_t sz, linux32_statfs64p sp); } +267 STD { int|linux32_sys||fstatfs64(int fd, \ + netbsd32_size_t sz, linux32_statfs64p sp); } +268 STD { int|linux32_sys||tgkill(int tgid, int tid, int sig); } +269 NOARGS { int|compat_50_netbsd32||utimes(netbsd32_charp path, \ + netbsd32_timeval50p_t tptr); } +270 STD { int|linux32_sys||fadvise64_64(int fd, uint32_t offlo, \ + uint32_t offhi, uint32_t lenlo, uint32_t lenhi, \ + int advice); } +271 UNIMPL pciconfig_iobase +272 UNIMPL pciconfig_read +273 UNIMPL pciconfig_write +274 UNIMPL mq_open +275 UNIMPL mq_unlink +276 UNIMPL mq_timedsend +277 UNIMPL mq_timedreceive +278 UNIMPL mq_notify +279 UNIMPL mq_getsetattr +280 UNIMPL waitid +281 NOARGS { int|linux32_sys||socket(int domain, int type, \ + int protocol); } +282 NOARGS { int|linux32_sys||bind(int s, netbsd32_osockaddrp_t name, \ + int namelen); } +283 NOARGS { int|linux32_sys||connect(int s, netbsd32_osockaddrp_t name, \ + int namelen); } +284 UNIMPL listen +285 NOARGS { int|linux32_sys||accept(int s, netbsd32_osockaddrp_t name, \ + netbsd32_intp anamelen); } +286 NOARGS { int|linux32_sys||getsockname(int fdec, netbsd32_charp asa, \ + netbsd32_intp alen); } +287 NOARGS { int|linux32_sys||getpeername(int fdes, \ + netbsd32_sockaddrp_t asa, netbsd32_intp alen); } +288 NOARGS { int|linux32_sys||socketpair(int domain, int type, \ + int protocol, netbsd32_intp rsv); } +289 NOARGS { int|linux32_sys||send(int s, netbsd32_voidp buf, int len, \ + int flags); } +290 NOARGS { int|linux32_sys||sendto(int s, netbsd32_voidp msg, int len, \ + int flags, netbsd32_osockaddrp_t to, int tolen); } +291 NOARGS { int|linux32_sys||recv(int s, netbsd32_voidp buf, int len, \ + int flags); } +292 NOARGS { int|linux32_sys||recvfrom(int s, netbsd32_voidp buf, \ + netbsd32_size_t len, int flags, \ + netbsd32_osockaddrp_t from, netbsd32_intp fromlenaddr); } +293 UNIMPL shutdown +294 NOARGS { int|linux32_sys||setsockopt(int s, int level, int optname, \ + netbsd32_voidp optval, int optlen); } +295 NOARGS { int|linux32_sys||getsockopt(int s, int level, int optname, \ + netbsd32_voidp optval, netbsd32_intp optlen); } +296 UNIMPL sendmsg +297 UNIMPL recvmsg +298 UNIMPL semop +299 UNIMPL semget +300 UNIMPL semctl +301 UNIMPL msgsnd +302 UNIMPL msgrcv +303 UNIMPL msgget +304 UNIMPL msgctl +305 UNIMPL shmat +306 UNIMPL shmdt +307 UNIMPL shmget +308 UNIMPL shmctl +309 UNIMPL add_key +310 UNIMPL request_key +311 UNIMPL keyctl +312 UNIMPL semtimedop +313 UNIMPL vserver +314 UNIMPL ioptio_set +315 UNIMPL ioptio_get +316 UNIMPL inotify_init +317 UNIMPL inotify_add_watch +318 UNIMPL inotify_rm_watch +319 UNIMPL mbind +320 UNIMPL get_mempolicy +321 UNIMPL set_mempolicy +322 STD { int|linux32_sys||openat(int fd, netbsd32_charp path, \ + int flags, ... linux_umode_t mode); } +323 NOARGS { int|netbsd32||mkdirat(int fd, netbsd32_charp path, \ + linux_umode_t mode); } +324 STD { int|linux32_sys||mknodat(int fd, netbsd32_charp path, \ + linux_umode_t mode, unsigned dev); } +325 STD { int|linux32_sys||fchownat(int fd, netbsd32_charp path, \ + uid_t owner, gid_t group, int flag); } +326 UNIMPL futimesat +327 STD { int|linux32_sys||fstatat64(int fd, netbsd32_charp path, \ + linux32_stat64p sp, int flag); } +328 STD { int|linux32_sys||unlinkat(int fd, netbsd32_charp path, \ + int flag); } +329 NOARGS { int|netbsd32||renameat(int fromfd, netbsd32_charp from, \ + int tofd, netbsd32_charp to); } +330 STD { int|linux32_sys||linkat(int fd1, netbsd32_charp name1, \ + int fd2, netbsd32_charp name2, int flags); } +331 NOARGS { int|netbsd32||symlinkat(netbsd32_charp path1, int fd, \ + netbsd32_charp path2); } +332 NOARGS { int|netbsd32||readlinkat(int fd, netbsd32_charp path, \ + netbsd32_charp buf, linux32_size_t bufsize); } +333 STD { int|linux32_sys||fchmodat(int fd, netbsd32_charp path, \ + linux_umode_t mode); } +334 STD { int|linux32_sys||faccessat(int fd, netbsd32_charp path, \ + int amode); } +335 UNIMPL pselect6 +336 STD { int|linux32_sys||ppoll(netbsd32_pollfdp_t fds, u_int nfds, \ + linux32_timespecp_t timeout, linux32_sigsetp_t sigset); } +337 UNIMPL unshare + ; + ; The netbsd32 native robust list calls have different + ; argument names / types, but they are ABI-compatible + ; with linux32. + ; +338 NOARGS { int|netbsd32||__futex_set_robust_list( \ + netbsd32_voidp head, netbsd32_size_t len); } +339 NOARGS { int|netbsd32||__futex_get_robust_list(lwpid_t lwpid, \ + netbsd32_voidp headp, netbsd32_size_tp lenp); } +340 UNIMPL splice +341 UNIMPL sync_file_range +342 UNIMPL tee +343 UNIMPL vmsplice +344 UNIMPL move_pages +345 UNIMPL getcpu +346 UNIMPL epoll_wait +347 UNIMPL kexec_load +348 STD { int|linux32_sys||utimensat(int fd, netbsd32_charp path, \ + linux32_timespecp_t times, int flag); } +349 UNIMPL signalfd +350 NOARGS { int|linux_sys||timerfd_create(clockid_t clock_id, \ + int flags); } +351 STD { int|linux32_sys||eventfd(unsigned int initval); } +352 STD { int|linux32_sys||fallocate(int fd, int mode, \ + off_t offset, off_t len); } +353 STD { int|linux32_sys||timerfd_settime(int fd, int flags, \ + const struct linux32_itimerspec *tim, \ + struct linux32_itimerspec *otim); } +354 STD { int|linux32_sys||timerfd_gettime(int fd, \ + struct linux32_itimerspec *tim); } +355 UNIMPL signalfd4 +356 STD { int|linux32_sys||eventfd2(unsigned int initval, \ + int flags); } +357 UNIMPL epoll_create1 +358 STD { int|linux32_sys||dup3(int from, int to, int flags); } +359 STD { int|linux32_sys||pipe2(netbsd32_intp fd, int flags); } +360 UNIMPL inotify_init1 +361 STD { int|linux32_sys||preadv(int fd, \ + const netbsd32_iovecp_t iovp, int iovcnt, \ + netbsd32_u_long off_lo, netbsd32_u_long off_hi); } +362 STD { int|linux32_sys||pwritev(int fd, \ + const netbsd32_iovecp_t iovp, int iovcnt, \ + netbsd32_u_long off_lo, netbsd32_u_long off_hi); } +363 UNIMPL rt_tgsigqueueinfo +364 UNIMPL perf_counter_open +365 UNIMPL recvmmsg +366 UNIMPL accept4 +367 UNIMPL fanotify_init +368 UNIMPL fanotify_mark +369 UNIMPL prlimit64 +370 UNIMPL name_to_handle_at +371 UNIMPL open_by_handle_at +372 UNIMPL clock_adjtime +373 UNIMPL syncfs +374 UNIMPL sendmmsg +375 UNIMPL setns +376 UNIMPL process_vm_readv +377 UNIMPL process_vm_writev +378 UNIMPL kcmp +379 UNIMPL finit_module +380 UNIMPL sched_setattr +381 UNIMPL sched_getattr +382 UNIMPL renameat2 +383 UNIMPL seccomp +384 NOARGS { netbsd32_ssize_t|netbsd32||getrandom( \ + netbsd32_voidp buf, netbsd32_size_t buflen, \ + unsigned int flags); } +385 UNIMPL memfd_create +386 UNIMPL bpf +387 UNIMPL execveat +388 UNIMPL userfaultfd +389 UNIMPL membarrier +390 UNIMPL mlock2 +391 UNIMPL copy_file_range +392 UNIMPL preadv2 +393 UNIMPL pwritev2 +394 UNIMPL pkey_mprotect +395 UNIMPL pkey_alloc +396 UNIMPL pkey_free +397 STD { int|linux32_sys||statx(int fd, netbsd32_charp path, \ + int flag, unsigned int mask, linux32_statxp sp); } +398 UNIMPL rseq +399 UNIMPL io_pgetevents +400 UNIMPL migrate_pages +401 UNIMPL kexec_file_load +402 UNIMPL /* unused */ +403 UNIMPL clock_gettime64 +404 UNIMPL clock_settime64 +405 UNIMPL clock_adjtime64 +406 UNIMPL clock_getres_time64 +407 UNIMPL clock_nanosleep_time64 +408 UNIMPL timer_gettime64 +409 UNIMPL timer_settime64 +410 UNIMPL timerfd_gettime64 +411 UNIMPL timerfd_settime64 +412 UNIMPL utimensat_time64 +413 UNIMPL pselect6_time64 +414 UNIMPL ppoll_time64 +415 UNIMPL /* unused? */ +416 UNIMPL io_pgetevents_time64 +417 UNIMPL recvmmsg_time64 +418 UNIMPL mq_timedsend_time64 +419 UNIMPL mq_timedreceive_time64 +420 UNIMPL semtimedop_time64 +421 UNIMPL rt_sigtimedwait_time64 +422 UNIMPL futex_time64 +423 UNIMPL sched_rr_get_interval_time64 +424 UNIMPL pidfd_send_signal +425 UNIMPL io_uring_setup +426 UNIMPL io_uring_enter +427 UNIMPL io_uring_register +428 UNIMPL open_tree +429 UNIMPL move_mount +430 UNIMPL fsopen +431 UNIMPL fsconfig +432 UNIMPL fsmount +433 UNIMPL fspick +434 UNIMPL pidfd_open +435 UNIMPL clone3 +436 UNIMPL close_range +437 UNIMPL openat2 +438 UNIMPL pidfd_getfd +439 UNIMPL faccessat2 +440 UNIMPL process_madvise +441 UNIMPL epoll_pwait2 +442 UNIMPL mount_setattr +443 UNIMPL quotactl_fd +444 UNIMPL landlock_create_ruleset +445 UNIMPL landlock_add_rule +446 UNIMPL landlock_restrict_self +447 UNIMPL +448 UNIMPL +449 UNIMPL +450 UNIMPL +451 UNIMPL +452 UNIMPL +453 UNIMPL +454 UNIMPL +455 UNIMPL +456 UNIMPL +457 UNIMPL +458 UNIMPL +459 UNIMPL +460 UNIMPL +461 UNIMPL +462 UNIMPL +463 UNIMPL +464 UNIMPL +465 UNIMPL +466 UNIMPL +467 UNIMPL +468 UNIMPL +469 UNIMPL +470 UNIMPL +471 UNIMPL +472 UNIMPL +473 UNIMPL +474 UNIMPL +475 UNIMPL +476 UNIMPL +477 UNIMPL +478 UNIMPL +479 UNIMPL + +; +; EABI ARMLinux actually has two ranges of syscalls. Normal syscalls use +; SVC numbers starting at 0 (__NR_SYSCALL_BASE), Special ARM-specific syscalls +; use SVC numbers starting at 0x0f0000 (__ARM_NR_BASE). +; $SRC/sys/arch/aarch64/aarch64/linux32_syscall.c remaps these down to 480-, +; So that we can use one linux_sysent array for the whole lot. +; +; If the linux's normal syscall is increased to more than 480, this needs to be +; changed. Also note the overall size as defined in syscalls.conf. (nsysent=512) +; +; see also: +; $LINUXSRC/arch/arm/include/uapi/asm/unistd.h +; $LINUXSRC/arch/arm/kernel/traps.c:arm_syscall() +; +480 UNIMPL /* base. actually 0x0f0000 */ +481 UNIMPL breakpoint +482 UNIMPL cacheflush +483 UNIMPL usr26 +484 UNIMPL usr32 +485 STD { int|linux32_sys||set_tls(netbsd32_voidp tls); } +486 STD { linux32_off_t|linux32_sys||get_tls(void); } diff --git a/sys/compat/linux32/common/linux32_errno.h b/sys/compat/linux32/common/linux32_errno.h index 58165a551a2..63d04e87563 100644 --- a/sys/compat/linux32/common/linux32_errno.h +++ b/sys/compat/linux32/common/linux32_errno.h @@ -1,10 +1,14 @@ -/* $NetBSD: linux32_errno.h,v 1.1 2006/02/09 19:18:57 manu Exp $ */ +/* $NetBSD: linux32_errno.h,v 1.2 2021/11/25 03:08:04 ryo Exp $ */ #ifndef _LINUX32_ERRNO_H #define _LINUX32_ERRNO_H -#ifdef __amd64__ +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_errno.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_errno.h> +#else +#error Undefined linux32_errno.h machine type. #endif #endif /* !_LINUX32_ERRNO_H */ diff --git a/sys/compat/linux32/common/linux32_exec.h b/sys/compat/linux32/common/linux32_exec.h index d0e8e567f30..2954b1e80b0 100644 --- a/sys/compat/linux32/common/linux32_exec.h +++ b/sys/compat/linux32/common/linux32_exec.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_exec.h,v 1.7 2010/07/07 01:30:35 chs Exp $ */ +/* $NetBSD: linux32_exec.h,v 1.8 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -36,8 +36,12 @@ #include <compat/netbsd32/netbsd32.h> -#if defined(__amd64__) +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_exec.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_exec.h> +#else +#error Undefined linux32_exec.h machine type. #endif extern struct emul emul_linux32; diff --git a/sys/compat/linux32/common/linux32_exec_elf32.c b/sys/compat/linux32/common/linux32_exec_elf32.c index c41b9ed8940..fd474094269 100644 --- a/sys/compat/linux32/common/linux32_exec_elf32.c +++ b/sys/compat/linux32/common/linux32_exec_elf32.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_exec_elf32.c,v 1.21 2021/11/25 02:48:00 ryo Exp $ */ +/* $NetBSD: linux32_exec_elf32.c,v 1.22 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001,2006 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.21 2021/11/25 02:48:00 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.22 2021/11/25 03:08:04 ryo Exp $"); #define ELFSIZE 32 @@ -53,7 +53,9 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.21 2021/11/25 02:48:00 ryo #include <compat/netbsd32/netbsd32_exec.h> #include <compat/linux32/common/linux32_exec.h> +#ifndef __aarch64__ #include <machine/cpuvar.h> +#endif #include <machine/frame.h> #ifdef DEBUG_LINUX diff --git a/sys/compat/linux32/common/linux32_ioctl.h b/sys/compat/linux32/common/linux32_ioctl.h index ac6deed4d54..c01d64593d2 100644 --- a/sys/compat/linux32/common/linux32_ioctl.h +++ b/sys/compat/linux32/common/linux32_ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ioctl.h,v 1.5 2008/06/19 16:09:25 christos Exp $ */ +/* $NetBSD: linux32_ioctl.h,v 1.6 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995-2006 The NetBSD Foundation, Inc. @@ -32,8 +32,12 @@ #ifndef _LINUX32_IOCTL_H #define _LINUX32_IOCTL_H -#if defined(__amd64__) +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_ioctl.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_ioctl.h> +#else +#error Undefined linux32_ioctl.h machine type. #endif #ifdef _KERNEL diff --git a/sys/compat/linux32/common/linux32_machdep.h b/sys/compat/linux32/common/linux32_machdep.h index 8f6d9991110..d522c5157bb 100644 --- a/sys/compat/linux32/common/linux32_machdep.h +++ b/sys/compat/linux32/common/linux32_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_machdep.h,v 1.3 2010/07/07 01:30:35 chs Exp $ */ +/* $NetBSD: linux32_machdep.h,v 1.4 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -34,7 +34,9 @@ #ifndef _LINUX32_MACHDEP_H #define _LINUX32_MACHDEP_H -#if defined(__amd64__) +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_machdep.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_machdep.h> #else #error Undefined linux32_machdep.h machine type. diff --git a/sys/compat/linux32/common/linux32_misc.c b/sys/compat/linux32/common/linux32_misc.c index 41dd48f12eb..b60f5475d36 100644 --- a/sys/compat/linux32/common/linux32_misc.c +++ b/sys/compat/linux32/common/linux32_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_misc.c,v 1.33 2021/09/20 02:20:03 thorpej Exp $ */ +/* $NetBSD: linux32_misc.c,v 1.34 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.33 2021/09/20 02:20:03 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.34 2021/11/25 03:08:04 ryo Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.33 2021/09/20 02:20:03 thorpej Ex #include <compat/linux/common/linux_types.h> #include <compat/linux32/common/linux32_types.h> +#include <compat/linux32/common/linux32_machdep.h> #include <compat/linux32/common/linux32_signal.h> #include <compat/linux32/common/linux32_sched.h> #include <compat/linux32/linux32_syscallargs.h> @@ -165,7 +166,7 @@ linux32_sys_ptrace(struct lwp *l, const struct linux32_sys_ptrace_args *uap, reg { /* { i386, m68k, powerpc: T=int - alpha, amd64: T=long + aarch64, alpha, amd64: T=long syscallarg(T) request; syscallarg(T) pid; syscallarg(T) addr; diff --git a/sys/compat/linux32/common/linux32_siginfo.h b/sys/compat/linux32/common/linux32_siginfo.h index 374d9a0ac71..d8902b15f40 100644 --- a/sys/compat/linux32/common/linux32_siginfo.h +++ b/sys/compat/linux32/common/linux32_siginfo.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_siginfo.h,v 1.1 2011/11/18 04:08:56 christos Exp $ */ +/* $NetBSD: linux32_siginfo.h,v 1.2 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -32,8 +32,12 @@ #ifndef _LINUX32_SIGINFO_H #define _LINUX32_SIGINFO_H -#if defined(__amd64__) +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_siginfo.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_siginfo.h> +#else +#error Undefined linux32_siginfo.h machine type. #endif /* si_code values for non signal */ diff --git a/sys/compat/linux32/common/linux32_signal.h b/sys/compat/linux32/common/linux32_signal.h index 49be4eae6ff..0f0c5e5a3ee 100644 --- a/sys/compat/linux32/common/linux32_signal.h +++ b/sys/compat/linux32/common/linux32_signal.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_signal.h,v 1.4 2021/11/01 05:07:16 thorpej Exp $ */ +/* $NetBSD: linux32_signal.h,v 1.5 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -34,8 +34,12 @@ #define _LINUX32_SIGNAL_H_ #include <compat/linux32/common/linux32_siginfo.h> -#ifdef __amd64__ +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_signal.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_signal.h> +#else +#error Undefined linux32_signal.h machine type. #endif void linux32_to_native_sigset(sigset_t *, const linux32_sigset_t *); diff --git a/sys/compat/linux32/common/linux32_sysinfo.c b/sys/compat/linux32/common/linux32_sysinfo.c index 5980fcafb0d..f7931e2d874 100644 --- a/sys/compat/linux32/common/linux32_sysinfo.c +++ b/sys/compat/linux32/common/linux32_sysinfo.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_sysinfo.c,v 1.13 2020/06/11 22:21:05 ad Exp $ */ +/* $NetBSD: linux32_sysinfo.c,v 1.14 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,10 +33,11 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_sysinfo.c,v 1.13 2020/06/11 22:21:05 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_sysinfo.c,v 1.14 2021/11/25 03:08:04 ryo Exp $"); #include <sys/types.h> #include <sys/param.h> +#include <sys/atomic.h> #include <sys/kernel.h> #include <sys/dirent.h> #include <sys/proc.h> diff --git a/sys/compat/linux32/common/linux32_termios.h b/sys/compat/linux32/common/linux32_termios.h index d56007f98f4..d569b44b740 100644 --- a/sys/compat/linux32/common/linux32_termios.h +++ b/sys/compat/linux32/common/linux32_termios.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_termios.h,v 1.1 2006/02/15 09:31:17 manu Exp $ */ +/* $NetBSD: linux32_termios.h,v 1.2 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -34,8 +34,12 @@ #ifndef _LINUX32_TERMIOS_H #define _LINUX32_TERMIOS_H -#if defined(__amd64__) +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_termios.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_termios.h> +#else +#error Undefined linux32_termios.h machine type. #endif /* diff --git a/sys/compat/linux32/common/linux32_types.h b/sys/compat/linux32/common/linux32_types.h index 231732ee07a..d5cb7fed95b 100644 --- a/sys/compat/linux32/common/linux32_types.h +++ b/sys/compat/linux32/common/linux32_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_types.h,v 1.16 2021/11/25 02:27:08 ryo Exp $ */ +/* $NetBSD: linux32_types.h,v 1.17 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -34,8 +34,12 @@ #ifndef _LINUX32_TYPES_H #define _LINUX32_TYPES_H -#ifdef __amd64__ +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_types.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_types.h> +#else +#error Undefined linux32_types.h machine type. #endif typedef uint16_t linux32_gid16_t; diff --git a/sys/compat/linux32/common/linux32_unistd.c b/sys/compat/linux32/common/linux32_unistd.c index 93b66458d87..0598ba85473 100644 --- a/sys/compat/linux32/common/linux32_unistd.c +++ b/sys/compat/linux32/common/linux32_unistd.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_unistd.c,v 1.42 2019/11/09 23:44:31 jdolecek Exp $ */ +/* $NetBSD: linux32_unistd.c,v 1.43 2021/11/25 03:08:04 ryo Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.42 2019/11/09 23:44:31 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.43 2021/11/25 03:08:04 ryo Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -73,6 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.42 2019/11/09 23:44:31 jdolecek #include <compat/linux32/common/linux32_sched.h> #include <compat/linux32/common/linux32_sysctl.h> #include <compat/linux32/common/linux32_socketcall.h> +#include <compat/linux32/linux32_syscall.h> #include <compat/linux32/linux32_syscallargs.h> static int linux32_select1(struct lwp *, register_t *, @@ -475,6 +476,7 @@ linux32_sys_mknod(struct lwp *l, const struct linux32_sys_mknod_args *uap, regis return linux_sys_mknod(l, &ua, retval); } +#ifdef LINUX32_SYS_break int linux32_sys_break(struct lwp *l, const struct linux32_sys_break_args *uap, register_t *retval) { @@ -486,6 +488,7 @@ linux32_sys_break(struct lwp *l, const struct linux32_sys_break_args *uap, regis return ENOSYS; } +#endif int linux32_sys_swapon(struct lwp *l, const struct linux32_sys_swapon_args *uap, register_t *retval) diff --git a/sys/compat/linux32/linux32_syscall.h b/sys/compat/linux32/linux32_syscall.h index 7b2a9d7f4ec..0d882ecceef 100644 --- a/sys/compat/linux32/linux32_syscall.h +++ b/sys/compat/linux32/linux32_syscall.h @@ -1,9 +1,11 @@ -/* $NetBSD: linux32_syscall.h,v 1.1 2006/02/09 19:18:57 manu Exp $ */ +/* $NetBSD: linux32_syscall.h,v 1.2 2021/11/25 03:08:05 ryo Exp $ */ #ifndef _LINUX32_SYSCALL_H #define _LINUX32_SYSCALL_H -#if defined(__amd64__) +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_syscall.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_syscall.h> #else #define LINUX32_SYS_MAXSYSCALL 0 diff --git a/sys/compat/linux32/linux32_syscallargs.h b/sys/compat/linux32/linux32_syscallargs.h index b8fa8a9a19f..65aa5f71cfe 100644 --- a/sys/compat/linux32/linux32_syscallargs.h +++ b/sys/compat/linux32/linux32_syscallargs.h @@ -1,9 +1,11 @@ -/* $NetBSD: linux32_syscallargs.h,v 1.1 2006/02/09 19:18:57 manu Exp $ */ +/* $NetBSD: linux32_syscallargs.h,v 1.2 2021/11/25 03:08:05 ryo Exp $ */ #ifndef _LINUX32_SYSCALLARGS_H #define _LINUX32_SYSCALLARGS_H -#if defined(__amd64__) +#if defined(__aarch64__) +#include <compat/linux32/arch/aarch64/linux32_syscallargs.h> +#elif defined(__amd64__) #include <compat/linux32/arch/amd64/linux32_syscallargs.h> #else #error Undefined linux32_syscallargs.h machine type. diff --git a/sys/compat/linux32/linux32_syscalls.c b/sys/compat/linux32/linux32_syscalls.c index 9459bcf8cbc..2ae94aad7d2 100644 --- a/sys/compat/linux32/linux32_syscalls.c +++ b/sys/compat/linux32/linux32_syscalls.c @@ -1,9 +1,11 @@ -/* $NetBSD: linux32_syscalls.c,v 1.1 2006/02/09 19:18:57 manu Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.2 2021/11/25 03:08:05 ryo Exp $ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: linux32_syscalls.c,v 1.1 2006/02/09 19:18:57 manu Exp $"); +__KERNEL_RCSID(1, "$NetBSD: linux32_syscalls.c,v 1.2 2021/11/25 03:08:05 ryo Exp $"); -#if defined(__amd64__) +#if defined(__aarch64__) +#include "../../sys/compat/linux32/arch/aarch64/linux32_syscalls.c" +#elif defined(__amd64__) #include "../../sys/compat/linux32/arch/amd64/linux32_syscalls.c" #else const char * const linux32_syscallnames[] = { 0 }; diff --git a/sys/compat/linux32/linux32_systrace_args.c b/sys/compat/linux32/linux32_systrace_args.c index d93ad10d74f..f7290ed508b 100644 --- a/sys/compat/linux32/linux32_systrace_args.c +++ b/sys/compat/linux32/linux32_systrace_args.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_systrace_args.c,v 1.1 2015/03/07 15:16:12 christos Exp $ */ +/* $NetBSD: linux32_systrace_args.c,v 1.2 2021/11/25 03:08:05 ryo Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -32,9 +32,11 @@ /* XXX XXX This exists to keep kdump and friends happy. */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: linux32_systrace_args.c,v 1.1 2015/03/07 15:16:12 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: linux32_systrace_args.c,v 1.2 2021/11/25 03:08:05 ryo Exp $"); -#if defined(__amd64__) +#if defined(__aarch64__) +#include "../../sys/compat/linux32/arch/aarch64/linux32_systrace_args.c" +#elif defined(__amd64__) #include "../../sys/compat/linux32/arch/amd64/linux32_systrace_args.c" #else #error "fix me" diff --git a/sys/modules/Makefile b/sys/modules/Makefile index b74e3e3a331..e767d4ccb5a 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.260 2021/11/06 13:34:39 brad Exp $ +# $NetBSD: Makefile,v 1.261 2021/11/25 03:08:05 ryo Exp $ .include <bsd.own.mk> @@ -365,6 +365,7 @@ SUBDIR+= wbsio .if ${MACHINE_CPU} == "aarch64" SUBDIR+= compat_linux +SUBDIR+= compat_linux32 .endif .if ${MACHINE_CPU} == "m68k" diff --git a/sys/modules/compat_linux32/Makefile b/sys/modules/compat_linux32/Makefile index dbc9a02016f..ea2b32d9c5a 100644 --- a/sys/modules/compat_linux32/Makefile +++ b/sys/modules/compat_linux32/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2019/02/17 04:05:45 rin Exp $ +# $NetBSD: Makefile,v 1.10 2021/11/25 03:08:05 ryo Exp $ .include "../Makefile.inc" .include "../Makefile.assym" @@ -17,6 +17,18 @@ SRCS+= linux32_socket.c linux32_socketcall.c linux32_stat.c linux32_sysctl.c SRCS+= linux32_sysinfo.c linux32_termios.c linux32_time.c SRCS+= linux32_unistd.c linux32_utsname.c linux32_wait.c +.if ${MACHINE_ARCH} == "aarch64" +CPPFLAGS+= -DEXEC_ELF32 +.PATH: ${S}/compat/linux32/arch/aarch64 +SRCS+= linux32_exec_machdep.c linux32_ipccall.c linux32_machdep.c +SRCS+= linux32_missing.c linux32_sigcode.S linux32_syscalls.c linux32_sysent.c +SRCS+= linux32_uid16.c +.PATH: ${S}/arch/aarch64/aarch64 +SRCS+= linux32_syscall.c +.PATH: ${S}/compat/linux/common +SRCS+= linux_exec_elf32.c +.endif + .if ${MACHINE_ARCH} == "x86_64" CPPFLAGS+= -DEXEC_ELF32 -DLINUX32_DEBUGLINK_SIGNATURE .PATH: ${S}/compat/linux32/arch/amd64 |
