summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_syscalls.c
AgeCommit message (Collapse)Author
2006-03-26do per file io accounting and show that in fstat as well; pedro@ marco@ okMichael Shalayeff
2006-01-05ansi/deregisterJonathan Gray
2005-07-06Eliminate a couple of 'msg.msg_iovlen < 0' tests. msg_iovlen isKenneth R Westerback
unsigned. ok millert@ deraadt@
2004-07-22remove p arg from fdplockTed Unangst
2004-04-12make sockargs take void *, combine a len check.Ted Unangst
from pedro martelletto, ok markus@
2004-04-01use NULL for ptrs. parts from Joris VinkTed Unangst
2004-01-06lock filedesc before manipulating. avoids some rare races.Ted Unangst
testing for quite some time by brad + otto
2003-09-01match syscallargs comments with realityHenning Brauer
from Patrick Latifi <patrick.l@hermes.usherb.ca> ok jason@ tedu@
2003-07-21remove caddr_t casts. it's just silly to cast something when the functionTed Unangst
takes a void *. convert uiomove to take a void * as well. ok deraadt@
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-08-23Just like getvnode, make getsock FREF the file so that we can't get awayArtur Grabowski
with not refing it. Eyeballed by lurene@daemonkitty.net, fries@, nordin@ and fries@ Some additional cleanups by nordin@
2002-05-23In sys_accept don't FILE_SET_MATURE the file if we got an error and we've ↵Artur Grabowski
freed it. Noticed by enami@netbsd in a recent discussion on tech-kern@netbsd. Thanks to miod@ for helping me understand my code and realize that what the discussion was originally about (a diff by itojun@) didn't apply to us because I tweaked the semantics of closef() to solve the problem automagically for us (and I forgot about it). miod@ ok.
2002-02-12Fix my total blackout of the brain.Artur Grabowski
I rearrange half of this function to properly handle unlocking in one error case, then I forget to handle that error case. I even had a regression test written for this! In other words: fix accept(2) to unlock when it runs out of fds.
2002-02-12Fix all users of getsock to use FREF/FRELE properly.Artur Grabowski
2002-02-11In {send,recv}msg allow zero sized message. We can have control data.Artur Grabowski
2002-02-08- Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't haveArtur Grabowski
the same semantics as NetBSD anyway, so it's good to avoid name collissions. - Always fdremove before freeing the file, not the other way around. - falloc FREFs the file. - have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to falloc FREFing the file). - Use closef as much as possible instead of ffree in error paths of falloc:ing functions. closef is much more careful with the fd and can deal with the fd being forcibly closed by dup2. Also try to avoid manually calling *fo_close when closef can do that for us (this makes some error paths mroe complicated (sys_socketpair and sys_pipe), but others become simpler (sys_open)).
2001-12-27makes a new accept() socket have the nonblock behavior.Federico G. Schwindt
slightly modified version from the original diff by theo, based on comments by niels@ and deraadt@; both ok'ed.
2001-12-02release the right descriptors when pipe fails; bug report fromNiels Provos
marcodsl@swbell.net
2001-11-28avoid "thundering herd" problem in accept by waking just one process.Niels Provos
based on freebsd. okay art@ markus@
2001-11-27change socket connection queues to use TAILQ_Niels Provos
from NetBSD: Wed Jan 7 23:47:08 1998 UTC by thorpej Make insertion and removal of sockets from the partial and incoming connections queues O(C) rather than O(N).
2001-10-26 - every new fd created by falloc() is marked as larval and should not be usedArtur Grabowski
any anyone. Every caller of falloc matures the fd when it's usable. - Since every lookup in the fd table must now check this flag and all of them do the same thing, move all the necessary checks into a function - fd_getfile.
2001-09-20occured->occurredMike Pechkin
idea from deraadt@ via NetBSD millert@ ok
2001-09-17Don't treated return length of recvfrom() as a size_t... it's a socklen_t.Jason Wright
2001-06-26implement djb's getpeereid(2), to allow local-domain servers to determine ↵Dug Song
client credentials. mostly from superscript.com. deraadt@ ok
2001-06-22KNFTheo de Raadt
2001-05-16No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)Hakan Olsson
2001-05-14gc OLD_PIPE.Artur Grabowski
2001-02-19Indentation nit.Artur Grabowski
2001-02-09return error from soaccept() upwards. part of accept(2) fix against RSTJun-ichiro itojun Hagino
right after handshake.
2000-11-16support kernel event queues, from FreeBSD by Jonathan Lemon,Niels Provos
okay art@, millert@
2000-11-10Change the ktrace interface functions from taking the trace vnode to taking theArtur Grabowski
traced proc. The vnode is in the proc and all functions need the proc.
2000-10-12allow buflen > MLEN for !SO_NAME case (like ancillary data, necessary forJun-ichiro itojun Hagino
IPv6 advanced API). sync with netbsd.
2000-09-27replace MALLOC/FREE w/ malloc/free for non-constant-sized memory ↵Michael Shalayeff
allocations; art@ ok
2000-01-17oops, another syscall pipe() botch; karls@inet.noTheo de Raadt
1999-12-08bring in KAME IPv6 code, dated 19991208.Jun-ichiro itojun Hagino
replaces NRL IPv6 layer. reuses NRL pcb layer. no IPsec-on-v6 support. see sys/netinet6/{TODO,IMPLEMENTATION} for more details. GENERIC configuration should work fine as before. GENERIC.v6 works fine as well, but you'll need KAME userland tools to play with IPv6 (will be bringed into soon).
1999-07-13introduce fdremove() to mark a file descriptor as unused. fdremove makesNiels Provos
sure that the fd_freefile hints stay in sync, otherwise free file descriptors might not be overlooked by fdalloc(); ok millert@
1999-06-15do not mangle retval, makes return value sane; problem found by millertTheo de Raadt
1999-06-11oopsNiels Provos
1999-06-08copy int sized objects, not register_t sized objects in pipe()Theo de Raadt
1999-06-08better fd leak preventionTheo de Raadt
1999-06-07need seperate sys_pipe() versions, for pipeclose() or soclose() callsTheo de Raadt
1999-06-07replacement pipe() system call; copies data into place inside kernel, soTheo de Raadt
that EFAULT return value is possible
1999-06-07do not leak file descriptors if copyout() failsTheo de Raadt
1999-06-07store NULL in fd_ofilesTheo de Raadt
1999-02-15sendto(2) takes a socklen_t as wellTodd C. Miller
1999-02-15use socklen_tTodd C. Miller
1999-02-14Use IOV_MAX, not the deprecated UIO_MAXIOVTodd C. Miller
1999-02-14Don't do range checking on namelen unless name is non-NULL, otherwiseTodd C. Miller
namelen is uninitialized.
1999-02-14readv/writev with iov_len == 0 is legal (was already ok in uipc_syscalls.c).Todd C. Miller
Make the check more readable by comparing against SSIZE_MAX instead of checking for wraparound. This is safe because SSIZE_MAX * 2 <= SIZE_T_MAX. Fixes recno problems in the db routines exposed by a perl test.
1999-02-11avoid insane lengths for various syscallsTheo de Raadt