summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-02 13:41:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-02 13:41:21 +0000
commit1fb69c91ee72b66a796ae557f722728248e1d421 (patch)
tree8df6f9cfeb1099f8c76b810bb2bfc56e67307c1e /sys/arch
parentb4b86e253c281667cdc2578d85a9fef3acf1385b (diff)
Turn off the alignment check flag when entering a signal handler
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/freebsd_machdep.c6
-rw-r--r--sys/arch/i386/i386/linux_machdep.c6
-rw-r--r--sys/arch/i386/i386/machdep.c11
-rw-r--r--sys/arch/i386/i386/svr4_machdep.c6
4 files changed, 14 insertions, 15 deletions
diff --git a/sys/arch/i386/i386/freebsd_machdep.c b/sys/arch/i386/i386/freebsd_machdep.c
index 8ef49795fa9..565990173b5 100644
--- a/sys/arch/i386/i386/freebsd_machdep.c
+++ b/sys/arch/i386/i386/freebsd_machdep.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: freebsd_machdep.c,v 1.4 1996/04/21 22:16:26 deraadt Exp $ */
-/* $NetBSD: freebsd_machdep.c,v 1.8 1996/04/12 08:44:35 mycroft Exp $ */
+/* $OpenBSD: freebsd_machdep.c,v 1.5 1996/05/02 13:41:14 deraadt Exp $ */
+/* $NetBSD: freebsd_machdep.c,v 1.9 1996/04/18 08:36:20 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996 Charles M. Hannum. All rights reserved.
@@ -160,7 +160,7 @@ freebsd_sendsig(catcher, sig, mask, code)
tf->tf_eip = (int)(((char *)PS_STRINGS) -
(freebsd_esigcode - freebsd_sigcode));
tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
- tf->tf_eflags &= ~(PSL_T|PSL_VM);
+ tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
tf->tf_esp = (int)fp;
tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
}
diff --git a/sys/arch/i386/i386/linux_machdep.c b/sys/arch/i386/i386/linux_machdep.c
index 67d22c8a819..af6bd27e0f5 100644
--- a/sys/arch/i386/i386/linux_machdep.c
+++ b/sys/arch/i386/i386/linux_machdep.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: linux_machdep.c,v 1.6 1996/04/21 22:16:28 deraadt Exp $ */
-/* $NetBSD: linux_machdep.c,v 1.27 1996/04/12 08:44:37 mycroft Exp $ */
+/* $OpenBSD: linux_machdep.c,v 1.7 1996/05/02 13:41:16 deraadt Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.28 1996/04/18 08:36:22 mycroft Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
@@ -176,7 +176,7 @@ linux_sendsig(catcher, sig, mask, code)
tf->tf_eip = (int)(((char *)PS_STRINGS) -
(linux_esigcode - linux_sigcode));
tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
- tf->tf_eflags &= ~(PSL_T|PSL_VM);
+ tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
tf->tf_esp = (int)fp;
tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
}
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 27438f0608e..bf9bc18274d 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: machdep.c,v 1.14 1996/04/29 14:13:15 hvozda Exp $ */
-/* $NetBSD: machdep.c,v 1.197 1996/04/12 08:44:40 mycroft Exp $ */
+/* $OpenBSD: machdep.c,v 1.15 1996/05/02 13:41:18 deraadt Exp $ */
+/* $NetBSD: machdep.c,v 1.199 1996/04/18 09:58:13 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996 Charles M. Hannum. All rights reserved.
@@ -459,11 +459,10 @@ identifycpu()
#if defined(I486_CPU) || defined(I586_CPU)
/*
- * On a 486 or above, enable ring 0 write protection and outer ring
- * alignment checking.
+ * On a 486 or above, enable ring 0 write protection.
*/
if (cpu_class >= CPUCLASS_486)
- lcr0(rcr0() | CR0_WP | CR0_AM);
+ lcr0(rcr0() | CR0_WP);
#endif
}
@@ -613,7 +612,7 @@ sendsig(catcher, sig, mask, code)
tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
tf->tf_eip = (int)(((char *)PS_STRINGS) - (esigcode - sigcode));
tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
- tf->tf_eflags &= ~(PSL_T|PSL_VM);
+ tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
tf->tf_esp = (int)fp;
tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
}
diff --git a/sys/arch/i386/i386/svr4_machdep.c b/sys/arch/i386/i386/svr4_machdep.c
index 479bf8d0fd1..86611d50679 100644
--- a/sys/arch/i386/i386/svr4_machdep.c
+++ b/sys/arch/i386/i386/svr4_machdep.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: svr4_machdep.c,v 1.4 1996/04/21 22:16:38 deraadt Exp $ */
-/* $NetBSD: svr4_machdep.c,v 1.22 1996/04/12 08:44:42 mycroft Exp $ */
+/* $OpenBSD: svr4_machdep.c,v 1.5 1996/05/02 13:41:20 deraadt Exp $ */
+/* $NetBSD: svr4_machdep.c,v 1.23 1996/04/18 08:36:31 mycroft Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -380,7 +380,7 @@ svr4_sendsig(catcher, sig, mask, code)
tf->tf_eip = (int)(((char *)PS_STRINGS) -
(svr4_esigcode - svr4_sigcode));
tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
- tf->tf_eflags &= ~(PSL_T|PSL_VM);
+ tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
tf->tf_esp = (int)fp;
tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
}