| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* Favor ENOTTY for unknown ioctl commands
* Return the actual error from copyinstr and copyoutstr, removes the need to
initialize the local error variable
* Do not use parens around return expressions consistently
ok visa@
|
|
|
|
|
|
|
|
|
|
|
| |
caused by calling vn_open() with write permissions must be reverted.
Otherwise, the vfs subsystem could panic while releasing the last vnode
reference if the writecount is still positive.
ok visa@
Reported-by: syzbot+4724df09d9ab0fdca28a@syzkaller.appspotmail.com
Reported-by: syzbot+a430606fd528645559db@syzkaller.appspotmail.com
|
|
|
|
|
|
| |
the API more logical.
OK kettenis@ mpi@
|
|
|
|
|
|
|
|
| |
to the namei args. This fixes a bug where chmod would be allowed when
with only READ. This also allows some further cleanup of some awkward
things like PLEDGE_STAT that will follow
Lots of assistence from semarie@ - thanks!
ok semarie@
|
|
|
|
| |
Found the hardway by mlarkin@, ok bluhm@
|
|
|
|
|
|
|
|
|
| |
With this change `f_data' is effectively immutable.
While here prevent a lock ordering issue by not unterleaving the vnode's
lock and the fdplock().
Tested by bluhm@, ok kettenis@, visa@, jsing@
|
|
|
|
|
|
|
|
|
|
| |
The only place where it was modified after initialization is a corner
case where the vnode of an open file is substitued by another one. Sine
the type of the file doesn't change, there's no need to overwrite `f_ops'.
While here proctect file counters with `f_mtx'.
ok bluhm@, visa@
|
|
|
|
|
|
| |
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@ sthen@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) turn NDINITAT into a function and make the macros point to it
with the later goal of getting rid of them.
2) Sweep the kernel for places where people make a struct nameidata manually
on the stack and fill in what they hope are the required fields and count
on prayer and clean living to always get them right. Instead use NDINIT
everywhere. NFS was especially bad for this and there have likely
been things lurking there for a while.
3) Add a couple of strategic KASSERT's to catch future offenders.
ok krw@ sthen@ deraadt@
|
|
|
|
|
|
| |
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
|
|
|
|
|
|
|
| |
few disklabel ioctls, and the DIOCMAP ioctl against /dev/diskmap used
to translate duid numbers into partitions.
This will allow pledging of at least 12 disk/filesystem aware
programs; due to the negative impact that diff will wait a bit so
everyone has a chance to update their kernels.
ok semarie
|
| |
|
|
|
|
| |
Input and ok millert@
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
anticipation of further changes to closef(). No binary change.
ok krw@ miod@ deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
added in POSIX Issue 7: openat(), mknodat(), mkfifoat(), linkat(),
symlinkat(), unlinkat(), faccessat(), fstatat(), readlinkat(),
fchmodat(), fchownat(), utimensat(), renameat(), and mkdirat().
This diff mostly just refactors the existing sys_foo() logic into a
common dofooat() function that can then be called by both sys_foo()
and sys_fooat(). Some of the new system calls support new flags to
control their behavior, and proper support for these will be added in
subsequent diffs.
Incorporating suggestions from thib@, guenther@, and tedu@.
ok tedu@, thib@, deraadt@, guenther@
|
|
|
|
|
|
|
|
|
| |
code. This gets us some additional validation and correct reference
counting.
Issue spotted by matthew@
ok thib@
|
|
|
|
| |
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
|
|
|
|
|
|
|
|
|
|
|
|
| |
of using NDINIT as vn_open overwrites and sets things up directly
it self.
the NDINIT usage here was actually wrong and would cause leaks
if vn_open would totally honor the nameidata it gets passed,
also there is one less place that triggers on my nameidata
flag greps...
ok jsing@
|
|
|
|
|
|
| |
the ioctl. also remove an uneeded if (devname) check.
ok jsing@
|
|
specified via its disklabel UID. The mapping from the disklabel UID to the
real disk and the opening of the resulting device is performed atomically
using a single ioctl.
ok krw@ deraadt@
|