pcrphase: add two additional phases

This adds two more phases to the PCR boot phase logic: "sysinit" +
"final".

The "sysinit" one is placed between sysinit.target and basic.target.
It's good to have a milestone in this place, since this is after all
file systems/LUKS volumes are in place (which sooner or later should
result in measurements of their own) and before services are started
(where we should be able to rely on them to be complete).

This is particularly useful to make certain secrets available for
mounting secondary file systems, but making them unavailable later.

This breaks API in a way (as measurements during runtime will change),
but given that the pcrphase stuff wasn't realeased yet should be OK.
This commit is contained in:
Lennart Poettering
2022-10-17 12:09:43 +02:00
committed by Luca Boccassi
parent 961549ab41
commit 047273e6e8
7 changed files with 62 additions and 17 deletions
+2 -1
View File
@@ -281,7 +281,8 @@ static int parse_argv(int argc, char *argv[]) {
if (strv_extend_strv(&arg_phase,
STRV_MAKE("enter-initrd",
"enter-initrd:leave-initrd",
"enter-initrd:leave-initrd:ready"),
"enter-initrd:leave-initrd:sysinit",
"enter-initrd:leave-initrd:sysinit:ready"),
/* filter_duplicates= */ false) < 0)
return log_oom();
} else {