From 61bfef8931bcefc1abb6d3d46e169c8372ce729b Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Fri, 22 Apr 2022 13:13:05 +0300 Subject: [PATCH] Add the STACKPROTECTOR check from KSPP Thanks to @izh1979 for the idea. --- kconfig_hardened_check/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 493d177..a40d8f2 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -326,6 +326,8 @@ def add_kconfig_checks(l, arch): l += [KconfigCheck('self_protection', 'defconfig', 'BUG', 'y')] l += [KconfigCheck('self_protection', 'defconfig', 'SLUB_DEBUG', 'y')] l += [KconfigCheck('self_protection', 'defconfig', 'GCC_PLUGINS', 'y')] + l += [OR(KconfigCheck('self_protection', 'defconfig', 'STACKPROTECTOR', 'y'), + KconfigCheck('self_protection', 'defconfig', 'CC_STACKPROTECTOR', 'y'))] l += [OR(KconfigCheck('self_protection', 'defconfig', 'STACKPROTECTOR_STRONG', 'y'), KconfigCheck('self_protection', 'defconfig', 'CC_STACKPROTECTOR_STRONG', 'y'))] l += [OR(KconfigCheck('self_protection', 'defconfig', 'STRICT_KERNEL_RWX', 'y'), -- 2.31.1