Linux EFI development
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/efi: Disregard stale EFI config tables after kexec
@ 2026-11-23  9:42 Ard Biesheuvel
  2026-11-23  9:42 ` [PATCH 1/2] x86/efi: Disregard the INITRD and MEMATTR " Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2026-11-23  9:42 UTC (permalink / raw)
  To: linux-efi; +Cc: Ard Biesheuvel, Jasmeet (Jazz) Bhatia

From: Ard Biesheuvel <ardb@kernel.org>

On x86, kexec passes the firmware's EFI configuration table array on to
the next kernel as-is, including tables that reside in memory that has
been released or repurposed since, and may therefore have been clobbered
by the time the next kernel gets to parse them.

Patch #1 wires up efi_config_table_is_usable() for x86, and uses it to
disregard the INITRD and Memory Attributes tables when booting via kexec.
This fixes a panic when kexec'ing without an initrd, and supersedes the
existing handling of the Memory Attributes table, which does not cover
all cases.

Patch #2 does the same for the TPM event log table, so that the EFI stub
can allocate it as EFI loader data again without regressing kexec. This
fixes hibernation on systems where the ACPI reclaim allocation that is
currently used for the event log ends up at a different address on each
boot, resulting in an inconsistent E820 map.

Cc: Jasmeet (Jazz) Bhatia <jasmeet.bhatia.us@gmail.com>

Ard Biesheuvel (2):
  x86/efi: Disregard the INITRD and MEMATTR config tables after kexec
  efi/tpm: Allocate the event log from EFI loader data again

 arch/x86/platform/efi/efi.c        | 32 ++++++++++++++++++++++++++++++
 arch/x86/platform/efi/quirks.c     |  4 ----
 drivers/firmware/efi/libstub/tpm.c |  2 +-
 include/linux/efi.h                |  3 +++
 4 files changed, 36 insertions(+), 5 deletions(-)


base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.56.1.750.gf70dc682cf-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-23 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  9:42 [PATCH 0/2] x86/efi: Disregard stale EFI config tables after kexec Ard Biesheuvel
2026-11-23  9:42 ` [PATCH 1/2] x86/efi: Disregard the INITRD and MEMATTR " Ard Biesheuvel
2026-11-23  9:42 ` [PATCH 2/2] efi/tpm: Allocate the event log from EFI loader data again Ard Biesheuvel
2026-11-23 13:05 ` [PATCH 0/2] x86/efi: Disregard stale EFI config tables after kexec jasmeet.bhatia.us

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox