From: "Mario Limonciello (AMD)" <superm1@kernel.org>
To: "Joerg Roedel (AMD)" <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Nicolas Bouchinet <nicolas.bouchinet@oss.cyber.gouv.fr>,
Xiu Jianfeng <xiujianfeng@huawei.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
"Mario Limonciello (AMD)" <superm1@kernel.org>
Subject: [PATCH 0/2] lockdown: Prevent booting with lockdown enabled but IOMMU disabled
Date: Mon, 02 Nov 2026 08:00:24 -0600 [thread overview]
Message-ID: <20261102-lockdown-iommu-v1-0-00f3c2be4c9f@kernel.org> (raw)
Lockdown is a kernel LSM that restricts access to sensitive kernel
resources (e.g. /dev/mem, kernel modules, perf, tracing, kprobes,
BPF access to kernel memory). However, without IOMMU, any PCI/PCIe
device can perform DMA to arbitrary physical memory, effectively
bypassing all lockdown protections.
A malicious or compromised device can:
- Read kernel memory directly (encryption keys, credentials, secrets)
- Write to kernel memory directly (code patches, rootkits, backdoors)
- Circumvent all lockdown LSM checks (which run inside the kernel)
This series adds a two-phase check to prevent booting with lockdown
enabled and IOMMU disabled:
1. Early check (in lockdown_lsm_init()): On x86, check the no_iommu
flag, which is set early by the "iommu=off" kernel cmdline option.
If lockdown is active and no_iommu is set, panic with a clear error.
2. Late check (late_initcall): On all architectures, check
iommu_is_available() which returns true if any IOMMU driver
registered successfully. This catches cases where:
- IOMMU hardware is absent on the platform
- IOMMU was disabled by driver initialization failure
- IOMMU was not detected (broken firmware, missing ACPI tables)
This follows the precedent set by s390 UV code which panics when
security cannot be guaranteed ("System security cannot be guaranteed
unless the system panics now").
This also adds a generic iommu_is_available() API in the IOMMU
subsystem, which is used by the lockdown check. Any IOMMU driver
that successfully registers will automatically call
iommu_set_available() from iommu_device_register().
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
Mario Limonciello (AMD) (2):
iommu: Add iommu_is_available() API
security: lockdown: Prevent boot with lockdown but no IOMMU
drivers/iommu/iommu.c | 48 ++++++++++++++++++++++++++++++++
include/linux/iommu.h | 14 ++++++++++
security/lockdown/lockdown.c | 65 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 127 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261014-lockdown-iommu-08c763d9f91dd
Best regards,
--
Mario Limonciello <superm1@kernel.org>
next reply other threads:[~2026-11-02 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 14:00 Mario Limonciello (AMD) [this message]
2026-11-02 14:00 ` [PATCH 1/2] iommu: Add iommu_is_available() API Mario Limonciello (AMD)
2026-11-02 14:11 ` sashiko-bot
2026-11-02 14:00 ` [PATCH 2/2] security: lockdown: Prevent boot with lockdown but no IOMMU Mario Limonciello (AMD)
2026-11-02 14:28 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102-lockdown-iommu-v1-0-00f3c2be4c9f@kernel.org \
--to=superm1@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=jmorris@namei.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=nicolas.bouchinet@oss.cyber.gouv.fr \
--cc=paul@paul-moore.com \
--cc=robin.murphy@arm.com \
--cc=serge@hallyn.com \
--cc=will@kernel.org \
--cc=xiujianfeng@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox