From: Ard Biesheuvel <ardb+git@google.com>
To: linux-efi@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
"Jasmeet (Jazz) Bhatia" <jasmeet.bhatia.us@gmail.com>
Subject: [PATCH 0/2] x86/efi: Disregard stale EFI config tables after kexec
Date: Mon, 23 Nov 2026 10:42:29 +0100 [thread overview]
Message-ID: <20261123094228.466164-4-ardb+git@google.com> (raw)
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
next reply other threads:[~2026-11-23 9:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 9:42 Ard Biesheuvel [this message]
2026-11-23 9:42 ` [PATCH 1/2] x86/efi: Disregard the INITRD and MEMATTR config tables after kexec 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261123094228.466164-4-ardb+git@google.com \
--to=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=jasmeet.bhatia.us@gmail.com \
--cc=linux-efi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox