Home | History | Annotate | Download | only in common
History log of /src/sys/compat/linux/common/linux_socketcall.c
RevisionDateAuthorComments
 1.49  23-Sep-2021  ryo add support COMPAT_LINUX for aarch64
 1.48  09-Feb-2017  christos use proper arg functions, remove bogus ones.
 1.47  03-Feb-2017  christos add sendmmsg and recvmmsg
 1.46  03-Feb-2017  christos handle accept4 for i386
 1.45  09-Nov-2014  maxv branches: 1.45.2; 1.45.4; 1.45.6;
Do not uselessly include <sys/malloc.h>.
 1.44  21-Jun-2014  maxv branches: 1.44.2;
If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.

With the help of njoly@
 1.43  27-Dec-2013  njoly branches: 1.43.2;
Rename ipcall/socketcall specific defines to avoid conflict with
syscalls definitions. No functional changes.
 1.42  22-Jun-2012  martin branches: 1.42.2; 1.42.4;
From the "parse errors that you just do not see as a human" department:
build fix.
 1.41  21-Jun-2012  christos fix token pasting.
 1.40  20-Jun-2012  christos print proper ktruser names depending on the emulation.
 1.39  03-Jul-2008  njoly branches: 1.39.6; 1.39.20; 1.39.30; 1.39.36; 1.39.40; 1.39.42; 1.39.44;
Fix SIOCGIFCONF ioctl for 64bit platforms. Add a new linux_ifreq
structure and linux_getifconf function (cleaned up version from
compat_ifconf).

While here, update linux_getifhwaddr to use the new structure.

Ok by christos.
 1.38  28-Apr-2008  martin branches: 1.38.2; 1.38.4;
Remove clause 3 and 4 from TNF licenses
 1.37  20-Dec-2007  dsl branches: 1.37.6; 1.37.8; 1.37.10;
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  15-Aug-2007  ad branches: 1.35.2; 1.35.10;
Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
 1.34  02-Jun-2007  yamt branches: 1.34.2; 1.34.6;
wrap #include "opt_ktrace.h" by #ifdef _KERNEL_OPT.
 1.33  01-Jun-2007  dsl (Ab)use a KTR_USER trace entry for the linux socket command and arguments.
 1.32  04-Mar-2007  christos branches: 1.32.2; 1.32.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31  09-Feb-2007  ad branches: 1.31.2;
Merge newlock2 to head.
 1.30  11-Dec-2005  christos branches: 1.30.20;
merge ktrace-lwp.
 1.29  29-May-2005  christos branches: 1.29.2;
- sprinkle const.
- add XXXUNCONST to the emul_find() pbuf argument free'ing. XXX: this needs
an api change.
- avoid variable shadowing.
 1.28  03-May-2005  manu First work on COMPAT_LINUX/amd64
Process startup and dynamiclinking work, but processes hang due to
Linux arch_prctl(2) not being really supported yet.
 1.27  05-Sep-2004  jdolecek improve the (#ifdef DEBUG_LINUX) socketcall argument dump code:
- print the socketcall type
- special case socket(2) call, it's also the only one with first argument
not being a socket descriptor
- only dump the relevant part of linux_socketcall_dummy_args, instead
of always the whole structure
 1.26  29-Aug-2004  jdolecek dump socketcall data #ifdef DEBUG_LINUX
 1.25  18-Jan-2003  thorpej branches: 1.25.2;
Merge the nathanw_sa branch.
 1.24  29-Mar-2002  christos - #undef DPRINTF for files that are included from other files.
- more debugging for socketcalls
- fix sa_len if AF_INET; somehow we get passed 28 instead of 16?
 1.23  13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.22  22-Jul-2001  jdolecek make linux_socketcall_argsize[] static const
 1.21  04-Jul-2001  jdolecek branches: 1.21.2;
Do address family (AF_*) number translation for socket system calls which
pass socket address in our or out. This makes Linux programs using IPv6
working under emulation. This addresses kern/13279 by Jun-ichiro itojun Hagino.

Change sendmsg()/recvmsg() to expect the control information
to be passed the standard way (not 4.3BSD one, imlied by compat_43 code
or MSG_COMPAT). Linux uses different (arguably broken) CMSG_ALIGN() on some
architectures unfortunately, that would need to be handled eventually.

Also provide some other trivial stubs (like linux_sys_send()) to avoid
unneeded dependance on uipc_syscalls_43.c.
 1.20  22-Jun-2001  jdolecek linux_sys_socketcall(): refuse negative 'what' values
 1.19  25-Mar-1999  sommerfe branches: 1.19.20;
commit fix to PR7072: emulate linux non-blocking connect behavior more correctly
 1.18  04-Oct-1998  fvdl Assign my copyright to TNF. Merge with others were appropriate.
Regen syscall files after script change.
 1.17  03-Oct-1998  christos Attempt to fix the mess.
 1.16  01-Oct-1998  erh Split linux/compat/linux_socket.c into common and multi-architechture parts. linux_socketcall.c contains the socketcall multiplexer.
 1.15  22-Dec-1996  fvdl Make this compile again, including Politically Correct const handling.
 1.14  05-Apr-1996  christos Prototyping changes.
 1.13  08-Mar-1996  mycroft Separate ioctl emulation by group. Add (minimal) audio emulation.
 1.12  07-Oct-1995  mycroft Prefix names of system call implementation functions with `sys_'.
 1.11  19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.10  14-Aug-1995  mycroft Rearrange #includes.
 1.9  24-Jun-1995  christos Use compat_util.[ch].
 1.8  22-Jun-1995  fvdl * Changed to use generic ELF code from kern/exec_elf.c (which was taken
from the svr4 exec code plus the linux compat mods)
* Include file change
* Add multicast sockopts (from John Brezak)
 1.7  28-May-1995  mycroft Need netinet/tcp.h.
 1.6  28-May-1995  mycroft Convert TCP socket options.
 1.5  28-May-1995  mycroft Fill in `name' argument to getsockopt() correctly.
 1.4  28-May-1995  mycroft Fix typo.
 1.3  28-May-1995  mycroft Convert IP socket options.
 1.2  28-May-1995  mycroft Get rid of damned `static's.
 1.1  28-Feb-1995  fvdl Added Linux compat code.
 1.19.20.5  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.19.20.4  17-Apr-2002  nathanw Catch up to -current.
 1.19.20.3  14-Nov-2001  nathanw Catch up to -current.
 1.19.20.2  24-Aug-2001  nathanw Catch up with -current.
 1.19.20.1  05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.21.2.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.21.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.21.2.1  03-Aug-2001  lukem update to -current
 1.25.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.25.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1  03-Sep-2004  skrll Sync with HEAD
 1.29.2.3  21-Jan-2008  yamt sync with head
 1.29.2.2  03-Sep-2007  yamt sync with head.
 1.29.2.1  26-Feb-2007  yamt sync with head.
 1.30.20.1  30-Jan-2007  ad Remove support for SA. Ok core@.
 1.31.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.32.4.1  11-Jul-2007  mjf Sync with head.
 1.32.2.2  20-Aug-2007  ad Sync with HEAD.
 1.32.2.1  09-Jun-2007  ad Sync with head.
 1.34.6.2  09-Dec-2007  jmcneill Sync with HEAD.
 1.34.6.1  16-Aug-2007  jmcneill Sync with HEAD.
 1.34.2.1  03-Sep-2007  skrll Sync with HEAD.
 1.35.10.1  26-Dec-2007  ad Sync with head.
 1.35.2.1  09-Jan-2008  matt sync with HEAD
 1.36.4.1  02-Jan-2008  bouyer Sync with HEAD
 1.37.10.2  04-May-2009  yamt sync with head.
 1.37.10.1  16-May-2008  yamt sync with head.
 1.37.8.1  18-May-2008  yamt sync with head.
 1.37.6.2  28-Sep-2008  mjf Sync with HEAD.
 1.37.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.38.4.1  03-Jul-2008  simonb Sync with head.
 1.38.2.3  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.38.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.38.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.39.44.1  08-Aug-2014  msaitoh Pull up following revision(s) (requested by maxv in ticket #1104):
sys/compat/linux32/common/linux32_socketcall.c: revision 1.9
sys/compat/linux/common/linux_socketcall.c: revision 1.44
If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.
With the help of njoly@
 1.39.42.1  08-Aug-2014  msaitoh Pull up following revision(s) (requested by maxv in ticket #1916):
sys/compat/linux32/common/linux32_socketcall.c: revision 1.9
sys/compat/linux/common/linux_socketcall.c: revision 1.44
If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.
With the help of njoly@
 1.39.40.1  08-Aug-2014  msaitoh Pull up following revision(s) (requested by maxv in ticket #1104):
sys/compat/linux32/common/linux32_socketcall.c: revision 1.9
sys/compat/linux/common/linux_socketcall.c: revision 1.44
If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.
With the help of njoly@
 1.39.36.1  08-Aug-2014  msaitoh Pull up following revision(s) (requested by maxv in ticket #1104):
sys/compat/linux32/common/linux32_socketcall.c: revision 1.9
sys/compat/linux/common/linux_socketcall.c: revision 1.44
If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.
With the help of njoly@
 1.39.30.2  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.39.30.1  30-Oct-2012  yamt sync with head
 1.39.20.1  08-Aug-2014  msaitoh Pull up following revision(s) (requested by maxv in ticket #1916):
sys/compat/linux32/common/linux32_socketcall.c: revision 1.9
sys/compat/linux/common/linux_socketcall.c: revision 1.44
If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.
With the help of njoly@
 1.39.6.1  08-Aug-2014  msaitoh Pull up following revision(s) (requested by maxv in ticket #1916):
sys/compat/linux32/common/linux32_socketcall.c: revision 1.9
sys/compat/linux/common/linux_socketcall.c: revision 1.44
If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.
With the help of njoly@
 1.42.4.1  18-May-2014  rmind sync with head
 1.42.2.2  03-Dec-2017  jdolecek update from HEAD
 1.42.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.43.2.1  10-Aug-2014  tls Rebase.
 1.44.2.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.45.6.1  21-Apr-2017  bouyer Sync with HEAD
 1.45.4.1  20-Mar-2017  pgoyette Sync with HEAD
 1.45.2.2  28-Aug-2017  skrll Sync with HEAD
 1.45.2.1  05-Feb-2017  skrll Sync with HEAD

RSS XML Feed