History log of /openbsd-src/sys/kern/sys_generic.c (Results 126 – 150 of 160)
Revision Date Author Comments
# b18008b0 08-Feb-2002 art <art@openbsd.org>

require a FREFd fp in dofilereadv. Fix some comments.


# 43c6a78b 08-Feb-2002 art <art@openbsd.org>

- Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't have
the same semantics as NetBSD anyway, so it's good to avoid name collissions.
- Always fdremove before freeing the file,

- Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't have
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)).

show more ...


# 03e6dd16 05-Feb-2002 art <art@openbsd.org>

Add counting of temporary references to a struct file (as opposed to references
from fd tables and other long-lived objects). This is to avoid races between
using a file descriptor and having another

Add counting of temporary references to a struct file (as opposed to references
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.

show more ...


# a7b596c7 02-Feb-2002 art <art@openbsd.org>

Be more consistent about using fd_getfile where it matters.


# bb9d7ac3 14-Nov-2001 deraadt <deraadt@openbsd.org>

in poll, if fd is < 0, clear revents; bjy@mogua.org


# af97e5cf 26-Oct-2001 art <art@openbsd.org>

- every new fd created by falloc() is marked as larval and should not be used
any anyone. Every caller of falloc matures the fd when it's usable.
- Since every lookup in the fd table must now che

- every new fd created by falloc() is marked as larval and should not be used
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.

show more ...


# d424e204 16-May-2001 ho <ho@openbsd.org>

No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)


# a27b30d8 10-Nov-2000 art <art@openbsd.org>

Change the ktrace interface functions from taking the trace vnode to taking the
traced proc. The vnode is in the proc and all functions need the proc.


# 8b34068e 27-Sep-2000 mickey <mickey@openbsd.org>

replace MALLOC/FREE w/ malloc/free for non-constant-sized memory allocations; art@ ok


# e40dc44b 07-Jul-2000 art <art@openbsd.org>

Isn't code sharing great?
poll had the same timeout problem as select.


# 564a8dd2 07-Jul-2000 art <art@openbsd.org>

When select is awakened by a select collission, we need to recalculate
the timeout.


# a82f1f5a 20-Apr-2000 deraadt <deraadt@openbsd.org>

p{read,write}{,v} from csapuntz, partial NetBSD origin I think


# dc974da3 19-Apr-2000 csapuntz <csapuntz@openbsd.org>

Change struct file interface methods read and write to pass file offset in
and out.

Make pread/pwrite in netbsd & linux thread safe - which is the whole point
anyway.


# 25ee547f 29-Nov-1999 deraadt <deraadt@openbsd.org>

revents already cleared; d


# e76a2466 29-Nov-1999 deraadt <deraadt@openbsd.org>

handle invalid file descriptors in poll more carefully; d


# 63e09ba8 04-Aug-1999 deraadt <deraadt@openbsd.org>

optimize poll() for small nfds, by avoiding malloc


# bd3fdb3f 24-May-1999 deraadt <deraadt@openbsd.org>

correct return value of poll(); noted by d@


# 4481aa99 22-Mar-1999 deraadt <deraadt@openbsd.org>

in poll(), constrain nfds better, to avoid kvm starvation; alex


# 8a7589ca 14-Feb-1999 millert <millert@openbsd.org>

Use IOV_MAX, not the deprecated UIO_MAXIOV


# a8bf5b0b 14-Feb-1999 millert <millert@openbsd.org>

readv/writev with iov_len == 0 is legal (was already ok in uipc_syscalls.c).
Make the check more readable by comparing against SSIZE_MAX instead
of checking for wraparound. This is safe because SSIZ

readv/writev with iov_len == 0 is legal (was already ok in uipc_syscalls.c).
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.

show more ...


# f86b5d3c 28-Jul-1998 millert <millert@openbsd.org>

writev takes an int as param #3; theo


# 1f681a38 28-Jul-1998 millert <millert@openbsd.org>

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

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 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.

show more ...


# 9b355cb2 28-Jul-1998 millert <millert@openbsd.org>

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 i

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 * as its 9th argument so change that and clean up uses of vn_rdwr(). Fixes 549 + more

show more ...


# 46bf2fa1 09-Feb-1998 tholo <tholo@openbsd.org>

More missing type changes; pointed out by deraadt@OpenBSD.org


# 07feb63c 06-Nov-1997 csapuntz <csapuntz@openbsd.org>

Updates for VFS Lite 2 + soft update.


1234567