| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
copied area, and initialize it properly in the FORK_THREAD case.
This restores the behavior of a forked process inheriting its parent's
signal stack.
ok guenther@
|
|
|
|
|
| |
past, pull that code out seperately.
ok guenther miod
|
|
|
|
|
|
|
|
| |
and use curp vs p instead of p1 vs p2. Add curpr and pr variables
for the respective struct processes. Make sigactsshare() return
the shared sigacts intead of taking the struct proc to update.
ok deraadt@
|
|
|
|
|
|
|
|
|
|
| |
layers. Then things get terribly confusing because the various MI layers
swap variable names for parameters, local variables, and structure fields
numerous times. Unconfuse all this mess.
Note that exec_elf.c coredump cpi_sigcode used to contain the MD traptype
but will now contain the MI siginfo-style "code" value.
ok miod kettenis pirofti
|
|
|
|
|
|
| |
as it causes hangs in some ports, including libsigsegv's configure script
confirmed by krw@, landry@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sys_osigaltstack() is 7 years old and no longer needed; all glory to
the sys_sigaltstack()!
sys_ogetdirentries() is about 9 months old, but still acceptable
within our release cycle; move from STD to COMPAT_48 to make this
clearer for tedu@ next year.
sys_sbrk() and sys_sstk() are completely obsolete: all they do is
return ENOSYS.
ok guenther@
|
|
|
|
|
|
|
|
|
|
|
| |
hold the kernel lock, but still need call one function that needs it.
Instead of grabbing the lock all over the place, move the locks into
the affected functions: trapsignal, scdebug*, ktrsyscall, ktrsysret,
systrace_redirect and ADDUPROF. In the cases we already hold the biglock
we'll just recurse.
kettenis@, beck@ ok
|
|
|
|
|
|
|
| |
KERNEL_PROC_LOCK -> KERNEL_LOCK
KERNEL_PROC_UNLOCK -> KERNEL_UNLOCK
oga@ ok
|
|
|
|
|
|
|
|
| |
problem has been tracked down. This fixes the sharing of the signal
handling state: shared bits go in sigacts, per-rthread bits goes in
struct proc.
ok deraadt@
|
|
|
|
|
|
| |
until they're zombies and then send them signals (for intr mounts). Until
that is untangled, the sigacts change is unsafe. sthen@ was the victim
for this one
|
|
|
|
|
|
|
|
|
|
|
|
| |
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves
to struct sigacts, wihle stuff that should be per rthread (ps_oldmask,
SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping
state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread
until our locking around coredumping is better.
Oh, and remove the old SunOS-compat ps_usertramp member.
"I like the sound of this" tedu@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
into struct process.
ok tedu@ deraadt@
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
way a kill() intended for a thread can result in a separate process
getting the signal.
ok tedu@ art@
|
| |
|
|
|
|
|
| |
the now-removed HPUX compat code.
ok and build testing deraadt@
|
| |
|
|
|
|
|
| |
(not done) hasn't changed, but now it's less work to test things.
ok art deraadt
|
|
|
|
|
| |
so stop including it in kernel .c files.
"sure" deraadt@
|
| |
|
|
|
|
|
|
|
| |
and struct timespec * argument. sigtimedwait is just a one line
wrapper after this.
"get it in" deraadt@, tedu@, cheers by others
|
|
|
|
| |
ok jsing@, miod@
|
|
|
|
| |
media just a wee bit too much.
|
|
|
|
| |
OK miod
|
|
|
|
|
|
| |
NetBSD.
ok kurt@, drahn@, miod@
|
|
|
|
|
|
|
|
|
| |
got multiple signals before tsleep() could wakeup. Also, POSIX
says that sigwait() should never return EINTR, so map that to
ERESTART.
ok kurt@, tedu@
fixes the panic encountered by ariane@ with kaffe
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that takes an additional argument "type" that indicates whether the
signal is for the process, just a particular thread, or propagated
to a thread because it's not caught or blocked. psignal() becomes
a wrapper that does the first of those.
So that sys_kill() can tell apart signals for the process and signals
for the process's original thread, the tid of the original thread
is defined as its pid + THREAD_PID_OFFSET.
ok tedu@ art@ andreas@ kurt@ "better early than late" deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
signal is already pending in the calling thread or the main thread
and there's no longer a race condition where the signal could be
diverted but sigwait() would still block. There were some off-by-one
errors too.
(The checking of the main thread's pending list is just until a
pending list for the process can be added to struct process. For
now, such signals end up as pending on the main thread.)
oks tedu@ and art@
|
|
|
|
|
|
|
| |
provided by christian ehrhardt (Christian_Ehrhardt@genua.de) and micky,
thanks!
ok deraadt millert
|
|
|
|
|
| |
From: Pierre Riteau pierre.riteau_att_gmail.com
OK miod@
|
|
|
|
| |
sys/dev/pci/pciide.c from naddy@
|
|
|
|
| |
match the comment. OK deraadt@
|
|
|
|
|
|
|
|
| |
version for i386
more architectures and ctob() replacement is being worked on
prodded by and ok miod
|
|
|
|
|
|
| |
truncation and add an additional truncation check.
ok deraadt@ tedu@
|
|
|
|
| |
ok tedu
|
|
|
|
|
| |
makes debugging easier, docs in a bit
ok beck deraadt
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Defer the sending of SIGCHLD and waking the parent when a process goes
to sleep. We set a flag in the process "P_STOPPED" and schedule a
timeout that checks all processes for this flag and sends SIGCHLD
and wakes the parent on those processes that have this flag set.
- Delay the waking of the parent in psignal on SIGCONT until we've
released the SCHED_LOCK at the end.
- In issignal, check for P_SINTR as a way to see we were called from
the tsleep path with SCHED_LOCK locked and don't skip locking
in that case. (This is slightly ugly, but it works until we have
some better way).
miod@ ok (after finding and fixing an MD bug on sgi)
|
|
|
|
|
|
|
|
|
|
|
| |
a new struct. Instead of doing a huge rename and deal with the fallout
for weeks, like other projects that need no mention, we will slowly and
carefully move things out of struct proc into a new struct process.
- Create struct process and the infrastructure to create and remove them.
- Move threads in a process into struct process.
deraadt@, tedu@ ok
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
the problem with lost signals in MP kernels.
miod@, kettenis@ ok
|
|
|
|
|
|
|
|
|
|
|
| |
signal to is the curproc, check if it's SONPROC. That way we'll also
signotify processes on other CPUs. This gives MD code the opportunity
to actually deliver signals to other CPUs faster than the clock
interrupt (in the worst case).
This is a NOP until MD code is fixed.
miod@ ok
|
|
|
|
|
|
|
|
|
| |
effectively been a no-op for quite some time now,
without promise for future usage.
ok pedro@
Testing by krw@ (earlier diff)
and Johan Mson Lindman (tybollt@solace.miun.se)
|
| |
|
| |
|
|
|
|
| |
cpu_coredump() behaviour.
|
|
|
|
| |
discussed with a few, ok tedu@
|