Add SHADOW_CALL_STACK for ARM64
[kconfig-hardened-check.git] / kconfig_hardened_check / __init__.py
index eb256de8b2e95b47ede1045bbbab2535d7886f2b..fe06bc951136aa8baa1d836631a9558faf27d0a2 100644 (file)
@@ -404,6 +404,8 @@ def construct_checklist(l, arch):
     if arch == 'X86_64':
         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')]
 
     # 'security_policy'
     if arch in ('X86_64', 'ARM64', 'X86_32'):
@@ -509,6 +511,7 @@ def construct_checklist(l, arch):
     l += [OptCheck('cut_attack_surface', 'lockdown', 'MMIOTRACE_TEST', 'is not set')] # refers to LOCKDOWN
 
     # 'cut_attack_surface', 'my'
+    l += [OptCheck('cut_attack_surface', 'my', 'TRIM_UNUSED_KSYMS', 'y')]
     l += [OptCheck('cut_attack_surface', 'my', 'MMIOTRACE', 'is not set')] # refers to LOCKDOWN (permissive)
     l += [OptCheck('cut_attack_surface', 'my', 'LIVEPATCH', 'is not set')]
     l += [OptCheck('cut_attack_surface', 'my', 'IP_DCCP', 'is not set')]