Age | Commit message (Collapse) | Author |
|
character. The '/' char is the path separator and is not allowed in
any filename.
NFS specific report by Apple Security Engineering and Architecture (SEAR).
Input from guenther@ and millert@
OK beck@ miod@
|
|
|
|
while here, ensure all vop_remove field are set, and always call the function.
the change is very conservative: it only adds vnode ref drop/unlock where it was
absent because it should be unreachable (and if it wasn't, it should fix
things).
ok miod@
|
|
separate the local part from the fifo_vops part, and add a comment to keep in
sync.
ok miod@
|
|
checks from all the filesystems that support hardlinks at all into
the VFS layer. Simplify, EPERM description in link(2).
ok miod@ mpi@
|
|
mechanical 'selinfo' to 'klist' replacement in 'vnode' structure because
knote(9) API is already used.
<sys/selinfo.h> headers added where is was required.
ok bluhm
|
|
panics [1].
1. https://marc.info/?l=openbsd-bugs&m=165012301707403&w=2
from Leo Larnack <leo at pseven.xyz>
ok kn@ mpi@
|
|
OK mpi@
|
|
Make __EV_POLL specific to kqueue-based poll(2), to remove overlap
with __EV_SELECT that only select(2) uses.
OK millert@ mpi@
|
|
|
|
|
|
|
|
From Pedro Martelletto
|
|
From gerhard@
|
|
uvm_vnp_uncache() in tmpfs_write() when a file grows in size. This
is not enough. We need to invalidate UVM's cache of the vnode every
time the contents of the vnode are modified. Failure to do so might
lead to inconsistencies between read/mmap consumers.
From Pedro Martelletto
|
|
VFS_LOOKUP(dir, &parent) in a loop and looks up the parent directory
".." repeatedly. VFS_LOOKUP is expected to unlock 'dir' and return
'parent' locked.
So tmpfs_lookup() is called for ISDOTDOT and:
- runs with dvp = dir, vpp = &parent
- gets parent from tmpfs_vnode_get() and
- re-locks dir with vn_lock(dvp)
but skips the call to
VOP_UNLOCK(dvp);
on return because *vpp == dvp
The reason for doing so is the lookup for ".". In this case
tmpfs_lookup() just increases the reference on dvp and copies the
pointer:
*vpp = dvp; vref(dvp);
However, in our case we also have *vpp == dvp, but for a different
lookup (ISDOTDOT), so we must do the unlock.
From markus@
|
|
It replaces spec_badop, fifo_badop, dead_badop and mfs_badop, which
are only calls to panic(9), to one unique function vop_generic_badop().
No intented behaviour changes (outside the panic message which isn't
the same).
ok mpi@
|
|
OK deraadt@
|
|
|
|
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
The breakage was caused by the removal of #include <sys/systm.h>
from <uvm/uvm_map.h>.
OK deraadt@, mpi@, beck@
|
|
for the vnode.
ok beck@
|
|
While here prefix kernel-only EV flags with two underbars.
Suggested by kettenis@, ok visa@
|
|
Adapt FS kqfilters to always return true when the flag is set and bypass
the polling mechanism of the NFS thread.
While here implement a write filter for NFS.
ok visa@
|
|
for example, with locking assertions.
OK mpi@, anton@
|
|
adding more filter properties without cluttering the struct.
OK mpi@, anton@
|
|
into read-only data segment.
OK deraadt@ tedu@
|
|
make the structs const so that the data are put in .rodata.
OK mpi@, deraadt@, anton@, bluhm@
|
|
OK visa@
|
|
This is clearer and more consistent with the rest of the kernel.
OK deraadt@ sashan@
|
|
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@
|
|
https://marc.info/?l=openbsd-cvs&m=156277704122293&w=2
ok anton@
|
|
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@
|
|
structure allows for better tracking of pending lock operations which is
essential in order to prevent a use-after-free once the underlying vnode is
gone.
Inspired by the lockf implementation in FreeBSD.
ok visa@
Reported-by: syzbot+d5540a236382f50f1dac@syzkaller.appspotmail.com
|
|
ok guenther@ tb@ deraadt@
|
|
unlocking the directory vnode.
OK mpi@, helg@
|
|
the file allocation routine. This allows stepwise changing of the vnode
locking discipline.
OK mpi@
|
|
OK mpi@
|
|
|
|
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@
|
|
copyin(9) ourselves anymore. Fixes tmpfs after recent changes.
ok bluhm@ deraadt@ visa@
|
|
to appease WITNESS. ext2fs and ffs already use the flag. The same
locking pattern appears with other file systems too, so this patch
addresses the remaining cases.
OK mpi@
|
|
|
|
for blocks re-fetchable from the filesystem. However at reboot time,
filesystems are unmounted, and since processes lack backing store they
are killed. Since the scheduler is still running, in some cases init is
killed... which drops us to ddb [noted by bluhm]. Solution is to convert
filesystems to read-only [proposed by kettenis]. The tale follows:
sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which
completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT()
with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a
copyin() late... so store the sizes in vfsconflist[] and move the copyin()
to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill
legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is
sharp and rusty especially wrt softdep, so fix some bugs adn add
~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help,
so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but
this issue is seperate and will be dealt with in time.
couple hundred reboots by bluhm and myself, advice from guenther and
others at the hut
|
|
|
|
on amd64 and i386.
|
|
|
|
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);
|
|
|