History log of /openbsd/sys/kern/exec_script.c (Results 1 – 25 of 48)
Revision Date Author Comments
# 8994f64a 15-Jul-2019 visa <visa@openbsd.org>

Do not relock fdp in fdrelease(). This prevents unnecessary locking
in the common case.

OK mpi@


# cd6537e7 18-Jun-2018 mpi <mpi@openbsd.org>

Put file descriptors on shared data structures when they are completely
setup, take 3.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]' or t

Put file descriptors on shared data structures when they are completely
setup, take 3.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]' or the global linked list. This allows
us to simplifies a lot code grabbing new references to fds.

All of this is now possible because dup2(2) refuses to clone LARVAL fds.

Note that the `fdplock' could now be release in all open(2)-like syscalls,
just like it is done in accept(2).

With inputs from Mathieu Masson, visa@, guenther@ and art@

Previous version ok bluhm@, ok visa@, sthen@

show more ...


# f695adb7 05-Jun-2018 mpi <mpi@openbsd.org>

Revert introduction of fdinsert(), a sanitify check triggers when
closing a LARVAL file.

Found the hardway by sthen@.


# e19d53e7 02-Jun-2018 mpi <mpi@openbsd.org>

Put file descriptors on shared data structures when they are completely
setup.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]'. This allow

Put file descriptors on shared data structures when they are completely
setup.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]'. This allows us to simplifies a lot
code grabbing new references to fds.

All of this is now possible because dup2(2) refuses to clone LARVAL fds.

Note that the `fdplock' could now be release in all open(2)-like syscalls,
just like it is done in accept(2).

With inputs from Mathieu -, visa@, guenther@ and art@

ok visa@, bluhm@

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@


# ff71d788 01-Jan-2018 florian <florian@openbsd.org>

We are either allocating 2 or three array members. Unroll while loop
to be able to call free(9) with sizes.

off-by-one pointed out by guenther
OK visa


# 65014aeb 11-Feb-2017 guenther <guenther@openbsd.org>

Add a flags argument to falloc() that lets it optionally set the
close-on-exec flag on the newly allocated fd. Make falloc()'s
return arguments non-optional: assert that they're not NULL.

ok mpi@ m

Add a flags argument to falloc() that lets it optionally set the
close-on-exec flag on the newly allocated fd. Make falloc()'s
return arguments non-optional: assert that they're not NULL.

ok mpi@ millert@

show more ...


# 2ed745d2 25-Apr-2016 tedu <tedu@openbsd.org>

boom goes the dynamite


# 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


# 7237622b 31-Dec-2015 mmcc <mmcc@openbsd.org>

NULL-terminate a pointer array to prevent an invalid free, and simplify
the associated pointer incrementing logic.

Reported by Maxim Pugachev. Looks good to tedu@


# 5fef797c 10-Sep-2015 deraadt <deraadt@openbsd.org>

sizes for free(); ok sthen


# 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 ...


# 57e3241e 19-Nov-2014 tedu <tedu@openbsd.org>

panic should be reserved for unrecoverable errors, not things we merely
hope don't happen. also, always check for errors. ok deraadt


# fc3c768a 18-Nov-2014 tedu <tedu@openbsd.org>

unifdef SETUIDSCRIPT and FDSCRIPT. we always use them. ok deraadt


# 8cc2fc56 13-Jul-2014 tedu <tedu@openbsd.org>

use mallocarray for multiplied value checking


# 9e8577e7 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.


# e6c6495d 08-Jul-2014 deraadt <deraadt@openbsd.org>

decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.h
don't need to be married.
ok guenther miod beck jsing 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@


# 638f0017 15-Feb-2012 guenther <guenther@openbsd.org>

Hold struct filedesc's fd_lock when writing to the fd_ofiles, fd_ofileflags,
or fd_{lo,hi}maps members, or when doing a read for a write. Fixes hangs
when an rthreaded processes sleeps while copying

Hold struct filedesc's fd_lock when writing to the fd_ofiles, fd_ofileflags,
or fd_{lo,hi}maps members, or when doing a read for a write. Fixes hangs
when an rthreaded processes sleeps while copying the fd table for fork()
and catches another thread with the lock.

ok jsing@ tedu@

show more ...


# 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 ...


# a8f078fd 29-Oct-2007 chl <chl@openbsd.org>

MALLOC/FREE -> malloc/free
replace an hard coded value with M_WAITOK

ok krw@


# d8a79e40 14-Nov-2006 jmc <jmc@openbsd.org>

grammar, spelling, and style fixes from bret lambert;
kern_descrip.c change ok deraadt


12