diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-05-11 20:19:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-05-11 20:19:02 +0000 |
commit | 803ffe1a237e2c586ebcb2c082bca5d973fc478c (patch) | |
tree | ea0f9c5f4596c5010c64a897854d023c1cc841bd /sys/arch | |
parent | 65a04800bd62e8607fce1687e1d852f87f686860 (diff) |
fix sigcookie value, address was off due to trapframe nesting
notice by miod
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/socppc/socppc/machdep.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 7ed9fa69054..94f74873124 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.174 2016/05/10 18:39:46 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.175 2016/05/11 20:19:00 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -481,11 +481,10 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type, frame.sf_sip = &fp->sf_si; initsiginfo(&frame.sf_si, sig, code, type, val); } - frame.sf_sc.sc_cookie = (long)fp ^ p->p_p->ps_sigcookie; + frame.sf_sc.sc_cookie = (long)&fp->sf_sc ^ p->p_p->ps_sigcookie; if (copyout(&frame, fp, sizeof frame) != 0) sigexit(p, SIGILL); - tf->fixreg[1] = (int)fp; tf->lr = (int)catcher; tf->fixreg[3] = (int)sig; diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c index 38dad7dc79a..7e138ae83cb 100644 --- a/sys/arch/socppc/socppc/machdep.c +++ b/sys/arch/socppc/socppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.66 2016/05/10 18:39:48 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.67 2016/05/11 20:19:01 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -508,11 +508,10 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type, frame.sf_sip = &fp->sf_si; initsiginfo(&frame.sf_si, sig, code, type, val); } - frame.sf_sc.sc_cookie = (long)fp ^ p->p_p->ps_sigcookie; + frame.sf_sc.sc_cookie = (long)&fp->sf_sc ^ p->p_p->ps_sigcookie; if (copyout(&frame, fp, sizeof frame) != 0) sigexit(p, SIGILL); - tf->fixreg[1] = (int)fp; tf->lr = (int)catcher; tf->fixreg[3] = (int)sig; |