Skip to content

eBPF-based security platform

docs: clarify the kernel interfaces used by image mode

KP Singh2579ccb4707c
diff --git a/Documentation/architecture.rst b/Documentation/architecture.rst
index fa775e33..cb9db071 100644
--- a/Documentation/architecture.rst
+++ b/Documentation/architecture.rst
@@ -390,12 +390,16 @@ than mutable ``mm->exe_file``. ``PR_SET_MM`` cannot grant authority.
``bdev_setintegrity`` records metadata available through the existing
upstream hook. Device lookup checks the block-device pointer, device number
-and disk sequence. ``bdev_free_security`` attempts cleanup, but upstream
+and disk sequence. Runtime records require the authenticated bootstrap root.
+Config records require an authorized task and the expected root it staged
+for that mapping. ``bdev_free_security`` attempts cleanup, but upstream
can omit the notification.
-The existing ``file_ioctl`` and ``file_ioctl_compat`` hooks deny untrusted
+The ``file_ioctl`` hook denies untrusted
callers mutating device-mapper control operations, including through old or
inherited FDs. This restriction applies to all DM devices in image mode.
-Trusted image tasks retain control access. No kernel patches are included.
+Trusted image tasks retain control access. These checks use existing LSM
+hooks. Direct keyring access additionally requires the upstream
+``KEY_SPEC_DM_VERITY_KEYRING`` API described in the requirements.
The metadata hook does not expose all verity options; complete mount-tree
protection remains unestablished. ``mmap_file`` and
``file_mprotect`` prevent trusted tasks from introducing host or anonymous
diff --git a/Documentation/config-images.rst b/Documentation/config-images.rst
index 77be5295..16cca912 100644
--- a/Documentation/config-images.rst
+++ b/Documentation/config-images.rst
@@ -420,7 +420,9 @@ The free hook attempts to delete the device record,
but upstream dispatch can skip that notification. Device identity checks
and cleanup are distinct concerns.
-The existing ``file_ioctl`` and ``file_ioctl_compat`` hooks deny mutating
+Image mode requires a kernel without 32-bit compatibility support, as
+listed in the `kernel requirements <requirements.rst>`__.
+The ``file_ioctl`` hook denies mutating
DM-control commands from untrusted callers, including commands on old or
inherited FDs. The restriction covers all DM devices in image mode, so
ordinary untrusted volume-management tools cannot mutate unrelated DM
diff --git a/Documentation/requirements.rst b/Documentation/requirements.rst
index cbfbf7d3..4386ae6e 100644
--- a/Documentation/requirements.rst
+++ b/Documentation/requirements.rst
@@ -15,11 +15,12 @@ features fail at build or pre-flight time; there is no compatibility mode.
1) Target kernel
----------------
-The validated source baseline is upstream bpf-next commit
+The signed-loader ABI is present at upstream bpf-next commit
``0867b7bfa9de65674c6e599fa21b762b71011b14``, which reports a
-``7.3.0-rc5``-based release string in the validation build. No kernel patches
-are applied. A released-version minimum has not been established by this
-validation, so a release number alone is not an admission check.
+``7.3.0-rc5``-based release string in the initial validation build. Image mode
+also requires the upstream keyring-ID API described below. A released-version
+minimum has not been established by this validation, so a release number
+alone is not an admission check.
``shirudo init`` checks the running kernel's signed-loader support through
``signed_loader_kernel_abi`` and refuses an incompatible ABI. Such a load
@@ -116,6 +117,11 @@ accepts the signed-attributes form.
Image-mode requirements
~~~~~~~~~~~~~~~~~~~~~~~
+Image mode supports 64-bit userspace only. Disable 32-bit compatibility
+(``CONFIG_COMPAT=n``); on x86-64, disable ``CONFIG_IA32_EMULATION`` and
+``CONFIG_X86_X32_ABI``. Device-mapper restrictions use the native
+``file_ioctl`` hook and do not cover compat ioctls.
+
The opt-in dm-verity mode additionally requires ``CONFIG_BLK_DEV_DM``,
``CONFIG_DM_VERITY``, ``CONFIG_BLK_DEV_LOOP`` and ``CONFIG_EXT4_FS``. Runtime
and config mappings use verity format 1, SHA-256, 4096-byte blocks and a
diff --git a/Documentation/threat-model.rst b/Documentation/threat-model.rst
index e7028484..60e4a74e 100644
--- a/Documentation/threat-model.rst
+++ b/Documentation/threat-model.rst
@@ -322,10 +322,15 @@ T11 Image-mode config and executable substitution
alone does not authenticate backing bytes: corruption or incomplete reads
refuse preparation. The target neither reconstructs the hash tree nor
invokes ``veritysetup``. Shirudo observes the mapping
- metadata exposed by existing upstream hooks. Existing ioctl hooks restrict DM-control mutations to trusted
+ metadata exposed by existing upstream hooks. The native ioctl hook restricts DM-control mutations to trusted
image tasks, including through old or inherited FDs; this restriction
- applies to unrelated DM devices too. No kernel patches are included,
- and the mount hooks do not cover every mount attribute change or
+ applies to unrelated DM devices too. Config device classification also
+ requires the root expected by the trusted task creating that mapping.
+ Image mode requires 32-bit compatibility disabled in the kernel; its
+ device-mapper checks cover native ioctls only.
+ Enforcement uses existing LSM hooks; direct access to the dm-verity
+ keyring requires the upstream keyring-ID API. The mount hooks do not
+ cover every mount attribute change or
unmount of a parent mount above the image mounts. A
candidate config cannot supply bootstrap keys or TPM settings, and config symlinks and special
files are refused. Repository certificate paths resolve inside the held