Home | History | Annotate | only in /src/sys/compat/sunos32
History log of /src/sys/compat/sunos32
RevisionDateAuthorComments
 1.6 14-Jan-2014  christos use new bsd.syscall.mk
 1.5 11-Dec-2005  christos branches: 1.5.110; 1.5.120; 1.5.126;
merge ktrace-lwp.
 1.4 26-Feb-2005  perry make this rebuild generated files by default, also clean up and make
more like other similar Makefiles.
 1.3 15-Nov-2003  thorpej branches: 1.3.8; 1.3.10;
We have CVS; there is no reason to make .bak files when generating the
syscall tables.
 1.2 26-Oct-2003  lukem Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.1 02-Feb-2001  mrg branches: 1.1.2; 1.1.26;
initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.1.26.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-02-11 19:14:28 +0000
 1.3.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.5.126.1 18-May-2014  rmind sync with head
 1.5.120.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.110.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.3 17-Nov-2014  uebayasi branches: 1.3.18; 1.3.20;
Define compat modules (but without dependencies yet).
 1.2 19-Nov-2008  ad branches: 1.2.26;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.1 02-Feb-2001  mrg branches: 1.1.2; 1.1.124; 1.1.128; 1.1.134; 1.1.138;
initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.1.138.1 19-Jan-2009  skrll Sync with HEAD.
 1.1.134.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.128.1 04-May-2009  yamt sync with head.
 1.1.124.1 17-Jan-2009  mjf Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file files.sunos32 was added on branch thorpej_scsipi on 2001-02-11 19:14:30 +0000
 1.2.26.1 03-Dec-2017  jdolecek update from HEAD
 1.3.20.1 10-Jun-2019  christos Sync with HEAD
 1.3.18.3 02-Oct-2018  pgoyette Revert most of previous. Leave the original dependencies, but still
remove the duplicate attribute definition to make config(1) happier.
 1.3.18.2 22-Sep-2018  pgoyette Use attribute compat_sunos32 rather than duplicating compat_sunos
(config(1) doesn't like duplication)
 1.3.18.1 12-Mar-2018  pgoyette Update dependencies for modules when they are built-in. Now we don't
(or at least, shouldn't) need reminders in the GENERIC config files
about which module options require other options.

Update branch status doc accordingly.
 1.13 29-May-2008  mrg remove clause #3 from my license where there are no other
copyright holders involved.
 1.12 12-May-2007  dsl branches: 1.12.28; 1.12.30; 1.12.32; 1.12.34;
Change interface to settimeofday1() so that it can also be used from
compat code in order to avoid the stackgap.
 1.11 22-Apr-2007  dsl Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
- which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
search for absolute pathnames in the emulation root, if that fails it will
retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
the real root is returned instead (matching the behaviour of emul_lookup,
but being a cheap comparison here) so that programs that scan "../.."
looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
 1.10 16-Mar-2007  dsl remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers. Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
 1.9 11-Dec-2005  christos branches: 1.9.26; 1.9.30; 1.9.32; 1.9.34;
merge ktrace-lwp.
 1.8 26-Feb-2005  perry branches: 1.8.4;
nuke trailing whitespace
 1.7 26-Mar-2004  drochner branches: 1.7.8; 1.7.10;
all ports define __HAVE_SIGINFO now, so remove the CPP conditionals
 1.6 26-Oct-2003  christos Add __HAVE_SIGINFO
 1.5 28-Sep-2003  martin constify
 1.4 29-Jun-2003  fvdl branches: 1.4.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.3 29-Jun-2003  martin struct proc * -> struct lwp *
 1.2 04-Jul-2002  thorpej Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.
 1.1 02-Feb-2001  mrg branches: 1.1.2; 1.1.4; 1.1.6; 1.1.18;
initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.1.18.1 15-Jul-2002  gehenna catch up with -current.
 1.1.6.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.1 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file sunos32.h was added on branch thorpej_scsipi on 2001-02-11 19:14:30 +0000
 1.4.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.2 26-Aug-2004  skrll Adapt to branch.

sparc64 GENERIC compiles.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.8.4.2 03-Sep-2007  yamt sync with head.
 1.8.4.1 21-Jun-2006  yamt sync with head.
 1.9.34.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.9.32.1 11-Jul-2007  mjf Sync with head.
 1.9.30.2 27-May-2007  ad Sync with head.
 1.9.30.1 10-Apr-2007  ad Sync with head.
 1.9.26.3 17-May-2007  yamt sync with head.
 1.9.26.2 07-May-2007  yamt sync with head.
 1.9.26.1 24-Mar-2007  yamt sync with head.
 1.12.34.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.12.32.1 04-May-2009  yamt sync with head.
 1.12.30.1 04-Jun-2008  yamt sync with head
 1.12.28.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 06-Feb-2001  mrg branches: 1.2.2; 1.2.124; 1.2.126; 1.2.128;
add from NetBSD Id.
 1.1 06-Feb-2001  mrg use struct sunos32_dirent. now getwd() works.
 1.2.128.1 16-May-2008  yamt sync with head.
 1.2.126.1 18-May-2008  yamt sync with head.
 1.2.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 06-Feb-2001  bouyer file sunos32_dirent.h was added on branch thorpej_scsipi on 2001-02-11 19:14:30 +0000
 1.36 10-Aug-2018  pgoyette Allow syscall_establish() to install new syscalls when the existing
entry-point is either sys_nomodule or sys_nosys. Update the
makesyscalls.sh script to create a const array of bits to allow
syscall_disestablish() to properly restore the original entry-point.
Update all the initializers of struct emul to initialize the pointer
to the bit array struct emul.

XXX Regen of all files created by makesyscalls.sh will come soon,
XXX followed by a kernel version bump (since struct emul is being
XXX modified).

This commit should address PR kern/45781 and also removes the need
for the work-around for that PR in file

sys/arch/usermode/modules/syscallemu/syscallemu.c
 1.35 06-May-2018  kamil branches: 1.35.2;
Remove an element from struct emul: e_tracesig

e_tracesig used to be implemented for Darwin compat. Nowadays the Darwin
compatiblity layer is gone and there are no other users.

This functionality isn't used where it shall be used in the existing
codebase.

If we want to emulate debugging interfaces in compat layers we would need
to implement that from scratch anyway. We would need to be bug compatible
with other OSes too.

Proposed on tech-kern@.

Welcome to NetBSD 8.99.16!

Sponsored by <The NetBSD Foundation>
 1.34 09-Jan-2018  maya branches: 1.34.2;
remove struct emul's e_fault.

It used to be used by COMPAT_IRIX for the purpose of overriding
uvm_fault (only implemented in MIPS), now removed.

Ride 8.99.12 version bump.
 1.33 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.32 07-Jul-2010  chs branches: 1.32.8; 1.32.12;
many changes for COMPAT_LINUX:
- update the linux syscall table for each platform.
- support new-style (NPTL) linux pthreads on all platforms.
clone() with CLONE_THREAD uses 1 process with many LWPs
instead of separate processes.
- move the contents of sys__lwp_setprivate() into a new
lwp_setprivate() and use that everywhere.
- update linux_release[] and linux32_release[] to "2.6.18".
- adjust placement of emul fork/exec/exit hooks as needed
and adjust other emul code to match.
- convert all struct emul definitions to use named initializers.
- change the pid allocator to allow multiple pids to refer to the same proc.
- remove a few fields from struct proc that are no longer needed.
- disable the non-functional "vdso" code in linux32/amd64,
glibc works fine without it.
- fix a race in the futex code where we could miss a wakeup after
a requeue operation.
- redo futex locking to be a little more efficient.
 1.31 19-Nov-2008  ad branches: 1.31.6; 1.31.8;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.30 15-Oct-2008  wrstuden branches: 1.30.2;
Merge wrstuden-revivesa into HEAD.
 1.29 29-May-2008  mrg branches: 1.29.4;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.28 16-Mar-2007  dsl branches: 1.28.30; 1.28.32; 1.28.34; 1.28.36;
remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers. Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
 1.27 19-Feb-2007  cube branches: 1.27.4; 1.27.6; 1.27.8;
Introduce a new member to struct emul, e_startlwp, to be used by
sys__lwp_create. It allows using the said syscall under COMPAT_NETBSD32.

The libpthread regression tests now pass on amd64 and sparc64.
 1.26 09-Feb-2007  ad branches: 1.26.2;
Merge newlock2 to head.
 1.25 15-Oct-2006  martin Missing initializers
 1.24 11-Dec-2005  christos branches: 1.24.20; 1.24.22;
merge ktrace-lwp.
 1.23 11-Jul-2005  christos Add a sunos_machdep include file to deal with MD implementations of
sunos_syscall_intern.
 1.22 10-Jul-2005  christos define syscall again.
 1.21 10-Jul-2005  christos We have syscall_intern now.
 1.20 26-Mar-2005  fvdl branches: 1.20.2;
Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.

* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
that will return the default VM map address. The default function
is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
macro. This gives emulations control over the default map address,
and allows things to be mapped at the right address (in 32bit range)
for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.
 1.19 20-Dec-2003  fvdl branches: 1.19.8; 1.19.10; 1.19.14;
Put back Emmanuel's sigfilter hooks, as decided by Core.
 1.18 20-Dec-2003  manu Introduce lwp_emuldata and the associated hooks. No hook is provided for the
exec case, as the emulation already has the ability to intercept that
with the e_proc_exec hook. It is the responsability of the emulation to
take appropriaye action about lwp_emuldata in e_proc_exec.

Patch reviewed by Christos.
 1.17 05-Dec-2003  jdolecek back the sigfilter emulation hook change off
 1.16 03-Dec-2003  manu Add a sigfilter emulation hook. It is used at the beginning of kpsignal2()
so that a specific emulation has the oportunity to filter out some signals.

if sigfilter returns 0, then no signal is sent by kpsignal2().

There is another place where signals can be generated: trapsignal. Since this
function is already an emulation hook, no call to the sigfilter hook was
introduced in trapsignal.

This is needed to emulate the softsignal feature in COMPAT_DARWIN (signals
sent as Mach exception messages)
 1.15 24-Aug-2003  chs add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default. the changes
fall into two basic catagories:

- pmap and trap-handler changes. these are all MD:
= alpha: we already track per-page execute permission with the (software)
PG_EXEC bit, so just have the trap handler pay attention to it.
= i386: use a new GDT segment for %cs for processes that have no
executable mappings above a certain threshold (currently the
bottom of the stack). track per-page execute permission with
the last unused PTE bit.
= powerpc/ibm4xx: just use the hardware exec bit.
= powerpc/oea: we already track per-page exec bits, but the hardware only
implements non-exec mappings at the segment level. so track the
number of executable mappings in each segment and turn on the no-exec
segment bit iff the count is 0. adjust the trap handler to deal.
= sparc (sun4m): fix our use of the hardware protection bits.
fix the trap handler to recognize text faults.
= sparc64: split the existing unified TSB into data and instruction TSBs,
and only load TTEs into the appropriate TSB(s) for the permissions.
fix the trap handler to check for execute permission.
= not yet implemented: amd64, hppa, sh5

- changes in all the emulations that put a signal trampoline on the stack.
instead, we now put the trampoline into a uvm_aobj and map that into
the process separately.

originally from openbsd, adapted for netbsd by me.
 1.14 10-Nov-2002  jdolecek branches: 1.14.6;
handle __HAVE_MINIMAL_EMUL
 1.13 01-Nov-2002  jdolecek set struct emul's nsysent to compat SYS_NSYSENT, not SYS_MAXSYSCALL
 1.12 21-Sep-2002  manu - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
 1.11 05-May-2002  thorpej Add missing const.
 1.10 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.9 20-Sep-2001  thorpej Add sunos32_setregs(), thus making sunos32 compile again.
 1.8 18-Sep-2001  jdolecek Make the setregs hook emulation-specific, rather than executable
format specific.
Struct emul has a e_setregs hook back, which points to emulation-specific
setregs function. es_setregs of struct execsw now only points to
optional executable-specific setup function (this is only used for
ECOFF).
 1.7 18-Jun-2001  christos branches: 1.7.2; 1.7.4;
Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
 1.6 16-Jun-2001  manu Removed obsoletes EMUL_NO_BSD_ASYNCIO_PIPE and EMUL_NO_SIGIO_ON_READ flags.
Async I/O OS specifities should now handled in OS specific code. Linux
has been done, but other emulation should be handled. See case LINUX_F_SETFL
in sys/compat/linux/common/linux_file.c:linux_sys_fcntl() for more details.

The data that has been collected yet:

Net Free Open Linux SunOS AIX OSF1 Darwin
send SIGIO to write end of pipe Y N N N N N Y Y
send SIGIO to read end of pipe Y Y N N N ? Y ?
send SIGIO to write end of socket Y Y Y N N Y Y Y
send SIGIO to read end of socket Y Y Y Y Y ? Y ?
 1.5 30-May-2001  mrg use _KERNEL_OPT.
 1.4 07-May-2001  manu Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so that
the native emulation (NetBSD) does not have a flag.
 1.3 06-May-2001  manu Added two flags to emulation packages:

EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.

EMUL_NO_SIGIO_ON_READ notes that the emulated binaries that requested
asynchrnous I/O expect the reader process to be notified by a SIGIO, but
not the writer process. OSes without this flag expect the reader and the
writer to be notified when some data has arrived or when some data have been
read. As far as we know, the OSes that need EMUL_NO_SIGIO_ON_READ are Linux
and SunOS.
 1.2 05-Feb-2001  mrg branches: 1.2.2; 1.2.4;
s/sunos_sendsig/sunos32_sendsig/
 1.1 02-Feb-2001  mrg initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.2.4.6 11-Nov-2002  nathanw Catch up to -current
 1.2.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.3 14-Nov-2001  nathanw Catch up to -current.
 1.2.4.2 21-Sep-2001  nathanw Catch up to -current.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 05-Feb-2001  bouyer file sunos32_exec.c was added on branch thorpej_scsipi on 2001-02-11 19:14:31 +0000
 1.7.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.6.4 01-Apr-2005  skrll Sync with HEAD.
 1.14.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19.14.1 18-Sep-2005  tron Pull up following revision(s) (requested by fvdl in ticket #798):
sys/compat/sunos/sunos_exec.c: revision 1.47
sys/compat/pecoff/pecoff_emul.c: revision 1.11
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.45
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.12
sys/sys/proc.h: revision 1.198
sys/compat/mach/mach_exec.c: revision 1.56
sys/compat/freebsd/freebsd_exec.c: revision 1.27
sys/arch/sparc64/include/vmparam.h: revision 1.27
sys/kern/kern_resource.c: revision 1.91
sys/compat/netbsd32/netbsd32_netbsd.c: revision 1.88
sys/compat/osf1/osf1_exec.c: revision 1.39
sys/compat/svr4_32/svr4_32_resource.c: revision 1.5
sys/compat/ultrix/ultrix_misc.c: revision 1.99
sys/compat/svr4_32/svr4_32_exec.h: revision 1.9
sys/kern/exec_elf32.c: revision 1.103
sys/compat/aoutm68k/aoutm68k_exec.c: revision 1.19
sys/compat/sunos32/sunos32_exec.c: revision 1.20
sys/compat/hpux/hpux_exec.c: revision 1.46
sys/compat/darwin/darwin_exec.c: revision 1.40
sys/kern/sysv_shm.c: revision 1.83
sys/uvm/uvm_extern.h: revision 1.99
sys/uvm/uvm_mmap.c: revision 1.89
sys/kern/kern_exec.c: revision 1.195
sys/compat/netbsd32/netbsd32.h: revision 1.31
sys/arch/sparc64/sparc64/svr4_32_machdep.c: revision 1.20
sys/compat/svr4/svr4_exec.c: revision 1.56
sys/compat/irix/irix_exec.c: revision 1.41
sys/compat/ibcs2/ibcs2_exec.c: revision 1.63
sys/compat/svr4_32/svr4_32_exec.c: revision 1.16
sys/arch/amd64/include/vmparam.h: revision 1.8
sys/compat/linux/common/linux_exec.c: revision 1.73
Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
that will return the default VM map address. The default function
is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
macro. This gives emulations control over the default map address,
and allows things to be mapped at the right address (in 32bit range)
for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2
Tested on amd64, compile-tested on sparc64.
 1.19.10.1 26-Mar-2005  yamt sync with head.
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.20.2.4 03-Sep-2007  yamt sync with head.
 1.20.2.3 26-Feb-2007  yamt sync with head.
 1.20.2.2 30-Dec-2006  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.24.22.1 22-Oct-2006  yamt sync with head
 1.24.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.24.20.1 18-Nov-2006  ad Sync with head.
 1.26.2.2 24-Mar-2007  yamt sync with head.
 1.26.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.27.8.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.27.6.1 11-Jul-2007  mjf Sync with head.
 1.27.4.1 10-Apr-2007  ad Sync with head.
 1.28.36.2 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.28.36.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.28.34.2 11-Aug-2010  yamt sync with head.
 1.28.34.1 04-May-2009  yamt sync with head.
 1.28.32.1 04-Jun-2008  yamt sync with head
 1.28.30.2 17-Jan-2009  mjf Sync with HEAD.
 1.28.30.1 02-Jun-2008  mjf Sync with HEAD.
 1.29.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.29.4.1 19-Oct-2008  haad Sync with HEAD.
 1.30.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.31.8.1 05-Mar-2011  rmind sync with head
 1.31.6.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.32.12.1 24-Feb-2012  mrg sync to -current.
 1.32.8.1 17-Apr-2012  yamt sync with head
 1.34.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.34.2.1 21-May-2018  pgoyette Sync with HEAD
 1.35.2.1 10-Jun-2019  christos Sync with HEAD
 1.10 19-Nov-2008  ad Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.9 29-May-2008  mrg branches: 1.9.4; 1.9.6;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.8 04-Dec-2007  dsl branches: 1.8.12; 1.8.14; 1.8.16; 1.8.18;
Remove all the __P
 1.7 11-Dec-2005  christos branches: 1.7.44; 1.7.46; 1.7.52; 1.7.56;
merge ktrace-lwp.
 1.6 29-Jun-2003  fvdl branches: 1.6.2; 1.6.18;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.5 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.4 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3 20-Sep-2001  thorpej Add sunos32_setregs(), thus making sunos32 compile again.
 1.2 08-Feb-2001  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
header is struct netbsd32_exec
 1.1 02-Feb-2001  mrg initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.2.8.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 23-Aug-2002  petrov lwpfication
 1.2.4.1 21-Sep-2001  nathanw Catch up to -current.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 08-Feb-2001  bouyer file sunos32_exec.h was added on branch thorpej_scsipi on 2001-02-11 19:14:31 +0000
 1.6.18.2 07-Dec-2007  yamt sync with head
 1.6.18.1 21-Jun-2006  yamt sync with head.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.7.56.1 08-Dec-2007  ad Sync with head.
 1.7.52.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.46.1 09-Jan-2008  matt sync with HEAD
 1.7.44.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.8.18.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.8.16.1 04-May-2009  yamt sync with head.
 1.8.14.1 04-Jun-2008  yamt sync with head
 1.8.12.2 17-Jan-2009  mjf Sync with HEAD.
 1.8.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.4.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.12 18-Oct-2015  maxv Make sure we have space for the aout header.
 1.11 29-May-2008  mrg branches: 1.11.42; 1.11.62;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.10 08-Dec-2007  dsl branches: 1.10.12; 1.10.14; 1.10.16; 1.10.18;
ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
 1.9 16-Mar-2007  dsl branches: 1.9.8; 1.9.10; 1.9.18;
remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers. Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
 1.8 11-Dec-2005  christos branches: 1.8.26; 1.8.30; 1.8.32; 1.8.34;
merge ktrace-lwp.
 1.7 29-Jun-2003  fvdl branches: 1.7.2; 1.7.18;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.6 29-Jun-2003  martin struct proc * -> struct lwp *
 1.5 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.4 29-Nov-2001  briggs SUNOS_M_NATIVE is now a macro that takes an arg, not a constant.
 1.3 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.2 30-May-2001  mrg branches: 1.2.2;
use _KERNEL_OPT.
 1.1 02-Feb-2001  mrg branches: 1.1.2; 1.1.4;
initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.1.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file sunos32_exec_aout.c was added on branch thorpej_scsipi on 2001-02-11 19:14:31 +0000
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.18.3 21-Jan-2008  yamt sync with head
 1.7.18.2 03-Sep-2007  yamt sync with head.
 1.7.18.1 21-Jun-2006  yamt sync with head.
 1.7.2.5 04-Feb-2005  skrll Adapt to branch.
 1.7.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.2 26-Aug-2004  skrll Adapt to branch.

sparc64 GENERIC compiles.
 1.7.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.8.34.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.8.32.1 11-Jul-2007  mjf Sync with head.
 1.8.30.1 10-Apr-2007  ad Sync with head.
 1.8.26.1 24-Mar-2007  yamt sync with head.
 1.9.18.1 26-Dec-2007  ad Sync with head.
 1.9.10.1 09-Jan-2008  matt sync with HEAD
 1.9.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.10.18.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.10.16.1 04-May-2009  yamt sync with head.
 1.10.14.1 04-Jun-2008  yamt sync with head
 1.10.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.62.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.11.42.1 03-Dec-2017  jdolecek update from HEAD
 1.36 07-Sep-2021  riastradh sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
 1.35 23-Apr-2019  msaitoh branches: 1.35.2;
KNF. No functional change.
 1.34 11-Dec-2015  mlelstv branches: 1.34.10; 1.34.18;
PR 50517 bad switch
 1.33 08-Dec-2015  christos Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead of
pointers.
 1.32 26-Sep-2015  christos rename sun ioctls
 1.31 05-Sep-2014  nakayama branches: 1.31.2;
Fix previous. There is no uap.
 1.30 05-Sep-2014  matt Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.
 1.29 29-May-2008  mrg branches: 1.29.42;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.28 21-Mar-2008  ad branches: 1.28.2; 1.28.4; 1.28.6;
Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
 1.27 05-Jan-2008  dsl branches: 1.27.6;
Use FILE_LOCK() and FILE_UNLOCK().
Attempt to fix all the code paths so that the 'fp' returned by fd_getfile()
isn't left locked, and is always unlocked (and ref-counted) before
doing anything that might sleep.
 1.26 20-Dec-2007  dsl Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.25 08-Dec-2007  dsl branches: 1.25.4;
ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
 1.24 04-Dec-2007  dsl Remove all the __P
 1.23 01-Jun-2007  hannken branches: 1.23.6; 1.23.8; 1.23.14; 1.23.16;
Fallout from last commit:

OSIOCGIFADDR -> OOSIOCGIFADDR
OSIOCGIFDSTADDR -> OOSIOCGIFDSTADDR
OSIOCGIFNETMASK -> OOSIOCGIFNETMASK

Sparc64 compiles again.
 1.22 29-May-2007  christos Add a sockaddr_storage member to "struct ifreq" maintaining backwards
compatibility with the older ioctls. This avoids stack smashing and
abuse of "struct sockaddr" when ioctls placed "struct sockaddr_foo's" that
were longer than "struct sockaddr".
XXX: Some of the emulations might be broken; I tried to add code for
them but I did not test them.
 1.21 12-May-2007  dsl Split the fcntl locking code out from its copyin/out.
Use to avoid all the stackgap stuff in compat code.
 1.20 16-Mar-2007  dsl remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers. Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
 1.19 04-Mar-2007  christos branches: 1.19.2; 1.19.4; 1.19.6;
fix fallout from caddr_t changes.
 1.18 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 09-Feb-2007  ad branches: 1.17.2;
Merge newlock2 to head.
 1.16 11-Dec-2005  christos branches: 1.16.20;
merge ktrace-lwp.
 1.15 31-May-2005  christos branches: 1.15.2;
- add const
- fix shadowed variables
 1.14 25-Apr-2004  matt Constify the speedtab arrays
 1.13 29-Jun-2003  fvdl branches: 1.13.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.12 29-Jun-2003  martin struct proc * -> struct lwp *
 1.11 21-Mar-2003  dsl Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)
 1.10 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.9 04-Jan-2003  wiz Spell output with two ts.
 1.8 16-Mar-2002  christos make the stackgap_{init,alloc} functions MP friendly (i.e. pass struct proc *
in, instead of using curproc). While there add an optional size argument to
stackgap_init.
 1.7 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.6 14-Jun-2001  thorpej branches: 1.6.2;
Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads. What we do is stick descriptors in the table, but
mark them as "larval". This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again. When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
 1.5 04-Jun-2001  mrg fix lint exposed by GCC 3.0 20010604 (prerelease).
 1.4 30-May-2001  mrg use _KERNEL_OPT.
 1.3 05-Feb-2001  mrg branches: 1.3.2; 1.3.4;
s/long/netbsd32_long/ in various places. call netbsd32_fcntl, not sys_fcntl.
 1.2 04-Feb-2001  mrg we don't #include ../sunos/sunos_ioctl.c anymore...sigh
 1.1 02-Feb-2001  mrg initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.3.4.6 07-Jan-2003  thorpej Sync with HEAD.
 1.3.4.5 23-Aug-2002  petrov lwpfication
 1.3.4.4 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.3.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.3.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 05-Feb-2001  bouyer file sunos32_ioctl.c was added on branch thorpej_scsipi on 2001-02-11 19:14:31 +0000
 1.6.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.2 26-Aug-2004  skrll Adapt to branch.

sparc64 GENERIC compiles.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.15.2.6 24-Mar-2008  yamt sync with head.
 1.15.2.5 21-Jan-2008  yamt sync with head
 1.15.2.4 07-Dec-2007  yamt sync with head
 1.15.2.3 03-Sep-2007  yamt sync with head.
 1.15.2.2 26-Feb-2007  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.16.20.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.17.2.3 17-May-2007  yamt sync with head.
 1.17.2.2 24-Mar-2007  yamt sync with head.
 1.17.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.6.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.19.4.1 11-Jul-2007  mjf Sync with head.
 1.19.2.3 09-Jun-2007  ad Sync with head.
 1.19.2.2 27-May-2007  ad Sync with head.
 1.19.2.1 10-Apr-2007  ad Sync with head.
 1.23.16.2 26-Dec-2007  ad Sync with head.
 1.23.16.1 08-Dec-2007  ad Sync with head.
 1.23.14.3 18-Feb-2008  mjf Sync with HEAD.
 1.23.14.2 27-Dec-2007  mjf Sync with HEAD.
 1.23.14.1 08-Dec-2007  mjf Sync with HEAD.
 1.23.8.1 09-Jan-2008  matt sync with HEAD
 1.23.6.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.25.4.2 08-Jan-2008  bouyer Sync with HEAD
 1.25.4.1 02-Jan-2008  bouyer Sync with HEAD
 1.27.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.27.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.28.6.3 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.28.6.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.28.6.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.28.4.1 04-May-2009  yamt sync with head.
 1.28.2.1 04-Jun-2008  yamt sync with head
 1.29.42.1 03-Dec-2017  jdolecek update from HEAD
 1.31.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.34.18.1 10-Jun-2019  christos Sync with HEAD
 1.34.10.1 21-Jun-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1836):

sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
sys/compat/sunos/sunos_misc.c: revision 1.177
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
sys/compat/common/kern_resource_43.c: revision 1.23
sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
sys/compat/common/vfs_syscalls_12.c: revision 1.38
sys/compat/ultrix/ultrix_misc.c: revision 1.126
sys/compat/common/kern_sig_43.c: revision 1.37
sys/compat/linux/common/linux_mtio.c: revision 1.8
sys/compat/freebsd/freebsd_misc.c: revision 1.34
sys/compat/linux/common/linux_olduname.c: revision 1.67
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
sys/compat/freebsd/freebsd_sched.c: revision 1.23
sys/compat/ossaudio/ossaudio.c: revision 1.84
sys/compat/sys/time_types.h: revision 1.6
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
sys/compat/linux/common/linux_file.c: revision 1.119
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
sys/compat/linux32/common/linux32_time.c: revision 1.38
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
sys/compat/linux/common/linux_misc.c: revision 1.252
sys/compat/linux/common/linux_hdio.c: revision 1.19
sys/compat/sunos/sunos_ioctl.c: revision 1.71
sys/compat/linux/common/linux_sched.c: revision 1.79
sys/compat/common/kern_info_43.c: revision 1.40
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
sys/compat/linux/common/linux_socket.c: revision 1.153
sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
sys/compat/common/vfs_syscalls_43.c: revision 1.68
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
sys/compat/common/kern_time_50.c: revision 1.37
sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
sys/compat/linux/common/linux_cdrom.c: revision 1.28
sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
sys/compat/common/kern_info_09.c: revision 1.22
sys/compat/linux32/common/linux32_resource.c: revision 1.12
sys/compat/linux/common/linux_oldolduname.c: revision 1.67
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
sys/compat/linux32/common/linux32_signal.c: revision 1.21
sys/compat/common/kern_sig_13.c: revision 1.22
sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
sys/compat/netbsd32/netbsd32_time.c: revision 1.56
sys/compat/linux/common/linux_signal.c: revision 1.84
sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
sys/compat/sunos32/sunos32_misc.c: revision 1.85
sys/compat/linux/common/linux_time.c: revision 1.40
sys/compat/linux/common/linux_fdio.c: revision 1.14
sys/compat/common/vfs_syscalls_30.c: revision 1.43

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
 1.35.2.1 03-Aug-2022  martin Pull up following revision(s), all via patch
(requested by riastradh in ticket #1487):

sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
sys/compat/sunos/sunos_misc.c: revision 1.177
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
sys/compat/common/kern_resource_43.c: revision 1.23
sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
sys/compat/common/vfs_syscalls_12.c: revision 1.38
sys/compat/ultrix/ultrix_misc.c: revision 1.126
sys/compat/common/kern_sig_43.c: revision 1.37
sys/compat/linux/common/linux_mtio.c: revision 1.8
sys/compat/freebsd/freebsd_misc.c: revision 1.34
sys/compat/freebsd/freebsd_machdep.c: revision 1.5
sys/compat/linux/common/linux_olduname.c: revision 1.67
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
sys/compat/freebsd/freebsd_sched.c: revision 1.23
sys/compat/ossaudio/ossaudio.c: revision 1.84
sys/compat/sys/time_types.h: revision 1.6
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
sys/compat/common/ieee80211_20.c: revision 1.7
sys/compat/linux/common/linux_file.c: revision 1.119
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
sys/compat/linux32/common/linux32_time.c: revision 1.38
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
sys/compat/linux/common/linux_misc.c: revision 1.252
sys/compat/linux/common/linux_hdio.c: revision 1.19
sys/compat/sunos/sunos_ioctl.c: revision 1.71
sys/compat/linux/common/linux_sched.c: revision 1.79
sys/compat/common/kern_info_43.c: revision 1.40
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
sys/compat/linux/common/linux_socket.c: revision 1.153
sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
sys/compat/common/vfs_syscalls_43.c: revision 1.68
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
sys/compat/common/kern_time_50.c: revision 1.37
sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
sys/compat/linux/common/linux_cdrom.c: revision 1.28
sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
sys/compat/common/kern_info_09.c: revision 1.22
sys/compat/linux32/common/linux32_resource.c: revision 1.12
sys/compat/linux/common/linux_oldolduname.c: revision 1.67
sys/compat/common/if_media_80.c: revision 1.4
sys/compat/linux/arch/alpha/linux_osf1.c: revision 1.5
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
sys/compat/linux32/common/linux32_signal.c: revision 1.21
sys/compat/common/kern_sig_13.c: revision 1.22
sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
sys/compat/netbsd32/netbsd32_time.c: revision 1.56
sys/compat/linux/common/linux_signal.c: revision 1.84
sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
sys/compat/sunos32/sunos32_misc.c: revision 1.85
sys/compat/linux/common/linux_time.c: revision 1.40
sys/compat/linux/common/linux_fdio.c: revision 1.14
sys/compat/common/vfs_syscalls_30.c: revision 1.43

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
 1.86 20-Jun-2023  riastradh compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

XXX pullup-8
XXX pullup-9
XXX pullup-10
 1.85 07-Sep-2021  riastradh branches: 1.85.4;
sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
 1.84 24-Jun-2020  jdolecek remove special handling for symbolic links for COMPAT_43 lstat, it's
not necessary; this removes the only places in kernel which did namei
LOOKUP with LOCKPARENT

fixes diagnostic KASSERT() in namei() code

Reported-by: syzbot+628382ecf1438e53d08d@syzkaller.appspotmail.com
 1.83 26-Oct-2019  christos use strlcpy() for the uts conversion, makes the code simpler and more readable.
 1.82 23-Sep-2019  christos make this compile again
 1.81 17-Sep-2019  christos Add a boolean argument to indicate if we have a path/true (execve) or an
fd/false (fexecve). This is needed to differentiate between them because
NULL/-1 can be readily passed from userland.
 1.80 17-Sep-2019  mrg pass new missing fd argument to execve1().

fixes sparc64 build.
 1.79 03-Sep-2018  riastradh branches: 1.79.4;
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.78 28-Jul-2017  riastradh branches: 1.78.2; 1.78.4;
Fail, don't panic, on bad dirents from file system.

Controllable via puffs from userland.

From Ilja Van Sprundel.
 1.77 28-Feb-2016  khorben branches: 1.77.10;
Add missing newline character in error message

This is related to kern/50469.
 1.76 23-Oct-2015  maxv Change do_sys_mount() so that it only takes as argument the type of the
drive instead of its associated vfsops. Makes it more friendly, and allows
compat binaries to autoload VFS modules if needed.

sent on tech-kern@, ok christos@
 1.75 05-Sep-2014  matt branches: 1.75.2;
Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.
 1.74 12-Feb-2012  matt branches: 1.74.2; 1.74.6; 1.74.8; 1.74.16; 1.74.22; 1.74.24; 1.74.28;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.73 19-Nov-2010  dholland branches: 1.73.8; 1.73.12;
Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
 1.72 24-Jun-2010  hannken Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
 1.71 03-Mar-2010  pooka branches: 1.71.2;
Remove nfssvc non-emulations I missed yesterday.
 1.70 03-Mar-2010  martin Add prototype and forward declarations to make the empty nfs stub compile.
 1.69 03-Mar-2010  he When implementing "read directory", when there are too many empty entries
in a row, and we need to try to read the next block, and have passed a
non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie
buffer before re-doing VOP_READDIR, so that we don't leak memory.
This fix is similar to nfs_serv.c revisions 1.115 + 1.124.

This should fix the long-standing problem observed by e.g. using Linux-
emulated programs to take backup of servers, which is one of the problems
which were reported in PR#42661.

Thanks to pooka@ for the hints for traversing the VOP* layer.
 1.68 02-Mar-2010  pooka remove nfssvc emulation (or non-emulation)
 1.67 29-Jun-2009  dholland branches: 1.67.2;
Convert 67 namei call sites to use namei_simple, in these functions:

check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
 1.66 16-May-2009  nakayama Follow pad to PAD change.
 1.65 11-Jan-2009  nakayama branches: 1.65.2;
Follow christos-time_t merge.
 1.64 19-Nov-2008  ad Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.63 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.62 07-Aug-2008  plunky branches: 1.62.2; 1.62.4; 1.62.8;
convert some [left behind] compat code to use new sockopt API
 1.61 24-Jun-2008  ad branches: 1.61.2;
Replace references to getsock/getvnode.
 1.60 29-May-2008  mrg branches: 1.60.2;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.59 21-Mar-2008  ad branches: 1.59.2; 1.59.4; 1.59.6;
Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
 1.58 05-Jan-2008  dsl branches: 1.58.6;
Use FILE_LOCK() and FILE_UNLOCK().
Attempt to fix all the code paths so that the 'fp' returned by fd_getfile()
isn't left locked, and is always unlocked (and ref-counted) before
doing anything that might sleep.
 1.57 28-Dec-2007  hannken maxfiles is now an u_int.
 1.56 20-Dec-2007  dsl Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.55 08-Dec-2007  pooka branches: 1.55.4;
Remove cn_lwp from struct componentname. curlwp should be used
from on. The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
 1.54 08-Dec-2007  dsl ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
 1.53 04-Dec-2007  dsl Remove all the __P
 1.52 27-Nov-2007  dogcow branches: 1.52.2;
more VFS_STATVFS(x,y,z) fallout; change them to VFS_STATVFS(x,y). (hi, pooka!)
 1.51 17-Jul-2007  christos branches: 1.51.6; 1.51.8; 1.51.14;
include <compat/sys/mount.h> for MFSNAMELEN.
 1.50 12-Jul-2007  dsl Change compat mount code to pass do_sys_mount() kernel resident buffers.
Possibly the standard nfs code needs teaching how to set the length and
address family in order to support non-netbsd sockaddr.
There are now no active stackgap() calls in the compat tree.
 1.49 12-May-2007  dsl Change interface to settimeofday1() so that it can also be used from
compat code in order to avoid the stackgap.
 1.48 22-Apr-2007  dsl Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
- which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
search for absolute pathnames in the emulation root, if that fails it will
retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
the real root is returned instead (matching the behaviour of emul_lookup,
but being a cheap comparison here) so that programs that scan "../.."
looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
 1.47 16-Mar-2007  dsl remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers. Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
 1.46 10-Mar-2007  dsl branches: 1.46.2; 1.46.4;
Update all the compat stuff to not use the 'stackgap' for processing
sys_stat() and friends, instead use do_sys_stat() and do_sys_fstat()
that write the answer into a kernel buffer (on stack) that can be
converted to the correct form and written the userspace.
I've test compiled a few kernels, and tested i386 netbsd1.6 ls.
Given I think I've fixed some bugs, it might be 50-50 with new ones.
 1.45 04-Mar-2007  christos branches: 1.45.2;
fix fallout from caddr_t changes.
 1.44 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.43 09-Feb-2007  ad branches: 1.43.2;
Merge newlock2 to head.
 1.42 14-Nov-2006  elad branches: 1.42.2;
Clean some KAUTH_GENERIC_ISSUSER usage in compat code.
 1.41 01-Sep-2006  matt branches: 1.41.2; 1.41.4;
When calling PTRACE from an LKM, use sysent[SYS_ptrace].sy_call in case
the sys_ptrace symbol isn't present.
 1.40 01-Sep-2006  mrg clean up ptrace changes: #include "opt_ptrace.h"
 1.39 23-Jul-2006  ad Use the LWP cached credentials where sane.
 1.38 26-Jun-2006  mrg version the socket(2) syscall. for compat30 socket, we use
EPROTONOSUPPORT instead of EAFNOSUPPORT.

from pavel@ with a little bit of clean up from myself.

XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.
 1.37 14-May-2006  elad branches: 1.37.4;
integrate kauth.
 1.36 01-Mar-2006  yamt branches: 1.36.2; 1.36.4; 1.36.6;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.35 24-Dec-2005  perry branches: 1.35.2; 1.35.4; 1.35.6;
__inline__ -> inline
 1.34 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.33 11-Dec-2005  christos merge ktrace-lwp.
 1.32 13-Jul-2005  cube Rework sunos32_execv{,e} after removal of netbsd32_execve2.

XXX COMPAT_SUNOS32 needs a SUNOS32PTR64() macro.
 1.31 31-May-2005  christos branches: 1.31.2;
- fix 32 -> 64 pointer casts properly.
- add const
- fix shadow
 1.30 19-Apr-2005  christos PR/29696: Joel Carnat: NetBSD freezes when accessing smbfs mounted FS with
firefox/linux due to compat getdents() call assumption that all filesystems
support cookies.
 1.29 26-Feb-2005  perry branches: 1.29.2;
nuke trailing whitespace
 1.28 17-Sep-2004  skrll branches: 1.28.4; 1.28.6;
There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
 1.27 25-Apr-2004  matt Constify a few read-only arrays/variables.
 1.26 22-Apr-2004  hannken Fix statfs->statvfs fallout.
 1.25 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.24 21-Oct-2003  kleink Don't use NULL in integer-type assignments/comparisons.
 1.23 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.22 29-Jun-2003  fvdl branches: 1.22.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.21 29-Jun-2003  martin struct proc * -> struct lwp *
 1.20 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.19 17-May-2003  nakayama Avoid strict-ailas warnings in gcc 3.3;
refer to change of sys/compat/netbsd32/netbsd32_netbsd.c r1.67 to r1.69.
 1.18 16-May-2003  itojun use strlcpy
[compat/svr4_32 should have bound check for SVR4_32_AUX_ARGSIZ]
 1.17 29-Jan-2003  atatat Cull unused variables. Sigh.

PS - Cross compilers are cool.
 1.16 28-Jan-2003  atatat No need to pick a "default address" for mmap in compat code, since we
merely call sys_mmap() at the end anyway, and that will pick the
address for us, if it's needed.

Likewise for checking if /dev/zero is being mapped.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.13 04-Jul-2002  thorpej Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.
 1.12 16-Mar-2002  christos branches: 1.12.4;
make the stackgap_{init,alloc} functions MP friendly (i.e. pass struct proc *
in, instead of using curproc). While there add an optional size argument to
stackgap_init.
 1.11 03-Jan-2002  mrg move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code. besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.
 1.10 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.9 14-Jun-2001  thorpej branches: 1.9.2; 1.9.4;
Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads. What we do is stick descriptors in the table, but
mark them as "larval". This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again. When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
 1.8 30-May-2001  mrg use _KERNEL_OPT.
 1.7 07-Feb-2001  mrg branches: 1.7.2; 1.7.4;
use the standard alt check for creat.
 1.6 06-Feb-2001  mrg use struct sunos32_dirent. now getwd() works.
 1.5 06-Feb-2001  mrg stat/lstat must use netbsd32_stat43 not stat43.
 1.4 05-Feb-2001  mrg make sunos32_sys_stime() & sunos32_sys_sigvec() work.
 1.3 04-Feb-2001  mrg clean up sunos32_sys_mmap(), modelling it more like netbsd32_mmap()
 1.2 02-Feb-2001  mrg implement stat & fstat properly.
 1.1 02-Feb-2001  mrg initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.7.4.9 17-Sep-2002  nathanw Catch up to -current.
 1.7.4.8 23-Aug-2002  petrov lwpfication
 1.7.4.7 01-Aug-2002  nathanw Catch up to -current.
 1.7.4.6 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.7.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.7.4.3 11-Jan-2002  nathanw More catchup.
 1.7.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.7.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.7.2.1 07-Feb-2001  bouyer file sunos32_misc.c was added on branch thorpej_scsipi on 2001-02-11 19:14:32 +0000
 1.9.4.1 26-Sep-2001  fvdl * add a VCLONED vnode flag that indicates a vnode representing a cloned
device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
to the specinfo of a cloned vnode. could possibly redirect getattr to
the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
original device, and reassociates it with the specified dev_t. to be
used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
when debugging race conditions that still exist wrt. locking and
revoking vnodes.
* make the locking state of a vnode consistent when passed to
d_open and d_close (unlocked). locked would be better, but has
some deadlock issues
 1.9.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.4.2 15-Jul-2002  gehenna catch up with -current.
 1.12.4.1 16-May-2002  gehenna Get rid of iszerodev. Use the 'zerodev' (dev_t for /dev/zero).
 1.22.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.22.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.22.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.22.2.3 26-Aug-2004  skrll Adapt to branch.

sparc64 GENERIC compiles.
 1.22.2.2 03-Aug-2004  skrll Sync with HEAD
 1.22.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.28.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.28.4.1 29-Apr-2005  kent sync with -current
 1.29.2.1 01-Oct-2005  tron Pull up following revision(s) (requested by christos in ticket #838):
sys/compat/svr4/svr4_misc.c: revision 1.112
sys/compat/ibcs2/ibcs2_misc.c: revision 1.74
sys/compat/linux/common/linux_misc.c: revision 1.136
sys/compat/irix/irix_dirent.c: revision 1.14
sys/compat/sunos/sunos_misc.c: revision 1.132
sys/compat/svr4_32/svr4_32_misc.c: revision 1.31
sys/compat/sunos32/sunos32_misc.c: revision 1.30
sys/compat/linux/common/linux_file64.c: revision 1.26
PR/29696: Joel Carnat: NetBSD freezes when accessing smbfs mounted FS with
firefox/linux due to compat getdents() call assumption that all filesystems
support cookies.
 1.31.2.7 24-Mar-2008  yamt sync with head.
 1.31.2.6 21-Jan-2008  yamt sync with head
 1.31.2.5 07-Dec-2007  yamt sync with head
 1.31.2.4 03-Sep-2007  yamt sync with head.
 1.31.2.3 26-Feb-2007  yamt sync with head.
 1.31.2.2 30-Dec-2006  yamt sync with head.
 1.31.2.1 21-Jun-2006  yamt sync with head.
 1.35.6.2 01-Jun-2006  kardel Sync with head.
 1.35.6.1 22-Apr-2006  simonb Sync with head.
 1.35.4.1 09-Sep-2006  rpaulo sync with head
 1.35.2.1 18-Feb-2006  yamt adapt the rest of MI code.
 1.36.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.36.4.3 12-May-2006  elad adapt to kauth kpi, include sys/kauth.h where needed..
 1.36.4.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.36.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.36.2.3 03-Sep-2006  yamt sync with head.
 1.36.2.2 11-Aug-2006  yamt sync with head
 1.36.2.1 24-May-2006  yamt sync with head.
 1.37.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.41.4.1 10-Dec-2006  yamt sync with head.
 1.41.2.3 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.41.2.2 11-Jan-2007  ad Checkpoint work in progress.
 1.41.2.1 18-Nov-2006  ad Sync with head.
 1.42.2.1 12-Jun-2010  riz Pull up following revision(s) (requested by he in ticket #1387):
sys/compat/svr4/svr4_misc.c: revision 1.149
sys/compat/linux/common/linux_misc.c: revision 1.214
sys/compat/common/vfs_syscalls_30.c: revision 1.31
sys/compat/sunos/sunos_misc.c: revision 1.166
sys/compat/linux/common/linux_file64.c: revision 1.50
sys/compat/svr4_32/svr4_32_misc.c: revision 1.68
sys/compat/ibcs2/ibcs2_misc.c: revision 1.110
sys/compat/linux32/common/linux32_dirent.c: revision 1.10
sys/compat/sunos32/sunos32_misc.c: revision 1.69
sys/compat/irix/irix_dirent.c: revision 1.24
sys/compat/osf1/osf1_file.c: revision 1.38
When implementing "read directory", when there are too many empty entries
in a row, and we need to try to read the next block, and have passed a
non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie
buffer before re-doing VOP_READDIR, so that we don't leak memory.
This fix is similar to nfs_serv.c revisions 1.115 + 1.124.
This should fix the long-standing problem observed by e.g. using Linux-
emulated programs to take backup of servers, which is one of the problems
which were reported in PR#42661.
Thanks to pooka@ for the hints for traversing the VOP* layer.
 1.43.2.4 17-May-2007  yamt sync with head.
 1.43.2.3 07-May-2007  yamt sync with head.
 1.43.2.2 24-Mar-2007  yamt sync with head.
 1.43.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.45.2.5 20-Aug-2007  ad Sync with HEAD.
 1.45.2.4 15-Jul-2007  ad Sync with head.
 1.45.2.3 27-May-2007  ad Sync with head.
 1.45.2.2 10-Apr-2007  ad Sync with head.
 1.45.2.1 13-Mar-2007  ad Sync with head.
 1.46.4.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.46.2.1 11-Jul-2007  mjf Sync with head.
 1.51.14.3 18-Feb-2008  mjf Sync with HEAD.
 1.51.14.2 27-Dec-2007  mjf Sync with HEAD.
 1.51.14.1 08-Dec-2007  mjf Sync with HEAD.
 1.51.8.1 09-Jan-2008  matt sync with HEAD
 1.51.6.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.51.6.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.52.2.2 26-Dec-2007  ad Sync with head.
 1.52.2.1 08-Dec-2007  ad Sync with head.
 1.55.4.2 08-Jan-2008  bouyer Sync with HEAD
 1.55.4.1 02-Jan-2008  bouyer Sync with HEAD
 1.58.6.5 17-Jan-2009  mjf Sync with HEAD.
 1.58.6.4 28-Sep-2008  mjf Sync with HEAD.
 1.58.6.3 29-Jun-2008  mjf Sync with HEAD.
 1.58.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.58.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.59.6.4 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.59.6.3 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.59.6.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.59.6.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.59.4.5 11-Aug-2010  yamt sync with head.
 1.59.4.4 11-Mar-2010  yamt sync with head
 1.59.4.3 18-Jul-2009  yamt sync with head.
 1.59.4.2 20-Jun-2009  yamt sync with head
 1.59.4.1 04-May-2009  yamt sync with head.
 1.59.2.1 04-Jun-2008  yamt sync with head
 1.60.2.1 27-Jun-2008  simonb Sync with head.
 1.61.2.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.61.2.1 19-Oct-2008  haad Sync with HEAD.
 1.62.8.1 21-Apr-2010  matt sync to netbsd-5
 1.62.4.1 17-Mar-2010  snj Pull up following revision(s) (requested by he in ticket #1323):
sys/compat/common/vfs_syscalls_30.c: revision 1.31
sys/compat/ibcs2/ibcs2_misc.c: revision 1.110
sys/compat/irix/irix_dirent.c: revision 1.24
sys/compat/linux/common/linux_file64.c: revision 1.50
sys/compat/linux/common/linux_misc.c: revision 1.214
sys/compat/linux32/common/linux32_dirent.c: revision 1.10
sys/compat/sunos/sunos_misc.c: revision 1.166
sys/compat/sunos32/sunos32_misc.c: revision 1.69
sys/compat/svr4/svr4_misc.c: revision 1.149
sys/compat/svr4_32/svr4_32_misc.c: revision 1.68
When implementing "read directory", when there are too many empty entries
in a row, and we need to try to read the next block, and have passed a
non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie
buffer before re-doing VOP_READDIR, so that we don't leak memory.
This fix is similar to nfs_serv.c revisions 1.115 + 1.124.
This should fix the long-standing problem observed by e.g. using Linux-
emulated programs to take backup of servers, which is one of the problems
which were reported in PR#42661.
Thanks to pooka@ for the hints for traversing the VOP* layer.
 1.62.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.65.2.1 23-Jul-2009  jym Sync with HEAD.
 1.67.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.67.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.71.2.2 05-Mar-2011  rmind sync with head
 1.71.2.1 03-Jul-2010  rmind sync with head
 1.73.12.1 18-Feb-2012  mrg merge to -current.
 1.73.8.1 17-Apr-2012  yamt sync with head
 1.74.28.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1479):
sys/compat/common/vfs_syscalls_12.c: revision 1.34
sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2
sys/compat/svr4_32/svr4_32_misc.c: revision 1.78
sys/compat/sunos32/sunos32_misc.c: revision 1.78
sys/compat/linux/common/linux_misc.c: revision 1.239
sys/compat/osf1/osf1_file.c: revision 1.44
sys/compat/common/vfs_syscalls_43.c: revision 1.60
sys/compat/svr4/svr4_misc.c: revision 1.158
sys/compat/ibcs2/ibcs2_misc.c: revision 1.114
sys/compat/linux/common/linux_file64.c: revision 1.59
sys/compat/linux32/common/linux32_dirent.c: revision 1.18
sys/compat/sunos/sunos_misc.c: revision 1.171
Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
 1.74.24.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1479):
sys/compat/common/vfs_syscalls_12.c: revision 1.34
sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2
sys/compat/svr4_32/svr4_32_misc.c: revision 1.78
sys/compat/sunos32/sunos32_misc.c: revision 1.78
sys/compat/linux/common/linux_misc.c: revision 1.239
sys/compat/osf1/osf1_file.c: revision 1.44
sys/compat/common/vfs_syscalls_43.c: revision 1.60
sys/compat/svr4/svr4_misc.c: revision 1.158
sys/compat/ibcs2/ibcs2_misc.c: revision 1.114
sys/compat/linux/common/linux_file64.c: revision 1.59
sys/compat/linux32/common/linux32_dirent.c: revision 1.18
sys/compat/sunos/sunos_misc.c: revision 1.171
Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
 1.74.22.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1479):
sys/compat/common/vfs_syscalls_12.c: revision 1.34
sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2
sys/compat/svr4_32/svr4_32_misc.c: revision 1.78
sys/compat/sunos32/sunos32_misc.c: revision 1.78
sys/compat/linux/common/linux_misc.c: revision 1.239
sys/compat/osf1/osf1_file.c: revision 1.44
sys/compat/common/vfs_syscalls_43.c: revision 1.60
sys/compat/svr4/svr4_misc.c: revision 1.158
sys/compat/ibcs2/ibcs2_misc.c: revision 1.114
sys/compat/linux/common/linux_file64.c: revision 1.59
sys/compat/linux32/common/linux32_dirent.c: revision 1.18
sys/compat/sunos/sunos_misc.c: revision 1.171
Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
 1.74.16.1 19-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1483):
sys/compat/common/vfs_syscalls_12.c: revision 1.34
sys/compat/svr4_32/svr4_32_misc.c: revision 1.78
sys/compat/sunos32/sunos32_misc.c: revision 1.78
sys/compat/linux/common/linux_misc.c: revision 1.239
sys/compat/osf1/osf1_file.c: revision 1.44
sys/compat/common/vfs_syscalls_43.c: revision 1.60
sys/compat/svr4/svr4_misc.c: revision 1.158
sys/compat/ibcs2/ibcs2_misc.c: revision 1.114
sys/compat/linux/common/linux_file64.c: revision 1.59
sys/compat/linux32/common/linux32_dirent.c: revision 1.18
sys/compat/sunos/sunos_misc.c: revision 1.171
Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
 1.74.8.1 19-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1483):
sys/compat/common/vfs_syscalls_12.c: revision 1.34
sys/compat/svr4_32/svr4_32_misc.c: revision 1.78
sys/compat/sunos32/sunos32_misc.c: revision 1.78
sys/compat/linux/common/linux_misc.c: revision 1.239
sys/compat/osf1/osf1_file.c: revision 1.44
sys/compat/common/vfs_syscalls_43.c: revision 1.60
sys/compat/svr4/svr4_misc.c: revision 1.158
sys/compat/ibcs2/ibcs2_misc.c: revision 1.114
sys/compat/linux/common/linux_file64.c: revision 1.59
sys/compat/linux32/common/linux32_dirent.c: revision 1.18
sys/compat/sunos/sunos_misc.c: revision 1.171
Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
 1.74.6.1 03-Dec-2017  jdolecek update from HEAD
 1.74.2.1 19-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1483):
sys/compat/common/vfs_syscalls_12.c: revision 1.34
sys/compat/svr4_32/svr4_32_misc.c: revision 1.78
sys/compat/sunos32/sunos32_misc.c: revision 1.78
sys/compat/linux/common/linux_misc.c: revision 1.239
sys/compat/osf1/osf1_file.c: revision 1.44
sys/compat/common/vfs_syscalls_43.c: revision 1.60
sys/compat/svr4/svr4_misc.c: revision 1.158
sys/compat/ibcs2/ibcs2_misc.c: revision 1.114
sys/compat/linux/common/linux_file64.c: revision 1.59
sys/compat/linux32/common/linux32_dirent.c: revision 1.18
sys/compat/sunos/sunos_misc.c: revision 1.171
Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
 1.75.2.3 28-Aug-2017  skrll Sync with HEAD
 1.75.2.2 19-Mar-2016  skrll Sync with HEAD
 1.75.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.77.10.3 21-Jun-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1841):

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.
 1.77.10.2 21-Jun-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1836):

sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
sys/compat/sunos/sunos_misc.c: revision 1.177
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
sys/compat/common/kern_resource_43.c: revision 1.23
sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
sys/compat/common/vfs_syscalls_12.c: revision 1.38
sys/compat/ultrix/ultrix_misc.c: revision 1.126
sys/compat/common/kern_sig_43.c: revision 1.37
sys/compat/linux/common/linux_mtio.c: revision 1.8
sys/compat/freebsd/freebsd_misc.c: revision 1.34
sys/compat/linux/common/linux_olduname.c: revision 1.67
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
sys/compat/freebsd/freebsd_sched.c: revision 1.23
sys/compat/ossaudio/ossaudio.c: revision 1.84
sys/compat/sys/time_types.h: revision 1.6
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
sys/compat/linux/common/linux_file.c: revision 1.119
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
sys/compat/linux32/common/linux32_time.c: revision 1.38
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
sys/compat/linux/common/linux_misc.c: revision 1.252
sys/compat/linux/common/linux_hdio.c: revision 1.19
sys/compat/sunos/sunos_ioctl.c: revision 1.71
sys/compat/linux/common/linux_sched.c: revision 1.79
sys/compat/common/kern_info_43.c: revision 1.40
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
sys/compat/linux/common/linux_socket.c: revision 1.153
sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
sys/compat/common/vfs_syscalls_43.c: revision 1.68
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
sys/compat/common/kern_time_50.c: revision 1.37
sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
sys/compat/linux/common/linux_cdrom.c: revision 1.28
sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
sys/compat/common/kern_info_09.c: revision 1.22
sys/compat/linux32/common/linux32_resource.c: revision 1.12
sys/compat/linux/common/linux_oldolduname.c: revision 1.67
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
sys/compat/linux32/common/linux32_signal.c: revision 1.21
sys/compat/common/kern_sig_13.c: revision 1.22
sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
sys/compat/netbsd32/netbsd32_time.c: revision 1.56
sys/compat/linux/common/linux_signal.c: revision 1.84
sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
sys/compat/sunos32/sunos32_misc.c: revision 1.85
sys/compat/linux/common/linux_time.c: revision 1.40
sys/compat/linux/common/linux_fdio.c: revision 1.14
sys/compat/common/vfs_syscalls_30.c: revision 1.43

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
 1.77.10.1 09-Aug-2017  snj Pull up following revision(s) (requested by spz in ticket #193):
sys/compat/common/vfs_syscalls_12.c: revision 1.34
sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2
sys/compat/svr4_32/svr4_32_misc.c: revision 1.78
sys/compat/sunos32/sunos32_misc.c: revision 1.78
sys/compat/linux/common/linux_misc.c: revision 1.239
sys/compat/osf1/osf1_file.c: revision 1.44
sys/compat/common/vfs_syscalls_43.c: revision 1.60
sys/compat/svr4/svr4_misc.c: revision 1.158
sys/compat/ibcs2/ibcs2_misc.c: revision 1.114
sys/compat/linux/common/linux_file64.c: revision 1.59
sys/compat/linux32/common/linux32_dirent.c: revision 1.18
sys/compat/sunos/sunos_misc.c: revision 1.171
Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
 1.78.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.78.4.1 10-Jun-2019  christos Sync with HEAD
 1.78.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.79.4.2 21-Jun-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1650):

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.
 1.79.4.1 03-Aug-2022  martin Pull up following revision(s), all via patch
(requested by riastradh in ticket #1487):

sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
sys/compat/sunos/sunos_misc.c: revision 1.177
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
sys/compat/common/kern_resource_43.c: revision 1.23
sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
sys/compat/common/vfs_syscalls_12.c: revision 1.38
sys/compat/ultrix/ultrix_misc.c: revision 1.126
sys/compat/common/kern_sig_43.c: revision 1.37
sys/compat/linux/common/linux_mtio.c: revision 1.8
sys/compat/freebsd/freebsd_misc.c: revision 1.34
sys/compat/freebsd/freebsd_machdep.c: revision 1.5
sys/compat/linux/common/linux_olduname.c: revision 1.67
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
sys/compat/freebsd/freebsd_sched.c: revision 1.23
sys/compat/ossaudio/ossaudio.c: revision 1.84
sys/compat/sys/time_types.h: revision 1.6
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
sys/compat/common/ieee80211_20.c: revision 1.7
sys/compat/linux/common/linux_file.c: revision 1.119
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
sys/compat/linux32/common/linux32_time.c: revision 1.38
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
sys/compat/linux/common/linux_misc.c: revision 1.252
sys/compat/linux/common/linux_hdio.c: revision 1.19
sys/compat/sunos/sunos_ioctl.c: revision 1.71
sys/compat/linux/common/linux_sched.c: revision 1.79
sys/compat/common/kern_info_43.c: revision 1.40
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
sys/compat/linux/common/linux_socket.c: revision 1.153
sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
sys/compat/common/vfs_syscalls_43.c: revision 1.68
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
sys/compat/common/kern_time_50.c: revision 1.37
sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
sys/compat/linux/common/linux_cdrom.c: revision 1.28
sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
sys/compat/common/kern_info_09.c: revision 1.22
sys/compat/linux32/common/linux32_resource.c: revision 1.12
sys/compat/linux/common/linux_oldolduname.c: revision 1.67
sys/compat/common/if_media_80.c: revision 1.4
sys/compat/linux/arch/alpha/linux_osf1.c: revision 1.5
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
sys/compat/linux32/common/linux32_signal.c: revision 1.21
sys/compat/common/kern_sig_13.c: revision 1.22
sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
sys/compat/netbsd32/netbsd32_time.c: revision 1.56
sys/compat/linux/common/linux_signal.c: revision 1.84
sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
sys/compat/sunos32/sunos32_misc.c: revision 1.85
sys/compat/linux/common/linux_time.c: revision 1.40
sys/compat/linux/common/linux_fdio.c: revision 1.14
sys/compat/common/vfs_syscalls_30.c: revision 1.43

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
 1.85.4.1 21-Jun-2023  martin Pull up following revision(s) (requested by riastradh in ticket #204):

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.
 1.7 12-Dec-2019  pgoyette Rather than keeping a separate mutex, condvar, and pserialize for each
module hook, we can share a common set of synchronization structures.
This cuts the amount of cacheline_aligned data for these structures by
50%.

Note that we still have a per-hook localcount, since we need to count
individual references.

As discussed with riastradh@

Welcome to 9.99.22 !
 1.6 01-Mar-2019  pgoyette Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.
 1.5 05-Feb-2019  pgoyette The sunos and sunos32 modules require compat_09, not compat (the
latter no longer exists).

Should fix "missing prerequisite" errors seen during qemu boot
of sparc64's MODULAR kernel.
 1.4 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.3 07-Mar-2014  christos branches: 1.3.28; 1.3.30;
c99 initializers for struct execsw
 1.2 19-Sep-2013  christos exec modules need to be of the exec kind
 1.1 19-Nov-2008  ad branches: 1.1.4; 1.1.6; 1.1.8; 1.1.12; 1.1.24; 1.1.34; 1.1.38;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.1.38.1 18-May-2014  rmind sync with head
 1.1.34.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 19-Nov-2008  yamt file sunos32_mod.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:27 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 19-Nov-2008  skrll file sunos32_mod.c was added on branch nick-hppapmap on 2009-01-19 13:17:40 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 19-Nov-2008  mjf file sunos32_mod.c was added on branch mjf-devfs2 on 2009-01-17 13:28:48 +0000
 1.1.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1 19-Nov-2008  haad file sunos32_mod.c was added on branch haad-dm on 2008-12-13 01:14:04 +0000
 1.3.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.30.1 10-Jun-2019  christos Sync with HEAD
 1.3.28.3 23-Jan-2019  pgoyette Convert the macros for setting and unsetting a hook to generate
in-line code rather than using an intermediary hook##set routine.
Hooks are set and unset only in one place, so the intermediary
routine provides no benefit. IMHO using the macro at the point-
of-call is more readable than using it elsewhere in the code and
then calling the generated intermediary routine (for which you
won't even find its declaration or definition unless you remember
to search for the HOOK_SET macro instead).

NFC intended, will verify with a bulk build and an atf test run.
 1.3.28.2 18-Oct-2018  pgoyette Add a few more references to the (currently always but not forever)
built-in compat_util module
 1.3.28.1 02-Oct-2018  pgoyette Use a hook callback to allow sparc fpu code to determine if a process
is running under sunos emulation (in which case, fpu cleanup uses a
different set of fpu_codes[]).
 1.38 10-Aug-2018  pgoyette Regen
 1.37 06-Jan-2018  kamil branches: 1.37.2; 1.37.4;
Revert vadvise(2) removal

This system call was used in legacy Lisp code, that was inherited to modern
age and still compiled against supported compat layers (e.g. in clisp,
oaklisp, Franz Lisp).

It used to instruct the kernel about paging policy (G/C aware, flush etc).

Newly compiled code (assuming that it will detect vadvise()) will use the
libc stub for vadvise(). The headers for this interface are gone.

vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix,
sunos or aout68k ABI, don't bother with this.

Requested by <mrg>
 1.36 19-Dec-2017  kamil compat/sunos32: Drop SYS_vadvise

The (o)vadvise syscall is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
 1.35 19-Dec-2017  kamil compat/sunos32: Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
 1.34 19-Dec-2017  kamil compat sunos32: Drop the sstk(2) syscall

sstk(2) has never been implemented by the NetBSD kernel.

Sponsored by <The NetBSD Foundation>
 1.33 10-May-2017  riastradh regen
 1.32 16-Jan-2017  christos branches: 1.32.4;
regen
 1.31 13-Jan-2017  christos branches: 1.31.2;
regen
 1.30 24-Sep-2015  christos branches: 1.30.2;
regen
 1.29 07-Mar-2015  christos regen
 1.28 07-Nov-2013  njoly branches: 1.28.6;
Regen for dup/dup2/dup3 argument types fix.
 1.27 02-Mar-2010  pooka branches: 1.27.10; 1.27.20; 1.27.24;
regen:
- remove nfssvc / fs_nfs.h / #ifdef NFS
- make getfh unconditional
 1.26 14-Dec-2009  matt branches: 1.26.2;
Regen (new makesyscalls.sh)
 1.25 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.24 13-Jan-2009  pooka regen
 1.23 11-Jan-2009  nakayama Regen for following christos-time_t merge.
 1.22 19-Nov-2008  ad Regen.
 1.21 20-Dec-2007  dsl branches: 1.21.6; 1.21.10; 1.21.16; 1.21.18;
regen
 1.20 04-Mar-2007  christos branches: 1.20.16; 1.20.24; 1.20.28;
fix fallout from caddr_t changes.
 1.19 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.18 13-Jul-2006  pavel branches: 1.18.10;
regen
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.8;
merge ktrace-lwp.
 1.16 27-Sep-2005  chs regen
 1.15 26-Feb-2005  perry branches: 1.15.4;
regen
 1.14 26-Feb-2005  perry regen
 1.13 26-Oct-2003  christos branches: 1.13.8; 1.13.10;
Regen
 1.12 18-Jan-2003  thorpej branches: 1.12.2;
Regen for correct RCS ID.
 1.11 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.10 01-Nov-2002  jdolecek set nsysent to 256
 1.9 29-Apr-2002  mrg regenerate.
 1.8 03-Jan-2002  mrg regen
 1.7 03-Jan-2002  mrg move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code. besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.
 1.6 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.5 30-May-2001  mrg branches: 1.5.2;
use _KERNEL_OPT.
 1.4 06-Feb-2001  mrg branches: 1.4.2; 1.4.4;
regen
 1.3 05-Feb-2001  mrg regen
 1.2 04-Feb-2001  mrg regen
 1.1 02-Feb-2001  mrg generate.
 1.4.4.6 11-Nov-2002  nathanw Catch up to -current
 1.4.4.5 29-May-2002  nathanw Regen.
 1.4.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.3 11-Jan-2002  nathanw More catchup.
 1.4.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 06-Feb-2001  bouyer file sunos32_syscall.h was added on branch thorpej_scsipi on 2001-02-11 19:14:32 +0000
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.15.4.4 21-Jan-2008  yamt sync with head
 1.15.4.3 03-Sep-2007  yamt sync with head.
 1.15.4.2 30-Dec-2006  yamt sync with head.
 1.15.4.1 21-Jun-2006  yamt sync with head.
 1.17.8.1 11-Aug-2006  yamt sync with head
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.18.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.20.28.1 02-Jan-2008  bouyer Sync with HEAD
 1.20.24.1 26-Dec-2007  ad Sync with head.
 1.20.16.1 09-Jan-2008  matt sync with HEAD
 1.21.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.21.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.21.10.2 11-Mar-2010  yamt sync with head
 1.21.10.1 04-May-2009  yamt sync with head.
 1.21.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.26.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.27.24.1 18-May-2014  rmind sync with head
 1.27.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.10.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.28.6.1 06-Apr-2015  skrll Sync with HEAD
 1.30.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.31.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.32.4.1 11-May-2017  pgoyette Sync with HEAD
 1.37.4.1 10-Jun-2019  christos Sync with HEAD
 1.37.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.37 10-Aug-2018  pgoyette Regen
 1.36 06-Jan-2018  kamil branches: 1.36.2; 1.36.4;
Revert vadvise(2) removal

This system call was used in legacy Lisp code, that was inherited to modern
age and still compiled against supported compat layers (e.g. in clisp,
oaklisp, Franz Lisp).

It used to instruct the kernel about paging policy (G/C aware, flush etc).

Newly compiled code (assuming that it will detect vadvise()) will use the
libc stub for vadvise(). The headers for this interface are gone.

vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix,
sunos or aout68k ABI, don't bother with this.

Requested by <mrg>
 1.35 19-Dec-2017  kamil compat/sunos32: Drop SYS_vadvise

The (o)vadvise syscall is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
 1.34 19-Dec-2017  kamil compat/sunos32: Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
 1.33 19-Dec-2017  kamil compat sunos32: Drop the sstk(2) syscall

sstk(2) has never been implemented by the NetBSD kernel.

Sponsored by <The NetBSD Foundation>
 1.32 10-May-2017  riastradh regen
 1.31 16-Jan-2017  christos branches: 1.31.4;
regen
 1.30 13-Jan-2017  christos branches: 1.30.2;
regen
 1.29 24-Sep-2015  christos branches: 1.29.2;
regen
 1.28 07-Mar-2015  christos regen
 1.27 07-Nov-2013  njoly branches: 1.27.6;
Regen for dup/dup2/dup3 argument types fix.
 1.26 02-Mar-2010  pooka branches: 1.26.10; 1.26.20; 1.26.24;
regen:
- remove nfssvc / fs_nfs.h / #ifdef NFS
- make getfh unconditional
 1.25 14-Dec-2009  matt branches: 1.25.2;
Regen (new makesyscalls.sh)
 1.24 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.23 13-Jan-2009  pooka regen
 1.22 11-Jan-2009  nakayama Regen for following christos-time_t merge.
 1.21 19-Nov-2008  ad Regen.
 1.20 20-Dec-2007  dsl branches: 1.20.6; 1.20.10; 1.20.16; 1.20.18;
regen
 1.19 04-Mar-2007  christos branches: 1.19.16; 1.19.24; 1.19.28;
fix fallout from caddr_t changes.
 1.18 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 13-Jul-2006  pavel branches: 1.17.10;
regen
 1.16 11-Dec-2005  christos branches: 1.16.4; 1.16.8;
merge ktrace-lwp.
 1.15 27-Sep-2005  chs regen
 1.14 26-Feb-2005  perry branches: 1.14.4;
regen
 1.13 26-Feb-2005  perry regen
 1.12 26-Oct-2003  christos branches: 1.12.8; 1.12.10;
Regen
 1.11 18-Jan-2003  thorpej branches: 1.11.2;
Regen for correct RCS ID.
 1.10 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.9 29-Apr-2002  mrg regenerate.
 1.8 03-Jan-2002  mrg regen
 1.7 03-Jan-2002  mrg move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code. besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.
 1.6 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.5 30-May-2001  mrg branches: 1.5.2;
use _KERNEL_OPT.
 1.4 06-Feb-2001  mrg branches: 1.4.2; 1.4.4;
regen
 1.3 05-Feb-2001  mrg regen
 1.2 04-Feb-2001  mrg regen
 1.1 02-Feb-2001  mrg generate.
 1.4.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.5 29-May-2002  nathanw Regen.
 1.4.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.3 11-Jan-2002  nathanw More catchup.
 1.4.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 06-Feb-2001  bouyer file sunos32_syscallargs.h was added on branch thorpej_scsipi on 2001-02-11 19:14:33 +0000
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.14.4.4 21-Jan-2008  yamt sync with head
 1.14.4.3 03-Sep-2007  yamt sync with head.
 1.14.4.2 30-Dec-2006  yamt sync with head.
 1.14.4.1 21-Jun-2006  yamt sync with head.
 1.16.8.1 11-Aug-2006  yamt sync with head
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.17.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.28.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.24.1 26-Dec-2007  ad Sync with head.
 1.19.16.1 09-Jan-2008  matt sync with HEAD
 1.20.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.10.2 11-Mar-2010  yamt sync with head
 1.20.10.1 04-May-2009  yamt sync with head.
 1.20.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.25.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.26.24.1 18-May-2014  rmind sync with head
 1.26.20.2 03-Dec-2017  jdolecek update from HEAD
 1.26.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.10.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.6.2 28-Aug-2017  skrll Sync with HEAD
 1.27.6.1 06-Apr-2015  skrll Sync with HEAD
 1.29.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.30.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.31.4.1 11-May-2017  pgoyette Sync with HEAD
 1.36.4.1 10-Jun-2019  christos Sync with HEAD
 1.36.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.37 10-Aug-2018  pgoyette Regen
 1.36 06-Jan-2018  kamil branches: 1.36.2; 1.36.4;
Revert vadvise(2) removal

This system call was used in legacy Lisp code, that was inherited to modern
age and still compiled against supported compat layers (e.g. in clisp,
oaklisp, Franz Lisp).

It used to instruct the kernel about paging policy (G/C aware, flush etc).

Newly compiled code (assuming that it will detect vadvise()) will use the
libc stub for vadvise(). The headers for this interface are gone.

vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix,
sunos or aout68k ABI, don't bother with this.

Requested by <mrg>
 1.35 19-Dec-2017  kamil compat/sunos32: Drop SYS_vadvise

The (o)vadvise syscall is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
 1.34 19-Dec-2017  kamil compat/sunos32: Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
 1.33 19-Dec-2017  kamil compat sunos32: Drop the sstk(2) syscall

sstk(2) has never been implemented by the NetBSD kernel.

Sponsored by <The NetBSD Foundation>
 1.32 10-May-2017  riastradh regen
 1.31 16-Jan-2017  christos branches: 1.31.4;
regen
 1.30 13-Jan-2017  christos branches: 1.30.2;
regen
 1.29 24-Sep-2015  christos branches: 1.29.2;
regen
 1.28 07-Mar-2015  christos regen
 1.27 07-Nov-2013  njoly branches: 1.27.6;
Regen for dup/dup2/dup3 argument types fix.
 1.26 02-Mar-2010  pooka branches: 1.26.10; 1.26.20; 1.26.24;
regen:
- remove nfssvc / fs_nfs.h / #ifdef NFS
- make getfh unconditional
 1.25 14-Dec-2009  matt branches: 1.25.2;
Regen (new makesyscalls.sh)
 1.24 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.23 13-Jan-2009  pooka regen
 1.22 11-Jan-2009  nakayama Regen for following christos-time_t merge.
 1.21 19-Nov-2008  ad Regen.
 1.20 20-Dec-2007  dsl branches: 1.20.6; 1.20.10; 1.20.16; 1.20.18;
regen
 1.19 04-Mar-2007  christos branches: 1.19.16; 1.19.24; 1.19.28;
fix fallout from caddr_t changes.
 1.18 09-Feb-2007  ad branches: 1.18.2;
Merge newlock2 to head.
 1.17 13-Jul-2006  pavel branches: 1.17.4;
regen
 1.16 11-Dec-2005  christos branches: 1.16.4; 1.16.8;
merge ktrace-lwp.
 1.15 27-Sep-2005  chs regen
 1.14 26-Feb-2005  perry branches: 1.14.4;
regen
 1.13 26-Feb-2005  perry regen
 1.12 26-Oct-2003  christos branches: 1.12.8; 1.12.10;
Regen
 1.11 18-Jan-2003  thorpej branches: 1.11.2;
Regen for correct RCS ID.
 1.10 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.9 29-Apr-2002  mrg regenerate.
 1.8 03-Jan-2002  mrg regen
 1.7 03-Jan-2002  mrg move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code. besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.
 1.6 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.5 30-May-2001  mrg branches: 1.5.2;
use _KERNEL_OPT.
 1.4 06-Feb-2001  mrg branches: 1.4.2; 1.4.4;
regen
 1.3 05-Feb-2001  mrg regen
 1.2 04-Feb-2001  mrg regen
 1.1 02-Feb-2001  mrg generate.
 1.4.4.5 29-May-2002  nathanw Regen.
 1.4.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.3 11-Jan-2002  nathanw More catchup.
 1.4.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 06-Feb-2001  bouyer file sunos32_syscalls.c was added on branch thorpej_scsipi on 2001-02-11 19:14:33 +0000
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.14.4.5 21-Jan-2008  yamt sync with head
 1.14.4.4 03-Sep-2007  yamt sync with head.
 1.14.4.3 26-Feb-2007  yamt sync with head.
 1.14.4.2 30-Dec-2006  yamt sync with head.
 1.14.4.1 21-Jun-2006  yamt sync with head.
 1.16.8.1 11-Aug-2006  yamt sync with head
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.17.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.18.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.28.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.24.1 26-Dec-2007  ad Sync with head.
 1.19.16.1 09-Jan-2008  matt sync with HEAD
 1.20.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.10.2 11-Mar-2010  yamt sync with head
 1.20.10.1 04-May-2009  yamt sync with head.
 1.20.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.25.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.26.24.1 18-May-2014  rmind sync with head
 1.26.20.2 03-Dec-2017  jdolecek update from HEAD
 1.26.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.10.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.6.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.27.6.1 06-Apr-2015  skrll Sync with HEAD
 1.29.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.30.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.31.4.1 11-May-2017  pgoyette Sync with HEAD
 1.36.4.1 10-Jun-2019  christos Sync with HEAD
 1.36.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.39 10-Aug-2018  pgoyette Regen
 1.38 06-Jan-2018  kamil branches: 1.38.2; 1.38.4;
Revert vadvise(2) removal

This system call was used in legacy Lisp code, that was inherited to modern
age and still compiled against supported compat layers (e.g. in clisp,
oaklisp, Franz Lisp).

It used to instruct the kernel about paging policy (G/C aware, flush etc).

Newly compiled code (assuming that it will detect vadvise()) will use the
libc stub for vadvise(). The headers for this interface are gone.

vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix,
sunos or aout68k ABI, don't bother with this.

Requested by <mrg>
 1.37 19-Dec-2017  kamil compat/sunos32: Drop SYS_vadvise

The (o)vadvise syscall is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
 1.36 19-Dec-2017  kamil compat/sunos32: Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
 1.35 19-Dec-2017  kamil compat sunos32: Drop the sstk(2) syscall

sstk(2) has never been implemented by the NetBSD kernel.

Sponsored by <The NetBSD Foundation>
 1.34 10-May-2017  riastradh regen
 1.33 16-Jan-2017  christos branches: 1.33.4;
regen
 1.32 13-Jan-2017  christos branches: 1.32.2;
regen
 1.31 24-Sep-2015  christos branches: 1.31.2;
regen
 1.30 07-Mar-2015  christos regen
 1.29 07-Nov-2013  njoly branches: 1.29.6;
Regen for dup/dup2/dup3 argument types fix.
 1.28 02-Mar-2010  pooka branches: 1.28.10; 1.28.20; 1.28.24;
regen:
- remove nfssvc / fs_nfs.h / #ifdef NFS
- make getfh unconditional
 1.27 14-Dec-2009  matt branches: 1.27.2;
Regen (new makesyscalls.sh)
 1.26 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.25 13-Jan-2009  pooka regen
 1.24 11-Jan-2009  nakayama Regen for following christos-time_t merge.
 1.23 19-Nov-2008  ad Regen.
 1.22 20-Dec-2007  dsl branches: 1.22.6; 1.22.10; 1.22.16; 1.22.18;
regen
 1.21 04-Mar-2007  christos branches: 1.21.16; 1.21.24; 1.21.28;
fix fallout from caddr_t changes.
 1.20 09-Feb-2007  ad branches: 1.20.2;
Merge newlock2 to head.
 1.19 13-Jul-2006  pavel branches: 1.19.4;
regen
 1.18 13-Jul-2006  martin COMPAT_SUNOS* uses COMPAT_30 getfh too
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.8;
merge ktrace-lwp.
 1.16 27-Sep-2005  chs regen
 1.15 26-Feb-2005  perry branches: 1.15.4;
regen
 1.14 26-Feb-2005  perry regen
 1.13 26-Oct-2003  christos branches: 1.13.8; 1.13.10;
Regen
 1.12 18-Jan-2003  thorpej branches: 1.12.2;
Regen for correct RCS ID.
 1.11 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.10 01-Nov-2002  jdolecek set nsysent to 256
 1.9 29-Apr-2002  mrg regenerate.
 1.8 03-Jan-2002  mrg regen
 1.7 03-Jan-2002  mrg move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code. besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.
 1.6 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.5 30-May-2001  mrg branches: 1.5.2;
use _KERNEL_OPT.
 1.4 06-Feb-2001  mrg branches: 1.4.2; 1.4.4;
regen
 1.3 05-Feb-2001  mrg regen
 1.2 04-Feb-2001  mrg regen
 1.1 02-Feb-2001  mrg generate.
 1.4.4.7 11-Nov-2002  nathanw Catch up to -current
 1.4.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.5 29-May-2002  nathanw Regen.
 1.4.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.3 11-Jan-2002  nathanw More catchup.
 1.4.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 06-Feb-2001  bouyer file sunos32_sysent.c was added on branch thorpej_scsipi on 2001-02-11 19:14:33 +0000
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.15.4.5 21-Jan-2008  yamt sync with head
 1.15.4.4 03-Sep-2007  yamt sync with head.
 1.15.4.3 26-Feb-2007  yamt sync with head.
 1.15.4.2 30-Dec-2006  yamt sync with head.
 1.15.4.1 21-Jun-2006  yamt sync with head.
 1.17.8.1 11-Aug-2006  yamt sync with head
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.19.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.20.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.21.28.1 02-Jan-2008  bouyer Sync with HEAD
 1.21.24.1 26-Dec-2007  ad Sync with head.
 1.21.16.1 09-Jan-2008  matt sync with HEAD
 1.22.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.22.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.22.10.2 11-Mar-2010  yamt sync with head
 1.22.10.1 04-May-2009  yamt sync with head.
 1.22.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.27.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.28.24.1 18-May-2014  rmind sync with head
 1.28.20.2 03-Dec-2017  jdolecek update from HEAD
 1.28.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.10.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.6.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.29.6.1 06-Apr-2015  skrll Sync with HEAD
 1.31.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.32.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.33.4.1 11-May-2017  pgoyette Sync with HEAD
 1.38.4.1 10-Jun-2019  christos Sync with HEAD
 1.38.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 01-Nov-2002  jdolecek set nsysent to 256
 1.1 02-Feb-2001  mrg branches: 1.1.2; 1.1.4;
initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.1.4.1 11-Nov-2002  nathanw Catch up to -current
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file syscalls.conf was added on branch thorpej_scsipi on 2001-02-11 19:14:34 +0000
 1.26 06-Jan-2018  kamil Revert vadvise(2) removal

This system call was used in legacy Lisp code, that was inherited to modern
age and still compiled against supported compat layers (e.g. in clisp,
oaklisp, Franz Lisp).

It used to instruct the kernel about paging policy (G/C aware, flush etc).

Newly compiled code (assuming that it will detect vadvise()) will use the
libc stub for vadvise(). The headers for this interface are gone.

vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix,
sunos or aout68k ABI, don't bother with this.

Requested by <mrg>
 1.25 19-Dec-2017  kamil compat/sunos32: Drop SYS_vadvise

The (o)vadvise syscall is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
 1.24 19-Dec-2017  kamil compat/sunos32: Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
 1.23 19-Dec-2017  kamil compat sunos32: Drop the sstk(2) syscall

sstk(2) has never been implemented by the NetBSD kernel.

Sponsored by <The NetBSD Foundation>
 1.22 07-Nov-2013  njoly Fix dup/dup2/dup3 argument types (u_int -> int).
 1.21 02-Mar-2010  pooka branches: 1.21.10; 1.21.20; 1.21.24;
Kill fs_nfs.h and #ifdef NFS by making getfh() support unconditional
and nfssvc unsupport unconditional. nfs server was just a fancy
NOP anyway for all except Ultrix. I know I'm boring but I couldn't
imagine why someone would want to run an Ultrix nfs server (and I
also doubt that it would work anymore with all the changes to fs
exporting etc).
 1.20 13-Jan-2009  pooka branches: 1.20.4;
Convert the syscalls.master to a format from which it is easier
to parse and generate the compat name and basename (e.g. __stat50
and stat). Use this to autogenerate __RENAME()'s to the rump_syscalls
header so that they can be called e.g. rump_sys_socket() instead
of rump_sys___socket30().
 1.19 13-Jan-2009  pooka UNIMPL police
 1.18 11-Jan-2009  nakayama Follow christos-time_t merge.
 1.17 19-Nov-2008  ad Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.16 04-Mar-2007  christos branches: 1.16.36; 1.16.40; 1.16.42; 1.16.46; 1.16.50;
fix fallout from caddr_t changes.
 1.15 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.14 09-Feb-2007  ad Merge newlock2 to head.
 1.13 13-Jul-2006  pavel branches: 1.13.4;
request the COMPAT_30 getfh in the master files. (Changes to the generated
ones would be lost.)
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.8;
merge ktrace-lwp.
 1.11 27-Sep-2005  chs include "opt_compat_sunos.h", netbsd32_syscallargs.h wants it.
 1.10 26-Feb-2005  perry branches: 1.10.4;
nuke trailing whitespace
 1.9 18-Jan-2003  thorpej branches: 1.9.2; 1.9.10; 1.9.12;
Merge the nathanw_sa branch.
 1.8 29-Apr-2002  mrg build the netbsd32_compat* objects into libcompat.a, so they are available
to emulations not just netbsd itself. rename the compat_10 functions to
match everything else. fixes a problem reported by julian coleman.
 1.7 03-Jan-2002  mrg ooops, socket() and socketpair() need args now.
 1.6 03-Jan-2002  mrg move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code. besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.
 1.5 30-May-2001  mrg branches: 1.5.2;
use _KERNEL_OPT.
 1.4 06-Feb-2001  mrg branches: 1.4.2; 1.4.4;
oops, use netbsd32_select().
 1.3 05-Feb-2001  mrg use sunos32_sys_sigreturn
 1.2 04-Feb-2001  mrg s/long/netbsd32_long/ in sunos32_sys_mmap(). noted by chuq.
 1.1 02-Feb-2001  mrg initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
 1.4.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.4 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.4.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.2 11-Jan-2002  nathanw More catchup.
 1.4.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 06-Feb-2001  bouyer file syscalls.master was added on branch thorpej_scsipi on 2001-02-11 19:14:34 +0000
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.9.10.1 29-Apr-2005  kent sync with -current
 1.9.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.10.4.3 26-Feb-2007  yamt sync with head.
 1.10.4.2 30-Dec-2006  yamt sync with head.
 1.10.4.1 21-Jun-2006  yamt sync with head.
 1.12.8.1 11-Aug-2006  yamt sync with head
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.16.50.1 19-Jan-2009  skrll Sync with HEAD.
 1.16.46.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.16.42.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.16.42.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.16.40.2 11-Mar-2010  yamt sync with head
 1.16.40.1 04-May-2009  yamt sync with head.
 1.16.36.1 17-Jan-2009  mjf Sync with HEAD.
 1.20.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.21.24.1 18-May-2014  rmind sync with head
 1.21.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.10.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed