Add the nobti check
[kconfig-hardened-check.git] / kconfig_hardened_check / __init__.py
index 15bdcae7c74e033c1096833449a6e184468327dd..34ecb2546514695c51dc17eed564e292a127b355 100644 (file)
@@ -21,9 +21,6 @@
 #       ARM64:
 #           kpti=on
 #
-#    Should NOT be set:
-#           sysrq_always_enabled
-#           arm64.nobti
 #           arm64.nopauth
 #           arm64.nomte
 #
@@ -729,6 +726,7 @@ 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 += [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'),
@@ -810,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 = []