X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2F__init__.py;h=f2170a5a2ae3c32163c47266ef1daa0b8c48d53c;hb=6f7e9c10f051e9b7120891403026cb927864cac0;hp=48476a439a2b599bd5224f020b0147c04c94040e;hpb=4ae357ed9b4a2f3afae75daea3433258e4157068;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 48476a4..f2170a5 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -20,12 +20,7 @@ # tsx=off # ARM64: # kpti=on -# ssbd=force-on # -# Should NOT be set: -# sysrq_always_enabled -# arm64.nobti -# arm64.nopauth # arm64.nomte # # Hardware tag-based KASAN with arm64 Memory Tagging Extension (MTE): @@ -730,6 +725,8 @@ def add_cmdline_checks(l, arch): l += [CmdlineCheck('self_protection', 'defconfig', 'nospectre_v1', 'is not set')] l += [CmdlineCheck('self_protection', 'defconfig', 'nospectre_v2', 'is not set')] l += [CmdlineCheck('self_protection', 'defconfig', 'nospec_store_bypass_disable', 'is not set')] + l += [CmdlineCheck('self_protection', 'defconfig', 'arm64.nobti', 'is not set')] + l += [CmdlineCheck('self_protection', 'defconfig', 'arm64.nopauth', 'is not set')] l += [OR(CmdlineCheck('self_protection', 'defconfig', 'mitigations', 'is not off'), CmdlineCheck('self_protection', 'defconfig', 'mitigations', 'is not set'))] l += [OR(CmdlineCheck('self_protection', 'defconfig', 'spectre_v2', 'is not off'), @@ -751,6 +748,9 @@ def add_cmdline_checks(l, arch): l += [OR(CmdlineCheck('self_protection', 'defconfig', 'retbleed', 'is not off'), CmdlineCheck('self_protection', 'defconfig', 'retbleed', 'is not set'))] if arch == 'ARM64': + l += [OR(CmdlineCheck('self_protection', 'defconfig', 'ssbd', 'kernel'), + CmdlineCheck('self_protection', 'my', 'ssbd', 'force-on'), + CmdlineCheck('self_protection', 'defconfig', 'ssbd', 'is not set'))] l += [OR(CmdlineCheck('self_protection', 'defconfig', 'rodata', 'full'), AND(KconfigCheck('self_protection', 'defconfig', 'RODATA_FULL_DEFAULT_ENABLED', 'y'), CmdlineCheck('self_protection', 'defconfig', 'rodata', 'is not set')))] @@ -808,6 +808,8 @@ def add_cmdline_checks(l, arch): l += [OR(CmdlineCheck('cut_attack_surface', 'grsec', 'debugfs', 'off'), KconfigCheck('cut_attack_surface', 'grsec', 'DEBUG_FS', 'is not set'))] # ... the end + # 'cut_attack_surface', 'my' + l += [CmdlineCheck('cut_attack_surface', 'my', 'sysrq_always_enabled', 'is not set')] def print_unknown_options(checklist, parsed_options): known_options = []