From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date: Fri, 27 Apr 2007 14:01:46 +0000 (+0200)
Subject: [S390] Improved kernel stack overflow checking.
X-Git-Tag: v2.6.22-rc1~1130^2~15
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=be7962856d299a0f231ac36f89f4a89cbecfe0ff;p=linux-2.6-omap-h63xx.git

[S390] Improved kernel stack overflow checking.

Recent cvs versions of gcc have support for an improved stack overflow
checking that calculates the size of the guard size for each function.
If the compiler accepts -mstack-size without -mstack-guard then the
new stack check is available. We always want to use the new stack
checker.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---

diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index b1e55849646..ece5adc0560 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -67,8 +67,10 @@ endif
 
 ifeq ($(call cc-option-yn,-mstack-size=8192 -mstack-guard=128),y)
 cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE)
+ifneq ($(call cc-option-yn,-mstack-size=8192),y)
 cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD)
 endif
+endif
 
 ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y)
 cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack