]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot/efi: don't hard fail on error for tpm measure (#6473)
authorHarald Hoyer <harald@hoyer.xyz>
Fri, 28 Jul 2017 07:46:05 +0000 (09:46 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Jul 2017 07:46:05 +0000 (03:46 -0400)
Display the error for a small amount of time, but don't fail hard.

In case of a faulty BIOS, a TPM error should not prevent the boot.
If something cares about the PCM measurement, it will be noticed
anyway later on.

Especially important now, that TPM measurement is the default now on
some distribution builds.

https://bugzilla.redhat.com/show_bug.cgi?id=1411156

src/boot/efi/boot.c
src/boot/efi/stub.c

index 9a0290242892aec3dff5f6755d035b3ee6190081..21898837e0e4c849a4bde9ac8b631b47065c2927 100644 (file)
@@ -1657,8 +1657,7 @@ static EFI_STATUS image_start(EFI_HANDLE parent_image, const Config *config, con
                                     loaded_image->LoadOptionsSize, loaded_image->LoadOptions);
                 if (EFI_ERROR(err)) {
                         Print(L"Unable to add image options measurement: %r", err);
-                        uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000);
-                        return err;
+                        uefi_call_wrapper(BS->Stall, 1, 200 * 1000);
                 }
 #endif
         }
index bef416aa5c6cec87f8966a0f57c0a5d7d5a84a70..7d03370cbd26806ea78f8bd6bc2bbe23ca2021ae 100644 (file)
@@ -94,8 +94,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
                                     loaded_image->LoadOptionsSize, loaded_image->LoadOptions);
                 if (EFI_ERROR(err)) {
                         Print(L"Unable to add image options measurement: %r", err);
-                        uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000);
-                        return err;
+                        uefi_call_wrapper(BS->Stall, 1, 200 * 1000);
                 }
 #endif
         }