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/mips64 | |
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/mips64')
-rw-r--r-- | sys/arch/mips64/mips64/sendsig.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/mips64/mips64/sendsig.c b/sys/arch/mips64/mips64/sendsig.c index 222fbdff635..d0523c26276 100644 --- a/sys/arch/mips64/mips64/sendsig.c +++ b/sys/arch/mips64/mips64/sendsig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendsig.c,v 1.16 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: sendsig.c,v 1.17 2011/07/05 04:48:01 guenther Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -115,7 +115,7 @@ sendsig(catcher, sig, mask, code, type, val) struct sigcontext ksc; regs = p->p_md.md_regs; - oonstack = psp->ps_sigstk.ss_flags & SA_ONSTACK; + oonstack = p->p_sigstk.ss_flags & SA_ONSTACK; /* * Allocate and validate space for the signal handler * context. Note that if the stack is in data space, the @@ -126,12 +126,12 @@ sendsig(catcher, sig, mask, code, type, val) fsize = sizeof(struct sigframe); if (!(psp->ps_siginfo & sigmask(sig))) fsize -= sizeof(siginfo_t); - if ((psp->ps_flags & SAS_ALTSTACK) && - (psp->ps_sigstk.ss_flags & SA_ONSTACK) == 0 && + if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && + (p->p_sigstk.ss_flags & SA_ONSTACK) == 0 && (psp->ps_sigonstack & sigmask(sig))) { - fp = (struct sigframe *)(psp->ps_sigstk.ss_sp + - psp->ps_sigstk.ss_size - fsize); - psp->ps_sigstk.ss_flags |= SA_ONSTACK; + fp = (struct sigframe *)(p->p_sigstk.ss_sp + + p->p_sigstk.ss_size - fsize); + p->p_sigstk.ss_flags |= SA_ONSTACK; } else fp = (struct sigframe *)(regs->sp - fsize); if ((vaddr_t)fp <= USRSTACK - ptoa(p->p_vmspace->vm_ssize)) @@ -255,9 +255,9 @@ sys_sigreturn(p, v, retval) * Restore the user supplied information */ if (scp->sc_onstack & SA_ONSTACK) - p->p_sigacts->ps_sigstk.ss_flags |= SA_ONSTACK; + p->p_sigstk.ss_flags |= SA_ONSTACK; else - p->p_sigacts->ps_sigstk.ss_flags &= ~SA_ONSTACK; + p->p_sigstk.ss_flags &= ~SA_ONSTACK; p->p_sigmask = scp->sc_mask &~ sigcantmask; regs->pc = scp->sc_pc; regs->mullo = scp->mullo; |