Age | Commit message (Collapse) | Author |
|
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);
|
|
|
|
for a null pointer now, all other filesystems fill in the complete table.
ok deraadt@, tom@
|
|
reported by Tim Newsham at NCC.
ok millert natano
|
|
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
|
|
tmpfs_readlink() functions ignore the noatime mount option, tmpfs_read()
should not update atime when zero bytes have been requested (as per
posix) and tmpfs_write() should update mtime and ctime (as per posix).
ok espie
|
|
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
|
|
thus will sleep until
get memory available so shouln't fail.
OK deraadt@ mmcc@
|
|
by ensuring the structure is zeroed when allocated from the pool
ok mmcc@, stsp@
|
|
|
|
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and
to correctly handle a timestamp of -1.
ok millert@
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@
|
|
|
|
|
|
era. fix uvm including c files to include lock.h or atomic.h as necessary.
ok deraadt
|
|
doesn't have all the values and therefore can't be used everywhere.
ok deraadt@ kettenis@
|
|
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
|
|
eliminating the must-be-kept-in-sync UVM_INH_* macros
ok deraadt@ tedu@
|
|
(tn_links == 0). Failure to enforce such a check can lead to the
violation of the assumption that removed directories should not
contain directory entries and thus trigger a kernel diagnostic
assertion (panic).
Fix provided by Pedro Martelletto, thanks!
OK millert@
|
|
to include that than rdnvar.h. ok deraadt dlg
|
|
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
|
|
|
|
|
|
after discussions with beck deraadt kettenis.
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
<uvm/uvm.h> if possible and remove double inclusions.
ok beck@, mlarkin@, deraadt@
|
|
structure of tmpfs_write.
rewrite the opening tests to conform more to ffs's code, so that overrun
is not used unitialized. Patch by kettenis@ (on the road)
deraadt@ "do it right away"
|
|
problem reported by brad@
ok kettenis@ millert@
|
|
generic flavor. problems noted and tested by ajacoutot
|
|
until we've confirmed they're on the same filesystem as the source:
not all filesystems do locking the same.
problem report and testing chrisz@
ok espie@
|
|
okay tedu@
|
|
ok espie
|
|
trying to hardlink a directory. While this is not allowed on tmpfs, this
allows us to reach the code that checks for this such that we can return
the appropriate error.
Cluestick from Pedro Martelletto.
ok espie@
|