From: deraadt Date: Thu, 2 May 1996 13:41:14 +0000 (+0000) Subject: Turn off the alignment check flag when entering a signal handler X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=078f5c872279fd185cffc2adfded598cfa8a154f;p=openbsd Turn off the alignment check flag when entering a signal handler --- 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); }