#
68cc3983 |
| 13-Apr-2023 |
jsg <jsg@openbsd.org> |
remove duplicate includes ok deraadt@ miod@ krw@
|
#
2759e442 |
| 06-Aug-2019 |
anton <anton@openbsd.org> |
Resolve some minor nits in diskmapioctl():
* Favor ENOTTY for unknown ioctl commands * Return the actual error from copyinstr and copyoutstr, removes the need to initialize the local error variabl
Resolve some minor nits in diskmapioctl():
* 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@
show more ...
|
#
3e253b47 |
| 05-Aug-2019 |
anton <anton@openbsd.org> |
Favor vn_close() in the error path of diskmapioctl() since side-effects caused by calling vn_open() with write permissions must be reverted. Otherwise, the vfs subsystem could panic while releasing t
Favor vn_close() in the error path of diskmapioctl() since side-effects 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
show more ...
|
#
5b75427a |
| 20-Aug-2018 |
visa <visa@openbsd.org> |
Make fnew() return a new file with only one reference. This makes the API more logical.
OK kettenis@ mpi@
|
#
e1a6e226 |
| 05-Aug-2018 |
beck <beck@openbsd.org> |
Decouple unveil from the pledge flags, by adding dedicated unveil flags to the namei args. This fixes a bug where chmod would be allowed when with only READ. This also allows some further cleanup of
Decouple unveil from the pledge flags, by adding dedicated unveil flags 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@
show more ...
|
#
64c74df7 |
| 04-Jul-2018 |
mpi <mpi@openbsd.org> |
Do not try to unlock the fdplock() in an error path if it isn't held.
Found the hardway by mlarkin@, ok bluhm@
|
#
4e13440d |
| 03-Jul-2018 |
mpi <mpi@openbsd.org> |
Instead of overwriting `f_data' replace the 'struct file' with a new one.
With this change `f_data' is effectively immutable.
While here prevent a lock ordering issue by not unterleaving the vnode'
Instead of overwriting `f_data' replace the 'struct file' with a new one.
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@
show more ...
|
#
9e621937 |
| 09-May-2018 |
mpi <mpi@openbsd.org> |
Mark `f_ops' as immutable.
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
Mark `f_ops' as immutable.
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@
show more ...
|
#
6e880534 |
| 02-May-2018 |
visa <visa@openbsd.org> |
Remove proc from the parameters of vn_lock(). The parameter is unnecessary because curproc always does the locking.
OK mpi@
|
#
36bb23f1 |
| 28-Apr-2018 |
visa <visa@openbsd.org> |
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@
|
#
4b1f64dc |
| 02-Jan-2018 |
guenther <guenther@openbsd.org> |
Stop assuming <sys/file.h> will pull in fcntl.h when _KERNEL is defined.
ok millert@ sthen@
|
#
b27348b2 |
| 08-Sep-2017 |
deraadt <deraadt@openbsd.org> |
If you use sys/param.h, you don't need sys/types.h
|
#
9b247b22 |
| 29-Apr-2016 |
beck <beck@openbsd.org> |
Fix some gibbering horrors due to uninitialized struct nameidata's
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 f
Fix some gibbering horrors due to uninitialized struct nameidata's
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@
show more ...
|
#
937fcae7 |
| 19-Mar-2016 |
natano <natano@openbsd.org> |
Remove the unused flags argument from VOP_UNLOCK().
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
|
#
2579b71c |
| 20-Nov-2015 |
deraadt <deraadt@openbsd.org> |
Add pledge "disklabel", which allows sysctl kern.rawpartition, a few disklabel ioctls, and the DIOCMAP ioctl against /dev/diskmap used to translate duid numbers into partitions. This will allow pledg
Add pledge "disklabel", which allows sysctl kern.rawpartition, a 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
show more ...
|
#
d21cd5d0 |
| 30-Aug-2015 |
deraadt <deraadt@openbsd.org> |
size for free(); ok krw
|
#
f4ce75d2 |
| 07-May-2015 |
mpi <mpi@openbsd.org> |
Pass a thread pointer instead of its file descriptor table to getvnode(9).
Input and ok millert@
|
#
21dab745 |
| 14-Mar-2015 |
jsg <jsg@openbsd.org> |
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@
|
#
fde894e5 |
| 16-Dec-2014 |
tedu <tedu@openbsd.org> |
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
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
show more ...
|
#
aa3cabd0 |
| 12-Jul-2014 |
tedu <tedu@openbsd.org> |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
#
06a89b59 |
| 22-Apr-2012 |
guenther <guenther@openbsd.org> |
Add struct proc * argument to FRELE() and FILE_SET_MATURE() in anticipation of further changes to closef(). No binary change.
ok krw@ miod@ deraadt@
|
#
8ef87afd |
| 07-Jul-2011 |
matthew <matthew@openbsd.org> |
Add new syscall entries to support the openat(2) family of functions added in POSIX Issue 7: openat(), mknodat(), mkfifoat(), linkat(), symlinkat(), unlinkat(), faccessat(), fstatat(), readlinkat(),
Add new syscall entries to support the openat(2) family of functions 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@
show more ...
|
#
1e5ca08a |
| 02-Jul-2011 |
jsing <jsing@openbsd.org> |
Use getvnode() instead of implementing our own file descriptor handling code. This gets us some additional validation and correct reference counting.
Issue spotted by matthew@
ok thib@
|
#
88ee6abd |
| 07-Apr-2011 |
miod <miod@openbsd.org> |
Do not use NULL in integer comparisons. No functional change. ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
|
#
6876d15b |
| 12-Jan-2011 |
thib <thib@openbsd.org> |
Only init the nameidata parts that are strictly needed instead of using NDINIT as vn_open overwrites and sets things up directly it self.
the NDINIT usage here was actually wrong and would cause lea
Only init the nameidata parts that are strictly needed instead 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@
show more ...
|