summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-10-09 13:52:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-10-13 11:17:11 +0200
commitc5666e188f447277d03b6bdb3562155303671585 (patch)
treea7757577382c3e7a4eff43a3defcbca41b92527c /lib
parent081b65cc42a7a2c8054ef1dfc1f633917251f99c (diff)
downloadbarebox-c5666e188f447277d03b6bdb3562155303671585.tar.gz
barebox-c5666e188f447277d03b6bdb3562155303671585.tar.xz
lib: stackprot: hide symbols when not applicable
Asking all users about the stacksmash command that's just there to test stack guard and protector is unnecessary noise. Likewise asking about PBL stackprotector, when we don't have any. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20231009115239.2291016-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.hardening5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Kconfig.hardening b/lib/Kconfig.hardening
index a9d3af1109..f14b256a7d 100644
--- a/lib/Kconfig.hardening
+++ b/lib/Kconfig.hardening
@@ -61,7 +61,7 @@ config STACKPROTECTOR_ALL
endchoice
choice
- prompt "Stack Protector buffer overflow detection for PBL"
+ prompt "Stack Protector buffer overflow detection for PBL" if PBL_IMAGE
config PBL_STACKPROTECTOR_NONE
bool "None"
@@ -69,6 +69,7 @@ config PBL_STACKPROTECTOR_NONE
config PBL_STACKPROTECTOR_STRONG
bool "Strong"
depends on $(cc-option,-fstack-protector-strong)
+ depends on PBL_IMAGE
select STACKPROTECTOR
help
For PBL, This option turns on the "stack-protector" GCC feature. This
@@ -93,7 +94,7 @@ config PBL_STACKPROTECTOR_STRONG
config PBL_STACKPROTECTOR_ALL
bool "PBL"
depends on $(cc-option,-fstack-protector-strong)
- depends on COMPILE_TEST
+ depends on PBL_IMAGE && COMPILE_TEST
select STACKPROTECTOR
help
This pushes and verifies stack protector canaries on all functions,