config: replace stack protector config [1/1]

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>
This commit is contained in:
Tao Zeng
2019-01-28 10:18:11 +08:00
committed by Luke Go
parent 31ebe878c4
commit debe420278
3 changed files with 7 additions and 1 deletions

View File

@@ -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

View File

@@ -447,6 +447,11 @@ config CC_STACKPROTECTOR_REGULAR
by about 0.3%.
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

View 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