From: Alexander Popov Date: Sun, 1 Sep 2024 14:55:05 +0000 (+0300) Subject: Remove `if arch` for the CPU_MITIGATIONS check X-Git-Tag: v0.6.10~9 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=da4060175e672f8498d984d8a1cc8a73abcbaac5;p=kconfig-hardened-check.git Remove `if arch` for the CPU_MITIGATIONS check It exists on all the platforms now. --- diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 48f53ef..36862d2 100755 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -61,6 +61,8 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None: l += [OR(KconfigCheck('self_protection', 'defconfig', 'INIT_STACK_ALL_ZERO', 'y'), AND(KconfigCheck('self_protection', 'kspp', 'GCC_PLUGIN_STRUCTLEAK', 'y'), KconfigCheck('self_protection', 'kspp', 'GCC_PLUGIN_STRUCTLEAK_BYREF_ALL', 'y')))] + l += [OR(KconfigCheck('self_protection', 'defconfig', 'CPU_MITIGATIONS', 'y'), + KconfigCheck('self_protection', 'defconfig', 'SPECULATION_MITIGATIONS', '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') @@ -89,8 +91,6 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None: cpu_sup_intel_not_set)] l += [OR(KconfigCheck('self_protection', 'defconfig', 'X86_MCE_AMD', 'y'), cpu_sup_amd_not_set)] - l += [OR(KconfigCheck('self_protection', 'defconfig', 'CPU_MITIGATIONS', 'y'), - KconfigCheck('self_protection', 'defconfig', 'SPECULATION_MITIGATIONS', 'y'))] l += [OR(KconfigCheck('self_protection', 'defconfig', 'MITIGATION_RETPOLINE', 'y'), KconfigCheck('self_protection', 'defconfig', 'RETPOLINE', 'y'))] l += [OR(KconfigCheck('self_protection', 'defconfig', 'MITIGATION_RFDS', 'y'),