linux_dsm_epyc7002/drivers/firmware/efi
Matthew Garrett 166a2809d6 tpm: Don't duplicate events from the final event log in the TCG2 log
After the first call to GetEventLog() on UEFI systems using the TCG2
crypto agile log format, any further log events (other than those
triggered by ExitBootServices()) will be logged in both the main log and
also in the Final Events Log. While the kernel only calls GetEventLog()
immediately before ExitBootServices(), we can't control whether earlier
parts of the boot process have done so. This will result in log entries
that exist in both logs, and so the current approach of simply appending
the Final Event Log to the main log will result in events being
duplicated.

We can avoid this problem by looking at the size of the Final Event Log
just before we call ExitBootServices() and exporting this to the main
kernel. The kernel can then skip over all events that occured before
ExitBootServices() and only append events that were not also logged to
the main log.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Reported-by: Joe Richey <joerichey@google.com>
Suggested-by: Joe Richey <joerichey@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
2019-06-24 23:57:50 +03:00
..
libstub tpm: Don't duplicate events from the final event log in the TCG2 log 2019-06-24 23:57:50 +03:00
test treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
apple-properties.c
arm-init.c
arm-runtime.c efi: Unify DMI setup code over the arm/arm64, ia64 and x86 architectures 2019-03-29 07:35:00 +01:00
capsule-loader.c
capsule.c
cper-arm.c
cper-x86.c
cper.c ACPI updates for 5.1-rc1 2019-03-06 13:33:11 -08:00
dev-path-parser.c
earlycon.c
efi-bgrt.c
efi-pstore.c
efi.c tpm: Reserve the TPM final events table 2019-06-24 23:57:49 +03:00
efibc.c
efivars.c
esrt.c
fake_mem.c
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
memattr.c
memmap.c
reboot.c
runtime-map.c
runtime-wrappers.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
tpm.c tpm: Reserve the TPM final events table 2019-06-24 23:57:49 +03:00
vars.c