| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
struct process; KTRFAC_ACTIVE becomes P_INKTR. Also, save the credentials
used to open the file in sys_ktrace() and use them for all writes to the
vnode.
much feedback and ok jsing@
|
|
|
|
|
|
| |
when exec succeeds.
ok jsing@
|
|
|
|
| |
the new image
|
|
|
|
| |
outside the tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vmmap is designed to perform address space randomized allocations,
without letting fragmentation of the address space go through the roof.
Some highlights:
- kernel address space randomization
- proper implementation of guardpages
- roughly 10% system time reduction during kernel build
Tested by alot of people on tech@ and developers.
Theo's machines are still happy.
|
|
|
|
|
|
| |
fail regardless of which rthread calls execve()
ok blambert@
|
|
|
|
|
|
|
|
|
| |
a vforked child behave correctly. Have the parent in a vfork()
wait on a (different) flag in *its* process instead of the child
to prevent a possible use-after-free. When ktracing the child
return from a fork, call it rfork if an rthread was created.
ok blambert@
|
|
|
|
|
|
| |
that you can't evade the checks by doing the dirty work in an rthread
ok blambert@, deraadt@
|
|
|
|
|
| |
trampoline) in sys_execve(), if MD <machine/_types.h> defines
__HAVE_EXEC_MD_MAP.
|
|
|
|
|
|
|
|
|
| |
so that the process-level stuff is to/from struct process and not
struct proc. This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.
Tested by many: deraadt, sthen, krw, ray, and in snapshots
|
| |
|
|
|
|
|
| |
from Brad Tilley <brad at 16systems dot com>;
ok oga@
|
|
|
|
|
|
|
|
|
|
|
| |
which is exactly what the macro does.
Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.
OK blambert@
Agreed by many.
|
|
|
|
|
|
| |
From NetBSD;
OK deraadt@
|
| |
|
| |
|
|
|
|
|
|
| |
by aligning the stack gap. Fixes gettext port build (and probably many others).
ok miod@, tedu@, tested by sthen@
|
|
|
|
|
|
| |
machines where the stack grows up. Fixes systrace(1) on hppa.
ok deraadt@
|
|
|
|
|
|
| |
replace an hard coded value with M_WAITOK
ok krw@
|
|
|
|
| |
help and ok miod@ thib@
|
|
|
|
|
|
|
|
|
|
|
|
| |
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
|
| |
|
| |
|
|
|
|
|
|
| |
take interp[MAXPATHLEN] off the stack. from mickey, ok otto
while here, switch above from malloc to pool, remove stupid casts
tedu@ miod@ ok
|
|
|
|
|
| |
setuid-script and are attempting to dup is the specific setuid-script
fd via such a pathname; ok tedu pedro millert
|
|
|
|
|
|
|
|
| |
uses rfork(RFTHREAD) to create threads, which are presently processes
that are a little more tightly bound together. several new syscalls
added to facilitate a userland thread library.
all conditional on RTHREADS, currently disabled.
ok deraadt
|
|
|
|
| |
'go for it' deraadt@
|
| |
|
|
|
|
|
| |
- Don't copy the pathbuf into kernel space unless we're systracing.
deraadt@ ok
|
|
|
|
|
| |
fixes resource accounting in a mmap malloc world
ok "too busy but looks right" tedu, tdeval
|
| |
|
|
|
|
| |
ok deraadt@ mickey@ millert@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
the argv[0] would be normalized, and hence break scripts
that depend on how they were called.
this fixes an issue in the ports builds.
ok provos@ deraadt@; lots of testing during hackathon sturm@ naddy@
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add an exec message so that whenever a set-uid/gid process
exec's a new image which we may control, the exec does not
go by unnoticed.
- take special care to check for P_SUGIDEXEC as well as
P_SUGID, corresponding to the same changes that were made in
the ptrace code a while ago
ok niels@, sturm@; thanks to naddy for testing
|
| |
|
| |
|
|
|
|
| |
ok deraadt@ millert@
|
|
|
|
|
| |
had previously increased the reference count. Should not happen, but...
From dhartmei@; ok deraadt@
|
|
|
|
|
| |
from Patrick Latifi <patrick.l@hermes.usherb.ca>
ok jason@ tedu@
|
|
|
|
|
|
|
|
|
| |
add e_flags to struct emul. this stores on/off and native flags.
check for emul enabled in check_exec(). gather all the emuls into a
emulsw so a sysctl can find them. create sysctl. move maxhdrsiz calcualation
into init_main so it cleans up sys_execve codepath. teach sysctl utility
to grok kern.emul hierarchy.
requested and ok deraadt@ some comments from mickey@
|
|
|
|
|
|
|
|
|
|
| |
use them to correctly emulate linux brk.
update to TNF copyright in linux_exec.c.
from netbsd, mostly from a diff by Kurt Miller in pr3318.
this should fix java. no regressions in testing by kurt and sturm@.
be prepared for "proc size mismatch" -- recompile ps and friends.
ok deraadt@
|
| |
|
|
|
|
| |
Close PR 3262
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first one is an mquery(2) syscall. It's for asking the VM system
about where to map things. It will be used by ld.so, read the man page
for details.
The second change is related and is a centralization of uvm_map hint
that all callers of uvm_map calculated. This will allow us to adjust
this hint on architectures that have segments for non-exec mappings.
deraadt@ drahn@ ok.
|
|
|
|
|
|
|
| |
man page. Instead of just clearing P_SUGIDEXEC if real and effective
uids/gids matched, we now set P_SUGIDEXEC if there is a mismatch in
the real, effective, or saved uid/gid and clear it otherwise.
deraadt@ and tholo@ OK.
|
| |
|
| |
|