OpenBSD CVS

CVS log for src/sys/kern/kern_descrip.c


[BACK] Up to [local] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.207 / (download) - annotate - [select for diffs], Mon Dec 5 23:18:37 2022 UTC (17 months, 3 weeks ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.206: +2 -2 lines
Diff to previous 1.206 (colored)

zap a pile of dangling tabs

Revision 1.206 / (download) - annotate - [select for diffs], Sun Aug 14 01:58:27 2022 UTC (21 months, 2 weeks ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.205: +1 -6 lines
Diff to previous 1.205 (colored)

remove unneeded includes in sys/kern
ok mpi@ miod@

Revision 1.205 / (download) - annotate - [select for diffs], Thu Jan 20 11:06:57 2022 UTC (2 years, 4 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.204: +6 -6 lines
Diff to previous 1.204 (colored)

Shifting signed integers left by 31 is undefined behavior in C.
found by kubsan; joint work with tobhe@; OK miod@

Revision 1.204 / (download) - annotate - [select for diffs], Mon Oct 25 10:24:54 2021 UTC (2 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.203: +3 -1 lines
Diff to previous 1.203 (colored)

Revert commitid: ufM9BcSbXqfLpzBH;
Move vfs_stall_barrier() from the fd layer into vn_lock() and the vfs layer.
In some cases it can result in a deadlock while suspending.
Discussed with mpi@ and deraadt@

Revision 1.203 / (download) - annotate - [select for diffs], Thu Oct 21 09:59:13 2021 UTC (2 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.202: +1 -3 lines
Diff to previous 1.202 (colored)

Move vfs_stall_barrier() from the fd layer into vn_lock() and the vfs layer.
vfs stalling is used by suspend/resume and by vmt(4) to stall any
filesystem operation from altering the state on disk. All these
operations will call vn_lock and be stalled. Adjust vfs_stall_barrier()
to allow the lock owner to still progress so that suspend can sync
the filesystems after stalling vfs operation.
OK mpi@

Revision 1.202 / (download) - annotate - [select for diffs], Thu Jun 11 13:23:18 2020 UTC (3 years, 11 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.201: +7 -4 lines
Diff to previous 1.201 (colored)

Move FRELE() outside fdplock in dup*(2) code. This avoids a potential
lock order issue with the file close path.

The FRELE() can trigger the close path during dup*(2) if another thread
manages to close the file descriptor simultaneously. This race is
possible because the file reference is taken before the file descriptor
table is locked for write access.

Vitaliy Makkoveev agrees
OK anton@ mpi@

Revision 1.201 / (download) - annotate - [select for diffs], Fri Mar 13 10:07:01 2020 UTC (4 years, 2 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.200: +4 -4 lines
Diff to previous 1.200 (colored)

In order to unlock flock(2), make writes to the f_iflags field of struct
file atomic. This also gets rid of the last kernel lock protected field
in the scope of struct file.

ok mpi@ visa@

Revision 1.200 / (download) - annotate - [select for diffs], Wed Feb 26 13:54:52 2020 UTC (4 years, 3 months ago) by visa
Branch: MAIN
Changes since 1.199: +23 -21 lines
Diff to previous 1.199 (colored)

Release the file descriptor table lock before calling closef()
in finishdup(). This makes the order of operations similar to that
of fdrelease() and removes a case where lock ordering might cause
problems.

OK anton@, mpi@

Revision 1.199 / (download) - annotate - [select for diffs], Tue Feb 18 03:47:18 2020 UTC (4 years, 3 months ago) by visa
Branch: MAIN
Changes since 1.198: +21 -11 lines
Diff to previous 1.198 (colored)

Move setting of UF_EXCLOSE file descriptor flag inside finishdup().
This makes it easier to release fdplock before calling closef().

OK mpi@, anton@

Revision 1.198 / (download) - annotate - [select for diffs], Wed Feb 5 17:03:13 2020 UTC (4 years, 3 months ago) by visa
Branch: MAIN
Changes since 1.197: +2 -12 lines
Diff to previous 1.197 (colored)

Move kernel locking inside knote_fdclose() from finishdup() and
fdrelease(). This makes the upper layer of file descriptor closing
free of KERNEL_LOCK() when the process does not use kqueue.

The kernel locking around fdremove() and knote_fdclose() is no longer
needed because kqueue_register() checks if there has been a race with
file descriptor close. Moreover, the locking became ineffective against
these races when filterops callbacks were allowed to sleep.

OK anton@, mpi@

Revision 1.197 / (download) - annotate - [select for diffs], Sat Feb 1 08:57:27 2020 UTC (4 years, 4 months ago) by anton
Branch: MAIN
Changes since 1.196: +8 -5 lines
Diff to previous 1.196 (colored)

Make writes to the f_flag field of `struct file' MP-safe using atomic
operations. Since the type of f_flag must change in order to use the
atomic(9) API, reorder the struct in order to avoid padding; as pointed
out by tedu@.

ok mpi@ visa@

Revision 1.196 / (download) - annotate - [select for diffs], Wed Jan 8 16:45:28 2020 UTC (4 years, 4 months ago) by visa
Branch: MAIN
Changes since 1.195: +1 -3 lines
Diff to previous 1.195 (colored)

Skip fdplock when freeing a file descriptor table. The lock is not
necessary because other threads cannot access the data structure.
This fixes the following lock order issue:

witness: lock order reversal:
 1st 0xfffffd81d821d248 fdlock (&newfdp->fd_fd.fd_lock)
 2nd 0xffff800000fe45b8 primlk (&prime_fpriv->lock)
lock order "&prime_fpriv->lock"(rwlock) -> "&newfdp->fd_fd.fd_lock"(rwlock) first seen at:
#0  witness_checkorder+0x449
#1  rw_enter_write+0x43
#2  dma_buf_fd+0x8c
#3  drm_gem_prime_handle_to_fd+0xed
#4  drmioctl+0xdc
#5  VOP_IOCTL+0x55
#6  vn_ioctl+0x64
#7  sys_ioctl+0x2f6
#8  syscall+0x389
#9  Xsyscall+0x128
lock order "&newfdp->fd_fd.fd_lock"(rwlock) -> "&prime_fpriv->lock"(rwlock) first seen at:
#0  witness_checkorder+0x449
#1  rw_enter_write+0x43
#2  drm_gem_object_release_handle+0x5e
#3  idr_for_each+0xee
#4  drm_gem_release+0x1f
#5  drmclose+0x144
#6  spec_close+0x213
#7  VOP_CLOSE+0x49
#8  vn_closefile+0x9b
#9  fdrop+0x8b
#10 closef+0xaf
#11 fdfree+0xd4
#12 exit1+0x1cf
#13 sys_exit+0x16
#14 syscall+0x389
#15 Xsyscall+0x128


OK mpi@

Revision 1.195 / (download) - annotate - [select for diffs], Wed Jan 8 16:27:41 2020 UTC (4 years, 4 months ago) by visa
Branch: MAIN
Changes since 1.194: +4 -16 lines
Diff to previous 1.194 (colored)

Unify handling of ioctls FIOSETOWN/SIOCSPGRP/TIOCSPGRP and
FIOGETOWN/SIOCGPGRP/TIOCGPGRP. Do this by determining the meaning of
the ID parameter inside the sigio code. Also add cases for FIOSETOWN
and FIOGETOWN where there have been TIOCSPGRP and TIOCGPGRP before.
These changes allow removing the ID translation from sys_fcntl() and
sys_ioctl().

Idea from NetBSD

OK mpi@, claudio@

Revision 1.194 / (download) - annotate - [select for diffs], Mon Jan 6 10:25:10 2020 UTC (4 years, 4 months ago) by visa
Branch: MAIN
Changes since 1.193: +4 -1 lines
Diff to previous 1.193 (colored)

Make kqlist part of filedesc and serialize access to it using fdplock.
This choice of locking is guided by knote_fdclose().

OK mpi@, anton@

Revision 1.193 / (download) - annotate - [select for diffs], Fri Jan 3 05:37:00 2020 UTC (4 years, 5 months ago) by visa
Branch: MAIN
Changes since 1.192: +15 -6 lines
Diff to previous 1.192 (colored)

Fix a file descriptor close race in kqueue_register()

After inserting a knote, check that the associated file descriptor
still references the same file. Remove the knote if the descriptor
has changed because otherwise the kqueue becomes inconsistent with
the file descriptor table.

There is an analogous race in fcntl(F_SETLK). It is already handled,
but the code can be simplified by using the same check as in
kqueue_register().

Fix inspired by DragonFly BSD

OK mpi@, anton@

Revision 1.192 / (download) - annotate - [select for diffs], Mon Aug 5 08:35:59 2019 UTC (4 years, 9 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.191: +9 -5 lines
Diff to previous 1.191 (colored)

Allow concurrent reads of the f_offset field of struct file by
serializing both read/write operations using the existing file mutex.
The vnode lock still grants exclusive write access to the offset; the
mutex is only used to make the actual write atomic and prevent any
concurrent reader from observing intermediate values.

ok mpi@ visa@

Revision 1.191 / (download) - annotate - [select for diffs], Mon Jul 15 04:11:03 2019 UTC (4 years, 10 months ago) by visa
Branch: MAIN
Changes since 1.190: +14 -7 lines
Diff to previous 1.190 (colored)

Do not relock fdp in fdrelease(). This prevents unnecessary locking
in the common case.

OK mpi@

Revision 1.190 / (download) - annotate - [select for diffs], Fri Jul 12 13:56:27 2019 UTC (4 years, 10 months ago) by solene
Branch: MAIN
Changes since 1.189: +4 -75 lines
Diff to previous 1.189 (colored)

Revert anton@ changes about read/write unlocking
https://marc.info/?l=openbsd-cvs&m=156277704122293&w=2

ok anton@

Revision 1.189 / (download) - annotate - [select for diffs], Wed Jul 10 16:43:19 2019 UTC (4 years, 10 months ago) by anton
Branch: MAIN
Changes since 1.188: +76 -5 lines
Diff to previous 1.188 (colored)

Make read/write of the f_offset field belonging to struct file MP-safe;
as part of the effort to unlock the kernel. Instead of relying on the
vnode lock, introduce a dedicated lock per file. Exclusive write access
is granted using the new foffset_enter and foffset_leave API. A
convenience function foffset_get is also available for threads that only
need to read the current offset.

The lock acquisition order in vn_write has been changed to match the one
in vn_read in order to avoid a potential deadlock. This change also gets
rid of a documented race in vn_read().

Inspired by the FreeBSD implementation.

With help and ok mpi@ visa@

Revision 1.188 / (download) - annotate - [select for diffs], Wed Jul 3 14:32:02 2019 UTC (4 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.187: +9 -1 lines
Diff to previous 1.187 (colored)

Lock the kernel when removing file descriptors from the descriptor
table. This should prevent a race with kevent when unlocked code
closes file descriptors that are fully set up.

OK mpi@

Revision 1.187 / (download) - annotate - [select for diffs], Wed Jun 26 13:27:20 2019 UTC (4 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.186: +2 -2 lines
Diff to previous 1.186 (colored)

Return EINVAL, not EBADF for fcntl(fd, F_GETLK) of a non-vnode.
Matches the recent F_SETLK change, POSIX and the man page.

Revision 1.186 / (download) - annotate - [select for diffs], Tue Jun 25 15:47:28 2019 UTC (4 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.185: +2 -2 lines
Diff to previous 1.185 (colored)

Return EINVAL not EBADF when trying to lock a non-vnode.
This behavior matches POSIX and our own fnctl(2) man page.
OK anton@ deraadt@

Revision 1.185 / (download) - annotate - [select for diffs], Fri Jun 21 09:39:48 2019 UTC (4 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.184: +4 -4 lines
Diff to previous 1.184 (colored)

Make resource limit access MP-safe. So far, the copy-on-write sharing
of resource limit structs has been done between processes. By applying
copy-on-write also between threads, threads can read rlimits in
a nearly lock-free manner.

Inspired by code in DragonFly BSD and FreeBSD.

OK mpi@, agreement from jmatthew@ and anton@

Revision 1.184 / (download) - annotate - [select for diffs], Mon May 13 17:31:51 2019 UTC (5 years ago) by deraadt
Branch: MAIN
Changes since 1.183: +6 -6 lines
Diff to previous 1.183 (colored)

dup2(n,n) would rlimit check before handling the n==n shortcut,
and incorrectly return EBADF when n>curlim.
ok millert guenther tedu

Revision 1.183 / (download) - annotate - [select for diffs], Mon Nov 5 17:05:50 2018 UTC (5 years, 6 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.182: +9 -1 lines
Diff to previous 1.182 (colored)

trace struct flock; ok visa@

Revision 1.182 / (download) - annotate - [select for diffs], Fri Aug 24 12:45:27 2018 UTC (5 years, 9 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.181: +2 -1 lines
Diff to previous 1.181 (colored)

Remove all knotes from a file descriptor before closing the file in
fdfree(). This fixes a resource leak with cyclic kqueue references and
prevents a kernel stack exhaustion scenario with long kqueue chains.

OK mpi@

Revision 1.181 / (download) - annotate - [select for diffs], Tue Aug 21 13:50:31 2018 UTC (5 years, 9 months ago) by visa
Branch: MAIN
Changes since 1.180: +6 -7 lines
Diff to previous 1.180 (colored)

Use explicit fd indexing to access fd_ofiles, to clarify the code.

OK mpi@

Revision 1.180 / (download) - annotate - [select for diffs], Mon Aug 20 14:59:02 2018 UTC (5 years, 9 months ago) by visa
Branch: MAIN
Changes since 1.179: +2 -3 lines
Diff to previous 1.179 (colored)

Make fnew() return a new file with only one reference. This makes
the API more logical.

OK kettenis@ mpi@

Revision 1.179 / (download) - annotate - [select for diffs], Sun Aug 19 02:22:40 2018 UTC (5 years, 9 months ago) by visa
Branch: MAIN
Changes since 1.178: +1 -7 lines
Diff to previous 1.178 (colored)

Remove a stale/obvious comment.

OK mpi@

Revision 1.178 / (download) - annotate - [select for diffs], Fri Aug 10 15:53:49 2018 UTC (5 years, 9 months ago) by jsing
Branch: MAIN
Changes since 1.177: +5 -2 lines
Diff to previous 1.177 (colored)

Update fd_freefile when filtering/closing kqueue descriptors in fdcopy().

Prior to r1.153 of kern_descrip.c, the kqueue descriptors were removed
using fdremove(), which reset fd_freefile as appropriate. The new code
simply avoids adding the descriptor to the new table, however this means
that fd_freefile can be left with an incorrect value, resulting in a file
descriptor allocation "hole". Restore the previous behavour by lowering
fd_freefile as appropriate when dropping descriptors.

Issue found via golang regress tests.

ok deraadt@ mpi@ visa@

Revision 1.177 / (download) - annotate - [select for diffs], Tue Jul 10 08:58:50 2018 UTC (5 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.176: +4 -24 lines
Diff to previous 1.176 (colored)

Move socket & pipe specific logic in their ioctl handler.

ok visa@, tb@

Revision 1.176 / (download) - annotate - [select for diffs], Sat Jul 7 16:14:40 2018 UTC (5 years, 10 months ago) by visa
Branch: MAIN
Changes since 1.175: +9 -8 lines
Diff to previous 1.175 (colored)

Fix an argument type error that happens when translating fcntl(F_SETOWN)
to ioctl(TIOCSPGRP). The ioctl handlers expect a pointer to an int, so
read the argument into a local int variable and pass the variable's
address to the handler instead of referencing SCARG(uap, arg) directly.

OK guenther@, mpi@

Revision 1.175 / (download) - annotate - [select for diffs], Mon Jul 2 14:36:33 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.174: +63 -31 lines
Diff to previous 1.174 (colored)

Update the file reference count field `f_count' using atomic operations
instead of using a mutex for update serialization. Use a per-fdp mutex
to manage updating of file instance pointers in the `fd_ofiles' array
to let fd_getfile() acquire file references safely with concurrent file
reference releases.

OK mpi@

Revision 1.174 / (download) - annotate - [select for diffs], Mon Jul 2 14:21:45 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.173: +3 -1 lines
Diff to previous 1.173 (colored)

Assert that fdp is locked in fdalloc().

OK mpi@

Revision 1.173 / (download) - annotate - [select for diffs], Sun Jul 1 16:33:15 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.172: +3 -1 lines
Diff to previous 1.172 (colored)

Lock the file descriptor table when accessing the `fd_ofileflags' array.
This prevents the array from being freed too early. In the function
unp_internalize(), the locking also ensures the per-fdp flags stay
coherent with the file instance.

OK mpi@

Revision 1.172 / (download) - annotate - [select for diffs], Wed Jun 27 16:37:25 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.171: +2 -2 lines
Diff to previous 1.171 (colored)

Raise file_pool's IPL to prevent deadlocks with the newly unlocked
system calls.

OK mpi@

Revision 1.171 / (download) - annotate - [select for diffs], Tue Jun 26 14:43:01 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.170: +3 -2 lines
Diff to previous 1.170 (colored)

Remove a duplicate fd_used() call. The new file descriptor passed
to dupfdopen() has already been registered with fd_used() in fdalloc().

The duplicate call distorted the number of open file descriptors
returned by getdtablecount(2) if a file was opened via /dev/fd/.

While there, assert that the file instance should already be in the
file list.

OK mpi@

Revision 1.170 / (download) - annotate - [select for diffs], Mon Jun 25 22:29:16 2018 UTC (5 years, 11 months ago) by kettenis
Branch: MAIN
Changes since 1.169: +6 -2 lines
Diff to previous 1.169 (colored)

Implement DRI3/prime support.  This allows graphics buffers to be passed
between processes using file descriptors.  This provides an alternative to
eporting them with guesable 32-bit IDs.  This implementation does not (yet)
allow sharing of graphics buffers between GPUs.

ok mpi@, visa@

Revision 1.169 / (download) - annotate - [select for diffs], Mon Jun 25 09:36:28 2018 UTC (5 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.168: +31 -12 lines
Diff to previous 1.168 (colored)

Introduce fnew(), a function to initialize a `struct file'.

Commiting now to help refactoring of DRI3 and diskmap rewrite.

ok visa@, kettenis@ as part of a larger diff.

Revision 1.168 / (download) - annotate - [select for diffs], Sun Jun 24 05:58:05 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.167: +6 -5 lines
Diff to previous 1.167 (colored)

Use atomic operations for updating `numfiles'. This makes the file count
tracking work without locks.

OK kettenis@, deraadt@

Revision 1.167 / (download) - annotate - [select for diffs], Wed Jun 20 10:52:49 2018 UTC (5 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.166: +42 -18 lines
Diff to previous 1.166 (colored)

Unlock sendmsg(2) and sendto(2).

These syscalls can now be executed w/o the KERNEL_LOCK() depending on
the kind of socket.

The current solution uses a single global mutex to serialize access to,
and reference count, 'struct file'.

ok visa@, kettenis@

Revision 1.166 / (download) - annotate - [select for diffs], Mon Jun 18 09:15:05 2018 UTC (5 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.165: +50 -46 lines
Diff to previous 1.165 (colored)

Put file descriptors on shared data structures when they are completely
setup, take 3.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]' or the global linked list.  This allows
us to simplifies a lot code grabbing new references to fds.

All of this is now possible because dup2(2) refuses to clone LARVAL fds.

Note that the `fdplock' could now be release in all open(2)-like syscalls,
just like it is done in accept(2).

With inputs from Mathieu Masson, visa@, guenther@ and art@

Previous version ok bluhm@, ok visa@, sthen@

Revision 1.165 / (download) - annotate - [select for diffs], Sun Jun 17 08:22:02 2018 UTC (5 years, 11 months ago) by anton
Branch: MAIN
Changes since 1.164: +3 -8 lines
Diff to previous 1.164 (colored)

Move kqueue related fields from struct filedesc to struct kqueue. Solves a panic
in knote_processexit() that can occur when the filedesc belonging to the process
already has been freed.

Similiar work has been done in:
- FreeBSD (commit bc1805c6e871c178d0b6516c3baa774ffd77224a)
- DragonFlyBSD (commit ccafe911a3aa55fd5262850ecfc5765cd31a56a2)

Thanks to tb@ for testing.

ok kettenis@ mpi@ visa@

Revision 1.164 / (download) - annotate - [select for diffs], Tue Jun 5 09:29:05 2018 UTC (5 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.163: +38 -48 lines
Diff to previous 1.163 (colored)

Revert introduction of fdinsert(), a sanitify check triggers when
closing a LARVAL file.

Found the hardway by sthen@.

Revision 1.163 / (download) - annotate - [select for diffs], Sat Jun 2 12:42:18 2018 UTC (6 years ago) by visa
Branch: MAIN
Changes since 1.162: +3 -1 lines
Diff to previous 1.162 (colored)

Add an assert that makes explicit that finishdup() should receive
an inserted fp.

OK mpi@

Revision 1.162 / (download) - annotate - [select for diffs], Sat Jun 2 10:27:43 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.161: +46 -38 lines
Diff to previous 1.161 (colored)

Put file descriptors on shared data structures when they are completely
setup.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]'.  This allows us to simplifies a lot
code grabbing new references to fds.

All of this is now possible because dup2(2) refuses to clone LARVAL fds.

Note that the `fdplock' could now be release in all open(2)-like syscalls,
just like it is done in accept(2).

With inputs from Mathieu -, visa@, guenther@ and art@

ok visa@, bluhm@

Revision 1.161 / (download) - annotate - [select for diffs], Thu May 31 11:38:15 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.160: +2 -2 lines
Diff to previous 1.160 (colored)

Use IPL_MPFLOOR for mutexes that can be taken w/ and w/o the KERNEL_LOCK().

From Mathieu <naabed at poolp.org>, ok visa@, tb@

Revision 1.160 / (download) - annotate - [select for diffs], Tue May 29 08:28:35 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.159: +6 -2 lines
Diff to previous 1.159 (colored)

`f_mtx' must block interrupts as long as it is taken w/ and w/o the
KERNEL_LOCK().

Otherwise a deadlock can occur as found the hardway by tb@.

ok tb@, kettenis@, visa@

Revision 1.159 / (download) - annotate - [select for diffs], Mon May 28 08:55:11 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.158: +7 -6 lines
Diff to previous 1.158 (colored)

Returns EBUSY if dup2(2) is called for a LARVAL file.

This prevents a panic due to a double free if a program exits after having
called accept(2) and dup2(2) on the same fd but without the corresponding
connect(5).

It will also allows us to simplify file descriptor locking.  The error code
has been choosed to match Linux's behavior.

Pointed by Mathieu on tech@ after a discussion with guenther@.  ok visa@

Revision 1.158 / (download) - annotate - [select for diffs], Tue May 8 09:03:58 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.157: +2 -2 lines
Diff to previous 1.157 (colored)

Change fd_iterfile() to not return imature fps instead of skipping them
later.

ok bluhm@, visa@

Revision 1.157 / (download) - annotate - [select for diffs], Tue May 8 08:53:41 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.156: +2 -1 lines
Diff to previous 1.156 (colored)

Protect per-file counters and document which lock is used to protect
the other fields.

Once we no longer have any [k] (kernel lock) protections, we'll be
able to unlock almost all network related syscalls.

Inputs from and ok bluhm@, visa@

Revision 1.156 / (download) - annotate - [select for diffs], Wed May 2 02:24:56 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.155: +2 -2 lines
Diff to previous 1.155 (colored)

Remove proc from the parameters of vn_lock(). The parameter is
unnecessary because curproc always does the locking.

OK mpi@

Revision 1.155 / (download) - annotate - [select for diffs], Sat Apr 28 03:13:04 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored)

Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.

OK mpi@, deraadt@

Revision 1.154 / (download) - annotate - [select for diffs], Fri Apr 27 10:13:37 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.153: +12 -12 lines
Diff to previous 1.153 (colored)

Move FREF() inside fd_getfile().

ok visa@

Revision 1.153 / (download) - annotate - [select for diffs], Thu Apr 26 06:28:43 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.152: +39 -53 lines
Diff to previous 1.152 (colored)

Rewrite fdcopy() to avoid memcpy()s.

With and ok visa@

Revision 1.152 / (download) - annotate - [select for diffs], Wed Apr 25 10:29:16 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.151: +23 -1 lines
Diff to previous 1.151 (colored)

Introduce fd_iterfile() a new helper function to iterate over `filehead'.

This turns `filehead' into a local variable, that will make it easier
to protect it.

ok visa@

Revision 1.151 / (download) - annotate - [select for diffs], Wed Apr 18 09:59:09 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.150: +8 -3 lines
Diff to previous 1.150 (colored)

Do a FREF()/FRELE() dance after fd_getfile() in sys_fcntl().

ok visa@

Revision 1.150 / (download) - annotate - [select for diffs], Thu Apr 12 10:30:18 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.149: +4 -5 lines
Diff to previous 1.149 (colored)

Use the current reference instead of incrementing `f_count' manually and
calling FRELE(9) in finishdup().

Update comments accordingly.

ok bluhm@, visa@

Revision 1.149 / (download) - annotate - [select for diffs], Thu Apr 12 10:28:13 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.148: +8 -4 lines
Diff to previous 1.148 (colored)

Call FREF(9) earlier instead of incrementing `f_count' directly in
dupfdopen().

ok bluhm@, visa@

Revision 1.148 / (download) - annotate - [select for diffs], Wed Apr 11 16:47:17 2018 UTC (6 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.147: +1 -3 lines
Diff to previous 1.147 (colored)

The pledge flag for file descriptors opened from /dev/fd was always
set for pledged processes.  dup(2) uses the flag from the old file
descriptor.  Make open /dev/fd consistent to duplicate and inherit
the flag.
OK deraadt@

Revision 1.147 / (download) - annotate - [select for diffs], Mon Apr 9 13:59:03 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.146: +12 -16 lines
Diff to previous 1.146 (colored)

Revert previous, it introduced a bug found the hardway by landry@.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Apr 9 09:57:13 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.145: +16 -12 lines
Diff to previous 1.145 (colored)

Call finishdup() instead of rerolling it in dupfdopen().

While here call FREF() right after fd_getfile().

ok bluhm@, visa@

Revision 1.145 / (download) - annotate - [select for diffs], Fri Apr 6 10:48:09 2018 UTC (6 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.144: +2 -2 lines
Diff to previous 1.144 (colored)

Retain the UF_PLEDGED flag from the original fd during dup(2).
Nothing uses this fd-tracking part of pledge yet.
OK deraadt@

Revision 1.144 / (download) - annotate - [select for diffs], Tue Apr 3 09:00:03 2018 UTC (6 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.143: +6 -3 lines
Diff to previous 1.143 (colored)

Call FREF() right after fd_getfile() in dodup3().

ok millert@, bluhm@

Revision 1.143 / (download) - annotate - [select for diffs], Wed Mar 28 09:49:28 2018 UTC (6 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.142: +5 -3 lines
Diff to previous 1.142 (colored)

Call FREF() right after fd_getfile() in sys_flock().

This ensure that all operations manipulating a 'struct file *' do so
with a properly refcounted element.

ok visa@, bluhm@

Revision 1.142 / (download) - annotate - [select for diffs], Mon Feb 19 08:59:52 2018 UTC (6 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Wed Aug 2 16:49:44 2017 UTC (6 years, 10 months ago) by deraadt
Branch: OPENBSD_6_0
Changes since 1.132: +2 -1 lines
Diff to previous 1.132 (colored) next main 1.133 (colored)

Initialize a local variable to not leak kernel stack info to userland
if TIOCGPGRP fail.
Issue found by Ilja van Sprundel.
errata 36

Revision 1.140.4.1 / (download) - annotate - [select for diffs], Tue Aug 1 22:25:07 2017 UTC (6 years, 10 months ago) by bluhm
Branch: OPENBSD_6_1
Changes since 1.140: +2 -1 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

Initialize a local variable to not leak kernel stack info to userland
if TIOCGPGRP fail.
Issue found by Ilja van Sprundel.
errata 022

Revision 1.141 / (download) - annotate - [select for diffs], Thu Jul 20 16:47:21 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.140: +2 -1 lines
Diff to previous 1.140 (colored)

Initialize a local variable to not leak kernel stack info to userland
if TIOCGPGRP fail.

Issue found by Ilja van Sprundel.

ok bluhm@, millert@, deraadt@

Revision 1.140 / (download) - annotate - [select for diffs], Sat Feb 11 19:51:06 2017 UTC (7 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE
Branch point for: OPENBSD_6_1
Changes since 1.139: +8 -6 lines
Diff to previous 1.139 (colored)

Add a flags argument to falloc() that lets it optionally set the
close-on-exec flag on the newly allocated fd.  Make falloc()'s
return arguments non-optional: assert that they're not NULL.

ok mpi@ millert@

Revision 1.139 / (download) - annotate - [select for diffs], Tue Jan 24 04:09:59 2017 UTC (7 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.138: +10 -3 lines
Diff to previous 1.138 (colored)

Track a per-fd flag UF_PLEDGED.  This indicates the initial open was done by a
pledged process. dup(2) and recvmsg(2) retain UF_PLEDGED from the original fd.
In pledge "exec" circumstances, exceve clears UF_PLEDGED on all the process's
fds.

In a pledge'd process, ioctl(2) can use this additional information to grant
access to ioctl's which are more sensitive or dive deeply into the kernel.
Developers will be encouraged to open such sensitive resources before calling
pledge(2), rather than afterwards.  That matches the heading of privsep
development practices.

Future changes will introduce those ioctl(2) changes.

Lots of discussions with semarie guenther and benno.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Jan 23 23:22:00 2017 UTC (7 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.137: +11 -6 lines
Diff to previous 1.137 (colored)

Allocate all memory chunks, and potentially sleeping, before freeing
the old array of open files.

Fix a race for multi-threaded processes reported by cheeky.m@gmx.com
on bugs@ and analyzed with bluhm@.

ok deraadt@, bluhm@

Revision 1.137 / (download) - annotate - [select for diffs], Mon Jan 23 22:34:10 2017 UTC (7 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.136: +9 -7 lines
Diff to previous 1.136 (colored)

Avoid curproc dance in dupfdopen(), by passing a struct proc *
ok guenther mpi

Revision 1.136 / (download) - annotate - [select for diffs], Sat Sep 24 18:39:17 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (colored)

move knhash size to event.h, use it for hashfree. from Mathieu -
ok guenther

Revision 1.135 / (download) - annotate - [select for diffs], Thu Sep 15 02:00:16 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.134: +5 -7 lines
Diff to previous 1.134 (colored)

all pools have their ipl set via pool_setipl, so fold it into pool_init.

the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.

most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.

the manpage and subr_pool.c bits i did myself.

ok tedu@ jmatthew@

@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);

Revision 1.134 / (download) - annotate - [select for diffs], Thu Aug 25 00:00:02 2016 UTC (7 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.133: +3 -1 lines
Diff to previous 1.133 (colored)

pool_setipl

ok kettenis@

Revision 1.133 / (download) - annotate - [select for diffs], Tue Aug 23 23:28:02 2016 UTC (7 years, 9 months ago) by tedu
Branch: MAIN
Changes since 1.132: +5 -5 lines
Diff to previous 1.132 (colored)

rename nfiles to numfiles to avoid shadowing and stretch out the name.
ok deraadt

Revision 1.132 / (download) - annotate - [select for diffs], Sun May 29 13:51:53 2016 UTC (8 years ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE
Branch point for: OPENBSD_6_0
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Fix sizes passed to free() in fdfree(). This prevents a panic reported
by sthen.
ok semarie

Revision 1.131 / (download) - annotate - [select for diffs], Sat May 28 00:11:10 2016 UTC (8 years ago) by tedu
Branch: MAIN
Changes since 1.130: +11 -7 lines
Diff to previous 1.130 (colored)

add sizes to free() calls for descrip tables

Revision 1.130 / (download) - annotate - [select for diffs], Mon Apr 25 20:18:31 2016 UTC (8 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.129: +3 -4 lines
Diff to previous 1.129 (colored)

remove systrace remnants

Revision 1.129 / (download) - annotate - [select for diffs], Sat Mar 19 12:04:15 2016 UTC (8 years, 2 months ago) by natano
Branch: MAIN
Changes since 1.128: +2 -2 lines
Diff to previous 1.128 (colored)

Remove the unused flags argument from VOP_UNLOCK().

torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt

Revision 1.128 / (download) - annotate - [select for diffs], Wed Jan 6 17:59:30 2016 UTC (8 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.127: +8 -8 lines
Diff to previous 1.127 (colored)

remove unnecessary casts where the incoming type is void *.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Dec 17 16:59:26 2015 UTC (8 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.126: +3 -5 lines
Diff to previous 1.126 (colored)

no need to check null before free

Revision 1.126 / (download) - annotate - [select for diffs], Thu Dec 17 16:49:07 2015 UTC (8 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

add size to free. from Mathieu

Revision 1.125 / (download) - annotate - [select for diffs], Sat Dec 5 10:11:53 2015 UTC (8 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.124: +1 -7 lines
Diff to previous 1.124 (colored)

remove stale lint annotations

Revision 1.124 / (download) - annotate - [select for diffs], Sun Nov 1 19:03:33 2015 UTC (8 years, 7 months ago) by semarie
Branch: MAIN
Changes since 1.123: +6 -6 lines
Diff to previous 1.123 (colored)

refactor pledge_*_check and pledge_fail functions

- rename _check function without suffix: a "pledge" function called from
  anywhere is a "check" function.

- makes pledge_fail call the responsability to the _check function. remove it
  from caller.

- make proper use of (potential) returned error of _check() functions.

- adds pledge_kill() and pledge_protexec()

with and OK deraadt@

Revision 1.123 / (download) - annotate - [select for diffs], Wed Oct 28 12:17:20 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.122: +5 -1 lines
Diff to previous 1.122 (colored)

Prevent F_SETOWN, unless a "proc" pledge was made.

Revision 1.122 / (download) - annotate - [select for diffs], Wed Oct 21 16:09:13 2015 UTC (8 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.121: +11 -1 lines
Diff to previous 1.121 (colored)

Setting fcntl(F_SETOWN) for a pipe failed with inappropriate ioctl
for device.  In sys_fcntl() the ioctl(TIOCSPGRP) is called, but the
pipe expects SIOCSPGRP.  Sockets have a specal case for the same
reason, so adapt the special code for pipes.
OK millert@

Revision 1.121 / (download) - annotate - [select for diffs], Fri Oct 16 13:37:43 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.120: +10 -1 lines
Diff to previous 1.120 (colored)

Implement real "flock" request and add it to userland programs that
use pledge and file locking.  OK deraadt@

Revision 1.120 / (download) - annotate - [select for diffs], Sun May 17 01:22:01 2015 UTC (9 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.119: +11 -1 lines
Diff to previous 1.119 (colored)

isatty() is used by stdio to determine the buffering mode.  Add a F_ISATTY
option to fcntl(), so that isatty() can use this rather than than the bloated
ioctl() interface.  Reducing uses of ioctl() by libc makes it easier to
constrain programs with various kinds of systrace sandboxes.
ok guenther, previously discussed as a concept with nicm

Revision 1.119 / (download) - annotate - [select for diffs], Thu Apr 30 21:18:45 2015 UTC (9 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

Avoid NULL deref in fd_getfile_mode(); OK deraadt@

Revision 1.118 / (download) - annotate - [select for diffs], Thu Apr 30 09:20:51 2015 UTC (9 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.117: +16 -1 lines
Diff to previous 1.117 (colored)

Indroduce fd_getfile_mode() and use it were fd_getfile() is directly
followed by a mode check.  This will simplify the ref/unref dance as
soon as fd_getfile() will increment fp's reference counter.

Idea from and ok guenther@, ok millert@

Revision 1.117 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:50 2015 UTC (9 years, 2 months ago) by jsg
Branch: MAIN
Changes since 1.116: +1 -2 lines
Diff to previous 1.116 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.116 / (download) - annotate - [select for diffs], Mon Jan 19 01:19:17 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.115: +2 -3 lines
Diff to previous 1.115 (colored)

unneccessary cmask variable; ok guenther

Revision 1.115 / (download) - annotate - [select for diffs], Fri Dec 19 05:59:21 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.114: +5 -5 lines
Diff to previous 1.114 (colored)

start retiring the nointr allocator. specify PR_WAITOK as a flag as a
marker for which pools are not interrupt safe. ok dlg

Revision 1.114 / (download) - annotate - [select for diffs], Tue Dec 16 18:30:03 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.113: +2 -1 lines
Diff to previous 1.113 (colored)

primary change: move uvm_vnode out of vnode, keeping only a pointer.
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt

Revision 1.113 / (download) - annotate - [select for diffs], Sun Aug 31 01:42:36 2014 UTC (9 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.112: +28 -3 lines
Diff to previous 1.112 (colored)

Add additional kernel interfaces for setting close-on-exec on fds
when creating them: pipe2(), dup3(), accept4(), MSG_CMSG_CLOEXEC,
SOCK_CLOEXEC.  Includes SOCK_NONBLOCK support.

ok matthew@

Revision 1.112 / (download) - annotate - [select for diffs], Sun Jul 13 15:29:04 2014 UTC (9 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.111: +7 -7 lines
Diff to previous 1.111 (colored)

use mallocarray where arguments are multipled. ok deraadt

Revision 1.111 / (download) - annotate - [select for diffs], Sat Jul 12 18:43:32 2014 UTC (9 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.110: +9 -9 lines
Diff to previous 1.110 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Jul 8 17:19:25 2014 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.109: +1 -3 lines
Diff to previous 1.109 (colored)

decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.h
don't need to be married.
ok guenther miod beck jsing kettenis

Revision 1.109 / (download) - annotate - [select for diffs], Sun Jun 15 20:39:22 2014 UTC (9 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.108: +2 -2 lines
Diff to previous 1.108 (colored)

Use sizeof(struct file *) consistently for memcpy()'ing fd_ofiles.

Pointed out by Jean-Philippe Ouellet.

Revision 1.108 / (download) - annotate - [select for diffs], Thu May 15 03:52:25 2014 UTC (10 years ago) by guenther
Branch: MAIN
Changes since 1.107: +7 -16 lines
Diff to previous 1.107 (colored)

Move from struct proc to process the reference-count-holding pointers
to the process's vmspace and filedescs.  struct proc continues to
keep copies of the pointers, copying them on fork, clearing them
on exit, and (for vmspace) refreshing on exec.
Also, make uvm_swapout_threads() thread aware, eliminating p_swtime
in kernel.

particular testing by ajacoutot@ and sebastia@

Revision 1.107 / (download) - annotate - [select for diffs], Sat Apr 12 14:18:11 2014 UTC (10 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.106: +14 -43 lines
Diff to previous 1.106 (colored)

revert falloc change, as it causes all new processes to get stuck after a while
(race condition ?)

problem noticed by me, aja, sthen, brynet, rpe.

vanishing after this revert, okay aja@, sthen@

tedu, you probably want to look into re-checking the fcreate/fpublish addition
first, then if it's stable, see about tweaking doopenat ?

Revision 1.106 / (download) - annotate - [select for diffs], Sun Mar 30 21:54:48 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.105: +2 -2 lines
Diff to previous 1.105 (colored)

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.

ok matthew@

Revision 1.105 / (download) - annotate - [select for diffs], Sat Mar 8 22:54:29 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.104: +43 -14 lines
Diff to previous 1.104 (colored)

split falloc into two functions, the allocation and the publication.
the first part is likely to fail, but we can generally prevent the second
part from failing.
use these two functions to drop the fdp lock around vn_open in sys_open,
but still maintain the original semantics of allocate then open.
the goal here is to fix the blocked fifo deadlock in a threaded program.

testing volunteers in short supply, resorting to conscription

Revision 1.104 / (download) - annotate - [select for diffs], Sat Sep 14 01:35:00 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.103: +1 -27 lines
Diff to previous 1.103 (colored)

Snapshots for all archs have been built, so remove the T32 code

Revision 1.103 / (download) - annotate - [select for diffs], Tue Aug 13 05:52:23 2013 UTC (10 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.102: +27 -2 lines
Diff to previous 1.102 (colored)

Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types.  Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments.  Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir.  Build perl with -DBIG_TIME.

Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.

DANGER: ABI incompatibility.  Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.

Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@

Revision 1.102 / (download) - annotate - [select for diffs], Thu Jul 4 16:55:19 2013 UTC (10 years, 11 months ago) by sf
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

Format string fixes:

f_count is long
ok kettenis@

Change esm_sensor_map.arg to int
ok deraadt@

Revision 1.101 / (download) - annotate - [select for diffs], Tue Jun 11 13:00:31 2013 UTC (10 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.100: +24 -22 lines
Diff to previous 1.100 (colored)

convert some easy bcopy to memcpy and clean up fdexpand a bit.
ok kettenis

Revision 1.100 / (download) - annotate - [select for diffs], Wed Jun 5 01:26:00 2013 UTC (11 years ago) by guenther
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

Move FHASLOCK from f_flag to f_iflags, freeing up a bit for passing
O_* flags and eliminating an XXX comment.

ok matthew@ deraadt@

Revision 1.99 / (download) - annotate - [select for diffs], Thu Aug 23 00:11:56 2012 UTC (11 years, 9 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.98: +16 -16 lines
Diff to previous 1.98 (colored)

To protect assumptions inside systrace, don't let systrace fds be
shared between processes.

ok djm@

Revision 1.98 / (download) - annotate - [select for diffs], Wed Jul 11 23:07:19 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.97: +5 -20 lines
Diff to previous 1.97 (colored)

Revert the blocked FIFO open fix, as there's either a race in the
ref-count handling under handling, or blambert@ is messing with my head

Revision 1.97 / (download) - annotate - [select for diffs], Sun Jul 8 10:55:10 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.96: +21 -6 lines
Diff to previous 1.96 (colored)

Don't hold the fd-table lock across vn_open(), as opening a FIFO may block.
Having done that, dupfdopen() has to handle a possible race.

ok matthew@ krw@

Revision 1.96 / (download) - annotate - [select for diffs], Mon May 21 16:41:03 2012 UTC (12 years ago) by matthew
Branch: MAIN
Changes since 1.95: +3 -2 lines
Diff to previous 1.95 (colored)

Cleanup O_CLOEXEC handling and make sure UF_EXCLOSE is set correctly
when opening /dev/fd/* (i.e., UF_EXCLOSE is now set iff O_CLOEXEC is
set, rather than copying UF_EXCLOSE from the file descriptor being
dup'd).

Also, add support for O_CLOEXEC and O_DIRECTORY to fhopen().

ok krw, guenther; feedback from millert; testing and bug finding by krw

Revision 1.95 / (download) - annotate - [select for diffs], Mon May 14 02:41:13 2012 UTC (12 years ago) by guenther
Branch: MAIN
Changes since 1.94: +14 -48 lines
Diff to previous 1.94 (colored)

Remove the "vn_open() returning ENXIO means dup+close" hook that
was used by the now defunct portalfs.  Zero out fd_ofileflags[fd]
when allocating an fd instead of when releasing it.

ok krw@ matthew@

Revision 1.94 / (download) - annotate - [select for diffs], Tue May 1 03:43:23 2012 UTC (12 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.93: +16 -30 lines
Diff to previous 1.93 (colored)

Eliminate the f_usecount ref count in struct file; instead of sleeping
at the top of closef() until all in-progress calls finish, just do the
advisory locking bits required of close() by POSIX and let whichever
thread has the last reference do the call to the file's fo_close()
method and the final cleanup.

lots of discussion with deraadt@ and others; worked out with and ok krw@

Revision 1.93 / (download) - annotate - [select for diffs], Sun Apr 22 05:43:14 2012 UTC (12 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.92: +12 -11 lines
Diff to previous 1.92 (colored)

Add struct proc * argument to FRELE() and FILE_SET_MATURE() in
anticipation of further changes to closef().  No binary change.

ok krw@ miod@ deraadt@

Revision 1.92 / (download) - annotate - [select for diffs], Thu Apr 12 17:42:57 2012 UTC (12 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored)

In this case where dup2() extends the table using fdalloc, the newly
selected fd is automatically fd_used().  We need to fd_unused() it,
because it will be fd_used() again in finishdup().  spotted by guenther
ok miod

Revision 1.91 / (download) - annotate - [select for diffs], Thu Apr 12 11:07:20 2012 UTC (12 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.90: +10 -1 lines
Diff to previous 1.90 (colored)

New system call: getdtablecount(2) returns the number of file
descriptors the process currently has open.
ok guenther miod gilles ...

Revision 1.90 / (download) - annotate - [select for diffs], Thu Apr 12 11:01:37 2012 UTC (12 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.89: +8 -7 lines
Diff to previous 1.89 (colored)

dup() was calling fd_used() twice for the new file descriptor.  Seperate
the dup and dup2 cases.  with guenther
ok miod

Revision 1.89 / (download) - annotate - [select for diffs], Wed Feb 15 04:26:27 2012 UTC (12 years, 3 months ago) by guenther
Branch: MAIN
Changes since 1.88: +25 -9 lines
Diff to previous 1.88 (colored)

Hold struct filedesc's fd_lock when writing to the fd_ofiles, fd_ofileflags,
or fd_{lo,hi}maps members, or when doing a read for a write.  Fixes hangs
when an rthreaded processes sleeps while copying the fd table for fork()
and catches another thread with the lock.

ok jsing@ tedu@

Revision 1.88 / (download) - annotate - [select for diffs], Fri Jul 8 21:26:27 2011 UTC (12 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.87: +5 -1 lines
Diff to previous 1.87 (colored)

Add F_DUPFD_CLOEXEC.

"Sure" deraadt@

Revision 1.87 / (download) - annotate - [select for diffs], Fri Jul 8 19:28:36 2011 UTC (12 years, 10 months ago) by otto
Branch: MAIN
Changes since 1.86: +6 -1 lines
Diff to previous 1.86 (colored)

Support sending struct info to kdump. So far for struct stat and
struct sockaddress; mostly from freebsd. ok deraadt@ tedu@ nicm@

Revision 1.86 / (download) - annotate - [select for diffs], Sat Apr 2 17:04:35 2011 UTC (13 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Move P_SUGID and P_SUGIDEXEC from struct proc to struct process, so
that you can't evade the checks by doing the dirty work in an rthread

ok blambert@, deraadt@

Revision 1.85 / (download) - annotate - [select for diffs], Mon Jul 26 01:56:27 2010 UTC (13 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.84: +4 -4 lines
Diff to previous 1.84 (colored)

Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not
struct proc.  This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.

Tested by many: deraadt, sthen, krw, ray, and in snapshots

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jul 19 23:00:15 2010 UTC (13 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.83: +1 -7 lines
Diff to previous 1.83 (colored)

Rollback the allproclk and fileheadlk addition.  When grabbing an
rwlock, the thread will release biglock if it sleeps, means that
atomicity from before the rw_enter() to after it is not guaranteed.
The change didn't address those, so pulling it until it does.

"go for it" tedu@

Revision 1.83 / (download) - annotate - [select for diffs], Wed Mar 24 23:18:17 2010 UTC (14 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.82: +7 -1 lines
Diff to previous 1.82 (colored)

Add a rwlock around the filehead and allproc lists, mainly to protect
list walkers in sysctl that can block.  As a reward, no more vslock.
With some feedback from art, guenther, phessler.  ok guenther.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Jul 9 22:29:56 2009 UTC (14 years, 10 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored)

Remove the VREF() macro and replaces all instances with a call to verf(),
which is exactly what the macro does.

Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.

OK blambert@
Agreed by many.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Nov 25 18:04:38 2008 UTC (15 years, 6 months ago) by blambert
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Punctuate comment for clarity, and keep tense consistent throughout

ok and improvements jmc@

Revision 1.80 / (download) - annotate - [select for diffs], Fri Sep 19 12:24:55 2008 UTC (15 years, 8 months ago) by art
Branch: MAIN
Changes since 1.79: +58 -45 lines
Diff to previous 1.79 (colored)

Fix a bunch of problems and races with posix file locking.

- file descriptor table becomes the owner of the lock instead of the proc.
- When grabbing the lock, we check if the fd hasn't changed under our
  feet, this is more or less impossible to solve without a hack like
  this. I've banged my head against the wall, I figured out a solution,
  but implementing it correctly would cost me 12 gray hairs. Screw it,
  this is ugly, but it works.
- Wait until usecount drains before releasing the posix lock in closef.
- Add missing FREF/FRELE to sys_flock
- keep the pid in the flock struct instead of abusing the fact that we
  used to use the proc as the lock owner.

Pointed out by and discussed with Al Viro, big thanks.
miod@ ok

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jun 12 18:10:06 2008 UTC (15 years, 11 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.78: +2 -3 lines
Diff to previous 1.78 (colored)

use PR_ZERO instead of a bzero() right after the pool_get();

ok blambert@

Revision 1.78 / (download) - annotate - [select for diffs], Tue May 6 20:57:19 2008 UTC (16 years, 1 month ago) by thib
Branch: MAIN
Changes since 1.77: +2 -3 lines
Diff to previous 1.77 (colored)

Add a PR_ZERO flag for pools, to compliment the M_ZERO
malloc flag, does the same thing.
use it in a few places.

OK tedu@, "then go ahead. and don't forget the manpage (-:" miod@

Revision 1.77 / (download) - annotate - [select for diffs], Mon Oct 29 14:12:19 2007 UTC (16 years, 7 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

MALLOC/FREE -> malloc/free
replace an hard coded value with M_WAITOK

ok krw@

Revision 1.76 / (download) - annotate - [select for diffs], Thu Mar 15 10:22:30 2007 UTC (17 years, 2 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

Since p_flag is often manipulated in interrupts and without biglock
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.

Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.

kettenis@ ok

Revision 1.75 / (download) - annotate - [select for diffs], Tue Nov 14 18:00:27 2006 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.74: +5 -3 lines
Diff to previous 1.74 (colored)

grammar, spelling, and style fixes from bret lambert;
kern_descrip.c change ok deraadt

Revision 1.74 / (download) - annotate - [select for diffs], Sun May 7 20:12:41 2006 UTC (18 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

add a name to rwlock so that we can tell where procs are getting stuck
without breaking into ddb.  doubles the size of rwlock [1], but moving
forward this really helps.  ok/tested pedro fgsch millert krw
[1 - next person to add a field to this struct gets whipped with a wet noodle]

Revision 1.73 / (download) - annotate - [select for diffs], Fri Jan 6 18:28:33 2006 UTC (18 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored)

typo fix from ray lai;
ok deraadt

Revision 1.69.4.1 / (download) - annotate - [select for diffs], Fri Dec 30 01:28:02 2005 UTC (18 years, 5 months ago) by brad
Branch: OPENBSD_3_7
Changes since 1.69: +12 -1 lines
Diff to previous 1.69 (colored) next main 1.70 (colored)

MFC:
Fix by deraadt@

do not allow setugid processes to use /dev/fd/#, unless they are a
setuid-script and are attempting to dup is the specific setuid-script
fd via such a pathname;

ok deraadt@

Revision 1.70.2.1 / (download) - annotate - [select for diffs], Thu Dec 22 02:41:54 2005 UTC (18 years, 5 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.70: +12 -1 lines
Diff to previous 1.70 (colored) next main 1.71 (colored)

MFC:
Fix by deraadt@

do not allow setugid processes to use /dev/fd/#, unless they are a
setuid-script and are attempting to dup is the specific setuid-script
fd via such a pathname;

ok deraadt@

Revision 1.72 / (download) - annotate - [select for diffs], Wed Dec 7 19:04:53 2005 UTC (18 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.71: +12 -1 lines
Diff to previous 1.71 (colored)

do not allow setugid processes to use /dev/fd/#, unless they are a
setuid-script and are attempting to dup is the specific setuid-script
fd via such a pathname; ok tedu pedro millert

Revision 1.71 / (download) - annotate - [select for diffs], Mon Nov 28 00:14:28 2005 UTC (18 years, 6 months ago) by jsg
Branch: MAIN
Changes since 1.70: +29 -78 lines
Diff to previous 1.70 (colored)

ansi/deregister.
'go for it' deraadt@

Revision 1.70 / (download) - annotate - [select for diffs], Sun Jul 3 01:07:44 2005 UTC (18 years, 11 months ago) by jaredy
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE
Branch point for: OPENBSD_3_8
Changes since 1.69: +3 -1 lines
Diff to previous 1.69 (colored)

change VOP_PATHCONF to take a locked vnode, as its
comment entry describes.  requires that sys_fpathconf()
lock its vnode.

lots of testing by jolan and myself, ok pedro

Revision 1.69 / (download) - annotate - [select for diffs], Thu Jul 22 06:13:08 2004 UTC (19 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_6_BASE, OPENBSD_3_6
Branch point for: OPENBSD_3_7
Changes since 1.68: +6 -6 lines
Diff to previous 1.68 (colored)

remove p arg from fdplock

Revision 1.18.4.11 / (download) - annotate - [select for diffs], Thu Feb 19 10:56:37 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.18.4.10: +57 -22 lines
Diff to previous 1.18.4.10 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.68 / (download) - annotate - [select for diffs], Mon Jan 12 18:06:51 2004 UTC (20 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.67: +23 -1 lines
Diff to previous 1.67 (colored)

new syscall closefrom(int fd) closes all fds equal and greater than fd.
ok deraadt@ millert@

Revision 1.67 / (download) - annotate - [select for diffs], Tue Jan 6 04:18:18 2004 UTC (20 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.66: +33 -19 lines
Diff to previous 1.66 (colored)

lock filedesc before manipulating.  avoids some rare races.
testing for quite some time by brad + otto

Revision 1.66 / (download) - annotate - [select for diffs], Tue Dec 2 01:40:18 2003 UTC (20 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Check array index before using it; from Tim Robbins via Niels.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Aug 15 20:32:18 2003 UTC (20 years, 9 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

change arguments to suser.  suser now takes the process, and a flags
argument.  old cred only calls user suser_ucred.  this will allow future
work to more flexibly implement the idea of a root process.  looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@  testing and further review miod@

Revision 1.64 / (download) - annotate - [select for diffs], Wed Aug 6 20:37:38 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.63: +1 -2 lines
Diff to previous 1.63 (colored)

Remove unreachable return statement after break; Patrick Latifi

Revision 1.18.4.10 / (download) - annotate - [select for diffs], Sat Jun 7 11:03:40 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.18.4.9: +2 -6 lines
Diff to previous 1.18.4.9 (colored) to branchpoint 1.18 (colored)

Sync SMP branch to -current

Revision 1.63 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:05 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.62: +2 -6 lines
Diff to previous 1.62 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.43.2.4 / (download) - annotate - [select for diffs], Mon May 19 22:31:09 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.43.2.3: +17 -14 lines
Diff to previous 1.43.2.3 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

sync

Revision 1.18.4.9 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:26 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.18.4.8: +22 -16 lines
Diff to previous 1.18.4.8 (colored) to branchpoint 1.18 (colored)

Sync the SMP branch with 3.3

Revision 1.62 / (download) - annotate - [select for diffs], Fri Nov 22 13:40:06 2002 UTC (21 years, 6 months ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.61: +12 -10 lines
Diff to previous 1.61 (colored)

Allow fdinit to be called with p == NULL so that we can use
it to properly init filedescs for proc0.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Nov 8 18:38:00 2002 UTC (21 years, 6 months ago) by art
Branch: MAIN
Changes since 1.60: +6 -5 lines
Diff to previous 1.60 (colored)

finishdup: Avoid reference count leak in error case by reordering some code.

Revision 1.43.2.3 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:44 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.43.2.2: +8 -5 lines
Diff to previous 1.43.2.2 (colored) to branchpoint 1.43 (colored)

sync to -current

Revision 1.60 / (download) - annotate - [select for diffs], Tue Oct 15 01:27:31 2002 UTC (21 years, 7 months ago) by nordin
Branch: MAIN
CVS Tags: UBC_SYNC_B
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored)

Match reality by changing (u_int) -> (int) in comments.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Aug 23 00:56:04 2002 UTC (21 years, 9 months ago) by pvalchev
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.58: +5 -2 lines
Diff to previous 1.58 (colored)

Add missing FRELE() in finishdup() error case; ok art

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Tue Jun 11 03:29:40 2002 UTC (21 years, 11 months ago) by art
Branch: UBC
Changes since 1.43.2.1: +185 -107 lines
Diff to previous 1.43.2.1 (colored) to branchpoint 1.43 (colored)

Sync UBC branch to -current

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jun 3 12:04:08 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

compatiblity -> compatibility
decriptor -> descriptor
authentciated -> authenticated
transmition -> transmission

Revision 1.57 / (download) - annotate - [select for diffs], Thu May 23 14:25:20 2002 UTC (22 years ago) by art
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Fix a comment I missed when renaming FILE_UNUSE to FRELE.

Revision 1.18.4.8 / (download) - annotate - [select for diffs], Thu Mar 28 11:43:04 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.18.4.7: +4 -4 lines
Diff to previous 1.18.4.7 (colored) to branchpoint 1.18 (colored)

Merge in -current from about a week ago

Revision 1.56 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:04 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.55: +5 -5 lines
Diff to previous 1.55 (colored)

First round of __P removal in sys

Revision 1.18.4.7 / (download) - annotate - [select for diffs], Wed Mar 6 02:13:23 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.18.4.6: +181 -103 lines
Diff to previous 1.18.4.6 (colored) to branchpoint 1.18 (colored)

Merge in trunk

Revision 1.55 / (download) - annotate - [select for diffs], Tue Feb 19 06:12:13 2002 UTC (22 years, 3 months ago) by nordin
Branch: MAIN
Changes since 1.54: +2 -1 lines
Diff to previous 1.54 (colored)

Missing FRELE in error case. ok provos@

Revision 1.54 / (download) - annotate - [select for diffs], Mon Feb 18 23:12:04 2002 UTC (22 years, 3 months ago) by ericj
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)


fix issue on LP64 BE arch's w/ fcntl's F_GETOWN
pointed out by der Mouse <mouse@Rodents.Montreal.QC.CA>

Revision 1.53 / (download) - annotate - [select for diffs], Wed Feb 13 19:08:06 2002 UTC (22 years, 3 months ago) by art
Branch: MAIN
Changes since 1.52: +34 -16 lines
Diff to previous 1.52 (colored)

More FREF/FRELE on relevant places. Now, only sys_mmap and a bunch of ioctl functions in sys/compat are left.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Feb 9 00:27:49 2002 UTC (22 years, 3 months ago) by art
Branch: MAIN
Changes since 1.51: +5 -2 lines
Diff to previous 1.51 (colored)

Protect the whole sys_fnctl with one big FREF/FRELE pair.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Feb 8 18:43:54 2002 UTC (22 years, 3 months ago) by art
Branch: MAIN
Changes since 1.50: +6 -1 lines
Diff to previous 1.50 (colored)

Add a comment about an obscure behavior in dup2(2).

Revision 1.50 / (download) - annotate - [select for diffs], Fri Feb 8 18:29:08 2002 UTC (22 years, 3 months ago) by art
Branch: MAIN
Changes since 1.49: +19 -16 lines
Diff to previous 1.49 (colored)

Add a slightly redundant arg to finishdup that's the struct file *
present on the 'old' descriptor. It's not really necessary because
we can easily find it with 'fp = p->p_fd->fd_ofiles[old];', but this
allows us to require that the fp is FREFed without violating all rules
of good taste and all callers have to do fd_getfile on it anyway (to
detect larval and closing files.

FREF the fp in all callers.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Feb 8 16:32:27 2002 UTC (22 years, 3 months ago) by art
Branch: MAIN
Changes since 1.48: +12 -21 lines
Diff to previous 1.48 (colored)

No more need for ffree. Since it's hard to use it safely, remove it.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Feb 8 13:53:28 2002 UTC (22 years, 3 months ago) by art
Branch: MAIN
Changes since 1.47: +7 -6 lines
Diff to previous 1.47 (colored)

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

Revision 1.47 / (download) - annotate - [select for diffs], Tue Feb 5 16:02:27 2002 UTC (22 years, 4 months ago) by art
Branch: MAIN
Changes since 1.46: +36 -5 lines
Diff to previous 1.46 (colored)

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.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Feb 4 11:48:22 2002 UTC (22 years, 4 months ago) by art
Branch: MAIN
Changes since 1.45: +15 -12 lines
Diff to previous 1.45 (colored)

Add some comments documenting why we use fd_ofiles instead
of fd_getfile in some places.

Also, get rid of the check for old == new in dupfdopen and document why
the semantics of fd_getfile make it unnecessary.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Feb 2 17:52:27 2002 UTC (22 years, 4 months ago) by art
Branch: MAIN
Changes since 1.44: +60 -38 lines
Diff to previous 1.44 (colored)

Reorganize sys_fcntl to make future changes easier.

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Thu Jan 31 22:55:40 2002 UTC (22 years, 4 months ago) by niklas
Branch: UBC
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Merge in -current, builds on i386, otherwise untested

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jan 23 00:39:47 2002 UTC (22 years, 4 months ago) by art
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't deal
well (not at all) with shortages of the vm_map where the pages are mapped
(usually kmem_map).

Try to deal with it:
 - group all information the backend allocator for a pool in a separate
   struct. The pool will only have a pointer to that struct.
 - change the pool_init API to reflect that.
 - link all pools allocating from the same allocator on a linked list.
 - Since an allocator is responsible to wait for physical memory it will
   only fail (waitok) when it runs out of its backing vm_map, carefully
   drain pools using the same allocator so that va space is freed.
   (see comments in code for caveats and details).
 - change pool_reclaim to return if it actually succeeded to free some
   memory, use that information to make draining easier and more efficient.
 - get rid of PR_URGENT, noone uses it.

Revision 1.18.4.6 / (download) - annotate - [select for diffs], Wed Dec 5 01:02:39 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.18.4.5: +1 -0 lines
Diff to previous 1.18.4.5 (colored) to branchpoint 1.18 (colored)

Merge in -current

Revision 1.43 / (download) - annotate - [select for diffs], Thu Nov 15 13:07:53 2001 UTC (22 years, 6 months ago) by niklas
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)

Initialize list

Revision 1.18.4.5 / (download) - annotate - [select for diffs], Tue Nov 13 23:04:23 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.18.4.4: +12 -13 lines
Diff to previous 1.18.4.4 (colored) to branchpoint 1.18 (colored)

merge in -current

Revision 1.42 / (download) - annotate - [select for diffs], Tue Nov 6 19:53:20 2001 UTC (22 years, 7 months ago) by miod
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.
(Look ma, I might have broken the tree)

Revision 1.41 / (download) - annotate - [select for diffs], Mon Nov 5 02:03:58 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.40: +11 -12 lines
Diff to previous 1.40 (colored)

let finishdup take the proc as arguemnt instead of the filedesc.

Revision 1.18.4.4 / (download) - annotate - [select for diffs], Wed Oct 31 03:26:29 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.18.4.3: +203 -157 lines
Diff to previous 1.18.4.3 (colored) to branchpoint 1.18 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.40 / (download) - annotate - [select for diffs], Fri Oct 26 12:03:27 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.39: +31 -38 lines
Diff to previous 1.39 (colored)

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

Revision 1.39 / (download) - annotate - [select for diffs], Fri Oct 26 10:39:31 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.38: +148 -97 lines
Diff to previous 1.38 (colored)

 - split fdalloc into two functions. fdalloc now returns ENOSPC if it
   would have to grow the table and fdexpand that grows the table. Since
   fdexpand can sleep we have to restart all operations if we have to call
   it.
 - dup2 changed so that finishdup frees the destination descriptor.
 - unp_externalize is a completly rewritten version from NetBSD.

Changes mostly inspired by NetBSD.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 7 23:12:06 2001 UTC (22 years, 8 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.37: +4 -6 lines
Diff to previous 1.37 (colored)

Clean up fdrelease.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Oct 7 22:42:07 2001 UTC (22 years, 8 months ago) by art
Branch: MAIN
Changes since 1.36: +1 -5 lines
Diff to previous 1.36 (colored)

gc UF_MAPPED.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Oct 1 16:55:57 2001 UTC (22 years, 8 months ago) by gluk
Branch: MAIN
Changes since 1.35: +3 -2 lines
Diff to previous 1.35 (colored)

Avoid panic when unconfiguring raid device which was autoconfigured and
so has fdp->fd_cdir = NULL.

From Tertou <TDeval@PrimeOBJ.COM>

Revision 1.35 / (download) - annotate - [select for diffs], Sat Sep 29 20:10:43 2001 UTC (22 years, 8 months ago) by gluk
Branch: MAIN
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

Avoid panic at time of raid autoconfiguration. Raid kernel thread starts
when root filesystem isn't configured yet and some kernel variables can't
be initialized.

From Thierry Deval <TDeval@PrimeOBJ.COM>

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jul 28 17:12:12 2001 UTC (22 years, 10 months ago) by gluk
Branch: MAIN
Changes since 1.33: +18 -12 lines
Diff to previous 1.33 (colored)

Allow negative lock length in case of lockf(3). This makes lockf(3)
compliant to specification.
costa@ ok.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jul 25 16:03:14 2001 UTC (22 years, 10 months ago) by art
Branch: MAIN
Changes since 1.32: +6 -6 lines
Diff to previous 1.32 (colored)

Random cleanups that generate noise in my cvs updates.

Revision 1.18.4.3 / (download) - annotate - [select for diffs], Wed Jul 4 10:48:15 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.18.4.2: +49 -67 lines
Diff to previous 1.18.4.2 (colored) to branchpoint 1.18 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 27 04:49:41 2001 UTC (22 years, 11 months ago) by art
Branch: MAIN
Changes since 1.31: +1 -6 lines
Diff to previous 1.31 (colored)

remove old vm

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 22 14:14:08 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +23 -25 lines
Diff to previous 1.30 (colored)

KNF

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Thu May 31 05:08:29 2001 UTC (23 years ago) by jason
Branch: OPENBSD_2_9
Changes since 1.23: +3 -4 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Fix (art):
don't panic on kqueue.

Revision 1.30 / (download) - annotate - [select for diffs], Wed May 23 14:50:15 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Don't panic on kqueues and crypto descriptors in fpathconf.
Just return EOPNOTSUPP.

Revision 1.29 / (download) - annotate - [select for diffs], Wed May 16 12:49:45 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.28: +22 -11 lines
Diff to previous 1.28 (colored)

Use pool to allocate struct filedesc0 and struct file.

Revision 1.18.4.2 / (download) - annotate - [select for diffs], Mon May 14 22:32:40 2001 UTC (23 years ago) by niklas
Branch: SMP
Changes since 1.18.4.1: +64 -32 lines
Diff to previous 1.18.4.1 (colored) to branchpoint 1.18 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.28 / (download) - annotate - [select for diffs], Mon May 14 13:43:53 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.27: +1 -4 lines
Diff to previous 1.27 (colored)

gc OLD_PIPE.

Revision 1.27 / (download) - annotate - [select for diffs], Mon May 14 13:28:20 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.26: +3 -22 lines
Diff to previous 1.26 (colored)

use fo_stat in fileops instead of huge switch statements.

Revision 1.26 / (download) - annotate - [select for diffs], Mon May 14 12:11:52 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Implement a wrapper round vn_stat that takes the same arguments
as soo_stat and pipe_stat.

Revision 1.25 / (download) - annotate - [select for diffs], Mon May 14 11:04:04 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

More generic arguments to soo_stat.

Revision 1.24 / (download) - annotate - [select for diffs], Mon May 14 10:51:26 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

More generic arguments to pipe_stat.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Nov 16 20:02:16 2000 UTC (23 years, 6 months ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE
Branch point for: OPENBSD_2_9
Changes since 1.22: +26 -3 lines
Diff to previous 1.22 (colored)

support kernel event queues, from FreeBSD by Jonathan Lemon,
okay art@, millert@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Sep 27 16:13:46 2000 UTC (23 years, 8 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.21: +13 -17 lines
Diff to previous 1.21 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Sun Sep 24 19:13:26 2000 UTC (23 years, 8 months ago) by provos
Branch: MAIN
Changes since 1.20: +26 -20 lines
Diff to previous 1.20 (colored)

prevent memory leak in fdalloc; fix by greg@nest.cx

Revision 1.20 / (download) - annotate - [select for diffs], Sat Apr 1 23:29:25 2000 UTC (24 years, 2 months ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.19: +8 -1 lines
Diff to previous 1.19 (colored)

fdup could fail when want for fdalloc > than the free fd in the block.
slightly different fix than in the bug report by
Rob Pickering <rob@syntonet.co.uk>

Revision 1.18.4.1 / (download) - annotate - [select for diffs], Thu Mar 2 07:04:40 2000 UTC (24 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.18: +124 -9 lines
Diff to previous 1.18 (colored)

Sync with -current

Revision 1.19 / (download) - annotate - [select for diffs], Mon Feb 28 18:04:08 2000 UTC (24 years, 3 months ago) by provos
Branch: MAIN
Changes since 1.18: +124 -9 lines
Diff to previous 1.18 (colored)

Optimized fdalloc as in Banga and Mogul paper:
http://www.usenix.org/publications/library/proceedings/usenix98/banga.html

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jul 13 15:17:50 1999 UTC (24 years, 10 months ago) by provos
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: SMP
Changes since 1.17: +10 -1 lines
Diff to previous 1.17 (colored)

introduce fdremove() to mark a file descriptor as unused. fdremove makes
sure that the fd_freefile hints stay in sync, otherwise free file
descriptors might not be overlooked by fdalloc(); ok millert@

Revision 1.17 / (download) - annotate - [select for diffs], Fri Feb 26 05:10:40 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.16: +8 -1 lines
Diff to previous 1.16 (colored)

uvm allocation and name changes

Revision 1.16 / (download) - annotate - [select for diffs], Fri Dec 4 19:40:55 1998 UTC (25 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

consider limits, in fdavail(); michaels@inet.no

Revision 1.15 / (download) - annotate - [select for diffs], Sun Mar 1 19:34:12 1998 UTC (26 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.14: +16 -3 lines
Diff to previous 1.14 (colored)

crank f_count/f_msgcount to long; when incrementing try to leave 2 slots
empty for unp_gc() in case of cross referenced sockets. part by millert

Revision 1.14 / (download) - annotate - [select for diffs], Sun Aug 31 20:42:15 1997 UTC (26 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.13: +7 -3 lines
Diff to previous 1.13 (colored)

for non-tty TIOCSPGRP/F_SETOWN/FIOSETOWN pgid setting calls, store uid
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.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Aug 21 05:17:37 1997 UTC (26 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

constrain nfiles so that fdavail() never lies; bug report and test program from abelits@phobos.illtel.denver.co.us

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jul 25 17:31:38 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

return EINVAL in case bad locking specified; netbsd

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jan 25 17:37:34 1997 UTC (27 years, 4 months ago) by dm
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.10: +7 -6 lines
Diff to previous 1.10 (colored)

Changed my mind about where to do this.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jan 25 00:27:30 1997 UTC (27 years, 4 months ago) by dm
Branch: MAIN
Changes since 1.9: +5 -1 lines
Diff to previous 1.9 (colored)

Only disclose generation number to root.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Oct 28 00:42:30 1996 UTC (27 years, 7 months ago) by tholo
Branch: MAIN
Changes since 1.8: +5 -1 lines
Diff to previous 1.8 (colored)

More argument checking of fcntl(, F_GETLK, )

Revision 1.8 / (download) - annotate - [select for diffs], Sat Oct 26 07:31:48 1996 UTC (27 years, 7 months ago) by tholo
Branch: MAIN
Changes since 1.7: +8 -1 lines
Diff to previous 1.7 (colored)

Verify arguments to fcntl(, F_GETLK, )

Revision 1.7 / (download) - annotate - [select for diffs], Wed Sep 4 22:33:48 1996 UTC (27 years, 9 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

pipe.h needed vm_page_t defined for me, so I moved it down

Revision 1.6 / (download) - annotate - [select for diffs], Tue Aug 27 14:46:59 1996 UTC (27 years, 9 months ago) by shawn
Branch: MAIN
Changes since 1.5: +11 -1 lines
Diff to previous 1.5 (colored)

New fast pipe(2) from freebsd without fancy vm stuff.

The old pipes can be used with the "OLD_PIPE" config option.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Apr 21 22:26:59 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.4: +5 -6 lines
Diff to previous 1.4 (colored)

partial sync with netbsd 960418, more to come

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 19 16:08:53 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

NetBSD 960317 merge

Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 3 17:19:42 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.2: +31 -11 lines
Diff to previous 1.2 (colored)

From NetBSD: 960217 merge

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jan 7 17:38:22 1996 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +44 -0 lines
Diff to previous 1.1 (colored)

add fdshare() and fdinit() calls for dealing with filedesc structures

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:52:43 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:52:43 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.