]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: introduce ConditionSecurity=measured-os
authorLennart Poettering <lennart@amutable.com>
Mon, 9 Mar 2026 17:53:09 +0000 (18:53 +0100)
committerLennart Poettering <lennart@amutable.com>
Thu, 26 Mar 2026 15:11:34 +0000 (16:11 +0100)
commitcd911bec6eec21a2cc775c98bf599ea38cb1fa1f
tree72857aed8f263de62f9cd0d0f00a014139e648bd
parentca03d178a077a7705c58619fcc83fb3b90845fdb
core: introduce ConditionSecurity=measured-os

So far we always conditioned our TPM magic on the UKI having detected
TPM support in the firmware. This is a bit limiting when we want to
support a software TPM that is not visible to the firmware. Hence let's
split this up, and add a separate control that can be set via the kernel
command line.  However, as before, let's by default inherit the firmare
TPM discovery state into it, to retain the current behaviour unless
overriden.

With this in place, boot with "systemd.tpm2_measured_os=1
systemd.tpm2_software_fallback=1" on the kernel cmdline to get the swtpm
fallback and then a measured OS based on it.
25 files changed:
man/kernel-command-line.xml
man/systemd.unit.xml
src/bootctl/bootctl-status.c
src/cryptsetup/cryptsetup.c
src/fstab-generator/fstab-generator.c
src/gpt-auto-generator/gpt-auto-generator.c
src/hibernate-resume/hibernate-resume-generator.c
src/pcrextend/pcrextend.c
src/shared/condition.c
src/shared/efi-loader.c
src/shared/efi-loader.h
units/systemd-pcrextend.socket
units/systemd-pcrfs-root.service.in
units/systemd-pcrfs@.service.in
units/systemd-pcrmachine.service.in
units/systemd-pcrnvdone.service.in
units/systemd-pcrphase-factory-reset.service.in
units/systemd-pcrphase-initrd.service.in
units/systemd-pcrphase-storage-target-mode.service.in
units/systemd-pcrphase-sysinit.service.in
units/systemd-pcrphase.service.in
units/systemd-pcrproduct.service.in
units/systemd-tpm2-clear.service.in
units/systemd-tpm2-setup-early.service.in
units/systemd-tpm2-setup.service.in