From b022ea047673d758d13b227305cc5972501a9b17 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 21 Aug 2023 18:38:18 +0200 Subject: [PATCH] efi: add comment clarifying we should not use EV_IPL anymore --- src/boot/efi/measure.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/boot/efi/measure.c b/src/boot/efi/measure.c index c2552268d5..359d277e2f 100644 --- a/src/boot/efi/measure.c +++ b/src/boot/efi/measure.c @@ -55,6 +55,12 @@ static EFI_STATUS tpm2_measure_to_pcr_and_event_log( assert(tcg); assert(description); + /* NB: We currently record everything as EV_IPL. Which sucks, because it makes it hard to + * recognize from the event log which of the events are ours. Measurement logs are kinda API hence + * this is hard to change for existing, established events. But for future additions, let's use + * EV_EVENT_TAG instead, with a tag of our choosing that makes clear what precisely we are measuring + * here. */ + desc_len = strsize16(description); tcg_event = xmalloc(offsetof(EFI_TCG2_EVENT, Event) + desc_len); memset(tcg_event, 0, offsetof(EFI_TCG2_EVENT, Event) + desc_len); -- 2.25.1