-# spectre_v2=on
-# pti=on
-# spec_store_bypass_disable=on
-# l1tf=full,force
-#
+# Mitigations of CPU vulnerabilities:
+# Аrch-independent:
+# mitigations=auto,nosmt
+# X86:
+# spectre_v2=on
+# pti=on
+# spec_store_bypass_disable=on
+# l1tf=full,force
+# mds=full,nosmt
+# ARM64:
+# ? CONFIG_HARDEN_BRANCH_PREDICTOR
+# kpti=on
+# ssbd=force-on
page_poisoning_is_set))
if debug_mode or arch == 'X86_32':
checklist.append(OptCheck('PAGE_TABLE_ISOLATION', 'y', 'my', 'self_protection'))
page_poisoning_is_set))
if debug_mode or arch == 'X86_32':
checklist.append(OptCheck('PAGE_TABLE_ISOLATION', 'y', 'my', 'self_protection'))
if debug_mode or arch == 'X86_64' or arch == 'ARM64' or arch == 'X86_32':
checklist.append(OptCheck('SECURITY', 'y', 'defconfig', 'security_policy'))
if debug_mode or arch == 'X86_64' or arch == 'ARM64' or arch == 'X86_32':
checklist.append(OptCheck('SECURITY', 'y', 'defconfig', 'security_policy'))
if debug_mode or arch == 'X86_32':
checklist.append(OptCheck('MODIFY_LDT_SYSCALL', 'is not set', 'my', 'cut_attack_surface'))
if debug_mode or arch == 'X86_32':
checklist.append(OptCheck('MODIFY_LDT_SYSCALL', 'is not set', 'my', 'cut_attack_surface'))
if debug_mode or arch == 'X86_64' or arch == 'ARM64':
checklist.append(OptCheck('ARCH_MMAP_RND_BITS', '32', 'my', 'userspace_protection'))
if debug_mode or arch == 'X86_32' or arch == 'ARM':
if debug_mode or arch == 'X86_64' or arch == 'ARM64':
checklist.append(OptCheck('ARCH_MMAP_RND_BITS', '32', 'my', 'userspace_protection'))
if debug_mode or arch == 'X86_32' or arch == 'ARM':
'option name', 'desired val', 'decision', 'reason'))
'option name', 'desired val', 'decision', 'reason'))
opt.name, opt.expected, opt.decision, opt.reason))
print()
def print_check_results():
opt.name, opt.expected, opt.decision, opt.reason))
print()
def print_check_results():
'option name', 'desired val', 'decision', 'reason', 'check result'))
'option name', 'desired val', 'decision', 'reason', 'check result'))
- if opt.result:
- print(' CONFIG_{:<32}|{:^13}|{:^10}|{:^20}||{:^28}'.format(
- opt.name, opt.expected, opt.decision, opt.reason, opt.result))
+ print('CONFIG_{:<33}|{:^13}|{:^10}|{:^20}||{:^28}'.format(
+ opt.name, opt.expected, opt.decision, opt.reason, opt.result))
- error_count = len(list(filter(lambda opt: opt.result and opt.result.startswith('FAIL'), checklist)))
+ error_count = len(list(filter(lambda opt: opt.result.startswith('FAIL'), checklist)))
+ ok_count = len(list(filter(lambda opt: opt.result.startswith('OK'), checklist)))