From: Alexander Popov Date: Sun, 11 Aug 2024 14:36:49 +0000 (+0300) Subject: Improve the CONFIG_GCC_PLUGIN_STRUCTLEAK check X-Git-Tag: v0.6.10~22 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=763e57a48b82d67c6d3a51389d148a1fe7ac1387;p=kconfig-hardened-check.git Improve the CONFIG_GCC_PLUGIN_STRUCTLEAK check --- diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 378a7d7..a6c6bb9 100755 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -59,7 +59,8 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None: # REFCOUNT_FULL is enabled by default since v5.5, # and this is backported to v5.4.208 l += [OR(KconfigCheck('self_protection', 'defconfig', 'INIT_STACK_ALL_ZERO', 'y'), - KconfigCheck('self_protection', 'kspp', 'GCC_PLUGIN_STRUCTLEAK_BYREF_ALL', 'y'))] + AND(KconfigCheck('self_protection', 'kspp', 'GCC_PLUGIN_STRUCTLEAK', 'y'), + KconfigCheck('self_protection', 'kspp', 'GCC_PLUGIN_STRUCTLEAK_BYREF_ALL', 'y')))] if arch in ('X86_64', 'ARM64', 'X86_32'): l += [KconfigCheck('self_protection', 'defconfig', 'RANDOMIZE_BASE', 'y')] vmap_stack_is_set = KconfigCheck('self_protection', 'defconfig', 'VMAP_STACK', 'y')