config: replace stack protector config [1/1]
authorTao Zeng <tao.zeng@amlogic.com>
Mon, 28 Jan 2019 02:18:11 +0000 (10:18 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 29 Jan 2019 01:43:38 +0000 (17:43 -0800)
PD#SWPL-4617

Problem:
CONFIG_CC_STACKPROTECTOR_STRONG will increase stack size for some large
functions and may cause stack overflow problems or increase real stack
usage after we have enabled VMAP STACK config. But direct remove it
from defconfig will cause CTS fail.

Solution:
using CONFIG_CC_STACKPROTECTOR_STRONG_AMLOGIC for real stack protect
config

Verify:
p212

Change-Id: I1ccba2ef6ab5ea6f2987af2986e0cf222da1a7c7
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Makefile
arch/Kconfig
arch/arm/configs/meson64_a32_defconfig
arch/arm64/configs/meson64_defconfig

index 2858e74..cdea6ae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -756,7 +756,7 @@ ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
   stackp-flag := -fstack-protector
   stackp-name := REGULAR
 else
-ifdef CONFIG_CC_STACKPROTECTOR_STRONG
+ifdef CONFIG_CC_STACKPROTECTOR_STRONG_AMLOGIC
   stackp-flag := -fstack-protector-strong
   stackp-name := STRONG
 else
index 0847b5d..c734874 100644 (file)
@@ -448,6 +448,11 @@ config CC_STACKPROTECTOR_REGULAR
 
 config CC_STACKPROTECTOR_STRONG
        bool "Strong"
+       help
+         Since this config will increase stack size. We repleace it
+
+config CC_STACKPROTECTOR_STRONG_AMLOGIC
+       bool "Strong"
        select CC_STACKPROTECTOR
        help
          Functions will have the stack-protector canary logic added in any
index 57cf825..7b0a2aa 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_EMBEDDED=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_PROFILING=y
 CONFIG_JUMP_LABEL=y
+CONFIG_CC_STACKPROTECTOR_STRONG=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
index 7971d54..264c5e4 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_EMBEDDED=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_PROFILING=y
 CONFIG_JUMP_LABEL=y
+CONFIG_CC_STACKPROTECTOR_STRONG=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y