From 8c0b69201209503038da89238b4ad8b51aab126f Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sat, 13 Aug 2022 22:58:05 +0300 Subject: [PATCH] Check hardened_usercopy in the cmdline --- kconfig_hardened_check/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index cb8d54b..c8d0334 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -673,6 +673,9 @@ def add_cmdline_checks(l, arch): l += [OR(CmdlineCheck('self_protection', 'kspp', 'iommu.passthrough', '0'), AND(KconfigCheck('self_protection', 'kspp', 'IOMMU_DEFAULT_PASSTHROUGH', 'is not set'), CmdlineCheck('self_protection', 'kspp', 'iommu.passthrough', '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')))] l += [OR(CmdlineCheck('self_protection', 'kspp', 'slab_common.usercopy_fallback', '0'), AND(KconfigCheck('self_protection', 'kspp', 'HARDENED_USERCOPY_FALLBACK', 'is not set'), CmdlineCheck('self_protection', 'kspp', 'slab_common.usercopy_fallback', 'is not set')))] -- 2.31.1