X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2F__init__.py;h=b8bfa1568b8f625d7a94e90e765556e996a0cb02;hb=29de5cc2de013ade52bb7589669672c7b0e2358d;hp=3d058dca0771531c8538d3e6e0f28f9149c3349b;hpb=ff5a84ba9be83ce98f8b6431d5fa44d57a7789cf;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 3d058dc..b8bfa15 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -322,7 +322,10 @@ def construct_checklist(l, arch): if arch == 'ARM': l += [OptCheck('self_protection', 'defconfig', 'CPU_SW_DOMAIN_PAN', 'y')] l += [OptCheck('self_protection', 'defconfig', 'STACKPROTECTOR_PER_TASK', 'y')] - if arch in ('ARM64', 'ARM'): + if arch == 'ARM64': + l += [OR(OptCheck('self_protection', 'defconfig', 'HARDEN_BRANCH_PREDICTOR', 'y'), + VerCheck((5, 10)))] # HARDEN_BRANCH_PREDICTOR is enabled by default since v5.10 + if arch == 'ARM': l += [OptCheck('self_protection', 'defconfig', 'HARDEN_BRANCH_PREDICTOR', 'y')] # 'self_protection', 'kspp' @@ -406,7 +409,7 @@ def construct_checklist(l, arch): l += [AND(OptCheck('self_protection', 'my', 'AMD_IOMMU_V2', 'y'), iommu_support_is_set)] if arch == 'ARM64': - l += [OptCheck('self_protection', 'my', 'SHADOW_CALL_STACK', 'y')] + l += [OptCheck('self_protection', 'my', 'SHADOW_CALL_STACK', 'y')] # maybe it should be alternative to STACKPROTECTOR_STRONG # 'security_policy' if arch in ('X86_64', 'ARM64', 'X86_32'): @@ -526,6 +529,8 @@ def construct_checklist(l, arch): l += [OptCheck('userspace_hardening', 'defconfig', 'INTEGRITY', 'y')] if arch == 'ARM': l += [OptCheck('userspace_hardening', 'my', 'INTEGRITY', 'y')] + if arch == 'ARM64': + l += [OptCheck('userspace_hardening', 'defconfig', 'ARM64_MTE', 'y')] if arch in ('ARM', 'X86_32'): l += [OptCheck('userspace_hardening', 'defconfig', 'VMSPLIT_3G', 'y')] if arch in ('X86_64', 'ARM64'):