From: Alexander Popov Date: Tue, 10 Sep 2024 16:32:55 +0000 (+0300) Subject: Style fixes X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=refs%2Fpull%2F156%2Fhead;p=kconfig-hardened-check.git Style fixes --- diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 8ee35c9..9bd0d61 100755 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -278,8 +278,8 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None: # 'self_protection', 'a13xp0p0v' if arch == 'X86_64': - l += [AND(KconfigCheck('self_protection', 'a13xp0p0v', 'CFI_AUTO_DEFAULT', 'is not set'), # same as 'cfi=kcfi' - KconfigCheck('self_protection', 'a13xp0p0v', 'CFI_AUTO_DEFAULT', 'is present'))] + l += [AND(KconfigCheck('self_protection', 'a13xp0p0v', 'CFI_AUTO_DEFAULT', 'is not set'), + KconfigCheck('self_protection', 'a13xp0p0v', 'CFI_AUTO_DEFAULT', 'is present'))] # same as 'cfi=kcfi' if arch == 'ARM': l += [KconfigCheck('self_protection', 'a13xp0p0v', 'ARM_SMMU', 'y')] l += [KconfigCheck('self_protection', 'a13xp0p0v', 'ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT', 'y')] @@ -614,7 +614,7 @@ def add_cmdline_checks(l: List[ChecklistObjType], arch: str) -> None: CmdlineCheck('self_protection', 'kspp', 'mitigations', 'is not set'))] # same as 'auto' if arch == 'X86_64': l += [OR(CmdlineCheck('self_protection', 'kspp', 'cfi', 'kcfi'), - AND(KconfigCheck('self_protection', 'a13xp0p0v', 'CFI_AUTO_DEFAULT', 'is not set'), # same as 'cfi=kcfi' + AND(KconfigCheck('self_protection', 'a13xp0p0v', 'CFI_AUTO_DEFAULT', 'is not set'), KconfigCheck('self_protection', 'a13xp0p0v', 'CFI_AUTO_DEFAULT', 'is present'), CmdlineCheck('self_protection', 'kspp', 'cfi', 'is not set')))]