History log of /openbsd-src/sys/kern/kern_fork.c (Results 151 – 175 of 268)
Revision Date Author Comments
# e9e504be 30-Jun-2010 thib <thib@openbsd.org>

style nit


# e88d58b2 30-Jun-2010 guenther <guenther@openbsd.org>

Move the plimit and pcred bits in fork1() into process_new() and make
process_new() handle the new struct process like fork1() does struct proc,
with a range of members zeroed and a range copied from

Move the plimit and pcred bits in fork1() into process_new() and make
process_new() handle the new struct process like fork1() does struct proc,
with a range of members zeroed and a range copied from the parent process.
ok tedu@

show more ...


# 14e540af 29-Jun-2010 guenther <guenther@openbsd.org>

We always copy struct pcred when creating a new process, so the reference
count was always one. That's pointless, so remove the member and the code.
ok tedu@


# 7824a839 29-Jun-2010 guenther <guenther@openbsd.org>

Eliminate struct plimit's PL_SHAREMOD flag: it was for COMPAT_IRIX
sproc() support, but we don't have COMPAT_IRIX.
ok krw@ tedu@


# bb41499a 29-Jun-2010 tedu <tedu@openbsd.org>

some late breaking style comments from guenther


# 351c20c5 29-Jun-2010 tedu <tedu@openbsd.org>

Eliminate RTHREADS kernel option in favor of a sysctl. The actual status
(not done) hasn't changed, but now it's less work to test things.
ok art deraadt


# 91d36d8a 27-Jun-2010 guenther <guenther@openbsd.org>

A process on the zombie list can have a NULL p_pgrp if it sleeps when
grabbing allproclk in proc_zap(); don't dereference the process's p_pgrp
if that happens.

ok art@ thib@


# 598bddab 29-May-2010 guenther <guenther@openbsd.org>

As noted by art, two processes with the same pid would be bad. Grab
the allproclk before searching for a free pid so that we don't sleep
between picking one and adding it to the list that is searche

As noted by art, two processes with the same pid would be bad. Grab
the allproclk before searching for a free pid so that we don't sleep
between picking one and adding it to the list that is searched.
Also, keep holding the lock until after the PIDHASH update.

ok art@, tedu@

show more ...


# ce0272ab 18-May-2010 tedu <tedu@openbsd.org>

move knote list to struct process. ok guenther


# 848c61ac 24-Mar-2010 tedu <tedu@openbsd.org>

Add a rwlock around the filehead and allproc lists, mainly to protect
list walkers in sysctl that can block. As a reward, no more vslock.
With some feedback from art, guenther, phessler. ok guenthe

Add a rwlock around the filehead and allproc lists, mainly to protect
list walkers in sysctl that can block. As a reward, no more vslock.
With some feedback from art, guenther, phessler. ok guenther.

show more ...


# a3c911ba 14-Jan-2010 schwarze <schwarze@openbsd.org>

fix typos in comments, no code changes;
from Brad Tilley <brad at 16systems dot com>;
ok oga@


# 819e4fd8 28-Dec-2009 guenther <guenther@openbsd.org>

Sanity check flags in fork1(), banning some combos we don't support
and catching FORK_THREAD when RTHREADS wasn't compiled in. Simplify
sys_rfork() based on that.

Flesh out the Linux clone support

Sanity check flags in fork1(), banning some combos we don't support
and catching FORK_THREAD when RTHREADS wasn't compiled in. Simplify
sys_rfork() based on that.

Flesh out the Linux clone support with more flags, but stricter
checks for missing support or bad combos. Still not enough for
NPTL to work, mind you.

ok kettenis@

show more ...


# 2428a54e 23-Dec-2009 guenther <guenther@openbsd.org>

The process's rdomain should be, well, per-process and not per-rthread,
so put it in struct process instead of struct proc. While at it,
move the p_emul member inside struct proc so that it gets cop

The process's rdomain should be, well, per-process and not per-rthread,
so put it in struct process instead of struct proc. While at it,
move the p_emul member inside struct proc so that it gets copied
automatically instead of requiring manual assignment.

ok deraadt@

show more ...


# 733a5504 27-Nov-2009 guenther <guenther@openbsd.org>

Add setrdomain() and getrdomain() system calls. Committing now to
catch the libc major bump per request from deraadt@

Diff by reyk.

ok guenther@


# 627b2c48 09-Jul-2009 thib <thib@openbsd.org>

Remove the VREF() macro and replaces all instances with a call to verf(),
which is exactly what the macro does.

Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost alw

Remove the VREF() macro and replaces all instances with a call to verf(),
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.

show more ...


# 7c565ebf 14-Apr-2009 art <art@openbsd.org>

Some tweaks to the cpu affinity code.
- Split up choosing of cpu between fork and "normal" cases. Fork is
very different and should be treated as such.
- Instead of implicitly choosing a cpu in

Some tweaks to the cpu affinity code.
- Split up choosing of cpu between fork and "normal" cases. Fork is
very different and should be treated as such.
- Instead of implicitly choosing a cpu in setrunqueue, do it outside
where it actually makes sense.
- Just because a cpu is marked as idle doesn't mean it will be soon.
There could be a thundering herd effect if we call wakeup from an
interrupt handler, so subtract cpus with queued processes when
deciding which cpu is actually idle.
- some simplifications allowed by the above.

kettenis@ ok (except one bugfix that was not in the intial diff)

show more ...


# 7035ad6b 23-Mar-2009 art <art@openbsd.org>

Processor affinity for processes.
- Split up run queues so that every cpu has one.
- Make setrunqueue choose the cpu where we want to make this process
runnable (this should be refined and less

Processor affinity for processes.
- Split up run queues so that every cpu has one.
- Make setrunqueue choose the cpu where we want to make this process
runnable (this should be refined and less brutal in the future).
- When choosing the cpu where we want to run, make some kind of educated
guess where it will be best to run (very naive right now).
Other:
- Set operations for sets of cpus.
- load average calculations per cpu.
- sched_is_idle() -> curcpu_is_idle()

tested, debugged and prodded by many@

show more ...


# 9aaca6d3 11-Nov-2008 tedu <tedu@openbsd.org>

slightly optimized the ptrace stat allocation to only happen when needed.
ok deraadt


# c8b205f6 09-Nov-2008 deraadt <deraadt@openbsd.org>

systrace activation happens in the middle of a rather sensitive piece of
fork(), i worry about it a lot but cannot prove yet that sleeping there
is bad. Anyways, this change makes us never sleep in

systrace activation happens in the middle of a rather sensitive piece of
fork(), i worry about it a lot but cannot prove yet that sleeping there
is bad. Anyways, this change makes us never sleep in that area -- the
memory needed is allocated ealier like the ptrace state. tested by many
developers.

show more ...


# 8dbab72b 03-Nov-2008 deraadt <deraadt@openbsd.org>

pre-allocate the ptrace_state we may need to tie to the new process
in case we need it. the idea is to try to get rid of some potential
sleeps..
ok tedu


# 2e81cdb6 14-Oct-2008 guenther <guenther@openbsd.org>

Back-in; problems were apparently elsewhere.
Put a reference count in struct process to prevent use-after-free
if the main thread reaches the reaper ahead of some other thread
in the process. Use th

Back-in; problems were apparently elsewhere.
Put a reference count in struct process to prevent use-after-free
if the main thread reaches the reaper ahead of some other thread
in the process. Use the reference count to update the user process
count correctly when changin real uid.

"please re-commit before something else nasty comes in" deraadt@

show more ...


# 21a41329 10-Oct-2008 deraadt <deraadt@openbsd.org>

backout; is causing some people difficulty


# 5de831d5 09-Oct-2008 guenther <guenther@openbsd.org>

Put a reference count in struct process to prevent use-after-free
if the main thread reaches the reaper ahead of some other thread
in the process.

ok art@ tedu@


# 0c5bca19 11-May-2008 tedu <tedu@openbsd.org>

set p_flag to 0 sooner, so we don't overwrite the thread flag. and correctly
free things when exiting a threaded proc. from philip guenther


# 047c293e 11-May-2008 tedu <tedu@openbsd.org>

share signal handlers for rthreads. from philip guenther


1234567891011