Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | require a FREFd fp in dofilereadv. Fix some comments. | 2002-02-08 | 1 | -3/+6 | ||
| | ||||||
* | - Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't have | 2002-02-08 | 1 | -12/+3 | ||
| | | | | | | | | | | | | | | 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)). | |||||
* | Add counting of temporary references to a struct file (as opposed to references | 2002-02-05 | 1 | -4/+4 | ||
| | | | | | | | | | | | | | | | from fd tables and other long-lived objects). This is to avoid races between using a file descriptor and having another process (with shared fd table) close it. We use a separate refence count so that error values from close(2) will be correctly returned to the caller of close(2). The macros for those reference counts are FILE_USE(fp) and FILE_UNUSE(fp). Make sure that the cases where closef can be called "incorrectly" (most notably dup2(2)) are handled. Right now only callers of closef (and {,p}read) use FILE_{,UN}USE correctly, more fixes incoming soon. | |||||
* | Be more consistent about using fd_getfile where it matters. | 2002-02-02 | 1 | -13/+4 | ||
| | ||||||
* | in poll, if fd is < 0, clear revents; bjy@mogua.org | 2001-11-14 | 1 | -1/+4 | ||
| | ||||||
* | - every new fd created by falloc() is marked as larval and should not be used | 2001-10-26 | 1 | -39/+14 | ||
| | | | | | | | 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. | |||||
* | No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok) | 2001-05-16 | 1 | -6/+2 | ||
| | ||||||
* | Change the ktrace interface functions from taking the trace vnode to taking the | 2000-11-10 | 1 | -5/+5 | ||
| | | | | traced proc. The vnode is in the proc and all functions need the proc. | |||||
* | replace MALLOC/FREE w/ malloc/free for non-constant-sized memory allocations; art@ ok | 2000-09-27 | 1 | -11/+9 | ||
| | ||||||
* | Isn't code sharing great? | 2000-07-07 | 1 | -11/+10 | ||
| | | | | poll had the same timeout problem as select. | |||||
* | When select is awakened by a select collission, we need to recalculate | 2000-07-07 | 1 | -13/+9 | ||
| | | | | the timeout. | |||||
* | p{read,write}{,v} from csapuntz, partial NetBSD origin I think | 2000-04-20 | 1 | -89/+231 | ||
| | ||||||
* | Change struct file interface methods read and write to pass file offset in | 2000-04-19 | 1 | -5/+5 | ||
| | | | | | | | and out. Make pread/pwrite in netbsd & linux thread safe - which is the whole point anyway. | |||||
* | revents already cleared; d | 1999-11-29 | 1 | -4/+2 | ||
| | ||||||
* | handle invalid file descriptors in poll more carefully; d | 1999-11-29 | 1 | -8/+20 | ||
| | ||||||
* | optimize poll() for small nfds, by avoiding malloc | 1999-08-04 | 1 | -4/+7 | ||
| | ||||||
* | correct return value of poll(); noted by d@ | 1999-05-24 | 1 | -4/+6 | ||
| | ||||||
* | in poll(), constrain nfds better, to avoid kvm starvation; alex | 1999-03-22 | 1 | -2/+7 | ||
| | ||||||
* | Use IOV_MAX, not the deprecated UIO_MAXIOV | 1999-02-14 | 1 | -3/+3 | ||
| | ||||||
* | readv/writev with iov_len == 0 is legal (was already ok in uipc_syscalls.c). | 1999-02-14 | 1 | -3/+5 | ||
| | | | | | | | 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. | |||||
* | writev takes an int as param #3; theo | 1998-07-28 | 1 | -2/+2 | ||
| | ||||||
* | For read, write, send, sendto, recv, recvfrom return EINVAL is size arg > SSIZE_MAX. For readv, writev, sendmsg, recvmsg return EINVAL if sum of the over iov_len values overflows an ssize_t. Based on what XPG 4.2 says (though XPG is not entirely consistent here). Basically since the return ↵ | 1998-07-28 | 1 | -16/+18 | ||
| | | | | value is ssize_t allowing size > SSIZE_MAX is bad since people who (incorrectly mind you) check the return value for < 0 instead of == -1 will have bad things happen to them. | |||||
* | Return EINVAL when msg_iovlen or iovcnt <= 0; Make uio_resid unsigned (size_t) and don't return EINVAL if it is < 0 in sys_{read,write}. Remove check for uio_resid < 0 uiomove() now that uio_resid is unsigned and brack remaining panics with #ifdef DIAGNOSTIC. vn_rdwr() must now take a size_t * ↵ | 1998-07-28 | 1 | -5/+5 | ||
| | | | | as its 9th argument so change that and clean up uses of vn_rdwr(). Fixes 549 + more | |||||
* | More missing type changes; pointed out by deraadt@OpenBSD.org | 1998-02-09 | 1 | -2/+2 | ||
| | ||||||
* | Updates for VFS Lite 2 + soft update. | 1997-11-06 | 1 | -17/+5 | ||
| | ||||||
* | back out vfs lite2 till after 2.2 | 1997-10-06 | 1 | -5/+17 | ||
| | ||||||
* | VFS Lite2 Changes | 1997-10-06 | 1 | -17/+5 | ||
| | ||||||
* | for non-tty TIOCSPGRP/F_SETOWN/FIOSETOWN pgid setting calls, store uid | 1997-08-31 | 1 | -2/+6 | ||
| | | | | | | | and euid as well, then deliver them using new csignal() interface which ensures that pgid setting process is permitted to signal the pgid process(es). Thanks to newsham@aloha.net for extensive help and discussion. | |||||
* | select subsystem si_pid becomes si_selpid, to not conflict against user/kernel siginfo si_pid #define | 1997-01-27 | 1 | -7/+7 | ||
| | ||||||
* | i added a fair bit to this | 1996-10-12 | 1 | -1/+2 | ||
| | ||||||
* | poll() as a system call | 1996-05-18 | 1 | -1/+123 | ||
| | ||||||
* | if nfds > FD_SETSIZE, allocate room for the bitmasks inside the kernel; also | 1996-05-07 | 1 | -12/+47 | ||
| | | | | | selscan() now understands that it may possible be passed home-grown fd_set's larger than FD_SETSIZE. | |||||
* | partial sync with netbsd 960418, more to come | 1996-04-21 | 1 | -3/+3 | ||
| | ||||||
* | From NetBSD: 960217 merge | 1996-03-03 | 1 | -10/+35 | ||
| | ||||||
* | initial import of NetBSD tree | 1995-10-18 | 1 | -0/+699 | ||