Home | History | Annotate | Download | only in freebsd
History log of /src/sys/compat/freebsd/freebsd_misc.c
RevisionDateAuthorComments
 1.34  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.33  09-Nov-2014  maxv branches: 1.33.12; 1.33.24;
Do not uselessly include <sys/malloc.h>.
 1.32  20-Dec-2007  dsl branches: 1.32.12; 1.32.54; 1.32.72;
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.31  08-Dec-2007  dsl branches: 1.31.4;
ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
 1.30  15-Aug-2007  ad branches: 1.30.2; 1.30.10;
Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
 1.29  04-Mar-2007  christos branches: 1.29.2; 1.29.10; 1.29.14;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.28  09-Feb-2007  ad branches: 1.28.2;
Merge newlock2 to head.
 1.27  16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.26  22-Oct-2006  christos ktruser checks for length now.
 1.25  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.24  11-Dec-2005  christos branches: 1.24.20; 1.24.22;
merge ktrace-lwp.
 1.23  13-Sep-2005  christos Forgot to reverse the conditional test.
 1.22  12-Sep-2005  christos Range checks are not optional. The omission of this one, allows the user
to corrupt the heap and/or crash the kernel (Christer Oeberg).
 1.21  26-Feb-2005  perry branches: 1.21.2; 1.21.4;
nuke trailing whitespace
 1.20  18-Sep-2003  pooka branches: 1.20.2; 1.20.6; 1.20.8; 1.20.10;
Add a good enuf emulation of the MAP_STACK flag to the mmap()
syscall. This allows programs which use MAP_STACK to work instead
of failing in weird and wonderous ways.
 1.19  29-Jun-2003  fvdl branches: 1.19.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.18  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.17  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16  26-Nov-2002  christos rename: s/sa_/<compat>sa/g
 1.15  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.14  13-Nov-2001  lukem branches: 1.14.8; 1.14.10;
add RCSIDs (including regeneration of files as appropriate)
 1.13  30-May-2001  mrg branches: 1.13.2;
use _KERNEL_OPT.
 1.12  28-Dec-2000  jdolecek branches: 1.12.2;
use NetBSD utrace(2) facilities for FreeBSD utrace(2) emulation;
use id 'FreeBSD utrace'
 1.11  18-Dec-2000  jdolecek make compilable without KTRACE, too
 1.10  17-Dec-2000  jdolecek add emulation of FreeBSD utrace(2)
 1.9  01-Dec-2000  jdolecek LKMify
 1.8  01-Dec-2000  jdolecek add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now
 1.7  07-Aug-2000  bjh21 Second phase of changes to remove ntp_adjtime(2) from the kernel entirely if
NTP is not defined.

Also removes sysctl_ntptime, since that's unreferenced without NTP.

ntp_gettime(2) is left alone, since it doesn't raise SIGSYS, which sys_nosys()
does.
 1.6  18-Jul-2000  onoe implement new signal syscalls in FreeBSD 4.0-RELEASE, using native syscalls:
sigaction, sigprocmask, sigsuspend, and sigpending.
 1.5  21-Apr-2000  minoura branches: 1.5.4;
We have now native issetugid.
 1.4  02-May-1998  christos branches: 1.4.14;
PR/5350: Minoura Makoto: add issetugid() syscall. (with fixes from me)
 1.3  20-Oct-1997  thorpej branches: 1.3.2;
Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
 1.2  03-May-1996  christos gcc -Wall fixes.
 1.1  10-Oct-1995  mycroft FreeBSD binary compatibility module, from Noriyuki Soda.
 1.3.2.1  30-Sep-1998  cgd pull up rev 1.4 from trunk (tv)
 1.4.14.3  05-Jan-2001  bouyer Sync with HEAD
 1.4.14.2  08-Dec-2000  bouyer Sync with HEAD.
 1.4.14.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.5.4.1  06-Mar-2002  he Pull up revisions 1.6-1.7 (requested by jonathan):
Add support for FreeBSD 4.x signals; fixes PR#9769.
 1.12.2.7  11-Dec-2002  thorpej Sync with HEAD.
 1.12.2.6  01-Aug-2002  nathanw Catch up to -current.
 1.12.2.5  12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.12.2.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.12.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.12.2.2  21-Jun-2001  nathanw Catch up to -current.
 1.12.2.1  05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.13.2.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.13.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.10.1  14-Sep-2005  riz Pull up patch (requested by elad in ticket #5867):
Fix a user-controlled length argument from potentially overflowing an
integer. Reported by Christer Oeberg.
 1.14.8.1  15-Jul-2002  gehenna catch up with -current.
 1.19.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.5  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.19.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.19.2.2  03-Aug-2004  skrll Sync with HEAD
 1.19.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.20.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.20.8.1  29-Apr-2005  kent sync with -current
 1.20.6.2  08-Feb-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11023):
sys/kern/kern_ktrace.c: revision 1.110 via patch
sys/sys/ktrace.h: revision 1.45 via patch
sys/compat/freebsd/freebsd_misc.c: revision 1.26 via patch
sys/compat/darwin/darwin_iohidsystem.c: revision 1.35 via patch
sys/compat/darwin/darwin_ktrace.c: revision 1.6 via patch
Due to insufficient length checking it is possible for a user to cause
an integer overflow. Make ktruser return an error instead.
 1.20.6.1  13-Sep-2005  tron branches: 1.20.6.1.2;
Pull up following revision(s) (requested by christos in ticket #5846):
sys/compat/freebsd/freebsd_misc.c: revision 1.22 via patch
Range checks are not optional. The omission of this one, allows the user
to corrupt the heap and/or crash the kernel. (Christer Oeberg)
 1.20.6.1.2.1  08-Feb-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11023):
sys/kern/kern_ktrace.c: revision 1.110 via patch
sys/sys/ktrace.h: revision 1.45 via patch
sys/compat/freebsd/freebsd_misc.c: revision 1.26 via patch
sys/compat/darwin/darwin_iohidsystem.c: revision 1.35 via patch
sys/compat/darwin/darwin_ktrace.c: revision 1.6 via patch
Due to insufficient length checking it is possible for a user to cause
an integer overflow. Make ktruser return an error instead.
 1.20.2.2  08-Feb-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11023):
sys/kern/kern_ktrace.c: revision 1.110 via patch
sys/sys/ktrace.h: revision 1.45 via patch
sys/compat/freebsd/freebsd_misc.c: revision 1.26 via patch
sys/compat/darwin/darwin_iohidsystem.c: revision 1.35 via patch
sys/compat/darwin/darwin_ktrace.c: revision 1.6 via patch
Due to insufficient length checking it is possible for a user to cause
an integer overflow. Make ktruser return an error instead.
 1.20.2.1  13-Sep-2005  tron Pull up following revision(s) (requested by christos in ticket #5846):
sys/compat/freebsd/freebsd_misc.c: revision 1.22 via patch
Range checks are not optional. The omission of this one, allows the user
to corrupt the heap and/or crash the kernel. (Christer Oeberg)
 1.21.4.5  21-Jan-2008  yamt sync with head
 1.21.4.4  03-Sep-2007  yamt sync with head.
 1.21.4.3  26-Feb-2007  yamt sync with head.
 1.21.4.2  30-Dec-2006  yamt sync with head.
 1.21.4.1  21-Jun-2006  yamt sync with head.
 1.21.2.3  24-Oct-2006  ghen Pull up following revision(s) (requested by adrianp in ticket #1564):
sys/compat/darwin/darwin_ktrace.c: revision 1.6 via patch
sys/compat/darwin/darwin_iohidsystem.c: revision 1.35 via patch
sys/compat/freebsd/freebsd_misc.c: revision 1.26 via patch
sys/kern/kern_ktrace.c: revision 1.110 via patch
sys/sys/ktrace.h: revision 1.45 via patch
make ktruser enforce the maximum buffer length, and return an error.
ktruser checks for length now.
ktruser now returns an error if the buffer length is too big.
 1.21.2.2  13-Sep-2005  tron branches: 1.21.2.2.2;
Pull up following revision(s) (requested by christos in ticket #778):
sys/compat/freebsd/freebsd_misc.c: revision 1.23
Forgot to reverse the conditional test.
 1.21.2.1  13-Sep-2005  tron Pull up following revision(s) (requested by christos in ticket #778):
sys/compat/freebsd/freebsd_misc.c: revision 1.22
Range checks are not optional. The omission of this one, allows the user
to corrupt the heap and/or crash the kernel. (Christer Oeberg)
 1.21.2.2.2.1  24-Oct-2006  ghen Pull up following revision(s) (requested by adrianp in ticket #1564):
sys/compat/darwin/darwin_ktrace.c: revision 1.6 via patch
sys/compat/darwin/darwin_iohidsystem.c: revision 1.35 via patch
sys/compat/freebsd/freebsd_misc.c: revision 1.26 via patch
sys/kern/kern_ktrace.c: revision 1.110 via patch
sys/sys/ktrace.h: revision 1.45 via patch
make ktruser enforce the maximum buffer length, and return an error.
ktruser checks for length now.
ktruser now returns an error if the buffer length is too big.
 1.24.22.2  10-Dec-2006  yamt sync with head.
 1.24.22.1  22-Oct-2006  yamt sync with head
 1.24.20.3  30-Jan-2007  ad Remove support for SA. Ok core@.
 1.24.20.2  18-Nov-2006  ad Sync with head.
 1.24.20.1  24-Oct-2006  ad - Redo LWP locking slightly and fix some races.
- Fix some locking botches.
- Make signal mask / stack per-proc for SA processes.
- Add _lwp_kill().
 1.28.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.29.14.2  09-Dec-2007  jmcneill Sync with HEAD.
 1.29.14.1  16-Aug-2007  jmcneill Sync with HEAD.
 1.29.10.1  03-Sep-2007  skrll Sync with HEAD.
 1.29.2.1  20-Aug-2007  ad Sync with HEAD.
 1.30.10.1  26-Dec-2007  ad Sync with head.
 1.30.2.1  09-Jan-2008  matt sync with HEAD
 1.31.4.1  02-Jan-2008  bouyer Sync with HEAD
 1.32.72.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.32.54.1  03-Dec-2017  jdolecek update from HEAD
 1.32.12.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.32.12.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.33.24.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.33.12.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.

RSS XML Feed