[OpenWrt-Devel] [PATCH] kernel: Fix KERNEL_STACKPROTECTOR on kernel 4.19
Hauke Mehrtens
hauke at hauke-m.de
Fri Dec 21 10:38:09 EST 2018
The configuration option was renamed with kernel 4.19 from
CONFIG_CC_STACKPROTECTOR to CONFIG_STACKPROTECTOR adapt the code to set
both options.
CONFIG_STACKPROTECTOR now sets the regular stack protector and
CONFIG_STACKPROTECTOR_STRONG activates the additional protection of more
functions.
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
config/Config-build.in | 8 ++++++++
target/linux/generic/config-4.19 | 6 ++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/config/Config-build.in b/config/Config-build.in
index a082a5e0e2..8cbc16b5c8 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -234,6 +234,14 @@ menu "Global build settings"
bool "Strong"
endchoice
+ config KERNEL_STACKPROTECTOR
+ bool
+ default KERNEL_CC_STACKPROTECTOR_REGULAR || KERNEL_CC_STACKPROTECTOR_STRONG
+
+ config KERNEL_STACKPROTECTOR_STRONG
+ bool
+ default KERNEL_CC_STACKPROTECTOR_STRONG
+
choice
prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
default PKG_FORTIFY_SOURCE_1
diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19
index dc3d80b57f..0fc5ce6621 100644
--- a/target/linux/generic/config-4.19
+++ b/target/linux/generic/config-4.19
@@ -745,10 +745,6 @@ CONFIG_CARDBUS=y
# CONFIG_CCS811 is not set
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_CC_STACKPROTECTOR is not set
-CONFIG_CC_STACKPROTECTOR_NONE=y
-# CONFIG_CC_STACKPROTECTOR_REGULAR is not set
-# CONFIG_CC_STACKPROTECTOR_STRONG is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CEPH_LIB is not set
@@ -1650,6 +1646,7 @@ CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_NMI=y
+CONFIG_HAVE_STACKPROTECTOR=y
# CONFIG_HCALL_STATS is not set
# CONFIG_HDC100X is not set
# CONFIG_HDLC is not set
@@ -4942,6 +4939,7 @@ CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB_SILENT is not set
# CONFIG_SSFDC is not set
# CONFIG_STACKPROTECTOR is not set
+# CONFIG_STACKPROTECTOR_STRONG is not set
# CONFIG_STACKTRACE is not set
CONFIG_STACKTRACE_SUPPORT=y
# CONFIG_STACK_TRACER is not set
--
2.19.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list