From: Alexander Popov Date: Sun, 2 Oct 2022 17:52:47 +0000 (+0300) Subject: Change the reason for the 'nokaslr' check X-Git-Tag: v0.6.1~84 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=005306ecf7c41c70fc7987e9ae93691089306d78;p=kconfig-hardened-check.git Change the reason for the 'nokaslr' check KASLR is enabled by default. --- 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')))]