Skip to content

configs: drop IMA and EVM from every EVE flavour - #332

Merged
rucoder merged 1 commit into
lf-edge:eve-kernel-amd64-v6.18.55-genericfrom
rucoder:mikem/no-ima-6.18.55
Nov 9, 2026
Merged

rucoder merged 1 commit into
lf-edge:eve-kernel-amd64-v6.18.55-genericfrom
rucoder:mikem/no-ima-6.18.55

Conversation

@rucoder

@rucoder rucoder commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR removes IMA (Integrity Measurement Architecture) and its companion EVM (Extended Verification Module) from every kernel flavour: core, rt, hwe and ai.

  • core and rt already build without them.
  • hwe and ai inherited CONFIG_IMA=y and CONFIG_EVM=y from the Ubuntu HWE derivation in eve-hwe_defconfig.

Why

EVE does not use IMA. It loads no IMA policy, puts no ima_* parameter on the kernel command line, and nothing in the rootfs reads the measurement list.

IMA is not idle in hwe and ai, though. On a Secure Boot host, IMA_ARCH_POLICY installs arch rules (security/integrity/ima/ima_efi.c) that:

  • measure every module and kexec kernel load into PCR 10;
  • turn on kexec signature enforcement through set_kexec_sig_enforced().

EVM only produces a verdict on a file's security xattrs for IMA appraisal to consume. It also needs an evm-key that EVE never loads, so without IMA it protects nothing.

How

  • eve-hwe_defconfig is regenerated with savedefconfig with IMA and EVM disabled, as in 92df24b ("configs: drop CONFIG_XEN from the EVE defconfigs").
    • TCG_TPM, TCG_TIS, TCG_CRB, ENCRYPTED_KEYS and CRYPTO_SHA1 were =y only because IMA and EVM selected them, so savedefconfig had left them out.
    • They stay =y and are now listed explicitly. Deleting the IMA lines by hand would have turned off built-in TPM support.
  • common.fragment pins # CONFIG_IMA is not set and # CONFIG_EVM is not set, so a future re-derivation from Ubuntu cannot bring them back on any flavour.

Validation

All of this is config resolution only, with no kernel compile; CI builds every flavour.

  • Host kconfig reproduces the current eve-hwe_defconfig and eve-core_defconfig byte for byte, so the regenerated defconfig has no toolchain noise.
  • Each flavour's .config was resolved the way Dockerfile.gcc does it: base defconfig, then each fragment through merge_config.sh, then olddefconfig. Diffs of before against after with scripts/diffconfig:
    • core and rt: identical (rt was resolved without the RT patch, which does not touch IMA);
    • hwe (and so ai, which has the same config inputs): only IMA_* and EVM_* symbols change. TPM, keys and crypto keep their values.
  • eve/check-config.py passes for all four flavours, with the same results as before this change. Its unit tests also pass (43 passed).
  • checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.

Backport

None.

EVE does not use the Integrity Measurement Architecture: it loads no IMA
policy, puts no ima_* parameter on the kernel command line, and nothing
in the rootfs reads the measurement list. core and rt never enabled it;
hwe and ai inherited CONFIG_IMA=y from the Ubuntu HWE derivation.

IMA is not idle there either. On a Secure Boot host IMA_ARCH_POLICY
installs arch rules that measure every module and kexec kernel load
into PCR 10, and turns on kexec signature enforcement through
set_kexec_sig_enforced().

EVM goes with it. Its verdict on a file's security xattrs is consumed
by IMA appraisal, and it needs an evm-key that EVE never loads, so
without IMA it protects nothing.

eve-hwe_defconfig is regenerated with savedefconfig, as in commit
92df24b ("configs: drop CONFIG_XEN from the EVE defconfigs").
TCG_TPM, TCG_TIS, TCG_CRB, ENCRYPTED_KEYS and CRYPTO_SHA1 were =y only
through IMA's and EVM's select; they stay =y, and savedefconfig now
lists them explicitly. Beyond that, the resolved hwe and ai .config
loses only IMA_* and EVM_* symbols. core and rt resolve to an identical
.config.

common.fragment pins both off, so a future re-derivation from Ubuntu
cannot bring them back on any flavour.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
@rucoder
rucoder force-pushed the mikem/no-ima-6.18.55 branch from 3aed289 to 1e3f8ed Compare November 6, 2026 14:35
@rucoder
rucoder requested review from rene and shjala November 6, 2026 14:35

@eriknordmark eriknordmark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One more reason this matters: EVE seals the vault key to PCR 10. DefaultDiskKeySealingPCRs in pkg/pillar/evetpm/tpm.go selects PCRs 0-15 except 5 and 15.

With IMA on, PCR 10 receives the boot_aggregate entry even with no policy loaded, and that digest covers PCRs 0-9, including PCR 5, which EVE excludes because GPT attribute changes (e.g. inprogress -> active after an upgrade) move it. So on hwe/ai EVE-k devices a GPT flip can break local unseal and force the controller backup-key path, and under Secure Boot the MODULE_CHECK measurements can make PCR 10 differ on every boot. Dropping IMA removes both.

@rucoder
rucoder merged commit 2a84923 into lf-edge:eve-kernel-amd64-v6.18.55-generic Nov 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants