From 763e57a48b82d67c6d3a51389d148a1fe7ac1387 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 11 Aug 2024 17:36:49 +0300 Subject: [PATCH] Improve the CONFIG_GCC_PLUGIN_STRUCTLEAK check --- kernel_hardening_checker/checks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') -- 2.31.1