From 005306ecf7c41c70fc7987e9ae93691089306d78 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 2 Oct 2022 20:52:47 +0300 Subject: [PATCH] Change the reason for the 'nokaslr' check KASLR is enabled by default. --- kconfig_hardened_check/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index e6d84ed..0a1015c 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -699,6 +699,7 @@ def add_cmdline_checks(l, arch): # 'self_protection', 'defconfig' l += [CmdlineCheck('self_protection', 'defconfig', 'nosmep', 'is not set')] l += [CmdlineCheck('self_protection', 'defconfig', 'nosmap', 'is not set')] + l += [CmdlineCheck('self_protection', 'defconfig', 'nokaslr', 'is not set')] l += [CmdlineCheck('self_protection', 'defconfig', 'nospectre_v1', 'is not set')] l += [CmdlineCheck('self_protection', 'defconfig', 'nospectre_v2', 'is not set')] if arch == 'ARM64': @@ -729,7 +730,6 @@ def add_cmdline_checks(l, arch): AND(KconfigCheck('self_protection', 'kspp', 'IOMMU_DEFAULT_PASSTHROUGH', 'is not set'), CmdlineCheck('self_protection', 'kspp', 'iommu.passthrough', 'is not set')))] # The cmdline checks compatible with the kconfig recommendations of the KSPP project... - l += [CmdlineCheck('self_protection', 'kspp', 'nokaslr', 'is not set')] l += [OR(CmdlineCheck('self_protection', 'kspp', 'hardened_usercopy', '1'), AND(KconfigCheck('self_protection', 'kspp', 'HARDENED_USERCOPY', 'y'), CmdlineCheck('self_protection', 'kspp', 'hardened_usercopy', 'is not set')))] -- 2.31.1