| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
file operations mp-safe.
This change makes it clear that `f_offset' is only accessed in vn_read()
and vn_write(), which will help taking it out of the KERNEL_LOCK().
This refactoring uncovered a race in vn_read() which is now documented
and will be addressed in a later diff.
ok visa@
|
|
|
|
|
|
|
| |
a scenario where MP-unsafe code gets run without the kernel lock
as a consequence of an unlocked system call.
OK mpi@, kettenis@
|
|
|
|
|
|
|
|
|
|
|
| |
files that aren't vnodes. Move the vnode-specific code into its own
function. Add an implementation for the "DMA buffers" that can be used
by DRI3/prime code to find out the size of the graphics buffer.
This implementation is very limited and only supports offset 0 and only
for SEEK_SET and SEEK_END. This doesn't really make sense; implementing
stat(2) would be a more obvious choice. But this is what Linux does.
ok guenther@, visa@
|
|
|
|
|
|
| |
descriptor belonging to a cloned device.
ok kettenis@
|
|
|
|
|
|
| |
unlocking the directory vnode.
OK mpi@, helg@
|
|
|
|
|
|
| |
unnecessary because curproc always does the locking.
OK mpi@
|
|
|
|
|
|
|
| |
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
|
|
|
| |
ok millert@, deraadt@, florian@
|
|
|
|
| |
ok millert@ sthen@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Years ago Theo made read(2) return 0 on directories, instead of dumping
the directory content. Another behavior is allowed as an extension by
POSIX, returning an EISDIR error, as used on a few other systems. This
behavior is deemed more useful as it helps spotting errors. This
implies that it might break some setups.
Ports bulk builds by ajacoutot@ and naddy@, ok millert@ bluhm@ naddy@
deraadt@
|
|
|
|
|
|
|
|
| |
trivial change to use rrw locks instead. All it needs is LK_* defines
for the RW_* flags.
tested by naddy and sthen on package building infrastructure
input and ok jmc mpi tedu
|
|
|
|
|
|
| |
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
| |
|
|
|
|
|
|
| |
flags to check FREAD/FWRITE if needed. This will be used by fifo_poll
to avoid checking the write end of the fifo when the fd is read-only.
OK guenther@
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
| |
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
|
|
|
|
|
| |
leaking values in the padding bytes on LP64. Also, vn_stat() was lacking
the zero-fill to clean its padding.
ok kettenis@ deraadt@ phessler@
|
|
|
|
|
|
| |
by using size_t/ssize_t instead of int/u_int to handle I/O lengths in
uiomove(), vn_fsizechk(), and ktrgenio(). Eliminate the always-zero
'error' argument to ktrgenio() at the same time.
|
|
|
|
|
|
| |
O_* flags and eliminating an XXX comment.
ok matthew@ deraadt@
|
|
|
|
|
|
| |
leaving us with a free type function that isn't atomic. deal with this
by erasing any reachable pointers to the vnode first, then free it.
ok deraadt guenther
|
|
|
|
|
|
|
| |
rlimit, then a write that would take it over the limit should be
clamped, making it a partial write.
ok beck@
|
|
|
|
|
|
| |
LLONG_MAX instead of SSIZE_MAX
ok deraadt@
|
|
|
|
|
|
|
| |
Detect attempts to wrap the file offset by reading past the max (except
for character devices).
ok matthew@, deraadt@
|
|
|
|
|
|
| |
POSIX Issue 7.
Requested by oga@ (and maybe djm@); ok guenther@
|
|
|
|
|
|
| |
necessary.
"ok ... wait wait WAIT!! ... oh, yeah, it's fine, ok" guenther@
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
of EMLINK) if the O_NOFOLLOW flag is set and the target is a symlink.
Aligns with Solaris and Linux behaviour.
ok tedu@ thib@ guenther@
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
POSIX 1003.1-2008, with compatibility macros for the names used in
previous version of OpenBSD. Update all the references in the
kernel to use the new, standard member names.
ok'ed by miod@, otto@; ports build test by naddy@
|
|
|
|
|
|
|
|
|
|
| |
VA_EXCLUSIVE. Handle this in NFS, also in NFS use arc4random()
for the create verifier instead of an uninitialized long and
the address of the first interface (which is likely to be lo0).
Lifted from NetBSD with small tweaks;
"looks good", miod@
OK blambert@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
oga@'s upcoming DRM changes and too some degree ratchov@'s audio
work. It still works for bpf's though.
Parts from ratchov@; fstat(1) parts from Pedro Martelletto;
tested by many, ok'ed by a few;
"get going with cloning" deraadt@
|
|
|
|
| |
with a disklabel. Original diff from pedro@; ok pedro@ deraadt@
|
| |
|
|
|
|
| |
locking around VOP_ACCESS. It can go.
|
|
|
|
|
|
|
|
|
| |
Zap all calls to simple_lock/unlock() on it (those calls are
#defined away though). Remove the LK_INTERLOCK from the calls
to vn_lock() and cleanup the filesystems wich implement VOP_LOCK().
(by remvoing the v_interlock from there calls to lockmgr()).
ok pedro@, art@, tedu@
|
|
|
|
|
|
|
|
|
| |
effectively been a no-op for quite some time now,
without promise for future usage.
ok pedro@
Testing by krw@ (earlier diff)
and Johan Mson Lindman (tybollt@solace.miun.se)
|
|
|
|
| |
from krw@ and toby@, subliminal prodding from dlg@, okay deraadt@.
|
| |
|
| |
|
| |
|
| |
|
| |
|