Home | History | Annotate | only in /src/sys/compat/linux/arch/powerpc
History log of /src/sys/compat/linux/arch/powerpc
RevisionDateAuthorComments
 1.4 29-May-2024  christos should not be using .include <> but .include "" here.
 1.3 08-Apr-2014  njoly Do not include bsd.kinc.mk in each arch Makefile, it's already pulled
by bsd.syscall.mk (from Makefile.inc).
 1.2 03-Oct-1998  christos branches: 1.2.184; 1.2.194; 1.2.200; 1.2.210;
Attempt to fix the mess.
 1.1 30-Sep-1998  erh Stubs for future development of linux compat architechtures.
 1.2.210.1 10-Aug-2014  tls Rebase.
 1.2.200.1 18-May-2014  rmind sync with head
 1.2.194.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.184.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.12 03-May-2020  thorpej Always clear FUTEX_PRIVATE_FLAG for Linux processes. NetBSD-native futexes
exist in different namespace depending on FUTEX_PRIVATE_FLAG. This appears
not to be the case in Linux, and some futex users will mix private and non-
private ops on the same futex object. Provide a convenience wrapper that
puts this logic in one place witn a comment explaining why.

While here, move the Linux futex wrapper out of its own file and plop
it in linux_misc.c, which is where it lives in the linux32 module.
 1.11 30-May-2011  alnsn Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.
 1.10 07-Jul-2010  chs branches: 1.10.2;
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.9 02-Feb-2008  dsl branches: 1.9.10; 1.9.30; 1.9.32;
Extract the fcntl64() suppoort from linux_file64.c into linux_fcntl64.c
Unravel some of the knots that caused linux_file64.c to be compiled twice
for an amd64 kernel (once for linux and once for linux32) with different
parts being skipped each time.
 1.8 01-Sep-2006  matt branches: 1.8.28; 1.8.34;
When calling PTRACE from an LKM, use sysent[SYS_ptrace].sy_call in case
the sys_ptrace symbol isn't present.
 1.7 30-Aug-2006  matt Update to deal with options PTRACE
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.8;
merge ktrace-lwp.
 1.5 25-Jul-2004  chs branches: 1.5.12;
remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.4 19-May-2002  jdolecek branches: 1.4.8; 1.4.10;
add missing linux_file64.c, which is needed now
 1.3 31-Mar-2002  christos branches: 1.3.2;
bring the reverse signal mapping array into linux_signo.c
 1.2 03-Sep-2001  manu Fixed indent
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.4; 1.1.6;
Added previously created files for powerpc Linux compatibility to the kernel
config system
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.1 21-Sep-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 19-Jan-2001  bouyer file files.linux_powerpc was added on branch thorpej_scsipi on 2001-02-11 19:13:49 +0000
 1.3.2.1 30-May-2002  gehenna Catch up with -current.
 1.4.10.1 26-Jul-2004  tron Pull up revision 1.5 (requested by chs in ticket #715):
remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.4.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.8.1 03-Aug-2004  skrll Sync with HEAD
 1.5.12.2 04-Feb-2008  yamt sync with head.
 1.5.12.1 30-Dec-2006  yamt sync with head.
 1.6.8.1 03-Sep-2006  yamt sync with head.
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.8.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.28.1 23-Mar-2008  matt sync with HEAD
 1.9.32.2 31-May-2011  rmind sync with head
 1.9.32.1 05-Mar-2011  rmind sync with head
 1.9.30.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.9.10.1 11-Aug-2010  yamt sync with head.
 1.10.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8 17-Dec-2013  njoly Cleanup compat linux errnos by adding generic errnos in a single file.
Use it for all arches except alpha and mips.
Add a few missing native to linux errno conversions.
 1.7 28-Apr-2008  martin branches: 1.7.34; 1.7.44; 1.7.50;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.70; 1.6.72; 1.6.74;
merge ktrace-lwp.
 1.5 26-Feb-2005  perry nuke trailing whitespace
 1.4 12-Feb-2001  manu branches: 1.4.24; 1.4.32; 1.4.34;
Clarified comments about the LINUX_SCERR_SIGN macro
 1.3 11-Feb-2001  manu Moved the fix for negative errno returned to userland on the PowerPC to a
more machine independent fashion
 1.2 04-Feb-2001  christos branches: 1.2.2;
cosmetic fixes.
 1.1 19-Jan-2001  manu Added Linux errno mapping for powerpc
 1.2.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 04-Feb-2001  bouyer file linux_errno.h was added on branch thorpej_scsipi on 2001-02-11 19:13:49 +0000
 1.4.34.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.32.1 29-Apr-2005  kent sync with -current
 1.4.24.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.74.1 16-May-2008  yamt sync with head.
 1.6.72.1 18-May-2008  yamt sync with head.
 1.6.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.50.1 18-May-2014  rmind sync with head
 1.7.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.34.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.25 26-Nov-2021  ryo - LINUX_GO_RT0_SIGNATURE for compat_linux is no longer enabled by default.
it is now defined in each arch same as the other *_SIGNATURE definitions.
- add new LINUX32_GO_RT0_SIGNATURE for compat_linux32, and is defined in amd64 and aarch64.
 1.24 12-Feb-2017  chs es_arglen is now in units of bytes, update the emulations accordingly.
 1.23 09-Feb-2014  chs branches: 1.23.6; 1.23.10; 1.23.14;
account for the 16 bytes of AT_RANDOM data in the stack setup. fixes PR 48518.
use cprng_strong32() instead of random(). add AT_RANDOM support for linux32.
 1.22 25-Jan-2014  skrll More alignment spellos
 1.21 28-Apr-2008  martin branches: 1.21.34; 1.21.44; 1.21.50;
Remove clause 3 and 4 from TNF licenses
 1.20 11-Dec-2005  christos branches: 1.20.70; 1.20.72; 1.20.74;
merge ktrace-lwp.
 1.19 26-Feb-2005  perry nuke trailing whitespace
 1.18 25-Jul-2004  chs branches: 1.18.4; 1.18.6;
remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.17 16-Jun-2004  manu COMPAT_LINUX/powerpc used the native stack setup routine, but now the
native version does non executable mappings on the stack. This is a
showstopper for Linux binaries.

To fix that we supply a copy f the native stack setup function for Linux
binaries, with the executable bit set.
 1.16 14-Aug-2003  christos branches: 1.16.2;
remove the args from the macro.
 1.15 08-Aug-2003  christos - GC all the setup_stack functions
- add one for linux/i386
 1.14 01-Mar-2003  thorpej branches: 1.14.2;
Do the syscall_plain/syscall_fancy dance on ARM. Shaves a fair number
of cycles off the syscall overhead.

Since all COMPAT_LINUX platforms now support __HAVE_SYSCALL_INTERN,
garbage-collect the LINUX_SYSCALL_FUNCTION stuff.
 1.13 13-Nov-2002  jdolecek add generic linux compat ELF copyargs function

this gives:
* linux sysconf(_SC_CLK_TCK) gives correct value for linux binaries (hz)
even if hz != 100
* glibc gets proper information on real/effective uid and enables
secure mode for suid binaries

g/c LINUX_COPYARGS_FUNCTION, replaced by linux ELF copyargs function
g/c alpha-specific linux ELF copyargs function and linux ELF defines
 1.12 13-Nov-2002  jdolecek need to use Aux32Info explicitly, not AuxInfo alone, to work
within context of kern/exec_conf.c
 1.11 13-Nov-2002  jdolecek eliminate remaining LinuxAuxInfo
 1.10 13-Nov-2002  jdolecek need to use LINUX_ELF_AUX_ENTRIES in LINUX_ELF_AUX_ARGSIZ
how this ever could have worked?
 1.9 13-Nov-2002  jdolecek use generic ELF AuxInfo, no need to define a 'linux' variant here
simplify LINUX_ELF_AUX_ARGSIZ definition, LINUX_SP_WRAP is always defined here
 1.8 26-Aug-2002  christos Implement passing AT_{E,R}{U,G}ID in the elf aux vector, like solaris.
- pass struct proc to copyargs.
- eliminate svr4_copyargs, since it is the same as ours now.
 1.7 12-Aug-2002  mrg don't need systm.h here
 1.6 17-Jan-2002  bjh21 branches: 1.6.8;
On platforms that don't __HAVE_SYSCALL_INTERN, define LINUX_SYSCALL_FUNCTION
to be the value of emul_linux.e_syscall that we want. This allows it to differ
between machines, so I can have a separate linux_syscall() on arm.
 1.5 30-Aug-2001  manu Enable the GCC signature test so that ld.so will be executable (needed for
Linux's ldd)
 1.4 29-Jul-2001  christos Adjust to the new copyargs() footprint.
 1.3 26-Jul-2001  wiz auxilliary -> auxiliary
 1.2 04-Feb-2001  christos branches: 1.2.2; 1.2.4; 1.2.6;
cosmetic fixes.
 1.1 19-Jan-2001  manu Added various header files for initial Linux compatibility on powerpc ports
 1.2.6.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.1 03-Aug-2001  lukem update to -current
 1.2.4.6 11-Dec-2002  thorpej Sync with HEAD.
 1.2.4.5 27-Aug-2002  nathanw Catch up to -current.
 1.2.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.2.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.2 21-Sep-2001  nathanw Catch up to -current.
 1.2.4.1 24-Aug-2001  nathanw Catch up with -current.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 04-Feb-2001  bouyer file linux_exec.h was added on branch thorpej_scsipi on 2001-02-11 19:13:50 +0000
 1.6.8.1 29-Aug-2002  gehenna catch up with -current.
 1.14.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.2.2 26-Jul-2004  tron Pull up revision 1.18 (requested by chs in ticket #715):
remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.16.2.1 19-Jun-2004  grant Pull up revision 1.17 (requested by manu in ticket #511):

COMPAT_LINUX/powerpc fixes for non-executable stack.
 1.18.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.20.74.1 16-May-2008  yamt sync with head.
 1.20.72.1 18-May-2008  yamt sync with head.
 1.20.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.50.1 18-May-2014  rmind sync with head
 1.21.44.2 03-Dec-2017  jdolecek update from HEAD
 1.21.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.34.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.23.14.1 21-Apr-2017  bouyer Sync with HEAD
 1.23.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.23.6.1 28-Aug-2017  skrll Sync with HEAD
 1.25 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.24 21-Feb-2012  rjs branches: 1.24.32; 1.24.44;
Switch to ANSI style declaration.
 1.23 03-Feb-2012  matt branches: 1.23.2;
Add a hook for freeing an ep_emul_arg. Add a wrapper routine
(exec_free_emul_arg) to call the hook and then clear the ep_emul_arg
and ep_emul_arg_free members in the exec_package.
Change users/accessors to use these routines.
Approved by releng.
 1.22 07-Jul-2010  chs branches: 1.22.8; 1.22.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.21 28-Apr-2008  martin branches: 1.21.20; 1.21.22;
Remove clause 3 and 4 from TNF licenses
 1.20 23-Jul-2006  ad branches: 1.20.54; 1.20.56; 1.20.58;
Use the LWP cached credentials where sane.
 1.19 15-May-2006  yamt include kauth.h for kauth_cred_getegid, etc.
 1.18 14-May-2006  elad integrate kauth.
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.6; 1.17.8; 1.17.10; 1.17.12;
merge ktrace-lwp.
 1.16 26-Feb-2005  perry branches: 1.16.4;
nuke trailing whitespace
 1.15 25-Jul-2004  chs branches: 1.15.4; 1.15.6;
remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.14 18-Jun-2004  manu include <sys/resourcevar.h>. It is not required for building -current,
but it is for -netbsd-2-0. Next step is to pull up the change...
 1.13 16-Jun-2004  manu COMPAT_LINUX/powerpc used the native stack setup routine, but now the
native version does non executable mappings on the stack. This is a
showstopper for Linux binaries.

To fix that we supply a copy f the native stack setup function for Linux
binaries, with the executable bit set.
 1.12 29-Jun-2003  fvdl branches: 1.12.2; 1.12.4;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.11 29-Jun-2003  darrenr 'struct proc *' -> 'struct lwp *' as required to get GENERIC for macppc built
 1.10 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.9 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.8 13-Nov-2002  jdolecek branches: 1.8.2;
use generic ELF AuxInfo, no need to define a 'linux' variant here
simplify LINUX_ELF_AUX_ARGSIZ definition, LINUX_SP_WRAP is always defined here
 1.7 26-Aug-2002  christos Implement passing AT_{E,R}{U,G}ID in the elf aux vector, like solaris.
- pass struct proc to copyargs.
- eliminate svr4_copyargs, since it is the same as ours now.
 1.6 13-Nov-2001  lukem branches: 1.6.8; 1.6.10;
add RCSIDs (including regeneration of files as appropriate)
 1.5 08-Aug-2001  christos PR/13652: Katsuomi Hamajima: Fix compile error.
 1.4 29-Jul-2001  christos Adjust to the new copyargs() footprint.
 1.3 13-Jun-2001  wiz branches: 1.3.2;
It's "extern int", not "extern".
Macppc kernels with LINUX_COMPAT now compile again.
 1.2 04-Feb-2001  christos branches: 1.2.2; 1.2.4;
cosmetic fixes.
 1.1 19-Jan-2001  manu Added powerpc specific code for Linux compatibility on powerpc ports
 1.2.4.7 11-Dec-2002  thorpej Sync with HEAD.
 1.2.4.6 27-Aug-2002  nathanw Catch up to -current.
 1.2.4.5 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.2.4.4 24-Jun-2002  nathanw LWPify changes.
 1.2.4.3 14-Nov-2001  nathanw Catch up to -current.
 1.2.4.2 24-Aug-2001  nathanw Catch up with -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 04-Feb-2001  bouyer file linux_exec_powerpc.c was added on branch thorpej_scsipi on 2001-02-11 19:13:50 +0000
 1.3.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.6.10.2 18-Jun-2004  jmc Back out last commit. Only releng commits to the branches w/o prior approval
 1.6.10.1 18-Jun-2004  manu Include resourcevar.h, which is not required for building -current but
is for the 2.0 branch. Next step is a pull-up...
 1.6.8.1 29-Aug-2002  gehenna catch up with -current.
 1.8.2.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.12.4.3 26-Jul-2004  tron Pull up revision 1.15 (requested by chs in ticket #715):
remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.12.4.2 19-Jun-2004  grant Pull up revision 1.14 (requested by manu in ticket #511):

include <sys/resourcevar.h> for the netbsd-2-0 branch.
 1.12.4.1 19-Jun-2004  grant Pull up revision 1.13 (requested by manu in ticket #511):

COMPAT_LINUX/powerpc fixes for non-executable stack.
 1.12.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.4 18-Nov-2004  skrll Adapt to branch. macppc release builds.
 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.15.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.15.4.1 29-Apr-2005  kent sync with -current
 1.16.4.2 30-Dec-2006  yamt sync with head.
 1.16.4.1 21-Jun-2006  yamt sync with head.
 1.17.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.17.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.17.8.2 11-Aug-2006  yamt sync with head
 1.17.8.1 24-May-2006  yamt sync with head.
 1.17.6.1 01-Jun-2006  kardel Sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.20.58.2 11-Aug-2010  yamt sync with head.
 1.20.58.1 16-May-2008  yamt sync with head.
 1.20.56.1 18-May-2008  yamt sync with head.
 1.20.54.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.22.1 05-Mar-2011  rmind sync with head
 1.21.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.12.2 24-Feb-2012  mrg sync to -current.
 1.22.12.1 18-Feb-2012  mrg merge to -current.
 1.22.8.1 17-Apr-2012  yamt sync with head
 1.23.2.1 24-Feb-2012  riz Pull up following revision(s) (requested by rjs in ticket #46):
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.24
Switch to ANSI style declaration.
 1.24.44.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.24.32.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.10 25-Jun-2014  njoly Add a few missing open(2) flags (LINUX_O_*). Fix alpha wrong values.
 1.9 02-Nov-2010  chs branches: 1.9.18; 1.9.32;
define LINUX_O_CLOEXEC.
sort definitions by value.
consistently use hex instead of octal for the values.
 1.8 21-Sep-2010  chs implement O_DIRECTORY as standardized in POSIX-2008,
for both native and linux emulations.
this fixes the rest of PR 43695.
 1.7 28-Apr-2008  martin branches: 1.7.20; 1.7.22;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.70; 1.6.72; 1.6.74;
merge ktrace-lwp.
 1.5 26-Feb-2005  perry nuke trailing whitespace
 1.4 30-Sep-2001  manu branches: 1.4.18; 1.4.26; 1.4.28;
Added initial support for fcntl64 system call (file locking is not
implemented)
 1.3 04-Feb-2001  christos branches: 1.3.2; 1.3.4; 1.3.6; 1.3.8;
cosmetic fixes.
 1.2 21-Jan-2001  manu Fixed wrong open() Linux flags definition (octal instead of hexadecimal)
 1.1 19-Jan-2001  manu Added various header files for initial Linux compatibility on powerpc ports
 1.3.8.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 04-Feb-2001  bouyer file linux_fcntl.h was added on branch thorpej_scsipi on 2001-02-11 19:13:50 +0000
 1.4.28.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.26.1 29-Apr-2005  kent sync with -current
 1.4.18.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.74.2 09-Oct-2010  yamt sync with head
 1.6.74.1 16-May-2008  yamt sync with head.
 1.6.72.1 18-May-2008  yamt sync with head.
 1.6.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.22.1 05-Mar-2011  rmind sync with head
 1.7.20.2 06-Nov-2010  uebayasi Sync with HEAD.
 1.7.20.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.9.32.1 10-Aug-2014  tls Rebase.
 1.9.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 08-Jun-2001  hannken branches: 1.2.120; 1.2.122; 1.2.124;
Close coment of CVS tag.
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.4;
Added various header files for initial Linux compatibility on powerpc ports
 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 19-Jan-2001  bouyer file linux_ioctl.h was added on branch thorpej_scsipi on 2001-02-11 19:13:51 +0000
 1.2.124.1 16-May-2008  yamt sync with head.
 1.2.122.1 18-May-2008  yamt sync with head.
 1.2.120.1 02-Jun-2008  mjf Sync with HEAD.
 1.51 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.50 03-May-2017  chs branches: 1.50.2; 1.50.14;
add missing arg to fpu_discard().
 1.49 16-Mar-2017  chs branches: 1.49.4;
allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.48 09-Nov-2014  maxv branches: 1.48.2; 1.48.4; 1.48.6;
Do not uselessly include <sys/malloc.h>.
 1.47 27-Jan-2013  mbalmer branches: 1.47.12;
exitting -> exiting.
 1.46 05-May-2011  matt branches: 1.46.4; 1.46.14;
Adapt to new PCU based FPU code.
 1.45 20-Jan-2011  he save_fpu_lwp() was renamed to fpu_save_lwp(), so follow suit.
 1.44 18-Jan-2011  matt branches: 1.44.2;
Deal with changes in the trapframe.
 1.43 14-Jan-2011  rmind branches: 1.43.2;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.42 07-Jul-2010  chs 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.41 02-Feb-2010  wiz branches: 1.41.2; 1.41.4;
Missing printf in sys/compat/linux/arch/powerpc/linux_machdep.c
found by cppcheck and reported by Henning Petersen in PR 42720.
 1.40 23-Nov-2009  rmind Use lwp_getpcb() in compat code, clean from struct user.
 1.39 28-Apr-2008  martin branches: 1.39.2; 1.39.22;
Remove clause 3 and 4 from TNF licenses
 1.38 24-Apr-2008  ad branches: 1.38.2;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.37 20-Dec-2007  dsl branches: 1.37.6; 1.37.8;
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.36 08-Dec-2007  dsl branches: 1.36.4;
ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
 1.35 19-Oct-2007  ad branches: 1.35.4;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.34 05-Mar-2007  tsutsui branches: 1.34.2; 1.34.14; 1.34.16; 1.34.20;
Use (char *) cast on pointer arith.
 1.33 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.32 09-Feb-2007  ad branches: 1.32.2;
Merge newlock2 to head.
 1.31 11-Dec-2005  christos branches: 1.31.20;
merge ktrace-lwp.
 1.30 20-May-2005  fvdl branches: 1.30.2;
Define linux_usertrap function, and set it in struct emul. For all
but amd64, it just returns 0, doing nothing.

For amd64, it implements vsyscalls through cheating: if the faulting
address is in the vsyscall area (which is statically known on Linux/amd64),
and the intruction pointer is too, it must have been a vsyscall. In that
case, retrieve the return address from the user stack, fix up %rip and
%rsp, and just execute the normal system call. It will return as if
the vsyscall has been executed.
 1.29 26-Feb-2005  perry nuke trailing whitespace
 1.28 17-Apr-2004  matt branches: 1.28.4; 1.28.6;
Switch to using PSL_USEROK_P()
Use new save_fpu_lwp sematics to save or discard the fpu state appropriately.
 1.27 26-Mar-2004  drochner all ports define __HAVE_SIGINFO now, so remove the CPP conditionals
 1.26 08-Oct-2003  thorpej Use ksi_signo accessor macro.
 1.25 26-Sep-2003  simonb Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
 1.24 25-Sep-2003  christos constify sendsig/trapsignal
 1.23 25-Sep-2003  matt Add siginfo support for PowerPC.
 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  darrenr 'struct proc *' -> 'struct lwp *' as required to get GENERIC for macppc built
 1.20 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.19 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.18 28-Jul-2002  chs restructure the FPU and AltiVEC code so that it works for MP.
 1.17 09-Jul-2002  matt Change fpuproc to curcpu()->ci_fpuproc.
 1.16 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.15 20-May-2002  jdolecek whitespace fixes
 1.14 31-Mar-2002  christos branches: 1.14.2;
make signal array handling uniform, and put signal arrays in a separate
file. This is simular to errno array handling.
 1.13 15-Feb-2002  christos - add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
gdb, telnet, work
jdk-1.4.0 extractor works, jdk still coredumps.

christos
 1.12 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.11 13-Jun-2001  wiz branches: 1.11.2;
#include <machine/fpu.h> for save_fpu()
#ifdef 0 two unused and un-prototyped functions.
Following a hint by Andrw Cagney on port-macppc.
 1.10 30-May-2001  mrg use _KERNEL_OPT.
 1.9 27-May-2001  manu Fixed two typo in comments
 1.8 11-Apr-2001  manu Integrated security review for signal delivery by Wolfgang Solfrank
 1.7 22-Mar-2001  manu Added a missing native to linux signal number translation in linux_sendsig(),
when building the trap frape
 1.6 18-Mar-2001  manu Fixed typos in comments
 1.5 05-Feb-2001  manu branches: 1.5.2; 1.5.4;
Modified a cast so that it builds again
 1.4 04-Feb-2001  christos cosmetic fixes.
 1.3 26-Jan-2001  manu Moved include <sys/ioctl.h> so that we can build without WSCONS enabled.
 1.2 25-Jan-2001  manu Fixed wrong signal handler argument setup. The emulated sigcontext still has some problems.
 1.1 19-Jan-2001  manu Added powerpc specific code for Linux compatibility on powerpc ports
 1.5.4.11 18-Oct-2002  nathanw Catch up to -current.
 1.5.4.10 02-Aug-2002  nathanw LWPify.
 1.5.4.9 01-Aug-2002  nathanw Catch up to -current.
 1.5.4.8 24-Jun-2002  nathanw LWPify changes.
 1.5.4.7 20-Jun-2002  nathanw Catch up to -current.
 1.5.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.5.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.5.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.3 14-Nov-2001  nathanw Catch up to -current.
 1.5.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.5.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.5.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.5.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.5.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.5.2.1 05-Feb-2001  bouyer file linux_machdep.c was added on branch thorpej_scsipi on 2001-02-11 19:13:51 +0000
 1.11.2.5 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.11.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.11.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.11.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.2.3 29-Aug-2002  gehenna catch up with -current.
 1.14.2.2 15-Jul-2002  gehenna catch up with -current.
 1.14.2.1 30-May-2002  gehenna Catch up with -current.
 1.22.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.22.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.22.2.4 18-Nov-2004  skrll Adapt to branch. macppc release builds.
 1.22.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.2.1 03-Aug-2004  skrll Sync with HEAD
 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.30.2.5 21-Jan-2008  yamt sync with head
 1.30.2.4 27-Oct-2007  yamt sync with head.
 1.30.2.3 03-Sep-2007  yamt sync with head.
 1.30.2.2 26-Feb-2007  yamt sync with head.
 1.30.2.1 21-Jun-2006  yamt sync with head.
 1.31.20.3 06-Feb-2007  ad More compat changes.

XXX compat_irix, compat_mach and compat_darwin need work.
 1.31.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.31.20.1 27-Jan-2007  ad More compat changes.
 1.32.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.34.20.1 25-Oct-2007  bouyer Sync with HEAD.
 1.34.16.2 09-Jan-2008  matt sync with HEAD
 1.34.16.1 06-Nov-2007  matt sync with HEAD
 1.34.14.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.34.14.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.34.2.1 23-Oct-2007  ad Sync with head.
 1.35.4.1 26-Dec-2007  ad Sync with head.
 1.36.4.1 02-Jan-2008  bouyer Sync with HEAD
 1.37.8.1 18-May-2008  yamt sync with head.
 1.37.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.38.2.3 11-Aug-2010  yamt sync with head.
 1.38.2.2 11-Mar-2010  yamt sync with head
 1.38.2.1 16-May-2008  yamt sync with head.
 1.39.22.1 07-Jan-2011  matt Deal with the trapframe changes.
 1.39.2.3 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.39.2.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.39.2.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.41.4.2 31-May-2011  rmind sync with head
 1.41.4.1 05-Mar-2011  rmind sync with head
 1.41.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.43.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.44.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.46.14.2 03-Dec-2017  jdolecek update from HEAD
 1.46.14.1 25-Feb-2013  tls resync with head
 1.46.4.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.47.12.1 17-Jan-2015  martin Pull up following revision(s) (requested by maxv in ticket #427):
sys/compat/svr4/svr4_schedctl.c: revision 1.8
sys/netinet/tcp_timer.c: revision 1.88
sys/miscfs/genfs/layer_vfsops.c: revision 1.45
sys/compat/svr4/svr4_ioctl.c: revision 1.37
sys/ufs/chfs/chfs_vfsops.c: revision 1.14
sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
sys/compat/common/kern_time_50.c: revision 1.28
sys/netinet6/ip6_forward.c: revision 1.74
sys/miscfs/umapfs/umap_vnops.c: revision 1.57
sys/compat/svr4/svr4_fcntl.c: revision 1.74
distrib/sets/lists/comp/mi: revision 1.1931
sys/netinet6/udp6_output.c: revision 1.46
sys/fs/puffs/puffs_compat.c: revision 1.3
sys/fs/udf/udf_rename.c: revision 1.11
sys/compat/svr4/svr4_filio.c: revision 1.24
sys/fs/udf/udf_rename.c: revision 1.12
sys/netinet/tcp_usrreq.c: revision 1.202
sys/miscfs/umapfs/umap_subr.c: revision 1.29
sys/compat/linux/common/linux_fadvise64.c: revision 1.3
sys/netinet/if_atm.c: revision 1.34
sys/miscfs/procfs/procfs_subr.c: revision 1.106
sys/miscfs/genfs/layer_subr.c: revision 1.37
sys/netinet/tcp_sack.c: revision 1.30
sys/compat/freebsd/freebsd_misc.c: revision 1.33
sys/compat/freebsd/freebsd_file.c: revision 1.33
sys/ufs/chfs/chfs_vnode.c: revision 1.12
sys/compat/svr4/svr4_ttold.c: revision 1.34
sys/compat/linux/common/linux_file.c: revision 1.114
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
sys/compat/linux/common/linux_signal.c: revision 1.76
sys/compat/common/compat_util.c: revision 1.46
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
sys/compat/svr4/svr4_sockio.c: revision 1.36
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
sys/compat/svr4/svr4_signal.c: revision 1.66
sys/kern/kern_exec.c: revision 1.410
sys/fs/puffs/puffs_vfsops.c: revision 1.115
sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
sys/compat/linux32/common/linux32_misc.c: revision 1.24
sys/netinet/in_pcb.c: revision 1.153
sys/sys/malloc.h: revision 1.116
sys/compat/common/if_43.c: revision 1.9
share/man/man9/Makefile: revision 1.380
sys/netinet/tcp_vtw.c: revision 1.12
sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
sys/compat/common/uipc_syscalls_43.c: revision 1.46
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
sys/fs/puffs/puffs_msgif.c: revision 1.97
sys/compat/svr4/svr4_ipc.c: revision 1.27
sys/compat/linux/common/linux_exec.c: revision 1.117
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
sys/netinet/tcp_output.c: revision 1.179
sys/compat/svr4/svr4_termios.c: revision 1.28
sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
sys/fs/puffs/puffs_subr.c: revision 1.67
sys/fs/puffs/puffs_node.c: revision 1.36
sys/miscfs/overlay/overlay_vnops.c: revision 1.21
sys/fs/cd9660/cd9660_node.c: revision 1.34
sys/netinet/raw_ip.c: revision 1.146
sys/sys/mallocvar.h: revision 1.13
sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
share/man/man9/malloc.9: revision 1.50
sys/netinet6/dest6.c: revision 1.18
sys/compat/linux/common/linux_uselib.c: revision 1.33
sys/compat/linux/common/linux_socket.c: revision 1.120
share/man/man9/malloc.9: revision 1.51
sys/netinet/tcp_subr.c: revision 1.257
sys/compat/linux/common/linux_socketcall.c: revision 1.45
sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
sys/compat/freebsd/freebsd_ipc.c: revision 1.17
sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
sys/netinet6/in6_pcb.c: revision 1.132
sys/netinet6/in6_ifattach.c: revision 1.94
sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
sys/miscfs/nullfs/null_vfsops.c: revision 1.90
sys/fs/cd9660/cd9660_util.c: revision 1.12
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
sys/compat/linux/common/linux_sched.c: revision 1.67
sys/compat/linux/common/linux_exec_aout.c: revision 1.67
sys/compat/linux/common/linux_pipe.c: revision 1.67
sys/compat/linux/common/linux_llseek.c: revision 1.34
sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.
 1.48.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.48.4.1 20-Mar-2017  pgoyette Sync with HEAD
 1.48.2.1 28-Aug-2017  skrll Sync with HEAD
 1.49.4.1 11-May-2017  pgoyette Sync with HEAD
 1.50.14.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.50.2.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.12 19-May-2025  andvar spelling and grammar fixes in comments.
 1.11 03-Dec-2021  andvar branches: 1.11.10;
fix various typos in comments, log messages and documentation.
 1.10 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.9 28-Apr-2008  martin branches: 1.9.6; 1.9.8;
Remove clause 3 and 4 from TNF licenses
 1.8 04-Dec-2007  dsl branches: 1.8.12; 1.8.14; 1.8.16;
Remove all the __P
 1.7 11-Nov-2005  chs branches: 1.7.46; 1.7.48; 1.7.54; 1.7.58;
include additional headers that are now needed.
 1.6 26-Feb-2005  perry branches: 1.6.4;
nuke trailing whitespace
 1.5 06-Sep-2002  gehenna branches: 1.5.6; 1.5.14; 1.5.16;
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.4 15-Feb-2002  christos branches: 1.4.8;
- add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
gdb, telnet, work
jdk-1.4.0 extractor works, jdk still coredumps.

christos
 1.3 27-May-2001  manu branches: 1.3.2;
Fixed two typo in comments
 1.2 12-Apr-2001  manu Fixed an error in a comment
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.4;
Added various header files for initial Linux compatibility on powerpc ports
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 19-Jan-2001  bouyer file linux_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:13:51 +0000
 1.3.2.2 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.3.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.8.1 16-May-2002  gehenna Remove a hard-coded device major.
 1.5.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.14.1 29-Apr-2005  kent sync with -current
 1.5.6.2 11-Dec-2005  christos Sync with head.
 1.5.6.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.4.2 07-Dec-2007  yamt sync with head
 1.6.4.1 21-Jun-2006  yamt sync with head.
 1.7.58.1 08-Dec-2007  ad Sync with head.
 1.7.54.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.48.1 09-Jan-2008  matt sync with HEAD
 1.7.46.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.8.16.2 04-May-2009  yamt sync with head.
 1.8.16.1 16-May-2008  yamt sync with head.
 1.8.14.1 18-May-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.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.11.10.1 02-Aug-2025  perseant Sync with HEAD
 1.7 14-Mar-2015  njoly Support Linux MAP_LOCKED mmap flag.
 1.6 28-Apr-2008  martin branches: 1.6.44; 1.6.64;
Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.70; 1.5.72; 1.5.74;
merge ktrace-lwp.
 1.4 26-Feb-2005  perry nuke trailing whitespace
 1.3 08-Sep-2001  manu branches: 1.3.18; 1.3.26; 1.3.28;
Removed a hack to make PowerPC mmap work. This could have side effects on
alpha and i386. It has been tested and works on i386.
 1.2 19-Jan-2001  manu branches: 1.2.2; 1.2.4; 1.2.6;
Added various header files for initial Linux compatibility on powerpc ports
 1.1 30-Sep-1998  erh branches: 1.1.12;
Stubs for future development of linux compat architechtures.
 1.1.12.1 11-Feb-2001  bouyer Sync with HEAD.
 1.2.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.1 21-Sep-2001  nathanw Catch up to -current.
 1.3.28.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.26.1 29-Apr-2005  kent sync with -current
 1.3.18.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.5.74.1 16-May-2008  yamt sync with head.
 1.5.72.1 18-May-2008  yamt sync with head.
 1.5.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.64.1 06-Apr-2015  skrll Sync with HEAD
 1.6.44.1 03-Dec-2017  jdolecek update from HEAD
 1.2 08-Sep-2001  manu Removed a hack to make PowerPC mmap work. This could have side effects on
alpha and i386. It has been tested and works on i386.
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Added powerpc specific code for Linux compatibility on powerpc ports
 1.1.8.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 19-Jan-2001  bouyer file linux_mmap_powerpc.c was added on branch thorpej_scsipi on 2001-02-11 19:13:52 +0000
 1.34 05-Sep-2022  tsutsui G/C ISSET() macro copies. It has been defined in <sys/types.h> since 2006.
 1.33 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.32 23-May-2020  ad Move proc_lock into the data segment. It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
 1.31 03-Sep-2018  riastradh branches: 1.31.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.30 28-Aug-2017  kamil branches: 1.30.2; 1.30.4;
Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
- /proc/#/ctl from mount_procfs(8)
- P_FSTRACE note from the documentation of ps(1)
- /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
- KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
- source code file miscfs/procfs/procfs_ctl.c
- PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
- KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
- PSL_FSTRACE (0x00010000) from sys/sys/proc.h
- P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed
PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).

Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>
 1.29 13-Oct-2015  pgoyette branches: 1.29.10;
Don't release proc_lock until we're done looking at things that are
protected by the lock, particularly p_stat and p_waited. Found by
Robert Elz.

XXX Pullup to NetBSD-7, -6, -6-0, and -6-1
 1.28 09-Nov-2014  maxv branches: 1.28.2;
Do not uselessly include <sys/malloc.h>.
 1.27 26-Sep-2014  christos set error return on error (from max)
 1.26 21-Sep-2014  christos fix leak
 1.25 15-Apr-2014  maxv branches: 1.25.2;
There are two times the same branches.

} else if (addr == LUSR_OFF(__signal)) {
error = ENOTSUP;
} else if (addr == LUSR_OFF(__signal)) {
error = ENOTSUP;
}

Just delete one of them. Spotted by my code scanner.

ok christos@
 1.24 04-Jan-2014  dsl branches: 1.24.2;
Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
of the fp save area to all the process_read_fpregs() and
process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
 1.23 01-Jul-2010  rmind branches: 1.23.8; 1.23.14; 1.23.18; 1.23.20; 1.23.22; 1.23.28;
Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour. Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
 1.22 21-Oct-2009  rmind branches: 1.22.2; 1.22.4;
Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.21 17-Dec-2008  cegger kill MALLOC and FREE macros.
 1.20 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.19 28-Apr-2008  martin branches: 1.19.2; 1.19.6; 1.19.8;
Remove clause 3 and 4 from TNF licenses
 1.18 23-Apr-2008  ad branches: 1.18.2;
Disable bitrotted linux ptrace interfaces, which are likely now a
security hole. Can be re-enabled at runtime. If you want to repair
them please look at the native implementation.
 1.17 20-Dec-2007  dsl branches: 1.17.6; 1.17.8;
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.16 09-Jul-2007  ad branches: 1.16.8; 1.16.16; 1.16.20;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.15 04-Mar-2007  christos branches: 1.15.2; 1.15.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.14 09-Feb-2007  ad branches: 1.14.2;
Merge newlock2 to head.
 1.13 30-Aug-2006  matt branches: 1.13.2;
Update to deal with options PTRACE
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.8;
merge ktrace-lwp.
 1.11 26-Feb-2005  perry branches: 1.11.4;
nuke trailing whitespace
 1.10 18-Jan-2003  thorpej branches: 1.10.2; 1.10.10; 1.10.12;
Merge the nathanw_sa branch.
 1.9 15-Nov-2001  lukem don't need <sys/types.h> when including <sys/param.h>
 1.8 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.7 02-Jun-2001  manu branches: 1.7.2;
Fixed a rough buf in ptrace SETFPREGS (was using regs instead of fpregs)
 1.6 28-May-2001  manu Fixed a potential security problem (copyout after an error)
 1.5 27-May-2001  manu Implements correctly PEEKUSER and fixes various serious bugs. The status
of this file is not "officially broken" any more (gdb works).
 1.4 22-May-2001  manu Fixed ptrace() so that it is now possible to get traced process registers.
This makes Linux gdb able to run a Linux binary
 1.3 04-Feb-2001  christos branches: 1.3.2; 1.3.4;
cosmetic fixes.
 1.2 04-Feb-2001  manu Fixed a bug in Linux/powerpc ktrace support (it's still broken, anyway)
 1.1 19-Jan-2001  manu Added powerpc specific code for Linux compatibility on powerpc ports
 1.3.4.5 24-Jun-2002  nathanw LWPify changes.
 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 08-Jan-2002  nathanw Catch up to -current.
 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 04-Feb-2001  bouyer file linux_ptrace.c was added on branch thorpej_scsipi on 2001-02-11 19:13:52 +0000
 1.7.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.10.10.1 29-Apr-2005  kent sync with -current
 1.10.2.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.11.4.4 21-Jan-2008  yamt sync with head
 1.11.4.3 03-Sep-2007  yamt sync with head.
 1.11.4.2 26-Feb-2007  yamt sync with head.
 1.11.4.1 30-Dec-2006  yamt sync with head.
 1.12.8.1 03-Sep-2006  yamt sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.2.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.13.2.1 28-Jan-2007  ad powerpc changes.
 1.14.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.4.1 11-Jul-2007  mjf Sync with head.
 1.15.2.1 05-Apr-2007  ad Compile fixes.
 1.16.20.1 02-Jan-2008  bouyer Sync with HEAD
 1.16.16.1 26-Dec-2007  ad Sync with head.
 1.16.8.1 09-Jan-2008  matt sync with HEAD
 1.17.8.1 18-May-2008  yamt sync with head.
 1.17.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.17.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.2.4 11-Aug-2010  yamt sync with head.
 1.18.2.3 11-Mar-2010  yamt sync with head
 1.18.2.2 04-May-2009  yamt sync with head.
 1.18.2.1 16-May-2008  yamt sync with head.
 1.19.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.19.2.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.19.2.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.22.4.1 03-Jul-2010  rmind sync with head
 1.22.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.23.28.1 15-Nov-2015  bouyer Pull up following revision(s) (requested by pgoyette in ticket #1335):
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29
Don't release proc_lock until we're done looking at things that are
protected by the lock, particularly p_stat and p_waited. Found by
Robert Elz.
XXX Pullup to NetBSD-7, -6, -6-0, and -6-1
 1.23.22.1 18-May-2014  rmind sync with head
 1.23.20.1 15-Nov-2015  bouyer Pull up following revision(s) (requested by pgoyette in ticket #1335):
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29
Don't release proc_lock until we're done looking at things that are
protected by the lock, particularly p_stat and p_waited. Found by
Robert Elz.
XXX Pullup to NetBSD-7, -6, -6-0, and -6-1
 1.23.18.2 03-Dec-2017  jdolecek update from HEAD
 1.23.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.14.1 15-Nov-2015  bouyer Pull up following revision(s) (requested by pgoyette in ticket #1335):
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29
Don't release proc_lock until we're done looking at things that are
protected by the lock, particularly p_stat and p_waited. Found by
Robert Elz.
XXX Pullup to NetBSD-7, -6, -6-0, and -6-1
 1.23.8.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.24.2.1 10-Aug-2014  tls Rebase.
 1.25.2.3 05-Nov-2015  snj Pull up following revision(s) (requested by pgoyette in ticket #998):
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29
Don't release proc_lock until we're done looking at things that are
protected by the lock, particularly p_stat and p_waited. Found by
Robert Elz.
 1.25.2.2 17-Jan-2015  martin branches: 1.25.2.2.2;
Pull up following revision(s) (requested by maxv in ticket #427):
sys/compat/svr4/svr4_schedctl.c: revision 1.8
sys/netinet/tcp_timer.c: revision 1.88
sys/miscfs/genfs/layer_vfsops.c: revision 1.45
sys/compat/svr4/svr4_ioctl.c: revision 1.37
sys/ufs/chfs/chfs_vfsops.c: revision 1.14
sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
sys/compat/common/kern_time_50.c: revision 1.28
sys/netinet6/ip6_forward.c: revision 1.74
sys/miscfs/umapfs/umap_vnops.c: revision 1.57
sys/compat/svr4/svr4_fcntl.c: revision 1.74
distrib/sets/lists/comp/mi: revision 1.1931
sys/netinet6/udp6_output.c: revision 1.46
sys/fs/puffs/puffs_compat.c: revision 1.3
sys/fs/udf/udf_rename.c: revision 1.11
sys/compat/svr4/svr4_filio.c: revision 1.24
sys/fs/udf/udf_rename.c: revision 1.12
sys/netinet/tcp_usrreq.c: revision 1.202
sys/miscfs/umapfs/umap_subr.c: revision 1.29
sys/compat/linux/common/linux_fadvise64.c: revision 1.3
sys/netinet/if_atm.c: revision 1.34
sys/miscfs/procfs/procfs_subr.c: revision 1.106
sys/miscfs/genfs/layer_subr.c: revision 1.37
sys/netinet/tcp_sack.c: revision 1.30
sys/compat/freebsd/freebsd_misc.c: revision 1.33
sys/compat/freebsd/freebsd_file.c: revision 1.33
sys/ufs/chfs/chfs_vnode.c: revision 1.12
sys/compat/svr4/svr4_ttold.c: revision 1.34
sys/compat/linux/common/linux_file.c: revision 1.114
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
sys/compat/linux/common/linux_signal.c: revision 1.76
sys/compat/common/compat_util.c: revision 1.46
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
sys/compat/svr4/svr4_sockio.c: revision 1.36
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
sys/compat/svr4/svr4_signal.c: revision 1.66
sys/kern/kern_exec.c: revision 1.410
sys/fs/puffs/puffs_vfsops.c: revision 1.115
sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
sys/compat/linux32/common/linux32_misc.c: revision 1.24
sys/netinet/in_pcb.c: revision 1.153
sys/sys/malloc.h: revision 1.116
sys/compat/common/if_43.c: revision 1.9
share/man/man9/Makefile: revision 1.380
sys/netinet/tcp_vtw.c: revision 1.12
sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
sys/compat/common/uipc_syscalls_43.c: revision 1.46
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
sys/fs/puffs/puffs_msgif.c: revision 1.97
sys/compat/svr4/svr4_ipc.c: revision 1.27
sys/compat/linux/common/linux_exec.c: revision 1.117
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
sys/netinet/tcp_output.c: revision 1.179
sys/compat/svr4/svr4_termios.c: revision 1.28
sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
sys/fs/puffs/puffs_subr.c: revision 1.67
sys/fs/puffs/puffs_node.c: revision 1.36
sys/miscfs/overlay/overlay_vnops.c: revision 1.21
sys/fs/cd9660/cd9660_node.c: revision 1.34
sys/netinet/raw_ip.c: revision 1.146
sys/sys/mallocvar.h: revision 1.13
sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
share/man/man9/malloc.9: revision 1.50
sys/netinet6/dest6.c: revision 1.18
sys/compat/linux/common/linux_uselib.c: revision 1.33
sys/compat/linux/common/linux_socket.c: revision 1.120
share/man/man9/malloc.9: revision 1.51
sys/netinet/tcp_subr.c: revision 1.257
sys/compat/linux/common/linux_socketcall.c: revision 1.45
sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
sys/compat/freebsd/freebsd_ipc.c: revision 1.17
sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
sys/netinet6/in6_pcb.c: revision 1.132
sys/netinet6/in6_ifattach.c: revision 1.94
sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
sys/miscfs/nullfs/null_vfsops.c: revision 1.90
sys/fs/cd9660/cd9660_util.c: revision 1.12
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
sys/compat/linux/common/linux_sched.c: revision 1.67
sys/compat/linux/common/linux_exec_aout.c: revision 1.67
sys/compat/linux/common/linux_pipe.c: revision 1.67
sys/compat/linux/common/linux_llseek.c: revision 1.34
sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.
 1.25.2.1 30-Oct-2014  martin Pull up following revision(s) (requested by maxv in ticket #163):
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.29
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.26
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.27
Fix four memory leaks in compat/linux.
 1.25.2.2.2.1 05-Nov-2015  snj Pull up following revision(s) (requested by pgoyette in ticket #998):
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29
Don't release proc_lock until we're done looking at things that are
protected by the lock, particularly p_stat and p_waited. Found by
Robert Elz.
 1.28.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.29.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.29.10.1 12-Apr-2018  martin Pull up following revision(s) (requested by kamil in ticket #713):

sys/modules/procfs/Makefile: revision 1.4
sys/miscfs/procfs/procfs_vfsops.c: revision 1.98
bin/ps/ps.1: revision 1.108
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.32
sys/miscfs/procfs/procfs_vnops.c: revision 1.198
sys/kern/sys_ptrace_common.c: revision 1.23
sys/kern/sys_ptrace_common.c: revision 1.24
sbin/mount_procfs/mount_procfs.8: revision 1.36
sys/kern/sys_ptrace_common.c: revision 1.25
sys/kern/sys_ptrace.c: revision 1.5
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.30
sys/sys/proc.h: revision 1.342
sys/kern/sys_ptrace_common.c: revision 1.26
sys/miscfs/procfs/procfs_ctl.c: file removal
sys/kern/sys_ptrace_common.c: revision 1.27
sys/miscfs/procfs/procfs_subr.c: revision 1.109
sys/kern/sys_ptrace_common.c: revision 1.28
sys/secmodel/extensions/secmodel_extensions.c: revision 1.8
sys/kern/sys_ptrace_common.c: revision 1.29
sys/sys/ptrace.h: revision 1.62
sys/compat/netbsd32/netbsd32_signal.c: revision 1.45
share/man/man9/kauth.9: revision 1.109
sys/miscfs/procfs/files.procfs: revision 1.12
sys/compat/netbsd32/netbsd32.h: revision 1.115
sys/miscfs/procfs/procfs.h: revision 1.72
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.5
sys/kern/kern_sig.c: revision 1.337
sys/sys/kauth.h: revision 1.75
sys/sys/sysctl.h: revision 1.224
sys/kern/sys_ptrace_common.c: revision 1.30
sys/kern/sys_ptrace_common.c: revision 1.31
sys/kern/sys_ptrace_common.c: revision 1.32
sys/kern/sys_ptrace_common.c: revision 1.33
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.20
sys/kern/sys_ptrace_common.c: revision 1.34
sys/kern/sys_ptrace_common.c: revision 1.36
sys/kern/kern_proc.c: revision 1.207
sys/kern/kern_exit.c: revision 1.269
doc/TODO.ptrace: revision 1.29

Make {s,g}et{db,fp,}regs work again for PK_32 processes
XXX: pullup-8

add disgusting magic to handle compat_netbsd32 as a module.

use process_*reg32 instead of struct *reg32.

Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
- /proc/#/ctl from mount_procfs(8)
- P_FSTRACE note from the documentation of ps(1)
- /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
- KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
- source code file miscfs/procfs/procfs_ctl.c
- PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
- KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
- PSL_FSTRACE (0x00010000) from sys/sys/proc.h
- P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed

PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).
Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>

untangle the mess:
- factor out common code
- break each ptrace subcall to its own sub-function
.. more to come ...
- reduce ifdef ugliness by moving it up top.
- factor out PT_IO and make PT_{READ,WRITE}_{I,D} use it
- factor out PT_DUMPCORE
- factor out sendsig code
.. more to come ...

handle siginfo requests for ptrace32

ptrace: Partially undo PT_{READ,WRITE}_{I,D} and unbreak these commands

The refactored code did not work and was generating EFAULT.

Sponsored by <The NetBSD Foundation>

Merge the code back; the problem was that since we are reading/writing
to a kernel address for PT_{READ,WRITE}_{I,D} we need the kernel vmspace.
provide separate read and write functions to accomodate register functions
that need a size argument.

don't ignore error from copyout_piod

Use the proper process (the tracee) to get information about lwps and
registers and the tracer for vmspace.

Add new sysctl(3) entry: security.models.extensions.user_set_dbregs

Model this new sysctl(3) entry after "user_set_cpu_affinity" in the same
level of sysctl(3) switches.

Allow to read unconditionally Debug Registers (no change here). This is
convenient as even if a user of a debugger does not use hardware assisted
watchpoints/breakpoints, a debugger can still prompt these values to store
in an internal cache with context of registers. Reading them should have
no security concerns.

Add a paranoid MI switch that prohibits by default setting these registers
by a regular user (non-superuser). Make this switch disabled by default.
There are enough reserved bits out there to allow using them
unconditionally on hardened hosts.

Features shipped with Debug Registers are optional features in debuggers.
There is no reduction in elementary functionality.

Reviewed by <christos>

Sponsored by <The NetBSD Foundation>
 1.30.4.1 10-Jun-2019  christos Sync with HEAD
 1.30.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.31.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.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.70; 1.6.72; 1.6.74;
merge ktrace-lwp.
 1.5 26-Feb-2005  perry nuke trailing whitespace
 1.4 31-Mar-2002  christos branches: 1.4.10; 1.4.18; 1.4.20;
bring the reverse signal mapping array into linux_signo.c
 1.3 31-Mar-2002  christos make signal array handling uniform, and put signal arrays in a separate
file. This is simular to errno array handling.
 1.2 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.4; 1.1.6;
Added powerpc specific code for Linux compatibility on powerpc ports
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.1 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 19-Jan-2001  bouyer file linux_sigarray.c was added on branch thorpej_scsipi on 2001-02-11 19:13:53 +0000
 1.4.20.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.18.1 29-Apr-2005  kent sync with -current
 1.4.10.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.74.1 16-May-2008  yamt sync with head.
 1.6.72.1 18-May-2008  yamt sync with head.
 1.6.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 18-Nov-2011  christos - add sigtimedwait support.
- merge the siginfo population code.
 1.5 23-Nov-2008  njoly branches: 1.5.16;
Move si_code definitions from MD to MI linux_siginfo.h, all archs
(except mips for 3 values) are identical.
While here, remove unused/unneeded LINUX__SI_CODE macro. Only the
lower 16-bits are used for userland si_code.
 1.4 28-Apr-2008  martin branches: 1.4.6; 1.4.8;
Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.70; 1.3.72; 1.3.74;
merge ktrace-lwp.
 1.2 26-Feb-2005  perry nuke trailing whitespace
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.26; 1.1.34; 1.1.36;
Added various header files for initial Linux compatibility on powerpc ports
 1.1.36.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.34.1 29-Apr-2005  kent sync with -current
 1.1.26.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 19-Jan-2001  bouyer file linux_siginfo.h was added on branch thorpej_scsipi on 2001-02-11 19:13:53 +0000
 1.3.74.2 04-May-2009  yamt sync with head.
 1.3.74.1 16-May-2008  yamt sync with head.
 1.3.72.1 18-May-2008  yamt sync with head.
 1.3.70.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.5.16.1 17-Apr-2012  yamt sync with head
 1.11 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.10 04-Dec-2007  dsl branches: 1.10.12; 1.10.14; 1.10.16;
Remove all the __P
 1.9 11-Dec-2005  christos branches: 1.9.44; 1.9.46; 1.9.52; 1.9.56;
merge ktrace-lwp.
 1.8 19-Sep-2005  christos MINSIGSTKSZ on linux is different depending on the platform and usually
smaller than ours.
 1.7 19-May-2005  manu branches: 1.7.2;
Add support for Linux SA_RESTORER on amd64.
 1.6 26-Feb-2005  perry nuke trailing whitespace
 1.5 26-Nov-2002  christos branches: 1.5.6; 1.5.14; 1.5.16;
rename: s/sa_/<compat>sa/g
 1.4 19-Mar-2002  christos - Now that RT-signals fit, fix the array to deliver them. [i386 only].
- jdk-1.4 works perfectly now. :-)
 1.3 19-Feb-2002  nathanw Add LINUX_SA_NOCLDWAIT.
 1.2 26-Aug-2001  manu Fixed a typo in struct naming. This does not seems to impact anything.
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.4; 1.1.6;
Added various header files for initial Linux compatibility on powerpc ports
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.4 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 21-Sep-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 19-Jan-2001  bouyer file linux_signal.h was added on branch thorpej_scsipi on 2001-02-11 19:13:53 +0000
 1.5.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.14.1 29-Apr-2005  kent sync with -current
 1.5.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.6.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.2.2 07-Dec-2007  yamt sync with head
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.9.56.1 08-Dec-2007  ad Sync with head.
 1.9.52.1 08-Dec-2007  mjf Sync with HEAD.
 1.9.46.1 09-Jan-2008  matt sync with HEAD
 1.9.44.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.10.16.1 16-May-2008  yamt sync with head.
 1.10.14.1 18-May-2008  yamt sync with head.
 1.10.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.7 25-Jan-2014  njoly Update linux socket socket options (SO_*). Add common version to its
own file (linux_socket_generic.h); use it for all but alpha and mips.
 1.6 28-Apr-2008  martin branches: 1.6.34; 1.6.44; 1.6.50;
Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.70; 1.5.72; 1.5.74;
merge ktrace-lwp.
 1.4 26-Feb-2005  perry nuke trailing whitespace
 1.3 26-Jul-2003  jdolecek branches: 1.3.8; 1.3.10;
add LINUX_SO_PEERNAME, LINUX_SO_TIMESTAMP where it has been missing
fix value for LINUX_SO_DETACH_FILTER on couple places (unused anyway)

g/c LINUX_SCM_TIMESTAMP definition for some archs, it will be defined
in generic linux_socket.h
 1.2 26-Aug-2001  manu branches: 1.2.20;
Fiexed a typo in a #define
 1.1 19-Jan-2001  manu branches: 1.1.2; 1.1.4; 1.1.6;
Added various header files for initial Linux compatibility on powerpc ports
 1.1.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 21-Sep-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 19-Jan-2001  bouyer file linux_socket.h was added on branch thorpej_scsipi on 2001-02-11 19:13:53 +0000
 1.2.20.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 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.74.1 16-May-2008  yamt sync with head.
 1.5.72.1 18-May-2008  yamt sync with head.
 1.5.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.50.1 18-May-2014  rmind sync with head
 1.6.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.34.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.3 25-Jul-2004  chs remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.2 19-Jan-2001  manu branches: 1.2.2; 1.2.26; 1.2.28;
Fixed a typo (two instructions dupliated at the end of code that were not reached)
 1.1 19-Jan-2001  manu Added powerpc specific code for Linux compatibility on powerpc ports
 1.2.28.1 26-Jul-2004  tron Pull up file removal (requested by chs in ticket #715):
remove the LINUX_SP_WRAP hack since it doesn't seem to be needed anymore,
and removing it lets us go back to mapping the stack non-executable again.
 1.2.26.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 19-Jan-2001  bouyer file linux_sp_wrap_powerpc.S was added on branch thorpej_scsipi on 2001-02-11 19:13:54 +0000
 1.99 28-Sep-2024  christos regen
 1.98 01-Jul-2024  christos regen
 1.97 29-Jun-2024  christos branches: 1.97.2;
regen
 1.96 19-Aug-2023  christos regen
 1.95 18-Aug-2023  christos regen
 1.94 29-Jul-2023  christos regen
 1.93 28-Jul-2023  christos regen
 1.92 02-Dec-2021  ryo regen
 1.91 24-Nov-2021  ryo regen
 1.90 20-Sep-2021  thorpej Regen for preadv(2) / pwritev(2).
 1.89 20-Sep-2021  thorpej Regen for eventfd.
 1.88 19-Sep-2021  thorpej Regen for timerfd.
 1.87 19-Sep-2021  thorpej Regen for POSIX timer syscalls.
 1.86 26-Apr-2020  thorpej branches: 1.86.2;
Regen for native futex calls.
 1.85 09-Nov-2019  jdolecek regen
 1.84 10-Aug-2018  pgoyette Regen
 1.83 10-May-2017  riastradh branches: 1.83.8; 1.83.10;
regen
 1.82 03-Feb-2017  christos branches: 1.82.4;
regen
 1.81 03-Feb-2017  martin regen
 1.80 16-Jan-2017  christos regen all
 1.79 13-Jan-2017  christos branches: 1.79.2;
regen
 1.78 02-Jan-2017  martin Regen (something apparently went wrong in previous)
 1.77 02-Jan-2017  manu Regen
 1.76 24-Jul-2016  njoly Regen for readlink/readlinkat signatures.
 1.75 27-Oct-2015  njoly branches: 1.75.2;
Regen.
 1.74 25-Oct-2015  njoly Regen for posix chown family cleanup.
 1.73 24-Sep-2015  christos regen
 1.72 07-Mar-2015  christos regen
 1.71 22-Nov-2014  njoly branches: 1.71.2;
Regen for ppoll signature fix
 1.70 31-May-2014  njoly branches: 1.70.2;
Regen for munmap(2) signature.
 1.69 20-May-2014  njoly Regen for getgroups/setgroups update.
 1.68 17-May-2014  njoly Regen for fadvise64 offset types changes.
 1.67 06-May-2014  njoly Regen for mknod device argument type change.
 1.66 04-May-2014  njoly Regen for pread/pwrite 64bit offset argument.
 1.65 08-Apr-2014  njoly Regen.
 1.64 10-Dec-2013  njoly branches: 1.64.2;
Regen.
 1.63 08-Dec-2013  njoly Regen.
 1.62 07-Nov-2013  njoly Regen for dup/dup2/dup3 argument types fix.
 1.61 24-Sep-2013  njoly Regen for utimensat(2).
 1.60 11-Aug-2013  pooka regen
 1.59 11-Aug-2013  pooka regen
 1.58 08-Apr-2013  pooka branches: 1.58.4;
regen for utimes
 1.57 19-Sep-2012  pooka regen for ppoll (and, apparently, SYCALL_ARG_PTR)
 1.56 18-Nov-2011  christos branches: 1.56.10;
- add sigtimedwait support.
- merge the siginfo population code.
 1.55 31-May-2011  njoly branches: 1.55.4;
Regen for fadvise64_64 typo fix.
 1.54 30-May-2011  alnsn Regenerate files to pick up correct RCS Ids. Suggested by Chris Badura.
 1.53 30-May-2011  alnsn Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.
 1.52 15-Apr-2011  he Regenerate these files after adding pipe2() and dup3().
 1.51 07-Jul-2010  chs branches: 1.51.2;
regen
 1.50 14-Dec-2009  matt branches: 1.50.2; 1.50.4;
Regen (new makesyscalls.sh)
 1.49 24-Nov-2009  njoly Regen for personality(2) update.
 1.48 08-Jun-2009  njoly Regen for rt_queueinfo(2) update.
 1.47 17-Jan-2009  njoly branches: 1.47.2;
Regen for wait4 update.
 1.46 15-Jan-2009  njoly Rengen for compat50 update.
 1.45 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.44 19-Nov-2008  ad Regen.
 1.43 12-Nov-2008  njoly Regen for nanosleep(2) fix.
 1.42 23-Apr-2008  ad branches: 1.42.2; 1.42.4; 1.42.8; 1.42.10; 1.42.12;
Regen.
 1.41 04-Apr-2008  njoly branches: 1.41.2;
Regen for linux_sys_msync removal.
 1.40 24-Dec-2007  njoly branches: 1.40.6;
Regen for linux_sys_getpgid removal.
 1.39 21-Dec-2007  njoly Regen for getfsuid/setfsgid syscall exchange.
 1.38 20-Dec-2007  dsl regen
 1.37 16-Nov-2007  njoly branches: 1.37.2; 1.37.6;
Regen, for syscalls cleanup.
 1.36 04-Mar-2007  christos branches: 1.36.14; 1.36.16; 1.36.20; 1.36.22;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.35 01-Sep-2006  matt branches: 1.35.8;
Regen.
 1.34 30-Aug-2006  matt Regen
 1.33 10-Jun-2006  christos regen
 1.32 11-Dec-2005  christos branches: 1.32.4; 1.32.8; 1.32.14;
merge ktrace-lwp.
 1.31 18-Oct-2005  christos regen
 1.30 16-May-2005  fvdl branches: 1.30.2;
Regen.
 1.29 16-May-2005  fvdl Regen.
 1.28 26-Feb-2005  perry regen
 1.27 26-Feb-2005  perry regen
 1.26 20-Sep-2004  jdolecek branches: 1.26.4; 1.26.6;
regen:
implement support for Linux statfs64() syscall - 64bit variant of statfs()
 1.25 08-Sep-2004  jdolecek regen: add exit_group(2)
 1.24 01-Aug-2004  jdolecek regen - sync syscall lists with Linux kernel 2.6.7
 1.23 01-Aug-2004  jdolecek regen:

connect madvise(2) and mincore(2) - apparently the newer Linux libs
don't stub it anymore, so allow the application to take advantage
of them

the Linux calls appear to be compatible in the flag values and semantics,
so a wrapper is not necessary
 1.22 10-Aug-2003  jdolecek regen - added wrapper for Linux ftruncate64()
 1.21 23-Jun-2003  christos branches: 1.21.2;
Regen.
 1.20 18-Jan-2003  thorpej Regen for correct RCS ID.
 1.19 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.18 01-Nov-2002  jdolecek regen: nsysent set to 256
 1.17 19-May-2002  jdolecek branches: 1.17.2;
hook in truncate64(2) and ftruncate64(2)
 1.16 12-May-2002  jdolecek branches: 1.16.2;
regen - 64 fs syscalls
 1.15 10-Apr-2002  christos regen
 1.14 22-Mar-2002  christos regen
 1.13 19-Feb-2002  nathanw Regen.
 1.12 15-Feb-2002  christos - add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
gdb, telnet, work
jdk-1.4.0 extractor works, jdk still coredumps.

christos
 1.11 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.10 08-Sep-2001  manu Removed a hack to make PowerPC mmap work. This could have side effects on
alpha and i386. It has been tested and works on i386.
 1.9 30-May-2001  mrg branches: 1.9.2; 1.9.4;
use _KERNEL_OPT.
 1.8 13-May-2001  manu Improved the accuracy of gettimeofday/settimeofday: Linux stores a srtuct
timezone in the kernel. We now keep track of it for emulated processes.
Tested for powerpc and i386. Untested on m68k, but it should be ok
Alpha has a particular implementation (osf1_sys_gettimeofday), and it has
therefore not been touched.
 1.7 30-Mar-2001  jdolecek regen - use linux_sys_nosys() instead sys_nosys()
 1.6 30-Mar-2001  jdolecek regen
 1.5 30-Mar-2001  jdolecek regen
 1.4 27-Jan-2001  thorpej branches: 1.4.2; 1.4.4;
Regen; getpid(2) is MP-safe.
 1.3 27-Jan-2001  thorpej Regen; add sy_flags.
 1.2 20-Jan-2001  manu Fix the "created from" field of files generated from syscalls.master (this
master file did not have a RCS Id at generation time, hence the problem)
 1.1 19-Jan-2001  manu Added various header files for initial Linux compatibility on powerpc ports
 1.4.4.10 11-Nov-2002  nathanw Catch up to -current
 1.4.4.9 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.8 29-May-2002  nathanw Regen.
 1.4.4.7 17-Apr-2002  nathanw Catch up to -current.
 1.4.4.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.4 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.3 21-Sep-2001  nathanw Catch up to -current.
 1.4.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 27-Jan-2001  bouyer file linux_syscall.h was added on branch thorpej_scsipi on 2001-02-11 19:13:54 +0000
 1.9.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.9.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.2.1 30-May-2002  gehenna Catch up with -current.
 1.17.2.3 14-Jun-2004  jmc Regen for changes in ticket #1708
 1.17.2.2 11-May-2004  tron Regen for ticket 1686.
 1.17.2.1 22-Oct-2003  jmc Regen files (requested by tv in ticket #1427)

Proper support for mmap2
 1.21.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.21.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.21.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.26.4.1 29-Apr-2005  kent sync with -current
 1.30.2.5 21-Jan-2008  yamt sync with head
 1.30.2.4 07-Dec-2007  yamt sync with head
 1.30.2.3 03-Sep-2007  yamt sync with head.
 1.30.2.2 30-Dec-2006  yamt sync with head.
 1.30.2.1 21-Jun-2006  yamt sync with head.
 1.32.14.1 19-Jun-2006  chap Sync with head.
 1.32.8.2 03-Sep-2006  yamt sync with head.
 1.32.8.1 26-Jun-2006  yamt sync with head.
 1.32.4.1 09-Sep-2006  rpaulo sync with head
 1.35.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.36.22.2 27-Dec-2007  mjf Sync with HEAD.
 1.36.22.1 19-Nov-2007  mjf Sync with HEAD.
 1.36.20.1 18-Nov-2007  bouyer Sync with HEAD
 1.36.16.1 09-Jan-2008  matt sync with HEAD
 1.36.14.1 21-Nov-2007  joerg Sync with HEAD.
 1.37.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.37.2.1 26-Dec-2007  ad Sync with head.
 1.40.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.40.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.41.2.1 18-May-2008  yamt sync with head.
 1.42.12.1 20-Nov-2008  snj Regen for ticket 81.
 1.42.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.42.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.42.4.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.42.2.4 11-Aug-2010  yamt sync with head.
 1.42.2.3 11-Mar-2010  yamt sync with head
 1.42.2.2 20-Jun-2009  yamt sync with head
 1.42.2.1 04-May-2009  yamt sync with head.
 1.47.2.1 23-Jul-2009  jym Sync with HEAD.
 1.50.4.4 12-Jun-2011  rmind sync with head
 1.50.4.3 31-May-2011  rmind sync with head
 1.50.4.2 21-Apr-2011  rmind sync with head
 1.50.4.1 05-Mar-2011  rmind sync with head
 1.50.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.51.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.55.4.3 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.55.4.2 30-Oct-2012  yamt sync with head
 1.55.4.1 17-Apr-2012  yamt sync with head
 1.56.10.4 03-Dec-2017  jdolecek update from HEAD
 1.56.10.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.56.10.2 23-Jun-2013  tls resync from head
 1.56.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.58.4.2 18-May-2014  rmind sync with head
 1.58.4.1 28-Aug-2013  rmind sync with head
 1.64.2.1 10-Aug-2014  tls Rebase.
 1.70.2.1 17-Apr-2017  snj regen for ticket 1354
 1.71.2.4 05-Feb-2017  skrll Sync with HEAD
 1.71.2.3 05-Oct-2016  skrll Sync with HEAD
 1.71.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.71.2.1 06-Apr-2015  skrll Sync with HEAD
 1.75.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.75.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.75.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.79.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.82.4.1 11-May-2017  pgoyette Sync with HEAD
 1.83.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.83.10.1 10-Jun-2019  christos Sync with HEAD
 1.83.8.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.86.2.2 17-Dec-2020  thorpej Regen for preadv(2) and pwritev(2).
 1.86.2.1 15-Dec-2020  thorpej Regen for eventfd, timerfd, POSIX timers.
 1.97.2.1 02-Aug-2025  perseant Sync with HEAD
 1.98 28-Sep-2024  christos regen
 1.97 01-Jul-2024  christos regen
 1.96 29-Jun-2024  christos branches: 1.96.2;
regen
 1.95 19-Aug-2023  christos regen
 1.94 18-Aug-2023  christos regen
 1.93 29-Jul-2023  christos regen
 1.92 28-Jul-2023  christos regen
 1.91 02-Dec-2021  ryo regen
 1.90 24-Nov-2021  ryo regen
 1.89 20-Sep-2021  thorpej Regen for preadv(2) / pwritev(2).
 1.88 20-Sep-2021  thorpej Regen for eventfd.
 1.87 19-Sep-2021  thorpej Regen for timerfd.
 1.86 19-Sep-2021  thorpej Regen for POSIX timer syscalls.
 1.85 26-Apr-2020  thorpej branches: 1.85.2;
Regen for native futex calls.
 1.84 09-Nov-2019  jdolecek regen
 1.83 10-Aug-2018  pgoyette Regen
 1.82 10-May-2017  riastradh branches: 1.82.8; 1.82.10;
regen
 1.81 03-Feb-2017  christos branches: 1.81.4;
regen
 1.80 03-Feb-2017  martin regen
 1.79 16-Jan-2017  christos regen all
 1.78 13-Jan-2017  christos branches: 1.78.2;
regen
 1.77 02-Jan-2017  martin Regen (something apparently went wrong in previous)
 1.76 02-Jan-2017  manu Regen
 1.75 24-Jul-2016  njoly Regen for readlink/readlinkat signatures.
 1.74 27-Oct-2015  njoly branches: 1.74.2;
Regen.
 1.73 25-Oct-2015  njoly Regen for posix chown family cleanup.
 1.72 24-Sep-2015  christos regen
 1.71 07-Mar-2015  christos regen
 1.70 22-Nov-2014  njoly branches: 1.70.2;
Regen for ppoll signature fix
 1.69 31-May-2014  njoly branches: 1.69.2;
Regen for munmap(2) signature.
 1.68 20-May-2014  njoly Regen for getgroups/setgroups update.
 1.67 17-May-2014  njoly Regen for fadvise64 offset types changes.
 1.66 06-May-2014  njoly Regen for mknod device argument type change.
 1.65 04-May-2014  njoly Regen for pread/pwrite 64bit offset argument.
 1.64 08-Apr-2014  njoly Regen.
 1.63 10-Dec-2013  njoly branches: 1.63.2;
Regen.
 1.62 08-Dec-2013  njoly Regen.
 1.61 07-Nov-2013  njoly Regen for dup/dup2/dup3 argument types fix.
 1.60 24-Sep-2013  njoly Regen for utimensat(2).
 1.59 11-Aug-2013  pooka regen
 1.58 11-Aug-2013  pooka regen
 1.57 08-Apr-2013  pooka branches: 1.57.4;
regen for utimes
 1.56 19-Sep-2012  pooka regen for ppoll (and, apparently, SYCALL_ARG_PTR)
 1.55 18-Nov-2011  christos branches: 1.55.10;
- add sigtimedwait support.
- merge the siginfo population code.
 1.54 31-May-2011  njoly branches: 1.54.4;
Regen for fadvise64_64 typo fix.
 1.53 30-May-2011  alnsn Regenerate files to pick up correct RCS Ids. Suggested by Chris Badura.
 1.52 30-May-2011  alnsn Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.
 1.51 15-Apr-2011  he Regenerate these files after adding pipe2() and dup3().
 1.50 07-Jul-2010  chs branches: 1.50.2;
regen
 1.49 14-Dec-2009  matt branches: 1.49.2; 1.49.4;
Regen (new makesyscalls.sh)
 1.48 24-Nov-2009  njoly Regen for personality(2) update.
 1.47 08-Jun-2009  njoly Regen for rt_queueinfo(2) update.
 1.46 17-Jan-2009  njoly branches: 1.46.2;
Regen for wait4 update.
 1.45 15-Jan-2009  njoly Rengen for compat50 update.
 1.44 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.43 19-Nov-2008  ad Regen.
 1.42 12-Nov-2008  njoly Regen for nanosleep(2) fix.
 1.41 23-Apr-2008  ad branches: 1.41.2; 1.41.4; 1.41.8; 1.41.10; 1.41.12;
Regen.
 1.40 04-Apr-2008  njoly branches: 1.40.2;
Regen for linux_sys_msync removal.
 1.39 24-Dec-2007  njoly branches: 1.39.6;
Regen for linux_sys_getpgid removal.
 1.38 21-Dec-2007  njoly Regen for getfsuid/setfsgid syscall exchange.
 1.37 20-Dec-2007  dsl regen
 1.36 16-Nov-2007  njoly branches: 1.36.2; 1.36.6;
Regen, for syscalls cleanup.
 1.35 04-Mar-2007  christos branches: 1.35.14; 1.35.16; 1.35.20; 1.35.22;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.34 01-Sep-2006  matt branches: 1.34.8;
Regen.
 1.33 30-Aug-2006  matt Regen
 1.32 10-Jun-2006  christos regen
 1.31 11-Dec-2005  christos branches: 1.31.4; 1.31.8; 1.31.14;
merge ktrace-lwp.
 1.30 18-Oct-2005  christos regen
 1.29 16-May-2005  fvdl branches: 1.29.2;
Regen.
 1.28 16-May-2005  fvdl Regen.
 1.27 26-Feb-2005  perry regen
 1.26 26-Feb-2005  perry regen
 1.25 20-Sep-2004  jdolecek branches: 1.25.4; 1.25.6;
regen:
implement support for Linux statfs64() syscall - 64bit variant of statfs()
 1.24 08-Sep-2004  jdolecek regen: add exit_group(2)
 1.23 01-Aug-2004  jdolecek regen - sync syscall lists with Linux kernel 2.6.7
 1.22 01-Aug-2004  jdolecek regen:

connect madvise(2) and mincore(2) - apparently the newer Linux libs
don't stub it anymore, so allow the application to take advantage
of them

the Linux calls appear to be compatible in the flag values and semantics,
so a wrapper is not necessary
 1.21 10-Aug-2003  jdolecek regen - added wrapper for Linux ftruncate64()
 1.20 23-Jun-2003  christos branches: 1.20.2;
Regen.
 1.19 18-Jan-2003  thorpej Regen for correct RCS ID.
 1.18 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.17 19-May-2002  jdolecek branches: 1.17.2;
hook in truncate64(2) and ftruncate64(2)
 1.16 12-May-2002  jdolecek branches: 1.16.2;
regen - 64 fs syscalls
 1.15 10-Apr-2002  christos regen
 1.14 22-Mar-2002  christos regen
 1.13 19-Feb-2002  nathanw Regen.
 1.12 15-Feb-2002  christos - add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
gdb, telnet, work
jdk-1.4.0 extractor works, jdk still coredumps.

christos
 1.11 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.10 08-Sep-2001  manu Removed a hack to make PowerPC mmap work. This could have side effects on
alpha and i386. It has been tested and works on i386.
 1.9 30-May-2001  mrg branches: 1.9.2; 1.9.4;
use _KERNEL_OPT.
 1.8 13-May-2001  manu Improved the accuracy of gettimeofday/settimeofday: Linux stores a srtuct
timezone in the kernel. We now keep track of it for emulated processes.
Tested for powerpc and i386. Untested on m68k, but it should be ok
Alpha has a particular implementation (osf1_sys_gettimeofday), and it has
therefore not been touched.
 1.7 30-Mar-2001  jdolecek regen - use linux_sys_nosys() instead sys_nosys()
 1.6 30-Mar-2001  jdolecek regen
 1.5 30-Mar-2001  jdolecek regen
 1.4 27-Jan-2001  thorpej branches: 1.4.2; 1.4.4;
Regen; getpid(2) is MP-safe.
 1.3 27-Jan-2001  thorpej Regen; add sy_flags.
 1.2 20-Jan-2001  manu Fix the "created from" field of files generated from syscalls.master (this
master file did not have a RCS Id at generation time, hence the problem)
 1.1 19-Jan-2001  manu Added various header files for initial Linux compatibility on powerpc ports
 1.4.4.9 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.8 29-May-2002  nathanw Regen.
 1.4.4.7 17-Apr-2002  nathanw Catch up to -current.
 1.4.4.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.4 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.3 21-Sep-2001  nathanw Catch up to -current.
 1.4.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 27-Jan-2001  bouyer file linux_syscallargs.h was added on branch thorpej_scsipi on 2001-02-11 19:13:55 +0000
 1.9.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.9.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.2.1 30-May-2002  gehenna Catch up with -current.
 1.17.2.3 14-Jun-2004  jmc Regen for changes in ticket #1708
 1.17.2.2 11-May-2004  tron Regen for ticket 1686.
 1.17.2.1 22-Oct-2003  jmc Regen files (requested by tv in ticket #1427)

Proper support for mmap2
 1.20.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.20.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.25.4.1 29-Apr-2005  kent sync with -current
 1.29.2.5 21-Jan-2008  yamt sync with head
 1.29.2.4 07-Dec-2007  yamt sync with head
 1.29.2.3 03-Sep-2007  yamt sync with head.
 1.29.2.2 30-Dec-2006  yamt sync with head.
 1.29.2.1 21-Jun-2006  yamt sync with head.
 1.31.14.1 19-Jun-2006  chap Sync with head.
 1.31.8.2 03-Sep-2006  yamt sync with head.
 1.31.8.1 26-Jun-2006  yamt sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.34.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.35.22.2 27-Dec-2007  mjf Sync with HEAD.
 1.35.22.1 19-Nov-2007  mjf Sync with HEAD.
 1.35.20.1 18-Nov-2007  bouyer Sync with HEAD
 1.35.16.1 09-Jan-2008  matt sync with HEAD
 1.35.14.1 21-Nov-2007  joerg Sync with HEAD.
 1.36.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.36.2.1 26-Dec-2007  ad Sync with head.
 1.39.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.39.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.40.2.1 18-May-2008  yamt sync with head.
 1.41.12.1 20-Nov-2008  snj Regen for ticket 81.
 1.41.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.41.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.41.4.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.41.2.4 11-Aug-2010  yamt sync with head.
 1.41.2.3 11-Mar-2010  yamt sync with head
 1.41.2.2 20-Jun-2009  yamt sync with head
 1.41.2.1 04-May-2009  yamt sync with head.
 1.46.2.1 23-Jul-2009  jym Sync with HEAD.
 1.49.4.4 12-Jun-2011  rmind sync with head
 1.49.4.3 31-May-2011  rmind sync with head
 1.49.4.2 21-Apr-2011  rmind sync with head
 1.49.4.1 05-Mar-2011  rmind sync with head
 1.49.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.50.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.54.4.3 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.54.4.2 30-Oct-2012  yamt sync with head
 1.54.4.1 17-Apr-2012  yamt sync with head
 1.55.10.4 03-Dec-2017  jdolecek update from HEAD
 1.55.10.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.55.10.2 23-Jun-2013  tls resync from head
 1.55.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.57.4.2 18-May-2014  rmind sync with head
 1.57.4.1 28-Aug-2013  rmind sync with head
 1.63.2.1 10-Aug-2014  tls Rebase.
 1.69.2.1 17-Apr-2017  snj regen for ticket 1354
 1.70.2.5 28-Aug-2017  skrll Sync with HEAD
 1.70.2.4 05-Feb-2017  skrll Sync with HEAD
 1.70.2.3 05-Oct-2016  skrll Sync with HEAD
 1.70.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.70.2.1 06-Apr-2015  skrll Sync with HEAD
 1.74.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.74.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.74.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.78.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.81.4.1 11-May-2017  pgoyette Sync with HEAD
 1.82.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.82.10.1 10-Jun-2019  christos Sync with HEAD
 1.82.8.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.85.2.2 17-Dec-2020  thorpej Regen for preadv(2) and pwritev(2).
 1.85.2.1 15-Dec-2020  thorpej Regen for eventfd, timerfd, POSIX timers.
 1.96.2.1 02-Aug-2025  perseant Sync with HEAD
 1.98 28-Sep-2024  christos regen
 1.97 01-Jul-2024  christos regen
 1.96 29-Jun-2024  christos branches: 1.96.2;
regen
 1.95 19-Aug-2023  christos regen
 1.94 18-Aug-2023  christos regen
 1.93 29-Jul-2023  christos regen
 1.92 28-Jul-2023  christos regen
 1.91 02-Dec-2021  ryo regen
 1.90 24-Nov-2021  ryo regen
 1.89 20-Sep-2021  thorpej Regen for preadv(2) / pwritev(2).
 1.88 20-Sep-2021  thorpej Regen for eventfd.
 1.87 19-Sep-2021  thorpej Regen for timerfd.
 1.86 19-Sep-2021  thorpej Regen for POSIX timer syscalls.
 1.85 26-Apr-2020  thorpej branches: 1.85.2;
Regen for native futex calls.
 1.84 09-Nov-2019  jdolecek regen
 1.83 10-Aug-2018  pgoyette Regen
 1.82 10-May-2017  riastradh branches: 1.82.8; 1.82.10;
regen
 1.81 03-Feb-2017  christos branches: 1.81.4;
regen
 1.80 03-Feb-2017  martin regen
 1.79 16-Jan-2017  christos regen all
 1.78 13-Jan-2017  christos branches: 1.78.2;
regen
 1.77 02-Jan-2017  martin Regen (something apparently went wrong in previous)
 1.76 02-Jan-2017  manu Regen
 1.75 24-Jul-2016  njoly Regen for readlink/readlinkat signatures.
 1.74 27-Oct-2015  njoly branches: 1.74.2;
Regen.
 1.73 25-Oct-2015  njoly Regen for posix chown family cleanup.
 1.72 24-Sep-2015  christos regen
 1.71 07-Mar-2015  christos regen
 1.70 22-Nov-2014  njoly branches: 1.70.2;
Regen for ppoll signature fix
 1.69 31-May-2014  njoly branches: 1.69.2;
Regen for munmap(2) signature.
 1.68 20-May-2014  njoly Regen for getgroups/setgroups update.
 1.67 17-May-2014  njoly Regen for fadvise64 offset types changes.
 1.66 06-May-2014  njoly Regen for mknod device argument type change.
 1.65 04-May-2014  njoly Regen for pread/pwrite 64bit offset argument.
 1.64 08-Apr-2014  njoly Regen.
 1.63 10-Dec-2013  njoly branches: 1.63.2;
Regen.
 1.62 08-Dec-2013  njoly Regen.
 1.61 07-Nov-2013  njoly Regen for dup/dup2/dup3 argument types fix.
 1.60 24-Sep-2013  njoly Regen for utimensat(2).
 1.59 11-Aug-2013  pooka regen
 1.58 11-Aug-2013  pooka regen
 1.57 08-Apr-2013  pooka branches: 1.57.4;
regen for utimes
 1.56 19-Sep-2012  pooka regen for ppoll (and, apparently, SYCALL_ARG_PTR)
 1.55 18-Nov-2011  christos branches: 1.55.10;
- add sigtimedwait support.
- merge the siginfo population code.
 1.54 31-May-2011  njoly branches: 1.54.4;
Regen for fadvise64_64 typo fix.
 1.53 30-May-2011  alnsn Regenerate files to pick up correct RCS Ids. Suggested by Chris Badura.
 1.52 30-May-2011  alnsn Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.
 1.51 15-Apr-2011  he Regenerate these files after adding pipe2() and dup3().
 1.50 07-Jul-2010  chs branches: 1.50.2;
regen
 1.49 14-Dec-2009  matt branches: 1.49.2; 1.49.4;
Regen (new makesyscalls.sh)
 1.48 24-Nov-2009  njoly Regen for personality(2) update.
 1.47 08-Jun-2009  njoly Regen for rt_queueinfo(2) update.
 1.46 17-Jan-2009  njoly branches: 1.46.2;
Regen for wait4 update.
 1.45 15-Jan-2009  njoly Rengen for compat50 update.
 1.44 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.43 19-Nov-2008  ad Regen.
 1.42 12-Nov-2008  njoly Regen for nanosleep(2) fix.
 1.41 23-Apr-2008  ad branches: 1.41.2; 1.41.4; 1.41.8; 1.41.10; 1.41.12;
Regen.
 1.40 04-Apr-2008  njoly branches: 1.40.2;
Regen for linux_sys_msync removal.
 1.39 24-Dec-2007  njoly branches: 1.39.6;
Regen for linux_sys_getpgid removal.
 1.38 21-Dec-2007  njoly Regen for getfsuid/setfsgid syscall exchange.
 1.37 20-Dec-2007  dsl regen
 1.36 16-Nov-2007  njoly branches: 1.36.2; 1.36.6;
Regen, for syscalls cleanup.
 1.35 09-Feb-2007  ad branches: 1.35.18; 1.35.20; 1.35.24; 1.35.26;
Merge newlock2 to head.
 1.34 01-Sep-2006  matt branches: 1.34.2;
Regen.
 1.33 30-Aug-2006  matt Regen
 1.32 10-Jun-2006  christos regen
 1.31 11-Dec-2005  christos branches: 1.31.4; 1.31.8; 1.31.14;
merge ktrace-lwp.
 1.30 18-Oct-2005  christos regen
 1.29 16-May-2005  fvdl branches: 1.29.2;
Regen.
 1.28 16-May-2005  fvdl Regen.
 1.27 26-Feb-2005  perry regen
 1.26 26-Feb-2005  perry regen
 1.25 20-Sep-2004  jdolecek branches: 1.25.4; 1.25.6;
regen:
implement support for Linux statfs64() syscall - 64bit variant of statfs()
 1.24 08-Sep-2004  jdolecek regen: add exit_group(2)
 1.23 01-Aug-2004  jdolecek regen - sync syscall lists with Linux kernel 2.6.7
 1.22 01-Aug-2004  jdolecek regen:

connect madvise(2) and mincore(2) - apparently the newer Linux libs
don't stub it anymore, so allow the application to take advantage
of them

the Linux calls appear to be compatible in the flag values and semantics,
so a wrapper is not necessary
 1.21 10-Aug-2003  jdolecek regen - added wrapper for Linux ftruncate64()
 1.20 23-Jun-2003  christos branches: 1.20.2;
Regen.
 1.19 18-Jan-2003  thorpej Regen for correct RCS ID.
 1.18 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.17 19-May-2002  jdolecek branches: 1.17.2;
hook in truncate64(2) and ftruncate64(2)
 1.16 12-May-2002  jdolecek branches: 1.16.2;
regen - 64 fs syscalls
 1.15 10-Apr-2002  christos regen
 1.14 22-Mar-2002  christos regen
 1.13 19-Feb-2002  nathanw Regen.
 1.12 15-Feb-2002  christos - add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
gdb, telnet, work
jdk-1.4.0 extractor works, jdk still coredumps.

christos
 1.11 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.10 08-Sep-2001  manu Removed a hack to make PowerPC mmap work. This could have side effects on
alpha and i386. It has been tested and works on i386.
 1.9 30-May-2001  mrg branches: 1.9.2; 1.9.4;
use _KERNEL_OPT.
 1.8 13-May-2001  manu Improved the accuracy of gettimeofday/settimeofday: Linux stores a srtuct
timezone in the kernel. We now keep track of it for emulated processes.
Tested for powerpc and i386. Untested on m68k, but it should be ok
Alpha has a particular implementation (osf1_sys_gettimeofday), and it has
therefore not been touched.
 1.7 30-Mar-2001  jdolecek regen - use linux_sys_nosys() instead sys_nosys()
 1.6 30-Mar-2001  jdolecek regen
 1.5 30-Mar-2001  jdolecek regen
 1.4 27-Jan-2001  thorpej branches: 1.4.2; 1.4.4;
Regen; getpid(2) is MP-safe.
 1.3 27-Jan-2001  thorpej Regen; add sy_flags.
 1.2 20-Jan-2001  manu Fix the "created from" field of files generated from syscalls.master (this
master file did not have a RCS Id at generation time, hence the problem)
 1.1 19-Jan-2001  manu Added powerpc specific code for Linux compatibility on powerpc ports
 1.4.4.9 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.8 29-May-2002  nathanw Regen.
 1.4.4.7 17-Apr-2002  nathanw Catch up to -current.
 1.4.4.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.4 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.3 21-Sep-2001  nathanw Catch up to -current.
 1.4.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 27-Jan-2001  bouyer file linux_syscalls.c was added on branch thorpej_scsipi on 2001-02-11 19:13:55 +0000
 1.9.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.9.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.2.1 30-May-2002  gehenna Catch up with -current.
 1.17.2.3 14-Jun-2004  jmc Regen for changes in ticket #1708
 1.17.2.2 11-May-2004  tron Regen for ticket 1686.
 1.17.2.1 22-Oct-2003  jmc Regen files (requested by tv in ticket #1427)

Proper support for mmap2
 1.20.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.20.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.25.4.1 29-Apr-2005  kent sync with -current
 1.29.2.5 21-Jan-2008  yamt sync with head
 1.29.2.4 07-Dec-2007  yamt sync with head
 1.29.2.3 26-Feb-2007  yamt sync with head.
 1.29.2.2 30-Dec-2006  yamt sync with head.
 1.29.2.1 21-Jun-2006  yamt sync with head.
 1.31.14.1 19-Jun-2006  chap Sync with head.
 1.31.8.2 03-Sep-2006  yamt sync with head.
 1.31.8.1 26-Jun-2006  yamt sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.34.2.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.35.26.2 27-Dec-2007  mjf Sync with HEAD.
 1.35.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.35.24.1 18-Nov-2007  bouyer Sync with HEAD
 1.35.20.1 09-Jan-2008  matt sync with HEAD
 1.35.18.1 21-Nov-2007  joerg Sync with HEAD.
 1.36.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.36.2.1 26-Dec-2007  ad Sync with head.
 1.39.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.39.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.40.2.1 18-May-2008  yamt sync with head.
 1.41.12.1 20-Nov-2008  snj Regen for ticket 81.
 1.41.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.41.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.41.4.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.41.4.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.41.2.4 11-Aug-2010  yamt sync with head.
 1.41.2.3 11-Mar-2010  yamt sync with head
 1.41.2.2 20-Jun-2009  yamt sync with head
 1.41.2.1 04-May-2009  yamt sync with head.
 1.46.2.1 23-Jul-2009  jym Sync with HEAD.
 1.49.4.4 12-Jun-2011  rmind sync with head
 1.49.4.3 31-May-2011  rmind sync with head
 1.49.4.2 21-Apr-2011  rmind sync with head
 1.49.4.1 05-Mar-2011  rmind sync with head
 1.49.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.50.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.54.4.3 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.54.4.2 30-Oct-2012  yamt sync with head
 1.54.4.1 17-Apr-2012  yamt sync with head
 1.55.10.4 03-Dec-2017  jdolecek update from HEAD
 1.55.10.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.55.10.2 23-Jun-2013  tls resync from head
 1.55.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.57.4.2 18-May-2014  rmind sync with head
 1.57.4.1 28-Aug-2013  rmind sync with head
 1.63.2.1 10-Aug-2014  tls Rebase.
 1.69.2.1 17-Apr-2017  snj regen for ticket 1354
 1.70.2.4 05-Feb-2017  skrll Sync with HEAD
 1.70.2.3 05-Oct-2016  skrll Sync with HEAD
 1.70.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.70.2.1 06-Apr-2015  skrll Sync with HEAD
 1.74.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.74.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.74.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.78.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.81.4.1 11-May-2017  pgoyette Sync with HEAD
 1.82.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.82.10.1 10-Jun-2019  christos Sync with HEAD
 1.82.8.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.85.2.2 17-Dec-2020  thorpej Regen for preadv(2) and pwritev(2).
 1.85.2.1 15-Dec-2020  thorpej Regen for eventfd, timerfd, POSIX timers.
 1.96.2.1 02-Aug-2025  perseant Sync with HEAD
 1.99 28-Sep-2024  christos regen
 1.98 01-Jul-2024  christos regen
 1.97 29-Jun-2024  christos branches: 1.97.2;
regen
 1.96 19-Aug-2023  christos regen
 1.95 18-Aug-2023  christos regen
 1.94 29-Jul-2023  christos regen
 1.93 28-Jul-2023  christos regen
 1.92 02-Dec-2021  ryo regen
 1.91 24-Nov-2021  ryo regen
 1.90 20-Sep-2021  thorpej Regen for preadv(2) / pwritev(2).
 1.89 20-Sep-2021  thorpej Regen for eventfd.
 1.88 19-Sep-2021  thorpej Regen for timerfd.
 1.87 19-Sep-2021  thorpej Regen for POSIX timer syscalls.
 1.86 26-Apr-2020  thorpej branches: 1.86.2;
Regen for native futex calls.
 1.85 09-Nov-2019  jdolecek regen
 1.84 10-Aug-2018  pgoyette Regen
 1.83 10-May-2017  riastradh branches: 1.83.8; 1.83.10;
regen
 1.82 03-Feb-2017  christos branches: 1.82.4;
regen
 1.81 03-Feb-2017  martin regen
 1.80 16-Jan-2017  christos regen all
 1.79 13-Jan-2017  christos branches: 1.79.2;
regen
 1.78 02-Jan-2017  martin Regen (something apparently went wrong in previous)
 1.77 02-Jan-2017  manu Regen
 1.76 24-Jul-2016  njoly Regen for readlink/readlinkat signatures.
 1.75 27-Oct-2015  njoly branches: 1.75.2;
Regen.
 1.74 25-Oct-2015  njoly Regen for posix chown family cleanup.
 1.73 24-Sep-2015  christos regen
 1.72 07-Mar-2015  christos regen
 1.71 22-Nov-2014  njoly branches: 1.71.2;
Regen for ppoll signature fix
 1.70 31-May-2014  njoly branches: 1.70.2;
Regen for munmap(2) signature.
 1.69 20-May-2014  njoly Regen for getgroups/setgroups update.
 1.68 17-May-2014  njoly Regen for fadvise64 offset types changes.
 1.67 06-May-2014  njoly Regen for mknod device argument type change.
 1.66 04-May-2014  njoly Regen for pread/pwrite 64bit offset argument.
 1.65 08-Apr-2014  njoly Regen.
 1.64 10-Dec-2013  njoly branches: 1.64.2;
Regen.
 1.63 08-Dec-2013  njoly Regen.
 1.62 07-Nov-2013  njoly Regen for dup/dup2/dup3 argument types fix.
 1.61 24-Sep-2013  njoly Regen for utimensat(2).
 1.60 11-Aug-2013  pooka regen
 1.59 11-Aug-2013  pooka regen
 1.58 08-Apr-2013  pooka branches: 1.58.4;
regen for utimes
 1.57 19-Sep-2012  pooka regen for ppoll (and, apparently, SYCALL_ARG_PTR)
 1.56 18-Nov-2011  christos branches: 1.56.10;
- add sigtimedwait support.
- merge the siginfo population code.
 1.55 31-May-2011  njoly branches: 1.55.4;
Regen for fadvise64_64 typo fix.
 1.54 30-May-2011  alnsn Regenerate files to pick up correct RCS Ids. Suggested by Chris Badura.
 1.53 30-May-2011  alnsn Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.
 1.52 15-Apr-2011  he Regenerate these files after adding pipe2() and dup3().
 1.51 07-Jul-2010  chs branches: 1.51.2;
regen
 1.50 14-Dec-2009  matt branches: 1.50.2; 1.50.4;
Regen (new makesyscalls.sh)
 1.49 24-Nov-2009  njoly Regen for personality(2) update.
 1.48 08-Jun-2009  njoly Regen for rt_queueinfo(2) update.
 1.47 17-Jan-2009  njoly branches: 1.47.2;
Regen for wait4 update.
 1.46 15-Jan-2009  njoly Rengen for compat50 update.
 1.45 13-Jan-2009  pooka Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.44 19-Nov-2008  ad Regen.
 1.43 12-Nov-2008  njoly Regen for nanosleep(2) fix.
 1.42 23-Apr-2008  ad branches: 1.42.2; 1.42.4; 1.42.8; 1.42.10; 1.42.12;
Regen.
 1.41 04-Apr-2008  njoly branches: 1.41.2;
Regen for linux_sys_msync removal.
 1.40 24-Dec-2007  njoly branches: 1.40.6;
Regen for linux_sys_getpgid removal.
 1.39 21-Dec-2007  njoly Regen for getfsuid/setfsgid syscall exchange.
 1.38 20-Dec-2007  dsl regen
 1.37 16-Nov-2007  njoly branches: 1.37.2; 1.37.6;
Regen, for syscalls cleanup.
 1.36 09-Feb-2007  ad branches: 1.36.18; 1.36.20; 1.36.24; 1.36.26;
Merge newlock2 to head.
 1.35 01-Sep-2006  matt branches: 1.35.2;
Regen.
 1.34 30-Aug-2006  matt Regen
 1.33 10-Jun-2006  christos regen
 1.32 11-Dec-2005  christos branches: 1.32.4; 1.32.8; 1.32.14;
merge ktrace-lwp.
 1.31 18-Oct-2005  christos regen
 1.30 16-May-2005  fvdl branches: 1.30.2;
Regen.
 1.29 16-May-2005  fvdl Regen.
 1.28 26-Feb-2005  perry regen
 1.27 26-Feb-2005  perry regen
 1.26 20-Sep-2004  jdolecek branches: 1.26.4; 1.26.6;
regen:
implement support for Linux statfs64() syscall - 64bit variant of statfs()
 1.25 08-Sep-2004  jdolecek regen: add exit_group(2)
 1.24 01-Aug-2004  jdolecek regen - sync syscall lists with Linux kernel 2.6.7
 1.23 01-Aug-2004  jdolecek regen:

connect madvise(2) and mincore(2) - apparently the newer Linux libs
don't stub it anymore, so allow the application to take advantage
of them

the Linux calls appear to be compatible in the flag values and semantics,
so a wrapper is not necessary
 1.22 10-Aug-2003  jdolecek regen - added wrapper for Linux ftruncate64()
 1.21 23-Jun-2003  christos branches: 1.21.2;
Regen.
 1.20 18-Jan-2003  thorpej Regen for correct RCS ID.
 1.19 18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.18 01-Nov-2002  jdolecek regen: nsysent set to 256
 1.17 19-May-2002  jdolecek branches: 1.17.2;
hook in truncate64(2) and ftruncate64(2)
 1.16 12-May-2002  jdolecek branches: 1.16.2;
regen - 64 fs syscalls
 1.15 10-Apr-2002  christos regen
 1.14 22-Mar-2002  christos regen
 1.13 19-Feb-2002  nathanw Regen.
 1.12 15-Feb-2002  christos - add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
gdb, telnet, work
jdk-1.4.0 extractor works, jdk still coredumps.

christos
 1.11 13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.10 08-Sep-2001  manu Removed a hack to make PowerPC mmap work. This could have side effects on
alpha and i386. It has been tested and works on i386.
 1.9 30-May-2001  mrg branches: 1.9.2; 1.9.4;
use _KERNEL_OPT.
 1.8 13-May-2001  manu Improved the accuracy of gettimeofday/settimeofday: Linux stores a srtuct
timezone in the kernel. We now keep track of it for emulated processes.
Tested for powerpc and i386. Untested on m68k, but it should be ok
Alpha has a particular implementation (osf1_sys_gettimeofday), and it has
therefore not been touched.
 1.7 30-Mar-2001  jdolecek regen - use linux_sys_nosys() instead sys_nosys()
 1.6 30-Mar-2001  jdolecek regen
 1.5 30-Mar-2001  jdolecek regen
 1.4 27-Jan-2001  thorpej branches: 1.4.2; 1.4.4;
Regen; getpid(2) is MP-safe.
 1.3 27-Jan-2001  thorpej Regen; add sy_flags.
 1.2 20-Jan-2001  manu Fix the "created from" field of files generated from syscalls.master (this
master file did not have a RCS Id at generation time, hence the problem)
 1.1 19-Jan-2001  manu Added powerpc specific code for Linux compatibility on powerpc ports
 1.4.4.10 11-Nov-2002  nathanw Catch up to -current
 1.4.4.9 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.8 29-May-2002  nathanw Regen.
 1.4.4.7 17-Apr-2002  nathanw Catch up to -current.
 1.4.4.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.4 14-Nov-2001  nathanw Catch up to -current.
 1.4.4.3 21-Sep-2001  nathanw Catch up to -current.
 1.4.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 27-Jan-2001  bouyer file linux_sysent.c was added on branch thorpej_scsipi on 2001-02-11 19:13:55 +0000
 1.9.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.9.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.2.1 30-May-2002  gehenna Catch up with -current.
 1.17.2.3 14-Jun-2004  jmc Regen for changes in ticket #1708
 1.17.2.2 11-May-2004  tron Regen for ticket 1686.
 1.17.2.1 22-Oct-2003  jmc Regen files (requested by tv in ticket #1427)

Proper support for mmap2
 1.21.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.21.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.21.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.26.4.1 29-Apr-2005  kent sync with -current
 1.30.2.5 21-Jan-2008  yamt sync with head
 1.30.2.4 07-Dec-2007  yamt sync with head
 1.30.2.3 26-Feb-2007  yamt sync with head.
 1.30.2.2 30-Dec-2006  yamt sync with head.
 1.30.2.1 21-Jun-2006  yamt sync with head.
 1.32.14.1 19-Jun-2006  chap Sync with head.
 1.32.8.2 03-Sep-2006  yamt sync with head.
 1.32.8.1 26-Jun-2006  yamt sync with head.
 1.32.4.1 09-Sep-2006  rpaulo sync with head
 1.35.2.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.36.26.2 27-Dec-2007  mjf Sync with HEAD.
 1.36.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.36.24.1 18-Nov-2007  bouyer Sync with HEAD
 1.36.20.1 09-Jan-2008  matt sync with HEAD
 1.36.18.1 21-Nov-2007  joerg Sync with HEAD.
 1.37.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.37.2.1 26-Dec-2007  ad Sync with head.
 1.40.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.40.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.41.2.1 18-May-2008  yamt sync with head.
 1.42.12.1 20-Nov-2008  snj Regen for ticket 81.
 1.42.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.42.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.42.4.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.42.4.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.42.2.4 11-Aug-2010  yamt sync with head.
 1.42.2.3 11-Mar-2010  yamt sync with head
 1.42.2.2 20-Jun-2009  yamt sync with head
 1.42.2.1 04-May-2009  yamt sync with head.
 1.47.2.1 23-Jul-2009  jym Sync with HEAD.
 1.50.4.4 12-Jun-2011  rmind sync with head
 1.50.4.3 31-May-2011  rmind sync with head
 1.50.4.2 21-Apr-2011  rmind sync with head
 1.50.4.1 05-Mar-2011  rmind sync with head
 1.50.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.51.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.55.4.3 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.55.4.2 30-Oct-2012  yamt sync with head
 1.55.4.1 17-Apr-2012  yamt sync with head
 1.56.10.4 03-Dec-2017  jdolecek update from HEAD
 1.56.10.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.56.10.2 23-Jun-2013  tls resync from head
 1.56.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.58.4.2 18-May-2014  rmind sync with head
 1.58.4.1 28-Aug-2013  rmind sync with head
 1.64.2.1 10-Aug-2014  tls Rebase.
 1.70.2.1 17-Apr-2017  snj regen for ticket 1354
 1.71.2.4 05-Feb-2017  skrll Sync with HEAD
 1.71.2.3 05-Oct-2016  skrll Sync with HEAD
 1.71.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.71.2.1 06-Apr-2015  skrll Sync with HEAD
 1.75.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.75.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.75.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.79.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.82.4.1 11-May-2017  pgoyette Sync with HEAD
 1.83.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.83.10.1 10-Jun-2019  christos Sync with HEAD
 1.83.8.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.86.2.2 17-Dec-2020  thorpej Regen for preadv(2) and pwritev(2).
 1.86.2.1 15-Dec-2020  thorpej Regen for eventfd, timerfd, POSIX timers.
 1.97.2.1 02-Aug-2025  perseant Sync with HEAD
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 11-Dec-2005  christos branches: 1.8.70; 1.8.72; 1.8.74;
merge ktrace-lwp.
 1.7 26-Feb-2005  perry nuke trailing whitespace
 1.6 26-Aug-2001  manu branches: 1.6.20; 1.6.28; 1.6.30;
Fixed a lot of mistakes in #define's (hes values instead of octal)
 1.5 26-Aug-2001  manu Moved LINUX_NCCS from MI file to MD file, because the value is different
on MIPS and sparc machines.
 1.4 19-May-2001  manu branches: 1.4.2;
Fixed a typo in a comment
 1.3 20-Jan-2001  manu branches: 1.3.2; 1.3.4;
Fixed wrong ioctl definitions that caused Linux ioctl TCGETS and many other to
fail
 1.2 20-Jan-2001  manu Moved architecure dependent part of struct linux_termio to architecture
dependent header files.
 1.1 19-Jan-2001  manu Added various header files for initial Linux compatibility on powerpc ports
 1.3.4.2 21-Sep-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 20-Jan-2001  bouyer file linux_termios.h was added on branch thorpej_scsipi on 2001-02-11 19:13:56 +0000
 1.4.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.6.30.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.28.1 29-Apr-2005  kent sync with -current
 1.6.20.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.8.74.1 16-May-2008  yamt sync with head.
 1.8.72.1 18-May-2008  yamt sync with head.
 1.8.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 11-Jan-2009  christos merge christos-time_t
 1.7 28-Apr-2008  martin branches: 1.7.8; 1.7.14;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.70; 1.6.72; 1.6.74;
merge ktrace-lwp.
 1.5 26-Feb-2005  perry nuke trailing whitespace
 1.4 20-Sep-2004  jdolecek branches: 1.4.4; 1.4.6;
move definition of linux_fsid_t to common/linux_types.h - it's identical
across all Linux archs
 1.3 19-Sep-2004  jdolecek move definition of struct linux_stafs to common/linux_types.h, and use
explicit size types - the structure definition is actually identical
on currently support COMPAT_LINUX archs, so no point to have 6 copies of it
in the tree
 1.2 20-Jan-2001  manu branches: 1.2.2; 1.2.26;
Fixed a typo
 1.1 19-Jan-2001  manu Added various header files for initial Linux compatibility on powerpc ports
 1.2.26.2 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.2.26.1 24-Sep-2004  skrll Sync with HEAD.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 20-Jan-2001  bouyer file linux_types.h was added on branch thorpej_scsipi on 2001-02-11 19:13:56 +0000
 1.4.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.4.1 29-Apr-2005  kent sync with -current
 1.6.74.2 04-May-2009  yamt sync with head.
 1.6.74.1 16-May-2008  yamt sync with head.
 1.6.72.1 18-May-2008  yamt sync with head.
 1.6.70.2 17-Jan-2009  mjf Sync with HEAD.
 1.6.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.14.2 11-Jan-2009  christos add linux_suseconds_t
 1.7.14.1 28-Apr-2008  christos file linux_types.h was added on branch christos-time_t on 2009-01-11 00:17:51 +0000
 1.7.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 01-Aug-2004  jdolecek sync the syscall lists with Linux kernel 2.6.7
 1.3 01-Nov-2002  jdolecek branches: 1.3.6;
add appropriate nsysent
 1.2 30-Mar-2001  jdolecek Use linux_sys_nosys() instead sys_nosys() here too.
 1.1 30-Sep-1998  erh branches: 1.1.12; 1.1.24;
Stubs for future development of linux compat architechtures.
 1.1.24.2 11-Nov-2002  nathanw Catch up to -current
 1.1.24.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.12.1 21-Apr-2001  bouyer Sync with HEAD
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.88 01-Oct-2024  riastradh sys/compat/linux/arch/*/syscalls.master: Nix trailing whitespace.

No functional change intended.
 1.87 28-Sep-2024  christos Linux GSoC-2024: renameat2, clone3, sync_file_range, syncfs (Shivraj Jamgade)
 1.86 01-Jul-2024  christos Add linux POSIX message queue support (Ricardo Branco)
 1.85 29-Jun-2024  christos branches: 1.85.2;
From gsoc 2024: Implement faccessat2 and getcpu (Shivraz)
 1.84 19-Aug-2023  christos Add inotify* syscalls GSoC 2023 (Theodore Preduta)
 1.83 18-Aug-2023  christos Add linux waitid(2) from GSoC 2023 (Theodore Preduta)
 1.82 29-Jul-2023  christos Add/fix statx, readahead, close_range. From GSoC 2023 by Theodore Preduta
 1.81 28-Jul-2023  christos add epoll syscalls
 1.80 02-Dec-2021  ryo add prlimit64(2) syscall to COMPAT_LINUX and COMPAT_LINUX32
 1.79 24-Nov-2021  ryo add getrandom(2) syscall entry
 1.78 20-Sep-2021  thorpej Add preadv(2) and pwritev(2) system calls to COMPAT_LINUX and COMPAT_LINUX32.
 1.77 20-Sep-2021  thorpej Add the eventfd system calls to COMPAT_LINUX and COMPAT_LINUX32.
 1.76 19-Sep-2021  thorpej Add the timerfd syscalls to COMPAT_LINUX and COMPAT_LINUX32.
 1.75 19-Sep-2021  thorpej Add the POSIX timer syscalls (timer_create(), timer_settime(), timer_gettime(),
timer_getoverrun(), and timer_delete()) to COMPAT_LINUX and COMPAT_LINUX32.
 1.74 26-Apr-2020  thorpej branches: 1.74.2;
Add a NetBSD native futex implementation, mostly written by riastradh@.
Map the COMPAT_LINUX futex calls to the native ones.
 1.73 09-Nov-2019  jdolecek add dummy implementation of linux fallocate() which just returns EOPNOTSUPP;
this is needed so that glibc falls back to emulation and apps behaving
properly, since EOPNOTSUPP is a documented and expected return code, but
ENOSYS is not

right now there are no filesystems in NetBSD tree supporting the fallocate
VOP, so no point trying to map this to a native call

supposed to help with problem reported in
https://mail-index.netbsd.org/tech-kern/2019/11/03/msg025641.html
 1.72 03-Feb-2017  christos branches: 1.72.14;
add unimple sendmmsg secvmmsg
 1.71 03-Feb-2017  martin Add accept4
 1.70 02-Jan-2017  manu branches: 1.70.2;
Add pselect6 Linux system call.
This lets Matlab R2016A run on NetBSD/amd64
 1.69 24-Jul-2016  njoly Small cleanup. Adjust readlink/readlinkat signatures to reduce diffs with
native.
 1.68 27-Oct-2015  njoly branches: 1.68.2;
Fix wrong gid types from previous.
 1.67 25-Oct-2015  njoly Cleanup posix chown family syscalls to match native (alpha, mips and
powerpc).
 1.66 22-Nov-2014  njoly branches: 1.66.2;
Fix ppoll signature (int ->u_int)
 1.65 31-May-2014  njoly branches: 1.65.2;
Fix munmap(2) signature.
 1.64 29-May-2014  njoly For utimes(2), use compat_50_sys_utimes() instead of local version.
 1.63 20-May-2014  njoly Fix getgroups/setgroups signature.
 1.62 17-May-2014  njoly Fix fadvise64 syscalls to use 64bit offset types.
 1.61 06-May-2014  njoly Reduce diffs between archs; make mknod device argument unsigned.
 1.60 04-May-2014  njoly Fix pread/pwrite syscalls which need a 64bit offset argument.
 1.59 08-Apr-2014  njoly Adjust read/write/readv/writev signature to match native versions.
 1.58 10-Dec-2013  njoly branches: 1.58.2;
Add *at() syscalls like other arches.
 1.57 08-Dec-2013  njoly Sprinkle a few more linux_umode_t where appropriate.
Reduce diffs between archs.
 1.56 07-Nov-2013  njoly Fix dup/dup2/dup3 argument types (u_int -> int).
 1.55 24-Sep-2013  njoly Add utimensat(2) for compat linux.
 1.54 11-Aug-2013  pooka Linux treats the data parameter as a pointer/long too. The comments
in the sys/ptrace.h on Linux say it should be an int, but the code
glibc/musl/kernel disagrees.
 1.53 11-Aug-2013  pooka Use long instead of int for ptrace addr. This makes things compile
better on powerpc64 with a compiler which warns about int-to-pointer
casts.
XXX: sys/ptrace.h on Linux says that the addr parameter is a "void *".
 1.52 08-Apr-2013  pooka branches: 1.52.4;
support utimes on non-alpha linux platforms
 1.51 19-Sep-2012  pooka emulate ppoll which is essentially our pollts
 1.50 18-Nov-2011  christos branches: 1.50.10;
add sigtimedwait
 1.49 09-Jul-2011  christos branches: 1.49.2;
the first argument of {g,s}etitimer() is int not u_int.
 1.48 31-May-2011  njoly Small typo in fadvise64_64 args (advise -> advice).
 1.47 30-May-2011  alnsn Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.
 1.46 15-Apr-2011  he Add dup3() and pipe2() for these archs as well.
 1.45 07-Jul-2010  chs branches: 1.45.2;
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.44 24-Nov-2009  njoly branches: 1.44.2; 1.44.4;
Update personality(2) to match Linux definition where the argument is an
unsigned long.
 1.43 08-Jun-2009  njoly Update rt_queueinfo(2) definition, and kill a corresponding comment.
 1.42 17-Jan-2009  njoly branches: 1.42.2;
Convert linux/linux32 wait(4) to use a compat50 rusage structure.
 1.41 15-Jan-2009  njoly Update some syscalls/arguments to use the new compat50 equivalents.
 1.40 13-Jan-2009  pooka 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.39 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.38 12-Nov-2008  njoly Fix nanosleep(2) on 64-bit archs. Do not call native nanosleep
syscall, but rather a modified version the will take care of `struct
timespec' conversions.
 1.37 23-Apr-2008  ad branches: 1.37.2; 1.37.4; 1.37.8; 1.37.10; 1.37.12;
-SYCALL_MPSAFE
 1.36 04-Apr-2008  njoly branches: 1.36.2;
Cleanup. Kill linux_sys_msync and use sys___msync13 instead.
No functional changes expected.
 1.35 24-Dec-2007  njoly branches: 1.35.6;
Kill unneeded linux_sys_getpgid and use native sys_getpgid instead.
 1.34 21-Dec-2007  njoly - Fix setfsuid to return uid on success.
- Replace getfsuid, which never existed on Linux, by correct setfsgid
syscall.

ok by christos and dsl.
 1.33 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.32 16-Nov-2007  njoly branches: 1.32.2; 1.32.6;
Cleanup. Remove a few linux syscalls definitions, now identical to
native ones (with stackgap and ALT_CHECK_xxx removal). No functional
changes expected.
 1.31 04-Mar-2007  christos branches: 1.31.14; 1.31.16; 1.31.20; 1.31.22;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.30 09-Feb-2007  ad branches: 1.30.2;
Merge newlock2 to head.
 1.29 01-Sep-2006  matt branches: 1.29.2;
Don't conditionalize *sys_ptrace. The lack of sys_ptrace will be dealt
with differently.
 1.28 30-Aug-2006  matt Update to deal with options PTRACE
 1.27 10-Jun-2006  christos linux getpriority is off-by-20 so use our own function.
From PR/33671: Nicolas Joly
 1.26 11-Dec-2005  christos branches: 1.26.4; 1.26.8; 1.26.14;
merge ktrace-lwp.
 1.25 18-Oct-2005  christos add the missing %% that confused joerg and the parser.
 1.24 18-Oct-2005  joerg sys_uselib is needed by COMPAT_LINUX for EXEC_AOUT. Since it doesn't get
build when EXEC_AOUT is not defined, the syscalls.master entry has to be
conditionalized. Alpha did so already, so let the other archs catch up
with it.

Go-on: christos
 1.23 16-May-2005  fvdl branches: 1.23.2;
Add clock_* POSIX functions.
 1.22 16-May-2005  fvdl Add *xattr functions (they all return EOPNOTSUPP).
 1.21 26-Feb-2005  perry nuke trailing whitespace
 1.20 20-Sep-2004  jdolecek branches: 1.20.4; 1.20.6;
implement support for Linux statfs64() syscall - 64bit variant of statfs()
 1.19 08-Sep-2004  jdolecek implement basic exit_group(2), which just terminates calling thread;
apparently not many apps use thread groups yet, at least not with default
SuSE 9.1 libraries, so this is enough for now
 1.18 01-Aug-2004  jdolecek sync the syscall lists with Linux kernel 2.6.7
 1.17 01-Aug-2004  jdolecek connect madvise(2) and mincore(2) - apparently the newer Linux libs
don't stub it anymore, so allow the application to take advantage
of them

the Linux calls appear to be compatible in the flag values and semantics,
so a wrapper is not necessary
 1.16 10-Aug-2003  jdolecek add Linux compat arg wrapper for ftruncate64(), and change linux compat
truncate64() wrapper to translate args structure
NetBSD truncate() and ftrucate() have hidden 'pad' argument, so we have
to do the argument translation

Problem found and patch supplied in PR kern/22360 by Ales Krenek

This is the last of syscalls with hidden 'pad' arg we didn't have
wrapper for; all the others (lseek, mmap, pwrite, pread) already had
wrapper before.
 1.15 23-Jun-2003  christos branches: 1.15.2;
PR/21937: Todd Vierling: Proper support for mmap2
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 19-May-2002  jdolecek branches: 1.13.2;
hook in truncate64(2) and ftruncate64(2)
 1.12 12-May-2002  jdolecek branches: 1.12.2;
hook in remaining 64bit fs syscalls
make most of stuff in linux_file64.c available unconditionally,
with exception of fcntl64, which is not present on Linux m68k
 1.11 10-Apr-2002  christos add getdents64
 1.10 22-Mar-2002  christos nuke mmap2, add mprotect
 1.9 19-Feb-2002  nathanw Add linux_sys_{get,set}rlimit.
 1.8 15-Feb-2002  christos - add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
gdb, telnet, work
jdk-1.4.0 extractor works, jdk still coredumps.

christos
 1.7 08-Sep-2001  manu Removed a hack to make PowerPC mmap work. This could have side effects on
alpha and i386. It has been tested and works on i386.
 1.6 30-May-2001  mrg branches: 1.6.2; 1.6.4;
use _KERNEL_OPT.
 1.5 13-May-2001  manu Improved the accuracy of gettimeofday/settimeofday: Linux stores a srtuct
timezone in the kernel. We now keep track of it for emulated processes.
Tested for powerpc and i386. Untested on m68k, but it should be ok
Alpha has a particular implementation (osf1_sys_gettimeofday), and it has
therefore not been touched.
 1.4 30-Mar-2001  jdolecek Add new syscalls from Linux 2.4.3 to the lists. Not implemented ATM.
 1.3 30-Mar-2001  jdolecek Implement linux_sys_nosys() and use it instead of sys_nosys() for
unimplemented syscalls. Difference is that linux_sys_nosys() doesn't
post SIGSYS to the process. Linux doesn't do that and thus glibc (and
probably other Linux code) doesn't deal with SIGSYS, even through it
generally contains fallback code for ENOSYS case.

This also addresses port-i386/12503, though the issue was already discussed
earlier.
 1.2 27-Jan-2001  thorpej branches: 1.2.2; 1.2.4;
getpid(2) is MP-safe.
 1.1 19-Jan-2001  manu Added various header files for initial Linux compatibility on powerpc ports
 1.2.4.8 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.7 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.2.4.6 17-Apr-2002  nathanw Catch up to -current.
 1.2.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.3 21-Sep-2001  nathanw Catch up to -current.
 1.2.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.2.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.2.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 27-Jan-2001  bouyer file syscalls.master was added on branch thorpej_scsipi on 2001-02-11 19:13:56 +0000
 1.6.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.6.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.6.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.12.2.1 30-May-2002  gehenna Catch up with -current.
 1.13.2.3 14-Jun-2004  jmc Pullup patch (requested by skrll in ticket #1708)

Bring netbsd-1-6 inline with -current sources after the mistakes in ticket #1686
 1.13.2.2 11-May-2004  tron Pull up revision 1.16 via patch (requested by wennmach in ticket #1686):
add Linux compat arg wrapper for ftruncate64(), and change linux compat
truncate64() wrapper to translate args structure
NetBSD truncate() and ftrucate() have hidden 'pad' argument, so we have
to do the argument translation
Problem found and patch supplied in PR kern/22360 by Ales Krenek
This is the last of syscalls with hidden 'pad' arg we didn't have
wrapper for; all the others (lseek, mmap, pwrite, pread) already had
wrapper before.
 1.13.2.1 22-Oct-2003  jmc Regen files (requested by tv in ticket #1427)

Proper support for mmap2
 1.15.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.20.4.1 29-Apr-2005  kent sync with -current
 1.23.2.5 21-Jan-2008  yamt sync with head
 1.23.2.4 07-Dec-2007  yamt sync with head
 1.23.2.3 03-Sep-2007  yamt sync with head.
 1.23.2.2 26-Feb-2007  yamt sync with head.
 1.23.2.1 21-Jun-2006  yamt sync with head.
 1.26.14.1 19-Jun-2006  chap Sync with head.
 1.26.8.1 26-Jun-2006  yamt sync with head.
 1.26.4.1 09-Sep-2006  rpaulo sync with head
 1.29.2.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.30.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.31.22.2 27-Dec-2007  mjf Sync with HEAD.
 1.31.22.1 19-Nov-2007  mjf Sync with HEAD.
 1.31.20.1 18-Nov-2007  bouyer Sync with HEAD
 1.31.16.1 09-Jan-2008  matt sync with HEAD
 1.31.14.1 21-Nov-2007  joerg Sync with HEAD.
 1.32.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.32.2.1 26-Dec-2007  ad Sync with head.
 1.35.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.35.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.36.2.1 18-May-2008  yamt sync with head.
 1.37.12.1 20-Nov-2008  snj Pull up following revision(s) (requested by njoly in ticket #81):
sys/compat/linux/arch/mips/syscalls.master: revision 1.30
sys/compat/linux/arch/m68k/syscalls.master: revision 1.63
sys/compat/linux32/arch/amd64/syscalls.master: revision 1.39
sys/compat/linux/arch/alpha/syscalls.master: revision 1.63
sys/compat/linux/arch/powerpc/syscalls.master: revision 1.38
sys/compat/linux32/common/linux32_time.c: revision 1.22
sys/compat/linux/arch/amd64/syscalls.master: revision 1.25
sys/compat/linux/arch/i386/syscalls.master: revision 1.94
sys/compat/linux/arch/arm/syscalls.master: revision 1.36
sys/compat/linux/common/linux_time.c: revision 1.26
Fix nanosleep(2) on 64-bit archs. Do not call native nanosleep
syscall, but rather a modified version the will take care of `struct
timespec' conversions.
 1.37.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.37.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.37.4.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.37.4.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.37.2.4 11-Aug-2010  yamt sync with head.
 1.37.2.3 11-Mar-2010  yamt sync with head
 1.37.2.2 20-Jun-2009  yamt sync with head
 1.37.2.1 04-May-2009  yamt sync with head.
 1.42.2.1 23-Jul-2009  jym Sync with HEAD.
 1.44.4.4 12-Jun-2011  rmind sync with head
 1.44.4.3 31-May-2011  rmind sync with head
 1.44.4.2 21-Apr-2011  rmind sync with head
 1.44.4.1 05-Mar-2011  rmind sync with head
 1.44.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.45.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.49.2.3 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.49.2.2 30-Oct-2012  yamt sync with head
 1.49.2.1 17-Apr-2012  yamt sync with head
 1.50.10.4 03-Dec-2017  jdolecek update from HEAD
 1.50.10.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50.10.2 23-Jun-2013  tls resync from head
 1.50.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.52.4.2 18-May-2014  rmind sync with head
 1.52.4.1 28-Aug-2013  rmind sync with head
 1.58.2.1 10-Aug-2014  tls Rebase.
 1.65.2.1 17-Apr-2017  snj Pull up following revision(s) (requested by manu in ticket #1354):
sys/compat/linux/arch/alpha/syscalls.master: revision 1.92 via patch
sys/compat/linux/arch/amd64/syscalls.master: revision 1.58 via patch
sys/compat/linux/arch/arm/syscalls.master: revision 1.65 via patch
sys/compat/linux/arch/i386/syscalls.master: revision 1.122 via patch
sys/compat/linux/arch/m68k/syscalls.master: revision 1.91 via patch
sys/compat/linux/arch/mips/syscalls.master: revision 1.61 via patch
sys/compat/linux/arch/powerpc/syscalls.master: revision 1.70 via patch
sys/compat/linux/common/linux_misc.c: revision 1.234
sys/compat/linux/common/linux_signal.h: revision 1.31
Add pselect6 Linux system call.
This lets Matlab R2016A run on NetBSD/amd64
 1.66.2.3 05-Feb-2017  skrll Sync with HEAD
 1.66.2.2 05-Oct-2016  skrll Sync with HEAD
 1.66.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.68.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.68.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.68.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.70.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.72.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.74.2.2 17-Dec-2020  thorpej Add suppport for Linux preadv(2) and pwritev(2). Same as native, except
for the silly way that the offset argument is passed in.
 1.74.2.1 15-Dec-2020  thorpej Add Linux eventfd, timerfd, and POSIX timer calls.
 1.85.2.1 02-Aug-2025  perseant Sync with HEAD

RSS XML Feed