Re: [PATCH] efi/libstub: Allocate the INITRD table in ACPI reclaim memory
From: Ard Biesheuvel
Date: Tue Nov 24 2026 - 06:38:46 EST
Hello Sebastien,
On Mon, 12 Oct 2026, at 15:37, Sebastien WENSKE wrote:
> Commit 6e62d1c6f2c7 ("efi: Wipe INITRD config table from memory after
> consumption") makes the kernel clear the base and size of the
> LINUX_EFI_INITRD_MEDIA_GUID configuration table once it has read them,
> so that a kexec'd kernel no longer picks up a stale initrd.
>
> However, the stub allocates that table from EFI_LOADER_DATA, which the
> kernel that consumes it treats as ordinary RAM, while the configuration
> table entry pointing at it survives kexec. A kexec'd kernel therefore
> finds the same address in the configuration table, and clears 16 bytes
> there again, in memory that may by then hold anything - including the
> kexec'd kernel's own image, which kexec_file_load() is free to place
> there.
>
...
>
> Allocate the table from EFI_ACPI_RECLAIM_MEMORY instead, as the stub
> already does for the RNG seed table so that it survives a kexec reboot.
> The table then stays where it is across kexec, and the wipe always
> lands on the table itself.
>
There was a report recently about EFI_ACPI_RECLAIM_MEMORY being
problematic in combination with hibernate, as those regions tends
to move around.
Can you try this fix instead please?
https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?h=urgent&id=6863183e8b65e833f8140e20d526282a725e040e