#
ff9b3386 |
| 11-Nov-2021 |
martin <martin@NetBSD.org> |
Adapt to recent posix_spawn extensions.
|
#
cb095f84 |
| 13-Apr-2021 |
mrg <mrg@NetBSD.org> |
GCC 10 does not like casting from one identical anonymous enum to another enum. supply some quietening cast.
|
#
a29147fa |
| 19-Apr-2020 |
thorpej <thorpej@NetBSD.org> |
- Only increment nprocs when we're creating a new process, not just when allocating a PID. - Per above, proc_free_pid() no longer decrements nprocs. It's now done in proc_free() right after proc
- Only increment nprocs when we're creating a new process, not just when allocating a PID. - Per above, proc_free_pid() no longer decrements nprocs. It's now done in proc_free() right after proc_free_pid(). - Ensure nprocs is accessed using atomics everywhere.
show more ...
|
#
eb654c05 |
| 17-Sep-2019 |
christos <christos@NetBSD.org> |
Add a boolean argument to indicate if we have a path/true (execve) or an fd/false (fexecve). This is needed to differentiate between them because NULL/-1 can be readily passed from userland.
|
#
df668d1f |
| 15-Sep-2019 |
christos <christos@NetBSD.org> |
fix fexecve
|
#
d1579b2d |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a n
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
show more ...
|
#
2934fa70 |
| 02-Feb-2014 |
martin <martin@NetBSD.org> |
Limit the amount of kernel memory a posix_spawn syscall can use (for handling the file action list) by limiting the maximum number of file actions to twice the current file descriptor limit. Fix a fe
Limit the amount of kernel memory a posix_spawn syscall can use (for handling the file action list) by limiting the maximum number of file actions to twice the current file descriptor limit. Fix a few bugs in the support functions and document the new limit. From Maxime Villard.
show more ...
|
#
33458e7a |
| 15-Jan-2013 |
hannken <hannken@NetBSD.org> |
netbsd32_posix_spawn_fa_alloc: use the right length for path allocation.
This error lead to memory pool corruption when freeing kmem with wrong size.
|
#
b10bf469 |
| 02-May-2012 |
rmind <rmind@NetBSD.org> |
Revert posix_spawn() clean up for now, there are some bugs.
|
#
0c217aec |
| 30-Apr-2012 |
rmind <rmind@NetBSD.org> |
posix_spawn: - Remove copy-pasting in error paths, use execve_free_{vmspace,data}(). - Move some code (both in the init and exit paths) out of the locks. - Slightly simplify do_posix_spawn() callers.
posix_spawn: - Remove copy-pasting in error paths, use execve_free_{vmspace,data}(). - Move some code (both in the init and exit paths) out of the locks. - Slightly simplify do_posix_spawn() callers. - Add few asserts and comments.
show more ...
|
#
94b761b6 |
| 08-Apr-2012 |
martin <martin@NetBSD.org> |
Rework posix_spawn locking and memory management: - always provide a vmspace for the new proc, initially borrowing from proc0 (this part fixes PR 46286) - increase parallelism between parent and
Rework posix_spawn locking and memory management: - always provide a vmspace for the new proc, initially borrowing from proc0 (this part fixes PR 46286) - increase parallelism between parent and child if arguments allow this, avoiding a potential deadlock on exec_lock - add a new flag for userland to request old (lockstepped) behaviour for better error reporting - adapt test cases to the previous two and add a new variant to test the diagnostics flag - fix a few memory (and lock) leaks - provide netbsd32 compat
show more ...
|
#
f7a1e1f6 |
| 31-Jan-2012 |
matt <matt@NetBSD.org> |
Add missing *at syscalls among others
|
#
c2b95373 |
| 29-May-2008 |
mrg <mrg@NetBSD.org> |
remove clause #3 from my license where there are no other copyright holders involved.
|
#
7e2790cf |
| 20-Dec-2007 |
dsl <dsl@NetBSD.org> |
Convert all the system call entry points from: int foo(struct lwp *l, void *v, register_t *retval) to: int foo(struct lwp *l, const struct foo_args *uap, register_t *retval) Fixup compat code
Convert all the system call entry points from: int foo(struct lwp *l, void *v, register_t *retval) to: int foo(struct lwp *l, const struct foo_args *uap, register_t *retval) Fixup compat code to not write into 'uap' and (in some cases) to actually pass a correctly formatted 'uap' structure with the right name to the next routine. A few 'compat' routines that just call standard ones have been deleted. All the 'compat' code compiles (along with the kernels required to test build it). 98% done by automated scripts.
show more ...
|
#
b8fbaf8c |
| 22-Apr-2007 |
dsl <dsl@NetBSD.org> |
Change the way that emulations locate files within the emulation root to avoid having to allocate space in the 'stackgap' - which is very LWP unfriendly. The additional code for non-emulation nam
Change the way that emulations locate files within the emulation root to avoid having to allocate space in the 'stackgap' - which is very LWP unfriendly. The additional code for non-emulation namei() is trivial, the reduction for the emulations is massive. The vnode for a processes emulation root is saved in the cwdi structure during process exec. If the emulation root the TRYEMULROOT flag are set, namei() will do an initial search for absolute pathnames in the emulation root, if that fails it will retry from the normal root. ".." at the emulation root will always go to the real root, even in the middle of paths and when expanding symlinks. Absolute symlinks found using absolute paths in the emulation root will be relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links inside the emulation root don't need changing). If the root of the emulation would be returned (for an emulation lookup), then the real root is returned instead (matching the behaviour of emul_lookup, but being a cheap comparison here) so that programs that scan "../.." looking for the root dircetory don't loop forever. The target for symbolic links is no longer mangled (it used to get the CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended). CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding TRYEMULROOT to the flags to NDINIT(). A lot of the emulation system call stubs could now be deleted.
show more ...
|
#
d364d308 |
| 18-Mar-2007 |
dsl <dsl@NetBSD.org> |
Change all the NETBSD32PTR64(SCARG(uap, xxx))) to SCARG_P32(uap, xxx).
|
#
53524e44 |
| 04-Mar-2007 |
christos <christos@NetBSD.org> |
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
#
b07ec3fc |
| 09-Feb-2007 |
ad <ad@NetBSD.org> |
Merge newlock2 to head.
|
#
be8b2353 |
| 07-Mar-2006 |
thorpej <thorpej@NetBSD.org> |
Clean up fallout proc_is_traced_p() change: - proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and trace_exit(). - trace_is_enabled() becomes a real function. - Remove unnecessary i
Clean up fallout proc_is_traced_p() change: - proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and trace_exit(). - trace_is_enabled() becomes a real function. - Remove unnecessary include files from various files that used to care about KTRACE and SYSTRACE, but do no more.
show more ...
|
#
95e1ffb1 |
| 11-Dec-2005 |
christos <christos@NetBSD.org> |
merge ktrace-lwp.
|
#
86f97cc4 |
| 13-Jul-2005 |
cube <cube@NetBSD.org> |
Do the CHECK_ALT_EXIST dance again in netbsd32_execve(). It was lost in previous commit.
|
#
355bcba7 |
| 11-Jul-2005 |
cube <cube@NetBSD.org> |
Split sys_execve() and add execve1() that does most of the work, and takes as an argument a function that will retrieve an element of the pointer arrays in user space. This allows COMPAT_NETBSD32 to
Split sys_execve() and add execve1() that does most of the work, and takes as an argument a function that will retrieve an element of the pointer arrays in user space. This allows COMPAT_NETBSD32 to share the code for the emulated version of execve(2), and fixes various issues that came from the slow drift between the two implementations.
Note: when splitting up a syscall function, I'll use two different ways of naming the resulting helper function. If it stills does copyin/out operations, it will be named <syscall>1(). If it does not (as it was the case for get/setitimer), it will be named do<syscall>.
show more ...
|
#
d2dc8313 |
| 31-May-2005 |
christos <christos@NetBSD.org> |
- add const - avoid shadowed variables.
|
#
5888b16e |
| 19-May-2005 |
elad <elad@NetBSD.org> |
Some changes in veriexec.
New features:
- Add a veriexec_report() routine to make most reporting consistent and remove some common code. - Add 'strict' mode that controls how veriexec behav
Some changes in veriexec.
New features:
- Add a veriexec_report() routine to make most reporting consistent and remove some common code. - Add 'strict' mode that controls how veriexec behaves. - Add sysctl knobs: o kern.veriexec.verbose controls verbosity levels. Value: 0, 1. o kern.veriexec.strict controls strict level. Values: 0, 1, 2. See documentation in sysctl(3) for details. o kern.veriexec.algorithms returns a string with a space separated list of supported hashing algorithms in veriexec. - Updated documentation in man pages for sysctl(3) and sysctl(8).
Bug fixes:
- veriexec_removechk(): Code cleanup + handle FINGERPRINT_NOTEVAL correctly. - exec_script(): Don't pass 0 as flag when executing a script; use the defined VERIEXEC_INDIRECT - which is 1. Makes indirect execution enforcement work. - Fix some printing formats and types..
show more ...
|
#
6b2d8b66 |
| 01-Apr-2005 |
yamt <yamt@NetBSD.org> |
merge yamt-km branch. - don't use managed mappings/backing objects for wired memory allocations. save some resources like pv_entry. also fix (most of) PR/27030. - simplify kernel memory management
merge yamt-km branch. - don't use managed mappings/backing objects for wired memory allocations. save some resources like pv_entry. also fix (most of) PR/27030. - simplify kernel memory management API. - simplify pmap bootstrap of some ports. - some related cleanups.
show more ...
|