From 4e0065c8baf8d40c733f7f4c5c920c07b93c55b6 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 22 Jan 2023 00:58:41 +0300 Subject: [PATCH] Add the check for the iommu cmdline option Refers to #76 --- kconfig_hardened_check/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index fae4524..d3fc58d 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -10,9 +10,6 @@ # Please don't cry if my Python code looks like C. # # -# N.B Missing hardening command line parameters: -# iommu=force (does it help against DMA attacks?) -# # Hardware tag-based KASAN with arm64 Memory Tagging Extension (MTE): # kasan=on # kasan.stacktrace=off @@ -796,6 +793,8 @@ def add_cmdline_checks(l, arch): # 'self_protection', 'clipos' l += [CmdlineCheck('self_protection', 'clipos', 'page_alloc.shuffle', '1')] + if arch in ('X86_64', 'X86_32'): + l += [CmdlineCheck('self_protection', 'clipos', 'iommu', 'force')] # 'cut_attack_surface', 'defconfig' if arch in ('X86_64', 'X86_32'): -- 2.31.1