diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-07-05 04:48:03 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-07-05 04:48:03 +0000 |
commit | 0e36778a06f5746ef60cadc41c445d6f5b6cc647 (patch) | |
tree | 28f4fa5e7600b312b1d6084db8548e11c7f9d783 /sys/arch/amd64 | |
parent | a7942e7ec8d68c52b4e9833fffb6c7810fde7f15 (diff) |
Recommit the reverted sigacts change now that the NFS use-after-free
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@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index d18fd2ed792..31572680850 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.147 2011/07/04 15:54:24 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.148 2011/07/05 04:48:01 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -548,15 +548,15 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type, #endif bcopy(tf, &ksc, sizeof(*tf)); - ksc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; + ksc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK; ksc.sc_mask = mask; ksc.sc_fpstate = NULL; /* Allocate space for the signal handler context. */ - if ((psp->ps_flags & SAS_ALTSTACK) && !ksc.sc_onstack && + if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !ksc.sc_onstack && (psp->ps_sigonstack & sigmask(sig))) { - sp = (register_t)psp->ps_sigstk.ss_sp + psp->ps_sigstk.ss_size; - psp->ps_sigstk.ss_flags |= SS_ONSTACK; + sp = (register_t)p->p_sigstk.ss_sp + p->p_sigstk.ss_size; + p->p_sigstk.ss_flags |= SS_ONSTACK; } else sp = tf->tf_rsp - 128; @@ -665,9 +665,9 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval) /* Restore signal stack. */ if (ksc.sc_onstack) - p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK; + p->p_sigstk.ss_flags |= SS_ONSTACK; else - p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK; + p->p_sigstk.ss_flags &= ~SS_ONSTACK; p->p_sigmask = ksc.sc_mask & ~sigcantmask; /* |