diff options
author | marcel <marcel@FreeBSD.org> | 2000-11-30 05:23:49 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2000-11-30 05:23:49 +0000 |
commit | 75c76bdc6b73745ecfa9955e547ca6ba4fd7d328 (patch) | |
tree | c43af70e24691529e40621dabcaf4913d9d353f4 /sys/compat/svr4/svr4_signal.c | |
parent | 673e30eadab9fe762d23631609edf13e018f59c1 (diff) | |
download | FreeBSD-src-75c76bdc6b73745ecfa9955e547ca6ba4fd7d328.zip FreeBSD-src-75c76bdc6b73745ecfa9955e547ca6ba4fd7d328.tar.gz |
Don't use p->p_sigstk.ss_flags to keep state of whether the
process is on the alternate stack or not. For compatibility
with sigstack(2) state is being updated if such is needed.
We now determine whether the process is on the alternate
stack by looking at its stack pointer. This allows a process
to siglongjmp from a signal handler on the alternate stack
to the place of the sigsetjmp on the normal stack. When
maintaining state, this would have invalidated the state
information and causing a subsequent signal to be delivered
on the normal stack instead of the alternate stack.
PR: 22286
Diffstat (limited to 'sys/compat/svr4/svr4_signal.c')
-rw-r--r-- | sys/compat/svr4/svr4_signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c index c80538e..84f8ce0 100644 --- a/sys/compat/svr4/svr4_signal.c +++ b/sys/compat/svr4/svr4_signal.c @@ -628,7 +628,7 @@ svr4_sys_context(p, uap) case 0: DPRINTF(("getcontext(%p)\n", uap->uc)); svr4_getcontext(p, &uc, &p->p_sigmask, - p->p_sigstk.ss_flags & SS_ONSTACK); + sigonstack(cpu_getstack(p))); return copyout(&uc, uap->uc, sizeof(uc)); case 1: |