Make TPM errors less fatal

Handle TPM errors, and stop trying to use the TPM once we hit one.
This commit is contained in:
Matthew Garrett 2016-10-13 13:55:26 -07:00
parent 5962f7d5e7
commit bf25cda14e
11 changed files with 29 additions and 4 deletions

View file

@ -170,6 +170,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
goto fail;
}
grub_tpm_measure (ptr, cursize, GRUB_BINARY_PCR, "grub_linuxefi", "Initrd");
grub_print_error();
ptr += cursize;
grub_memset (ptr, 0, ALIGN_UP_OVERHEAD (cursize, 4));
ptr += ALIGN_UP_OVERHEAD (cursize, 4);
@ -226,6 +227,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
}
grub_tpm_measure (kernel, filelen, GRUB_BINARY_PCR, "grub_linuxefi", "Kernel");
grub_print_error();
if (! grub_linuxefi_secure_validate (kernel, filelen))
{