Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/conf for multi-cpu machines, cpu_hatch() straddles the i...



details:   https://anonhg.NetBSD.org/src/rev/362d06207c66
branches:  trunk
changeset: 769121:362d06207c66
user:      plunky <plunky%NetBSD.org@localhost>
date:      Wed Aug 31 20:16:43 2011 +0000

description:
for multi-cpu machines, cpu_hatch() straddles the init of
__stack_chk_guard, so ensure stack protection is disabled
on x86 architectures (I don't know about other archs)

diffstat:

 sys/conf/Makefile.kern.inc |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r cc7a7588cb52 -r 362d06207c66 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Wed Aug 31 20:13:31 2011 +0000
+++ b/sys/conf/Makefile.kern.inc        Wed Aug 31 20:16:43 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.147 2011/08/28 23:15:53 jmcneill Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.148 2011/08/31 20:16:43 plunky Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -96,6 +96,12 @@
 COPTS.kern_ssp.c+=     -fno-stack-protector -D__SSP__
 .endif
 
+# for multi-cpu machines, cpu_hatch() straddles the init of
+# __stack_chk_guard, so ensure stack protection is disabled
+.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64"
+COPTS.cpu.c+=          -fno-stack-protector
+.endif
+
 # If we want the bpendtsleep: label in kern_synch.c, we need to use
 # -fno-reorder-blocks.  Don't make this a config(1) defflag without
 # making sure this fragment remains valid.



Home | Main Index | Thread Index | Old Index