]> Git Repo - linux.git/commitdiff
Merge tag 'efi-fixes-for-v5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorBorislav Petkov <[email protected]>
Fri, 22 May 2020 18:06:25 +0000 (20:06 +0200)
committerBorislav Petkov <[email protected]>
Fri, 22 May 2020 18:06:25 +0000 (20:06 +0200)
Pull EFI fixes from Ard Biesheuvel:

"- fix EFI framebuffer earlycon for wide fonts
 - avoid filling screen_info with garbage if the EFI framebuffer is not
   available
 - fix a potential host tool build error due to a symbol clash on x86
 - work around a EFI firmware bug regarding the binary format of the TPM
   final events table
 - fix a missing memory free by reworking the E820 table sizing routine to
   not do the allocation in the first place
 - add CPER parsing for firmware errors"

1  2 
drivers/firmware/efi/tpm.c

index 55b031d2c989074ec9f3b53f9662865d2e448122,0543fbf6022238ad8ad005d2f043601ee524f31a..c1955d320fecd6548cf99e9692562bac10f3998f
@@@ -16,7 -16,7 +16,7 @@@
  int efi_tpm_final_log_size;
  EXPORT_SYMBOL(efi_tpm_final_log_size);
  
 -static int tpm2_calc_event_log_size(void *data, int count, void *size_info)
 +static int __init tpm2_calc_event_log_size(void *data, int count, void *size_info)
  {
        struct tcg_pcr_event2_head *header;
        int event_size, size = 0;
@@@ -62,8 -62,11 +62,11 @@@ int __init efi_tpm_eventlog_init(void
        tbl_size = sizeof(*log_tbl) + log_tbl->size;
        memblock_reserve(efi.tpm_log, tbl_size);
  
-       if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR)
+       if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR ||
+           log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
+               pr_warn(FW_BUG "TPM Final Events table missing or invalid\n");
                goto out;
+       }
  
        final_tbl = early_memremap(efi.tpm_final_log, sizeof(*final_tbl));
  
This page took 0.057552 seconds and 4 git commands to generate.