summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-07-31 21:15:06 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-07-31 21:15:06 +0000
commitf8e47afa1a0e4626de95fd0a432d87e71214696e (patch)
tree8b39f521902e6904aeb4c1e09f36501025acb137 /sys
parent7e6b1723eff79ba8ec057910aef9e6c6315424b8 (diff)
Ignore the PSL_VEC bit in the sigcontext and always copy the bit out from
the trap frame. The Altivec unit might have been stolen away from us while we were running the signal handler, so it is ok that the two don't agree. Fixes the X server mysteriously exiting (and seemingly freeze). ok miod@, drahn@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/macppc/machdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index c1f9904562c..185d983d2fd 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.119 2010/06/27 13:28:46 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.120 2010/07/31 21:15:05 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -637,6 +637,8 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval)
if ((error = copyin(SCARG(uap, sigcntxp), &sc, sizeof sc)))
return error;
tf = trapframe(p);
+ sc.sc_frame.srr1 &= ~PSL_VEC;
+ sc.sc_frame.srr1 |= (tf->srr1 & PSL_VEC);
if ((sc.sc_frame.srr1 & PSL_USERSTATIC) != (tf->srr1 & PSL_USERSTATIC))
return EINVAL;
bcopy(&sc.sc_frame, tf, sizeof *tf);