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.
This commit is contained in:
@@ -672,9 +672,9 @@ static int add_mount(
|
||||
}
|
||||
|
||||
if (flags & MOUNT_PCRFS) {
|
||||
r = efi_measured_uki(LOG_WARNING);
|
||||
r = efi_measured_os(LOG_WARNING);
|
||||
if (r == 0)
|
||||
log_debug("Kernel stub did not measure kernel image into PCR, skipping userspace measurement, too.");
|
||||
log_debug("OS measurements not explicitly requested and kernel stub did not measure kernel image into PCR, skipping userspace measurement, too.");
|
||||
else if (r > 0) {
|
||||
r = generator_hook_up_pcrfs(dest, where, target_unit);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user