1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-11 04:58:19 +03:00

boot: Fix assertion failure

The TPM code expects a description unless the PCR index indicates that
no measurements have to take place. The assert was preempting this
check from happening.

Fixes: #26428
(cherry picked from commit f92428eae53685f372775e8cb0f0f4c249f02724)
(cherry picked from commit cd5de2811ae72e209377f714cdbd8e5a0d6361bc)
(cherry picked from commit ac3d8922df1a08de934fc9d8c81cd0215bcb1633)
(cherry picked from commit 2cf90e13f5020f41e0919d4a2d7f181ecce3613d)
This commit is contained in:
Jan Janssen 2023-02-16 15:24:44 +01:00 committed by Luca Boccassi
parent 8e8c7d5114
commit 8a9b918e17

View File

@ -139,7 +139,7 @@ EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UIN
EFI_TCG *tpm1;
EFI_TCG2 *tpm2;
assert(description);
assert(description || pcrindex == UINT32_MAX);
tpm2 = tcg2_interface_check();
if (tpm2)