Check the nosmap and nosmep cmdline parameters
[kconfig-hardened-check.git] / kconfig_hardened_check / __init__.py
index 41d6520fc4a0594a8d531d291956c63b0343635b..e62fad6890ca0484dfd93d24d33f782b953b1993 100644 (file)
@@ -719,6 +719,10 @@ def add_cmdline_checks(l, arch):
     # 'self_protection', 'clipos'
     l += [CmdlineCheck('self_protection', 'clipos', 'page_alloc.shuffle', '1')]
 
+    # 'self_protection', 'my'
+    l += [CmdlineCheck('self_protection', 'my', 'nosmep', 'is not set')]
+    l += [CmdlineCheck('self_protection', 'my', 'nosmap', 'is not set')]
+
     # 'cut_attack_surface', 'kspp'
     if arch == 'X86_64':
         l += [OR(CmdlineCheck('cut_attack_surface', 'kspp', 'vsyscall', 'none'),