git: be67ea40c5a0 - main - freebsd32: generate from sys/kern/syscalls.master

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 22 Nov 2021 22:38:05 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=be67ea40c5a0fd375d754a92e6cd8a3bfc508ba3

commit be67ea40c5a0fd375d754a92e6cd8a3bfc508ba3
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-22 22:36:58 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-22 22:36:58 +0000

    freebsd32: generate from sys/kern/syscalls.master
    
    This avoids the need to keep a freebsd32-specific syscalls.master
    in sync with the default ABI.  As evidenced by the number of commits
    required to sync the two, it is extremely easy for them to get out
    of sync due to misunderstandings and user errors.
    
    Reviewed by:    kevans, kib
---
 sys/compat/freebsd32/Makefile          |    2 +-
 sys/compat/freebsd32/capabilities.conf |  784 ----------------------
 sys/compat/freebsd32/syscalls.conf     |   49 +-
 sys/compat/freebsd32/syscalls.master   | 1127 --------------------------------
 sys/kern/syscalls.master               |   22 +-
 5 files changed, 67 insertions(+), 1917 deletions(-)

diff --git a/sys/compat/freebsd32/Makefile b/sys/compat/freebsd32/Makefile
index 8777b1992768..b4f72fcc2bca 100644
--- a/sys/compat/freebsd32/Makefile
+++ b/sys/compat/freebsd32/Makefile
@@ -3,6 +3,6 @@
 # $FreeBSD$
 
 GENERATED_PREFIX=	freebsd32_
-CAPABILITIES_CONF=	capabilities.conf
+SYSENT_FILE=		${SYSDIR}/kern/syscalls.master
 
 .include "../../conf/sysent.mk"
diff --git a/sys/compat/freebsd32/capabilities.conf b/sys/compat/freebsd32/capabilities.conf
deleted file mode 100644
index 3ec922d54920..000000000000
--- a/sys/compat/freebsd32/capabilities.conf
+++ /dev/null
@@ -1,784 +0,0 @@
-##
-## Copyright (c) 2008-2010 Robert N. M. Watson
-## All rights reserved.
-##
-## This software was developed at the University of Cambridge Computer
-## Laboratory with support from a grant from Google, Inc.
-##
-## 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 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.
-##
-## List of system calls enabled in capability mode, one name per line.
-##
-## System calls listed here operate either fully or partially in the absence
-## of global namespaces or ambient authority.  In capability mode system calls
-## that operate only on global namespaces or require ambient authority have no
-## utility and thus are not permitted.
-##
-## Notes:
-## - sys_exit(2), abort2(2) and close(2) are very important.
-## - Sorted alphabetically, please keep it that way.
-##
-## $FreeBSD$
-##
-
-##
-## Allow ACL and MAC label operations by file descriptor, subject to
-## capability rights.  Allow MAC label operations on the current process but
-## we will need to scope __mac_get_pid(2).
-##
-__acl_aclcheck_fd
-__acl_delete_fd
-__acl_get_fd
-__acl_set_fd
-__mac_get_fd
-#__mac_get_pid
-__mac_get_proc
-__mac_set_fd
-__mac_set_proc
-
-##
-## Allow creating special file descriptors like eventfd(2).
-##
-__specialfd
-
-##
-## Allow sysctl(2) as we scope internal to the call; this is a global
-## namespace, but there are several critical sysctls required for almost
-## anything to run, such as hw.pagesize.  For now that policy lives in the
-## kernel for performance and simplicity, but perhaps it could move to a
-## proxying daemon in userspace.
-##
-__sysctl
-__sysctlbyname
-
-##
-## Allow umtx operations as these are scoped by address space.
-##
-## XXRW: Need to check this very carefully.
-##
-_umtx_op
-
-##
-## Allow process termination using abort2(2).
-##
-abort2
-
-##
-## Allow accept(2) since it doesn't manipulate namespaces directly, rather
-## relies on existing bindings on a socket, subject to capability rights.
-##
-accept
-accept4
-
-##
-## Allow AIO operations by file descriptor, subject to capability rights.
-##
-aio_cancel
-aio_error
-aio_fsync
-aio_read
-aio_return
-aio_suspend
-aio_waitcomplete
-aio_write
-aio_writev
-aio_readv
-
-##
-## audit(2) is a global operation, submitting to the global trail, but it is
-## controlled by privilege, and it might be useful to be able to submit
-## records from sandboxes.  For now, disallow, but we may want to think about
-## providing some sort of proxy service for this.
-##
-#audit
-
-##
-## Allow bindat(2).
-##
-bindat
-
-##
-## Allow capability mode and capability system calls.
-##
-cap_enter
-cap_fcntls_get
-cap_fcntls_limit
-cap_getmode
-cap_ioctls_get
-cap_ioctls_limit
-__cap_rights_get
-cap_rights_limit
-
-##
-## Allow read-only clock operations.
-##
-clock_getres
-clock_gettime
-
-##
-## Always allow file descriptor close(2).
-##
-close
-close_range
-closefrom
-
-##
-## Allow connectat(2).
-##
-connectat
-
-##
-## copy_file_range(2) reads from one descriptor and writes to the other.
-##
-copy_file_range
-
-##
-## cpuset(2) and related calls are limited to caller's own process/thread.
-##
-#cpuset
-cpuset_getaffinity
-cpuset_getdomain
-#cpuset_getid
-cpuset_setaffinity
-cpuset_setdomain
-#cpuset_setid
-
-##
-## Always allow dup(2) and dup2(2) manipulation of the file descriptor table.
-##
-dup
-dup2
-
-##
-## Allow extended attribute operations by file descriptor, subject to
-## capability rights.
-##
-extattr_delete_fd
-extattr_get_fd
-extattr_list_fd
-extattr_set_fd
-
-##
-## Allow changing file flags, mode, and owner by file descriptor, subject to
-## capability rights.
-##
-fchflags
-fchmod
-fchown
-
-##
-## For now, allow fcntl(2), subject to capability rights, but this probably
-## needs additional scoping.
-##
-fcntl
-
-##
-## Allow fexecve(2), subject to capability rights.  We perform some scoping,
-## such as disallowing privilege escalation.
-##
-fexecve
-
-##
-## Allow flock(2), subject to capability rights.
-##
-flock
-
-##
-## Allow fork(2), even though it returns pids -- some applications seem to
-## prefer this interface.
-##
-fork
-
-##
-## Allow fpathconf(2), subject to capability rights.
-##
-fpathconf
-
-##
-## Allow various file descriptor-based I/O operations, subject to capability
-## rights.
-##
-freebsd11_fstat
-freebsd11_fstatat
-freebsd11_getdirentries
-freebsd11_fstatfs
-freebsd11_mknodat
-freebsd6_ftruncate
-freebsd6_lseek
-freebsd6_mmap
-freebsd6_pread
-freebsd6_pwrite
-
-##
-## Allow I/O-related file operations, subject to capability rights.
-##
-fspacectl
-
-##
-## Allow querying file and file system state with fstat(2) and fstatfs(2),
-## subject to capability rights.
-##
-fstat
-fstatfs
-
-##
-## Allow further file descriptor-based I/O operations, subject to capability
-## rights.
-##
-fdatasync
-fsync
-ftruncate
-
-##
-## Allow futimens(2) and futimes(2), subject to capability rights.
-##
-futimens
-futimes
-
-##
-## Allow querying process audit state, subject to normal access control.
-##
-getaudit
-getaudit_addr
-getauid
-
-##
-## Allow thread context management with getcontext(2).
-##
-getcontext
-
-##
-## Allow directory I/O on a file descriptor, subject to capability rights.
-## Originally we had separate capabilities for directory-specific read
-## operations, but on BSD we allow reading the raw directory data, so we just
-## rely on CAP_READ now.
-##
-getdents
-getdirentries
-
-##
-## Allow querying certain trivial global state.
-##
-getdomainname
-
-##
-## Allow querying certain per-process resource limit state.
-##
-getdtablesize
-
-##
-## Allow querying current process credential state.
-##
-getegid
-geteuid
-
-##
-## Allow querying certain trivial global state.
-##
-gethostid
-gethostname
-
-##
-## Allow querying per-process timer.
-##
-getitimer
-
-##
-## Allow querying current process credential state.
-##
-getgid
-getgroups
-getlogin
-getloginclass
-
-##
-## Allow querying certain trivial global state.
-##
-getpagesize
-getpeername
-
-##
-## Allow querying certain per-process scheduling, resource limit, and
-## credential state.
-##
-## XXXRW: getpgid(2) needs scoping.  It's not clear if it's worth scoping
-## getppid(2).  getpriority(2) needs scoping.  getrusage(2) needs scoping.
-## getsid(2) needs scoping.
-##
-getpgid
-getpgrp
-getpid
-getppid
-getpriority
-getresgid
-getresuid
-getrlimit
-getrusage
-getsid
-
-##
-## Allow getrandom
-##
-getrandom
-
-##
-## Allow querying socket state, subject to capability rights.
-##
-## XXXRW: getsockopt(2) may need more attention.
-##
-getsockname
-getsockopt
-
-##
-## Allow querying the global clock.
-##
-gettimeofday
-
-##
-## Allow querying current process credential state.
-##
-getuid
-
-##
-## Allow ioctl(2), which hopefully will be limited by applications only to
-## required commands with cap_ioctls_limit(2) syscall.
-##
-ioctl
-
-##
-## Allow querying current process credential state.
-##
-issetugid
-
-##
-## Allow kevent(2), as we will authorize based on capability rights on the
-## target descriptor.
-##
-kevent
-
-##
-## Allow kill(2), as we allow the process to send signals only to himself.
-##
-kill
-
-##
-## Allow message queue operations on file descriptors, subject to capability
-## rights.
-## NOTE: Corresponding sysents are initialized in sys/kern/uipc_mqueue.c with
-## SYF_CAPENABLED.
-##
-kmq_notify
-kmq_setattr
-kmq_timedreceive
-kmq_timedsend
-
-##
-## Allow kqueue(2), we will control use.
-##
-kqueue
-
-##
-## Allow managing per-process timers.
-##
-ktimer_create
-ktimer_delete
-ktimer_getoverrun
-ktimer_gettime
-ktimer_settime
-
-##
-## We can't allow ktrace(2) because it relies on a global namespace, but we
-## might want to introduce an fktrace(2) of some sort.
-##
-#ktrace
-
-##
-## Allow AIO operations by file descriptor, subject to capability rights.
-##
-lio_listio
-
-##
-## Allow listen(2), subject to capability rights.
-##
-## XXXRW: One might argue this manipulates a global namespace.
-##
-listen
-
-##
-## Allow I/O-related file descriptors, subject to capability rights.
-##
-lseek
-
-##
-## Allow simple VM operations on the current process.
-##
-madvise
-mincore
-minherit
-mlock
-mlockall
-
-##
-## Allow memory mapping a file descriptor, and updating protections, subject
-## to capability rights.
-##
-mmap
-mprotect
-
-##
-## Allow simple VM operations on the current process.
-##
-msync
-munlock
-munlockall
-munmap
-
-##
-## Allow the current process to sleep.
-##
-nanosleep
-
-##
-## Allow querying the global clock.
-##
-ntp_gettime
-
-##
-## Allow AIO operations by file descriptor, subject to capability rights.
-##
-oaio_read
-oaio_write
-
-##
-## Allow simple VM operations on the current process.
-##
-break
-
-##
-## Allow AIO operations by file descriptor, subject to capability rights.
-##
-olio_listio
-
-##
-## Operations relative to directory capabilities.
-##
-chflagsat
-faccessat
-fchmodat
-fchownat
-fstatat
-futimesat
-linkat
-mkdirat
-mkfifoat
-mknodat
-openat
-readlinkat
-renameat
-symlinkat
-unlinkat
-funlinkat
-utimensat
-
-##
-## Process descriptor-related system calls are allowed.
-##
-pdfork
-pdgetpid
-pdkill
-#pdwait4	# not yet implemented
-
-##
-## Allow pipe(2).
-##
-pipe
-pipe2
-
-##
-## Allow poll(2), which will be scoped by capability rights.
-##
-poll
-ppoll
-
-##
-## Allow I/O-related file descriptors, subject to capability rights.
-##
-posix_fallocate
-pread
-preadv
-
-##
-## Allow access to profiling state on the current process.
-##
-profil
-
-##
-## Disallow ptrace(2) for now, but we do need debugging facilities in
-## capability mode, so we will want to revisit this, possibly by scoping its
-## operation.
-##
-#ptrace
-
-##
-## Allow I/O-related file descriptors, subject to capability rights.
-##
-pwrite
-pwritev
-read
-readv
-recv
-recvfrom
-recvmsg
-
-##
-## Allow real-time scheduling primitives to be used.
-##
-## XXXRW: These require scoping.
-##
-rtprio
-rtprio_thread
-
-##
-## Allow simple VM operations on the current process.
-##
-sbrk
-
-##
-## Allow querying trivial global scheduler state.
-##
-sched_get_priority_max
-sched_get_priority_min
-sched_getcpu
-
-##
-## Allow various thread/process scheduler operations.
-##
-## XXXRW: Some of these require further scoping.
-##
-sched_getparam
-sched_getscheduler
-sched_rr_get_interval
-sched_setparam
-sched_setscheduler
-sched_yield
-
-##
-## Allow I/O-related file descriptors, subject to capability rights.
-## NOTE: Corresponding sysents are initialized in sys/netinet/sctp_syscalls.c
-## with SYF_CAPENABLED.
-##
-sctp_generic_recvmsg
-sctp_generic_sendmsg
-sctp_generic_sendmsg_iov
-sctp_peeloff
-
-##
-## Allow pselect(2) and select(2), which will be scoped by capability rights.
-##
-## XXXRW: But is it?
-##
-pselect
-select
-
-##
-## Allow I/O-related file descriptors, subject to capability rights.  Use of
-## explicit addresses here is restricted by the system calls themselves.
-##
-send
-sendfile
-sendmsg
-sendto
-
-##
-## Allow setting per-process audit state, which is controlled separately by
-## privileges.
-##
-setaudit
-setaudit_addr
-setauid
-
-##
-## Allow setting thread context.
-##
-setcontext
-
-##
-## Allow setting current process credential state, which is controlled
-## separately by privilege.
-##
-setegid
-seteuid
-setgid
-
-##
-## Allow use of the process interval timer.
-##
-setitimer
-
-##
-## Allow setpriority(2).
-##
-## XXXRW: Requires scoping.
-##
-setpriority
-
-##
-## Allow setting current process credential state, which is controlled
-## separately by privilege.
-##
-setregid
-setresgid
-setresuid
-setreuid
-
-##
-## Allow setting process resource limits with setrlimit(2).
-##
-setrlimit
-
-##
-## Allow creating a new session with setsid(2).
-##
-setsid
-
-##
-## Allow setting socket options with setsockopt(2), subject to capability
-## rights.
-##
-## XXXRW: Might require scoping.
-##
-setsockopt
-
-##
-## Allow setting current process credential state, which is controlled
-## separately by privilege.
-##
-setuid
-
-##
-## shm_open(2) is scoped so as to allow only access to new anonymous objects.
-##
-shm_open
-shm_open2
-
-##
-## Allow I/O-related file descriptors, subject to capability rights.
-##
-shutdown
-
-##
-## Allow signal control on current process.
-##
-sigaction
-sigaltstack
-sigblock
-sigfastblock
-sigpending
-sigprocmask
-sigqueue
-sigreturn
-sigsetmask
-sigstack
-sigsuspend
-sigtimedwait
-sigvec
-sigwaitinfo
-sigwait
-
-##
-## Allow creating new socket pairs with socket(2) and socketpair(2).
-##
-socket
-socketpair
-
-##
-## Allow simple VM operations on the current process.
-##
-## XXXRW: Kernel doesn't implement this, so drop?
-##
-sstk
-
-##
-## Do allow sync(2) for now, but possibly shouldn't.
-##
-sync
-
-##
-## Always allow process termination with sys_exit(2).
-##
-sys_exit
-
-##
-## sysarch(2) does rather diverse things, but is required on at least i386
-## in order to configure per-thread data.  As such, it's scoped on each
-## architecture.
-##
-sysarch
-
-##
-## Allow thread operations operating only on current process.
-##
-thr_create
-thr_exit
-thr_kill
-
-##
-## Disallow thr_kill2(2), as it may operate beyond the current process.
-##
-## XXXRW: Requires scoping.
-##
-#thr_kill2
-
-##
-## Allow thread operations operating only on current process.
-##
-thr_new
-thr_self
-thr_set_name
-thr_suspend
-thr_wake
-
-##
-## Allow manipulation of the current process umask with umask(2).
-##
-umask
-
-##
-## Allow submitting of process trace entries with utrace(2).
-##
-utrace
-
-##
-## Allow generating UUIDs with uuidgen(2).
-##
-uuidgen
-
-##
-## Allow I/O-related file descriptors, subject to capability rights.
-##
-write
-writev
-
-##
-## Allow processes to yield(2).
-##
-yield
diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf
index 4ccf7f545dde..6b80018165df 100644
--- a/sys/compat/freebsd32/syscalls.conf
+++ b/sys/compat/freebsd32/syscalls.conf
@@ -9,6 +9,51 @@ syscallprefix="FREEBSD32_SYS_"
 switchname="freebsd32_sysent"
 namesname="freebsd32_syscallnames"
 systrace="freebsd32_systrace_args.c"
+abi_flags="long_size|pointer_size|time_t_size|pair_64bit"
 abi_func_prefix="freebsd32_"
-abi_flags="pair_64bit"
-capabilities_conf="capabilities.conf"
+abi_type_suffix="32"
+abi_long="int32_t"
+abi_u_long="uint32_t"
+abi_semid_t="int32_t"
+abi_size_t="uint32_t"
+abi_ptr_array_t="uint32_t"
+abi_headers="#include <compat/freebsd32/freebsd32_proto.h>"
+
+#
+# Variables below this line are exceptions to the ABI changes programatically
+# detected by makesyscalls.lua.  New system calls should not require an entry
+# here in nearly virtually all cases.  New entries are almost certainly
+# representative of badly designed interfaces.
+#
+
+# System calls that require freebsd32-specific handling:
+# fcntl - need to sign extend arg unless it's a pointer
+# ksem_init, ksem_open - XXX not required
+# mprotect - i386 read-implies-exec
+# msgsys, semsys, shmsys - some sub-syscalls require compat
+# sigqueue - union sival requires special handing on big-endian
+# sigreturn - struct osigcontext
+# sysarch - always MD
+# _umtx_lock _umtx_unlock _umtx_op - arguments require special handling
+syscall_abi_change="fcntl ksem_init ksem_open mprotect msgsys semsys shmsys sigqueue sigreturn sysarch _umtx_lock _umtx_unlock _umtx_op"
+
+# System calls that appear to require handling, but don't:
+# aio_cancel - the aiocb pointer is just a virtual address
+# thr_* - the lack of sign extension of long args is OK
+# sctp_generic_* - iovec differences handled internally
+syscall_no_abi_change="aio_cancel thr_exit thr_kill thr_kill2 thr_self thr_set_name thr_wake sctp_generic_sendmsg_iov sctp_generic_recvmsg"
+
+# OBSOL syscalls
+# getkerninfo - obsolete and can't be implemented (kernel virtual addresses can't fit in 32-bits)
+obsol="getkerninfo"
+
+# Syscalls without implementations:
+# *mac_* - should be implemented
+# afs3_syscall - requires significant porting, probably doesn't make sense
+# kldsym - can't be implemented (kernel virtual addresses can't fit in 32-bits)
+# lgetfh - should be implemented
+# nlm_syscall - requires significant porting, probably doesn't make sense
+# nnpfs_syscall - requires significant porting, probably doesn't make sense
+# ntp_gettime - should be implemented
+# thr_create - was unimplemented and appears to be unnecessicary
+unimpl="afs3_syscall kldsym __mac_get_proc __mac_set_proc __mac_get_fd __mac_get_file __mac_set_fd __mac_set_file __mac_get_pid __mac_get_link __mac_set_link __mac_execve mac_syscall nfssvc nlm_syscall ntp_gettime lgetfh nnpfs_syscall thr_create"
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
deleted file mode 100644
index d4e309c8f68b..000000000000
--- a/sys/compat/freebsd32/syscalls.master
+++ /dev/null
@@ -1,1127 +0,0 @@
- $FreeBSD$
-;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
-;	from: src/sys/kern/syscalls.master 1.107
-;
-; System call name/number master file.
-; Processed to created init_sysent.c, syscalls.c and syscall.h.
-
-; Columns: number audit type name alt{name,tag,rtyp}/comments
-;	number	system call number, must be in order
-;	audit	the audit event associated with the system call
-;		A value of AUE_NULL means no auditing, but it also means that
-;		there is no audit event for the call at this time. For the
-;		case where the event exists, but we don't want auditing, the
-;		event should be #defined to AUE_NULL in audit_kevents.h.
-;	type	one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6,
-;		COMPAT7, COMPAT11, COMPAT12, NODEF, NOARGS, NOPROTO, NOSTD
-;		The COMPAT* options may be combined with one or more NO*
-;		options separated by '|' with no spaces (e.g. COMPAT|NOARGS)
-;	name	pseudo-prototype of syscall routine
-;		If one of the following alts is different, then all appear:
-;	altname	name of system call if different
-;	alttag	name of args struct tag if different from [o]`name'"_args"
-;	altrtyp	return type if not int (bogus - syscalls always return int)
-;		for UNIMPL/OBSOL, name continues with comments
-
-; types:
-;	STD	always included
-;	COMPAT	included on COMPAT #ifdef
-;	COMPAT4	included on COMPAT_FREEBSD4 #ifdef (FreeBSD 4 compat)
-;	COMPAT6	included on COMPAT_FREEBSD6 #ifdef (FreeBSD 6 compat)
-;	COMPAT7	included on COMPAT_FREEBSD7 #ifdef (FreeBSD 7 compat)
-;	COMPAT10 included on COMPAT_FREEBSD10 #ifdef (FreeBSD 10 compat)
-;	COMPAT11 included on COMPAT_FREEBSD11 #ifdef (FreeBSD 11 compat)
-;	COMPAT12 included on COMPAT_FREEBSD12 #ifdef (FreeBSD 12 compat)
-;	OBSOL	obsolete, not included in system, only specifies name
-;	UNIMPL	not implemented, placeholder only
-;	NOSTD	implemented but as a lkm that can be statically
-;		compiled in; sysent entry will be filled with lkmressys
-;		so the SYSCALL_MODULE macro works
-;	NOARGS	same as STD except do not create structure in sys/sysproto.h
-;	NODEF	same as STD except only have the entry in the syscall table
-;		added.  Meaning - do not create structure or function
-;		prototype in sys/sysproto.h
-;	NOPROTO	same as STD except do not create structure or
-;		function prototype in sys/sysproto.h.  Does add a
-;		definition to syscall.h besides adding a sysent.
-
-; #ifdef's, etc. may be included, and are copied to the output files.
-
-#include <sys/param.h>
-#include <sys/sysent.h>
-#include <sys/sysproto.h>
-#include <compat/freebsd32/freebsd32_proto.h>
-
-; Reserved/unimplemented system calls in the range 0-150 inclusive
-; are reserved for use in future Berkeley releases.
-; Additional system calls implemented in vendor and other
-; redistributions should be placed in the reserved range at the end
-; of the current calls.
-
-0	AUE_NULL	NOPROTO	{ int nosys(void); } syscall nosys_args int
-1	AUE_EXIT	NOPROTO	{ void sys_exit(int rval); } exit \
-				    sys_exit_args void
-2	AUE_FORK	NOPROTO	{ int fork(void); }
-3	AUE_READ	NOPROTO	{ ssize_t read(int fd, void *buf, \
-				    size_t nbyte); }
-4	AUE_WRITE	NOPROTO	{ ssize_t write(int fd, const void *buf, \
-				    size_t nbyte); }
-5	AUE_OPEN_RWTC	NOPROTO	{ int open(const char *path, int flags, \
-				    mode_t mode); }
-6	AUE_CLOSE	NOPROTO	{ int close(int fd); }
-7	AUE_WAIT4	STD	{ int freebsd32_wait4(int pid, int *status, \
-				    int options, struct rusage32 *rusage); }
-8	AUE_CREAT	COMPAT|NOPROTO	{ int creat(const char *path, \
-				    int mode); }
-9	AUE_LINK	NOPROTO	{ int link(const char *path, \
-				    const char *link); }
-10	AUE_UNLINK	NOPROTO	{ int unlink(const char *path); }
-11	AUE_NULL	OBSOL	execv
-12	AUE_CHDIR	NOPROTO	{ int chdir(const char *path); }
-13	AUE_FCHDIR	NOPROTO	{ int fchdir(int fd); }
-14	AUE_MKNOD	COMPAT11|NOPROTO { int mknod(const char *path, \
-					int mode, uint32_t dev); }
-15	AUE_CHMOD	NOPROTO	{ int chmod(const char *path, mode_t mode); }
-16	AUE_CHOWN	NOPROTO	{ int chown(const char *path, int uid, int gid); }
-17	AUE_NULL	NOPROTO	{ void *break(char *nsize); }
-18	AUE_GETFSSTAT	COMPAT4	{ int freebsd32_getfsstat( \
-				    struct ostatfs32 *buf, int32_t bufsize, \
-				    int mode); }
-19	AUE_LSEEK	COMPAT	{ int freebsd32_lseek(int fd, int32_t offset, \
-				    int whence); }
-20	AUE_GETPID	NOPROTO	{ pid_t getpid(void); }
-21	AUE_MOUNT	NOPROTO	{ int mount(const char *type, \
-				    const char *path, \
-				    int flags, void *data); }
*** 1077 LINES SKIPPED ***