syscalls.master revision 1.1
1	$NetBSD: syscalls.master,v 1.1 2021/11/25 03:08:04 ryo Exp $
2
3; NetBSD aarch64 COMPAT_LINUX32 system call name/number "master" file.
4;
5; The system call numbers are defined by $LINUXSRC/arch/arm/tools/syscall.tbl,
6; but linux/arm has multiple syscall tables, these are laid out
7; consecutively in this table.
8; See the comments at the bottom of this file for details.
9;
10; (See syscalls.conf to see what it is processed into.)
11;
12; Fields: number type [type-dependent ...]
13;	number	system call number, must be in order
14;	type	one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of
15;		the compatibility options defined in syscalls.conf.
16;
17; Optional fields are specified after the type field
18; (NOTE! they *must* be specified in this order):
19;	MODULAR modname :attempt to autoload system call module if not present
20;	RUMP:	generate rump syscall entry point
21;
22; types:
23;	STD	always included
24;	OBSOL	obsolete, not included in system
25;	IGNORED	syscall is a null op, but always succeeds
26;	UNIMPL	unimplemented, not included in system
27;	EXCL	implemented, but not included in system
28;	NODEF	included, but don't define the syscall number
29;	NOARGS	included, but don't define the syscall args structure
30;	INDIR	included, but don't define the syscall args structure,
31;		and allow it to be "really" varargs.
32;	NOERR	included, syscall does not set errno
33;	EXTERN	implemented, but as 3rd party module
34;
35; arguments:
36;	PAD	argument not part of the C interface, used only for padding
37;
38; The compat options are defined in the syscalls.conf file, and the
39; compat option name is prefixed to the syscall name.  Other than
40; that, they're like NODEF (for 'compat' options), or STD (for
41; 'libcompat' options).
42;
43; The type-dependent arguments are as follows:
44; For STD, NODEF, NOARGS, and compat syscalls:
45;	{ return_type|prefix|compat(optional)|basename(pseudo-proto); } [alias]
46; For other syscalls:
47;	[comment]
48;
49; #ifdef's, etc. may be included, and are copied to the output files.
50; #include's are copied to the syscall names and switch definition files only.
51
52#include <sys/param.h>
53#include <sys/syscallargs.h>
54
55#include <machine/netbsd32_machdep.h>
56
57#include <compat/netbsd32/netbsd32.h>
58#include <compat/netbsd32/netbsd32_syscallargs.h>
59
60#include <compat/linux/common/linux_types.h>
61#include <compat/linux/common/linux_mmap.h>
62#include <compat/linux/common/linux_signal.h>
63#include <compat/linux/common/linux_siginfo.h>
64#include <compat/linux/common/linux_machdep.h>
65#include <compat/linux/common/linux_ipc.h>
66#include <compat/linux/common/linux_sem.h>
67#include <compat/linux/linux_syscallargs.h>
68
69#include <compat/linux32/common/linux32_types.h>
70#include <compat/linux32/common/linux32_signal.h>
71#include <compat/linux32/common/linux32_socketcall.h>
72#include <compat/linux32/arch/aarch64/linux32_missing.h>
73#include <compat/linux32/linux32_syscallargs.h>
74
75%%
76
770	NOARGS	{ int|linux_sys||nosys(void); } syscall
781	STD	{ int|linux32_sys||exit(int rval); }
792	NOARGS	{ int|sys||fork(void); }
803	NOARGS	{ netbsd32_ssize_t|netbsd32||read(int fd, \
81		    netbsd32_voidp buf, netbsd32_size_t nbyte); }
824	NOARGS	{ netbsd32_ssize_t|netbsd32||write(int fd, \
83		    netbsd32_voidp buf, netbsd32_size_t nbyte); }
845	STD	{ int|linux32_sys||open(netbsd32_charp path, int flags, \
85		    linux_umode_t mode); }
866	NOARGS	{ int|netbsd32||close(int fd); }
877	STD	{ int|linux32_sys||waitpid(int pid, netbsd32_intp status, \
88		    int options);}
898	STD	{ int|linux32_sys||creat(netbsd32_charp path, \
90	    linux_umode_t mode); }
919	NOARGS	{ int|netbsd32||link(netbsd32_charp path, \
92		    netbsd32_charp link); }
9310	STD	{ int|linux32_sys||unlink(netbsd32_charp path); }
9411	NOARGS	{ int|netbsd32||execve(netbsd32_charp path, \
95		    netbsd32_charpp argp, netbsd32_charpp envp); }
9612	NOARGS	{ int|netbsd32||chdir(netbsd32_charp path); }
9713	STD	{ int|linux32_sys||time(linux32_timep_t t); }
9814	STD	{ int|linux32_sys||mknod(netbsd32_charp path, \
99		    linux_umode_t mode, unsigned dev); }
10015	NOARGS	{ int|netbsd32||chmod(netbsd32_charp path, \
101	    linux_umode_t mode); }
10216	STD	{ int|linux32_sys||lchown16(netbsd32_charp path, \
103		    linux32_uid16_t uid, linux32_gid16_t gid); }
10417	OBSOL	break
10518	OBSOL	ostat
10619	NOARGS	{ netbsd32_long|compat_43_netbsd32||olseek(int fd, \
107		    netbsd32_long offset, int whence); }
10820	NOARGS 	{ pid_t|sys||getpid(void); }
10921	UNIMPL	mount
11022	UNIMPL	umount
11123	NOARGS	linux_setuid16 { int|netbsd32||setuid(uid_t uid); }
11224	NOARGS	linux_getuid16 { uid_t|sys||getuid(void); }
11325	STD	{ int|linux32_sys||stime(linux32_timep_t t); }
11426	STD	{ int|linux32_sys||ptrace(int request, int pid, \
115		  int addr, int data); }
11627	STD	{ int|linux32_sys||alarm(unsigned int secs); }
11728	OBSOL	ofstat
11829	NOARGS	{ int|linux_sys||pause(void); }
11930	STD	{ int|linux32_sys||utime(netbsd32_charp path, \
120		    linux32_utimbufp_t times); }
12131	OBSOL	stty
12232	OBSOL	gtty
12333	NOARGS	{ int|netbsd32||access(netbsd32_charp path, \
124		    int flags); }
12534	STD	{ int|linux32_sys||nice(int incr); }
12635	OBSOL	ftime
12736	NOARGS	{ int|sys||sync(void); }
12837	STD	{ int|linux32_sys||kill(int pid, int signum); }
12938	NOARGS	{ int|netbsd32||__posix_rename(netbsd32_charp from, \
130		    netbsd32_charp to); }
13139	NOARGS	{ int|netbsd32||mkdir(netbsd32_charp path, \
132	    linux_umode_t mode); }
13340	NOARGS	{ int|netbsd32||rmdir(netbsd32_charp path); }
13441	NOARGS	{ int|netbsd32||dup(int fd); }
13542	STD	{ int|linux32_sys||pipe(netbsd32_intp fd); }
13643	STD	{ int|linux32_sys||times(linux32_tmsp_t tms); }
13744	OBSOL	prof
13845	STD	{ int|linux32_sys||brk(netbsd32_charp nsize); }
13946	NOARGS	linux_setgid16 { int|netbsd32||setgid(gid_t gid); }
14047	NOARGS	linux_getgid16 { gid_t|sys||getgid(void); }
14148	STD	{ int|linux32_sys||signal(int signum, \
142		    linux32_handlerp_t handler); }
14349	NOARGS	linux_geteuid16 { uid_t|sys||geteuid(void); }
14450	NOARGS	linux_getegid16 { gid_t|sys||getegid(void); }
14551	NOARGS	{ int|netbsd32||acct(netbsd32_charp path); }
14652	OBSOL	phys
14753	OBSOL	lock
14854	STD	{ int|linux32_sys||ioctl(int fd, netbsd32_u_long com, \
149		    netbsd32_charp data); }
15055	STD	{ int|linux32_sys||fcntl(int fd, \
151		    int cmd, netbsd32_voidp arg); }
15256	OBSOL	mpx
15357	NOARGS	{ int|netbsd32||setpgid(int pid, int pgid); }
15458	OBSOL	ulimit
15559	STD	{ int|linux32_sys||oldolduname( \
156		    linux32_oldold_utsnamep_t up); }
15760	NOARGS	{ int|netbsd32||umask(int newmask); }
15861	NOARGS	{ int|netbsd32||chroot(netbsd32_charp path); }
15962	UNIMPL	ustat
16063	NOARGS	{ int|netbsd32||dup2(int from, int to); }
16164	NOARGS	{ pid_t|sys||getppid(void); }
16265	NOARGS	{ int|sys||getpgrp(void); }
16366	NOARGS	{ int|sys||setsid(void); }
16467	UNIMPL	sigaction
16568	STD	{ int|linux32_sys||siggetmask(void); }
16669	STD	{ int|linux32_sys||sigsetmask(linux32_old_sigset_t mask); }
16770	STD	{ int|linux32_sys||setreuid16(linux32_uid16_t ruid, \
168		    linux32_uid16_t euid); }
16971	STD	{ int|linux32_sys||setregid16(linux32_gid16_t rgid, \
170		    linux32_gid16_t egid); }
17172	UNIMPL	sigsuspend
17273	UNIMPL	sigpending
17374	NOARGS	{ int|compat_43_netbsd32||osethostname( \
174		    netbsd32_charp hostname, u_int len); }
17575	STD	{ int|linux32_sys||setrlimit(u_int which, \
176		    netbsd32_orlimitp_t rlp); }
17776	STD	{ int|linux32_sys||getrlimit(u_int which, \
178		    netbsd32_orlimitp_t rlp); }
17977	NOARGS	{ int|compat_50_netbsd32||getrusage(int who, \
180		    netbsd32_rusage50p_t rusage); }
18178	STD	{ int|linux32_sys||gettimeofday(netbsd32_timeval50p_t tp, \
182		    netbsd32_timezonep_t tzp); }
18379	STD	{ int|linux32_sys||settimeofday(netbsd32_timeval50p_t tp, \
184		    netbsd32_timezonep_t tzp); }
18580	STD	{ int|linux32_sys||getgroups16(int gidsetsize, \
186		    linux32_gid16p_t gidset); }
18781	STD	{ int|linux32_sys||setgroups16(int gidsetsize, \
188		    linux32_gid16p_t gidset); }
18982	STD	{ int|linux32_sys||oldselect(linux32_oldselectp_t lsp); }
19083	NOARGS	{ int|netbsd32||symlink(netbsd32_charp path, \
191		    netbsd32_charp link); }
19284	NOARGS	{ int|compat_43_netbsd32||lstat43(netbsd32_charp \
193		    path, netbsd32_stat43p_t ub); }
19485	NOARGS	{ int|netbsd32||readlink(netbsd32_charp path, \
195		    netbsd32_charp buf, netbsd32_size_t count); }
19686	UNIMPL	uselib
19787	STD	{ int|linux32_sys||swapon(netbsd32_charp name); }
19888	STD	{ int|linux32_sys||reboot(int magic1, int magic2, int cmd, \
199		    netbsd32_voidp arg); }
20089	STD	{ int|linux32_sys||readdir(int fd, netbsd32_voidp dent, \
201		    unsigned int count); }
20290	STD	{ int|linux32_sys||old_mmap(linux32_oldmmapp lmp); }
20391	NOARGS	{ int|netbsd32||munmap(netbsd32_voidp addr, \
204		    netbsd32_size_t len); }
20592	NOARGS	{ int|compat_43_netbsd32||otruncate(netbsd32_charp path, \
206		    netbsd32_long length); }
20793	NOARGS	{ int|compat_43_netbsd32||oftruncate(int fd, \
208		    netbsd32_long length); }
20994	NOARGS	{ int|netbsd32||fchmod(int fd, linux_umode_t mode); }
21095	STD	{ int|linux32_sys||fchown16(int fd, linux32_uid16_t uid, \
211		    linux32_gid16_t gid); }
21296	STD	{ int|linux32_sys||getpriority(int which, int who); }
21397	NOARGS	{ int|netbsd32||setpriority(int which, int who, int prio); }
21498	NOARGS	{ int|netbsd32||profil(netbsd32_voidp samples, \
215		    netbsd32_size_t size, netbsd32_u_long offset, \
216		    u_int scale); }
21799	STD	{ int|linux32_sys||statfs(netbsd32_charp path, \
218		    linux32_statfsp sp); }
219100	STD	{ int|linux32_sys||fstatfs(int fd, linux32_statfsp sp); }
220101	UNIMPL	ioperm
221102	STD	{ int|linux32_sys||socketcall(int what, netbsd32_voidp args); }
222103	UNIMPL	syslog
223104	NOARGS	{ int|compat_50_netbsd32||setitimer(int which, \
224		    netbsd32_itimerval50p_t itv, \
225		    netbsd32_itimerval50p_t oitv); }
226105	NOARGS	{ int|compat_50_netbsd32||getitimer(int which, \
227		    netbsd32_itimerval50p_t itv); }
228106	STD	{ int|linux32_sys||stat(netbsd32_charp path, \
229		    linux32_statp sp); }
230107	STD	{ int|linux32_sys||lstat(netbsd32_charp path, \
231		    linux32_statp sp); }
232108	STD	{ int|linux32_sys||fstat(int fd, \
233		    linux32_statp sp); }
234109	STD	{ int|linux32_sys||olduname(linux32_oldutsnamep_t up); }
235110	UNIMPL	iopl
236111	UNIMPL	vhangup
237112	UNIMPL	idle
238113	UNIMPL	syscall
239114	STD	{ int|linux32_sys||wait4(int pid, netbsd32_intp status, \
240		    int options, netbsd32_rusage50p_t rusage); }
241115	STD	{ int|linux32_sys||swapoff(netbsd32_charp path); }
242116	STD	{ int|linux32_sys||sysinfo(linux32_sysinfop_t arg); }
243117	STD	{ int|linux32_sys||ipc(int what, int a1, int a2, int a3, \
244		    netbsd32_voidp ptr); }
245118	NOARGS	{ int|netbsd32||fsync(int fd); }
246119	STD	{ int|linux32_sys||sigreturn(linux32_sigcontextp_t scp); }
247120	STD	{ int|linux32_sys||clone(int flags, netbsd32_voidp stack, \
248		    netbsd32_voidp parent_tidptr, netbsd32_voidp tls, \
249		    netbsd32_voidp child_tidptr); }
250121	STD	{ int|linux32_sys||setdomainname(netbsd32_charp domainname, \
251		    int len); }
252122	STD	{ int|linux32_sys||uname(linux32_utsnamep up); }
253123	UNIMPL	modify_ldt
254124	UNIMPL	adjtimex
255125	STD	{ int|linux32_sys||mprotect(netbsd32_voidp start, \
256		    netbsd32_size_t len, int prot); } 
257126	UNIMPL	sigprocmask
258127	UNIMPL	create_module
259128	UNIMPL	init_module
260129	UNIMPL	delete_module
261130	UNIMPL	get_kernel_syms
262131	UNIMPL	quotactl
263132	NOARGS	{ int|netbsd32||getpgid(pid_t pid); }
264133	NOARGS	{ int|netbsd32||fchdir(int fd); }
265134	UNIMPL	bdflush
266135	UNIMPL	sysfs
267136	STD	{ int|linux32_sys||personality(netbsd32_u_long per); }
268137	UNIMPL	afs_syscall
269138	NOARGS	setfsuid16 { int|linux32_sys||setfsuid(uid_t uid); }
270139	NOARGS	setfsgid16 { int|linux32_sys||setfsgid(gid_t gid); }
271140	STD	{ int|linux32_sys||llseek(int fd, u_int32_t ohigh, \
272		    u_int32_t olow, netbsd32_voidp res, int whence); }
273141	STD	{ int|linux32_sys||getdents(int fd, \
274		    linux32_direntp_t dent, unsigned int count); }
275142	STD	{ int|linux32_sys||select(int nfds, \
276		    netbsd32_fd_setp_t readfds, \
277		    netbsd32_fd_setp_t writefds, \
278		    netbsd32_fd_setp_t exceptfds, \
279		    netbsd32_timeval50p_t timeout); }
280143	NOARGS	{ int|netbsd32||flock(int fd, int how); } 
281144	NOARGS	{ int|netbsd32|13|msync(netbsd32_voidp addr, \
282		    netbsd32_size_t len, int flags); }
283145	NOARGS	{ int|netbsd32||readv(int fd, \
284		    netbsd32_iovecp_t iovp, int iovcnt); }
285146	NOARGS	{ netbsd32_ssize_t|netbsd32||writev(int fd, \
286		    netbsd32_iovecp_t iovp, int iovcnt); }
287147	NOARGS	{ pid_t|netbsd32||getsid(pid_t pid); }
288148	STD	{ int|linux32_sys||fdatasync(int fd); }
289149	STD	{ int|linux32_sys||__sysctl(linux32___sysctlp_t lsp); }
290150	NOARGS	{ int|netbsd32||mlock(netbsd32_voidp addr, \
291		    netbsd32_size_t len); }
292151	NOARGS	{ int|netbsd32||munlock(netbsd32_voidp addr, \
293		    netbsd32_size_t len); }
294152	NOARGS	{ int|netbsd32||mlockall(int flags); }
295153	NOARGS	{ int|sys||munlockall(void); }
296154	STD	{ int|linux32_sys||sched_setparam(pid_t pid, \
297		    const linux32_sched_paramp_t sp); }
298155	STD	{ int|linux32_sys||sched_getparam(pid_t pid, \
299		    linux32_sched_paramp_t sp); }
300156	STD	{ int|linux32_sys||sched_setscheduler(pid_t pid, \
301		    int policy, linux32_sched_paramp_t sp); }
302157	STD	{ int|linux32_sys||sched_getscheduler(pid_t pid); }
303158	NOARGS	{ int|linux_sys||sched_yield(void); }
304159	STD	{ int|linux32_sys||sched_get_priority_max(int policy); }
305160	STD	{ int|linux32_sys||sched_get_priority_min(int policy); }
306161	UNIMPL	sched_rr_get_interval
307162	STD	{ int|linux32_sys||nanosleep(linux32_timespecp_t rqtp, \
308		    linux32_timespecp_t rmtp); }
309163	STD	{ int|linux32_sys||mremap(netbsd32_voidp old_address, \
310		    netbsd32_size_t old_size, netbsd32_size_t new_size, \
311		    netbsd32_u_long flags); }
312164	STD	{ int|linux32_sys||setresuid16(linux32_uid16_t ruid, \
313		    linux32_uid16_t euid, linux32_uid16_t suid); }
314165	STD	{ int|linux32_sys||getresuid16(linux32_uid16p_t ruid, \
315		    linux32_uid16p_t euid, linux32_uid16p_t suid); }
316166	UNIMPL	vm86
317167	UNIMPL	query_module
318168	NOARGS	{ int|netbsd32||poll(netbsd32_pollfdp_t fds, u_int nfds, \
319		    int timeout); }
320169	UNIMPL	nfsservctl
321170	STD	{ int|linux32_sys||setresgid16(linux32_gid16_t rgid, \
322		    linux32_gid16_t egid, linux32_gid16_t sgid); }
323171	STD	{ int|linux32_sys||getresgid16(linux32_gid16p_t rgid, \
324		    linux32_gid16p_t egid, linux32_gid16p_t sgid); }
325172	UNIMPL	prctl
326173	STD	{ int|linux32_sys||rt_sigreturn(linux32_ucontextp_t ucp); }
327174	STD	{ int|linux32_sys||rt_sigaction(int signum, \
328		    linux32_sigactionp_t nsa, \
329		    linux32_sigactionp_t osa, \
330		    netbsd32_size_t sigsetsize); }
331175	STD	{ int|linux32_sys||rt_sigprocmask(int how, \
332		     linux32_sigsetp_t set, \
333		     linux32_sigsetp_t oset, \
334		     netbsd32_size_t sigsetsize); }
335176	STD	{ int|linux32_sys||rt_sigpending(linux32_sigsetp_t set, \
336		    netbsd32_size_t sigsetsize); }
337177	STD	{ int|linux32_sys||rt_sigtimedwait( \
338		    const linux32_sigsetp_t set, \
339		    linux32_siginfop_t info, \
340		    const linux32_timespecp_t timeout); }
341178	STD	{ int|linux32_sys||rt_queueinfo(int pid, int sig, \
342		    linux32_siginfop_t uinfo); }
343179	STD	{ int|linux32_sys||rt_sigsuspend(linux32_sigsetp_t unewset, \
344		    netbsd32_size_t sigsetsize); }
345180	STD	{ netbsd32_ssize_t|linux32_sys||pread(int fd, \
346		    netbsd32_voidp buf, netbsd32_size_t nbyte, \
347		    netbsd32_off_t offset); }
348181	STD	{ netbsd32_ssize_t|linux32_sys||pwrite(int fd, \
349		    netbsd32_voidp buf, netbsd32_size_t nbyte, \
350		    netbsd32_off_t offset); }
351182	STD	{ int|linux32_sys||chown16(netbsd32_charp path, \
352		    linux32_uid16_t uid, linux32_gid16_t gid); }
353183	NOARGS	{ int|netbsd32||__getcwd(netbsd32_charp bufp, \
354		    netbsd32_size_t length); } 
355184	UNIMPL	capget
356185	UNIMPL	capset
357186	UNIMPL	sigaltstack
358187	UNIMPL	sendfile
359188	UNIMPL	getpmsg
360189	UNIMPL	putpmsg
361190	NOARGS	{ int|sys|14|vfork(void); }
362191	STD	{ int|linux32_sys||ugetrlimit(int which, \
363		    netbsd32_orlimitp_t rlp); }
364192	STD	{ linux32_off_t|linux32_sys||mmap2(netbsd32_u_long addr, \
365		    netbsd32_size_t len, int prot, int flags, int fd, \
366		    linux32_off_t offset); }
367193	STD	{ int|linux32_sys||truncate64(netbsd32_charp path, \
368		    uint32_t lenlo, uint32_t lenhi); }
369194	STD	{ int|linux32_sys||ftruncate64(unsigned int fd, \
370		    uint32_t lenlo, uint32_t lenhi); }
371195	STD	{ int|linux32_sys||stat64(netbsd32_charp path, \
372		    linux32_stat64p sp); }
373196	STD	{ int|linux32_sys||lstat64(netbsd32_charp path, \
374		    linux32_stat64p sp); }
375197	STD	{ int|linux32_sys||fstat64(int fd, \
376		    linux32_stat64p sp); }
377198	NOARGS	{ int|netbsd32||__posix_lchown(netbsd32_charp path, \
378		    uid_t uid, gid_t gid); }
379199	NOARGS	{ uid_t|sys||getuid(void); }
380200	NOARGS	{ gid_t|sys||getgid(void); }
381201	NOARGS	{ uid_t|sys||geteuid(void); }
382202	NOARGS	{ gid_t|sys||getegid(void); }
383203	NOARGS	{ int|netbsd32||setreuid(uid_t ruid, uid_t euid); }
384204	NOARGS	{ int|netbsd32||setregid(gid_t rgid, gid_t egid); }
385205	NOARGS	{ int|netbsd32||getgroups(int gidsetsize, \
386		    netbsd32_gid_tp gidset); }
387206	NOARGS	{ int|netbsd32||setgroups(int gidsetsize, \
388		    netbsd32_gid_tp gidset); }
389207	NOARGS	{ int|netbsd32||__posix_fchown(int fd, uid_t uid, gid_t gid); }
390208	STD	{ int|linux32_sys||setresuid(uid_t ruid, uid_t euid, \
391		    uid_t suid); }
392209	STD	{ int|linux32_sys||getresuid(linux32_uidp_t ruid, \
393		    linux32_uidp_t euid, linux32_uidp_t suid); }
394210	STD	{ int|linux32_sys||setresgid(gid_t rgid, gid_t egid, \
395		    gid_t sgid); }
396211	STD	{ int|linux32_sys||getresgid(linux32_gidp_t rgid, \
397		    linux32_gidp_t egid, linux32_gidp_t sgid); }
398212	NOARGS	{ int|netbsd32||__posix_chown(netbsd32_charp path, \
399		    uid_t uid, gid_t gid); }
400213 	NOARGS	{ int|netbsd32||setuid(uid_t uid); }
401214	NOARGS	{ int|netbsd32||setgid(gid_t gid); }
402215	STD	{ int|linux32_sys||setfsuid(uid_t uid); }
403216	STD	{ int|linux32_sys||setfsgid(gid_t gid); }
404217	STD	{ int|linux32_sys||getdents64(int fd, \
405		    linux32_dirent64p_t dent, unsigned int count); }
406218	UNIMPL	pivot_root
407219	NOARGS	{ int|netbsd32||mincore(netbsd32_voidp addr, \
408		    netbsd32_size_t len, netbsd32_charp vec); }
409220	NOARGS	{ int|netbsd32||madvise(netbsd32_voidp addr, \
410		    netbsd32_size_t len, int behav); }
411; fcntl64() - Exactly the same as fcntl()
412#define linux32_sys_fcntl64 linux32_sys_fcntl
413#define linux32_sys_fcntl64_args linux32_sys_fcntl_args
414221	NOARGS	{ int|linux32_sys||fcntl64(int fd, \
415		    int cmd, netbsd32_voidp arg); }
416222	UNIMPL	/* unused */
417223	UNIMPL	/* unused */
418224	NOARGS	{ pid_t|linux_sys||gettid(void); }
419225	UNIMPL	readahead
420226	NOARGS	{ int|netbsd32||setxattr(netbsd32_charp path, \
421		    netbsd32_charp name, netbsd32_voidp value, \
422		    netbsd32_size_t size, int flags); }
423227	NOARGS	{ int|netbsd32||lsetxattr(netbsd32_charp path, \
424		    netbsd32_charp name,  netbsd32_voidp value, \
425		    netbsd32_size_t size, int flags); }
426228	NOARGS	{ int|netbsd32||fsetxattr(int fd, netbsd32_charp name, \
427		    netbsd32_voidp value, netbsd32_size_t size, int flags); }
428229	NOARGS	{ ssize_t|netbsd32||getxattr(netbsd32_charp path, \
429		    netbsd32_charp name, netbsd32_voidp value, \
430		    netbsd32_size_t size); }
431230	NOARGS	{ ssize_t|netbsd32||lgetxattr(netbsd32_charp path, \
432		    netbsd32_charp name, netbsd32_voidp value, \
433		    netbsd32_size_t size); }
434231	NOARGS	{ ssize_t|netbsd32||fgetxattr(int fd, netbsd32_charp name, \
435		    netbsd32_voidp value, netbsd32_size_t size); }
436232	NOARGS	{ ssize_t|netbsd32||listxattr(netbsd32_charp path, \
437		    netbsd32_charp list, netbsd32_size_t size); }
438233	NOARGS	{ ssize_t|netbsd32||llistxattr(netbsd32_charp path, \
439		    netbsd32_charp list, netbsd32_size_t size); }
440234	NOARGS	{ ssize_t|netbsd32||flistxattr(int fd, netbsd32_charp list, \
441		    netbsd32_size_t size); }
442235	NOARGS	{ int|netbsd32||removexattr(netbsd32_charp path, \
443		    netbsd32_charp name); }
444236	NOARGS	{ int|netbsd32||lremovexattr(netbsd32_charp path, \
445		    netbsd32_charp name); }
446237	NOARGS	{ int|netbsd32||fremovexattr(int fd, netbsd32_charp name); }
447238	STD	{ int|linux32_sys||tkill(int tid, int sig); }
448239	UNIMPL	sendfile64
449240	STD	{ int|linux32_sys||futex(linux32_intp_t uaddr, int op, \
450		    int val, linux32_timespecp_t timeout, \
451		    linux32_intp_t uaddr2, int val3); }
452241	STD	{ int|linux32_sys||sched_setaffinity(pid_t pid, \
453		    unsigned int len, linux32_ulongp_t mask); }
454242	STD	{ int|linux32_sys||sched_getaffinity(pid_t pid, \
455		    unsigned int len, linux32_ulongp_t mask); }
456243	UNIMPL	io_setup
457244	UNIMPL	io_destroy
458245	UNIMPL	io_getevents
459246	UNIMPL	io_submit
460247	UNIMPL	io_cancel
461248	STD	{ int|linux32_sys||exit_group(int error_code); }
462249	UNIMPL	lookup_dcookie
463250	UNIMPL	epoll_create
464251	UNIMPL	epoll_ctl
465252	UNIMPL	epoll_wait
466253	UNIMPL	remap_file_pages
467254	UNIMPL	set_thread_area
468255	UNIMPL	get_thread_area
469256	STD	{ int|linux32_sys||set_tid_address(linux32_intp_t tid); }
470257	STD	{ int|linux32_sys||timer_create(clockid_t clockid, \
471		    struct linux32_sigevent *evp, timer_t *timerid); }
472258	STD	{ int|linux32_sys||timer_settime(timer_t timerid, \
473		    int flags, const struct linux32_itimerspec *tim, \
474		    struct linux32_itimerspec *otim); }
475259	STD	{ int|linux32_sys||timer_gettime(timer_t timerid, \
476		    struct linux32_itimerspec *tim); }
477260	NOARGS	{ int|sys||timer_getoverrun(timer_t timerid); }
478261	NOARGS	{ int|sys||timer_delete(timer_t timerid); }
479262	STD	{ int|linux32_sys||clock_settime(clockid_t which, \
480		    linux32_timespecp_t tp); }
481263	STD	{ int|linux32_sys||clock_gettime(clockid_t which, \
482		    linux32_timespecp_t tp); }
483264	STD	{ int|linux32_sys||clock_getres(clockid_t which, \
484		    linux32_timespecp_t tp); }
485265	STD	{ int|linux32_sys||clock_nanosleep(clockid_t which, int flags, \
486		    linux32_timespecp_t rqtp, linux32_timespecp_t rmtp); }
487266	STD	{ int|linux32_sys||statfs64(netbsd32_charp path, \
488		    netbsd32_size_t sz, linux32_statfs64p sp); }
489267	STD	{ int|linux32_sys||fstatfs64(int fd, \
490		    netbsd32_size_t sz, linux32_statfs64p sp); }
491268	STD	{ int|linux32_sys||tgkill(int tgid, int tid, int sig); }
492269	NOARGS	{ int|compat_50_netbsd32||utimes(netbsd32_charp path, \
493		    netbsd32_timeval50p_t tptr); }
494270	STD	{ int|linux32_sys||fadvise64_64(int fd, uint32_t offlo, \
495		    uint32_t offhi, uint32_t lenlo, uint32_t lenhi, \
496		    int advice); }
497271	UNIMPL	pciconfig_iobase
498272	UNIMPL	pciconfig_read
499273	UNIMPL	pciconfig_write
500274	UNIMPL	mq_open
501275	UNIMPL	mq_unlink
502276	UNIMPL	mq_timedsend
503277	UNIMPL	mq_timedreceive
504278	UNIMPL	mq_notify
505279	UNIMPL	mq_getsetattr
506280	UNIMPL	waitid
507281	NOARGS	{ int|linux32_sys||socket(int domain, int type, \
508		    int protocol); }
509282	NOARGS	{ int|linux32_sys||bind(int s, netbsd32_osockaddrp_t name, \
510		    int namelen); }
511283	NOARGS	{ int|linux32_sys||connect(int s, netbsd32_osockaddrp_t name, \
512		    int namelen); }
513284	UNIMPL	listen
514285	NOARGS	{ int|linux32_sys||accept(int s, netbsd32_osockaddrp_t name, \
515		    netbsd32_intp anamelen); }
516286	NOARGS	{ int|linux32_sys||getsockname(int fdec, netbsd32_charp asa, \
517		    netbsd32_intp alen); }
518287	NOARGS	{ int|linux32_sys||getpeername(int fdes, \
519		    netbsd32_sockaddrp_t asa, netbsd32_intp alen); }
520288	NOARGS	{ int|linux32_sys||socketpair(int domain, int type, \
521		    int protocol, netbsd32_intp rsv); }
522289	NOARGS	{ int|linux32_sys||send(int s, netbsd32_voidp buf, int len, \
523		    int flags); }
524290	NOARGS	{ int|linux32_sys||sendto(int s, netbsd32_voidp msg, int len, \
525		    int flags, netbsd32_osockaddrp_t to, int tolen); }
526291	NOARGS	{ int|linux32_sys||recv(int s, netbsd32_voidp buf, int len, \
527		    int flags); }
528292	NOARGS	{ int|linux32_sys||recvfrom(int s, netbsd32_voidp buf, \
529		    netbsd32_size_t len, int flags, \
530		    netbsd32_osockaddrp_t from, netbsd32_intp fromlenaddr); }
531293	UNIMPL	shutdown
532294	NOARGS	{ int|linux32_sys||setsockopt(int s, int level, int optname, \
533		    netbsd32_voidp optval, int optlen); }
534295	NOARGS	{ int|linux32_sys||getsockopt(int s, int level, int optname, \
535		    netbsd32_voidp optval, netbsd32_intp optlen); }
536296	UNIMPL	sendmsg
537297	UNIMPL	recvmsg
538298	UNIMPL	semop
539299	UNIMPL	semget
540300	UNIMPL	semctl
541301	UNIMPL	msgsnd
542302	UNIMPL	msgrcv
543303	UNIMPL	msgget
544304	UNIMPL	msgctl
545305	UNIMPL	shmat
546306	UNIMPL	shmdt
547307	UNIMPL	shmget
548308	UNIMPL	shmctl
549309	UNIMPL	add_key
550310	UNIMPL	request_key
551311	UNIMPL	keyctl
552312	UNIMPL	semtimedop
553313	UNIMPL	vserver
554314	UNIMPL	ioptio_set
555315	UNIMPL	ioptio_get
556316	UNIMPL	inotify_init
557317	UNIMPL	inotify_add_watch
558318	UNIMPL	inotify_rm_watch
559319	UNIMPL	mbind
560320	UNIMPL	get_mempolicy
561321	UNIMPL	set_mempolicy
562322	STD	{ int|linux32_sys||openat(int fd, netbsd32_charp path, \
563		    int flags, ... linux_umode_t mode); }
564323	NOARGS	{ int|netbsd32||mkdirat(int fd, netbsd32_charp path, \
565		    linux_umode_t mode); }
566324	STD	{ int|linux32_sys||mknodat(int fd, netbsd32_charp path, \
567		    linux_umode_t mode, unsigned dev); }
568325	STD	{ int|linux32_sys||fchownat(int fd, netbsd32_charp path, \
569		    uid_t owner, gid_t group, int flag); }
570326	UNIMPL	futimesat
571327	STD	{ int|linux32_sys||fstatat64(int fd, netbsd32_charp path, \
572		    linux32_stat64p sp, int flag); }
573328	STD	{ int|linux32_sys||unlinkat(int fd, netbsd32_charp path, \
574		    int flag); }
575329	NOARGS	{ int|netbsd32||renameat(int fromfd, netbsd32_charp from, \
576		    int tofd, netbsd32_charp to); }
577330	STD	{ int|linux32_sys||linkat(int fd1, netbsd32_charp name1, \
578		    int fd2, netbsd32_charp name2, int flags); }
579331	NOARGS	{ int|netbsd32||symlinkat(netbsd32_charp path1, int fd, \
580		    netbsd32_charp path2); }
581332	NOARGS	{ int|netbsd32||readlinkat(int fd, netbsd32_charp path, \
582		    netbsd32_charp buf, linux32_size_t bufsize); }
583333	STD	{ int|linux32_sys||fchmodat(int fd, netbsd32_charp path, \
584		    linux_umode_t mode); }
585334	STD	{ int|linux32_sys||faccessat(int fd, netbsd32_charp path, \
586		    int amode); }
587335	UNIMPL	pselect6
588336	STD	{ int|linux32_sys||ppoll(netbsd32_pollfdp_t fds, u_int nfds, \
589		    linux32_timespecp_t timeout, linux32_sigsetp_t sigset); }
590337	UNIMPL	unshare
591		;
592		; The netbsd32 native robust list calls have different
593		; argument names / types, but they are ABI-compatible
594		; with linux32.
595		;
596338	NOARGS	{ int|netbsd32||__futex_set_robust_list( \
597		    netbsd32_voidp head, netbsd32_size_t len); }
598339	NOARGS	{ int|netbsd32||__futex_get_robust_list(lwpid_t lwpid, \
599		    netbsd32_voidp headp, netbsd32_size_tp lenp); }
600340	UNIMPL	splice
601341	UNIMPL	sync_file_range
602342	UNIMPL	tee
603343	UNIMPL	vmsplice
604344	UNIMPL	move_pages
605345	UNIMPL	getcpu
606346	UNIMPL	epoll_wait
607347	UNIMPL	kexec_load
608348	STD	{ int|linux32_sys||utimensat(int fd, netbsd32_charp path, \
609			    linux32_timespecp_t times, int flag); }
610349	UNIMPL	signalfd
611350	NOARGS	{ int|linux_sys||timerfd_create(clockid_t clock_id, \
612		    int flags); }
613351	STD	{ int|linux32_sys||eventfd(unsigned int initval); }
614352	STD	{ int|linux32_sys||fallocate(int fd, int mode, \
615			    off_t offset, off_t len); }
616353	STD	{ int|linux32_sys||timerfd_settime(int fd, int flags, \
617		    const struct linux32_itimerspec *tim, \
618		    struct linux32_itimerspec *otim); }
619354	STD	{ int|linux32_sys||timerfd_gettime(int fd, \
620		    struct linux32_itimerspec *tim); }
621355	UNIMPL	signalfd4
622356	STD	{ int|linux32_sys||eventfd2(unsigned int initval, \
623		    int flags); }
624357	UNIMPL	epoll_create1
625358	STD	{ int|linux32_sys||dup3(int from, int to, int flags); }
626359	STD	{ int|linux32_sys||pipe2(netbsd32_intp fd, int flags); }
627360	UNIMPL	inotify_init1
628361	STD	{ int|linux32_sys||preadv(int fd, \
629		    const netbsd32_iovecp_t iovp, int iovcnt, \
630		    netbsd32_u_long off_lo, netbsd32_u_long off_hi); }
631362	STD	{ int|linux32_sys||pwritev(int fd, \
632		    const netbsd32_iovecp_t iovp, int iovcnt, \
633		    netbsd32_u_long off_lo, netbsd32_u_long off_hi); }
634363	UNIMPL	rt_tgsigqueueinfo
635364	UNIMPL	perf_counter_open
636365	UNIMPL	recvmmsg
637366	UNIMPL	accept4
638367	UNIMPL	fanotify_init
639368	UNIMPL	fanotify_mark
640369	UNIMPL	prlimit64
641370	UNIMPL	name_to_handle_at
642371	UNIMPL	open_by_handle_at
643372	UNIMPL	clock_adjtime
644373	UNIMPL	syncfs
645374	UNIMPL	sendmmsg
646375	UNIMPL	setns
647376	UNIMPL	process_vm_readv
648377	UNIMPL	process_vm_writev
649378	UNIMPL	kcmp
650379	UNIMPL	finit_module
651380	UNIMPL	sched_setattr
652381	UNIMPL	sched_getattr
653382	UNIMPL	renameat2
654383	UNIMPL	seccomp
655384	NOARGS	{ netbsd32_ssize_t|netbsd32||getrandom( \
656		    netbsd32_voidp buf, netbsd32_size_t buflen, \
657		    unsigned int flags); }
658385	UNIMPL	memfd_create
659386	UNIMPL	bpf
660387	UNIMPL	execveat
661388	UNIMPL	userfaultfd
662389	UNIMPL	membarrier
663390	UNIMPL	mlock2
664391	UNIMPL	copy_file_range
665392	UNIMPL	preadv2
666393	UNIMPL	pwritev2
667394	UNIMPL	pkey_mprotect
668395	UNIMPL	pkey_alloc
669396	UNIMPL	pkey_free
670397	STD	{ int|linux32_sys||statx(int fd, netbsd32_charp path, \
671		    int flag, unsigned int mask, linux32_statxp sp); }
672398	UNIMPL	rseq
673399	UNIMPL	io_pgetevents
674400	UNIMPL	migrate_pages
675401	UNIMPL	kexec_file_load
676402	UNIMPL	/* unused */
677403	UNIMPL	clock_gettime64
678404	UNIMPL	clock_settime64
679405	UNIMPL	clock_adjtime64
680406	UNIMPL	clock_getres_time64
681407	UNIMPL	clock_nanosleep_time64
682408	UNIMPL	timer_gettime64
683409	UNIMPL	timer_settime64
684410	UNIMPL	timerfd_gettime64
685411	UNIMPL	timerfd_settime64
686412	UNIMPL	utimensat_time64
687413	UNIMPL	pselect6_time64
688414	UNIMPL	ppoll_time64
689415	UNIMPL	/* unused? */
690416	UNIMPL	io_pgetevents_time64
691417	UNIMPL	recvmmsg_time64
692418	UNIMPL	mq_timedsend_time64
693419	UNIMPL	mq_timedreceive_time64
694420	UNIMPL	semtimedop_time64
695421	UNIMPL	rt_sigtimedwait_time64
696422	UNIMPL	futex_time64
697423	UNIMPL	sched_rr_get_interval_time64
698424	UNIMPL	pidfd_send_signal
699425	UNIMPL	io_uring_setup
700426	UNIMPL	io_uring_enter
701427	UNIMPL	io_uring_register
702428	UNIMPL	open_tree
703429	UNIMPL	move_mount
704430	UNIMPL	fsopen
705431	UNIMPL	fsconfig
706432	UNIMPL	fsmount
707433	UNIMPL	fspick
708434	UNIMPL	pidfd_open
709435	UNIMPL	clone3
710436	UNIMPL	close_range
711437	UNIMPL	openat2
712438	UNIMPL	pidfd_getfd
713439	UNIMPL	faccessat2
714440	UNIMPL	process_madvise
715441	UNIMPL	epoll_pwait2
716442	UNIMPL	mount_setattr
717443	UNIMPL	quotactl_fd
718444	UNIMPL	landlock_create_ruleset
719445	UNIMPL	landlock_add_rule
720446	UNIMPL	landlock_restrict_self
721447	UNIMPL
722448	UNIMPL
723449	UNIMPL
724450	UNIMPL
725451	UNIMPL
726452	UNIMPL
727453	UNIMPL
728454	UNIMPL
729455	UNIMPL
730456	UNIMPL
731457	UNIMPL
732458	UNIMPL
733459	UNIMPL
734460	UNIMPL
735461	UNIMPL
736462	UNIMPL
737463	UNIMPL
738464	UNIMPL
739465	UNIMPL
740466	UNIMPL
741467	UNIMPL
742468	UNIMPL
743469	UNIMPL
744470	UNIMPL
745471	UNIMPL
746472	UNIMPL
747473	UNIMPL
748474	UNIMPL
749475	UNIMPL
750476	UNIMPL
751477	UNIMPL
752478	UNIMPL
753479	UNIMPL
754
755;
756; EABI ARMLinux actually has two ranges of syscalls. Normal syscalls use
757; SVC numbers starting at 0 (__NR_SYSCALL_BASE), Special ARM-specific syscalls
758; use SVC numbers starting at 0x0f0000 (__ARM_NR_BASE).
759; $SRC/sys/arch/aarch64/aarch64/linux32_syscall.c remaps these down to 480-,
760; So that we can use one linux_sysent array for the whole lot.
761;
762; If the linux's normal syscall is increased to more than 480, this needs to be
763; changed. Also note the overall size as defined in syscalls.conf. (nsysent=512)
764;
765; see also:
766;  $LINUXSRC/arch/arm/include/uapi/asm/unistd.h
767;  $LINUXSRC/arch/arm/kernel/traps.c:arm_syscall()
768;
769480	UNIMPL	/* base. actually 0x0f0000 */
770481	UNIMPL	breakpoint
771482	UNIMPL	cacheflush
772483	UNIMPL	usr26
773484	UNIMPL	usr32
774485	STD	{ int|linux32_sys||set_tls(netbsd32_voidp tls); }
775486	STD	{ linux32_off_t|linux32_sys||get_tls(void); }
776