Re: [PATCH] efi/libstub: Allocate the INITRD table in ACPI reclaim memory

From: Ard Biesheuvel

Date: Tue Nov 24 2026 - 09:25:03 EST




On Tue, 24 Nov 2026, at 15:06, Sebastien WENSKE wrote:
> On Tue, 24 Nov 2026, at 12:38, Ard Biesheuvel wrote:
>> 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
>
> Hello Ard,
>
> It works, thanks - please consider my patch withdrawn.
>
> Tested on x86_64 under QEMU/KVM (q35, SMM) with Debian's OVMF
> 2025.02, both the plain and the Secure Boot capable builds (no keys
> enrolled), the kernel booted as a systemd-stub UKI (initrd through the
> LINUX_EFI_INITRD_MEDIA_GUID device path), then kexec'd twice in a row
> with kexec_file_load() and an initrd:
>
> - v7.2.10, the setup of my report: without any patch the kexec'd
> kernel oopses in tcp_parse_options+0xe7 again, 16 bytes of its text
> zeroed at the stale table's address (0x1d4bcf98). With your patch
> both kexec'd kernels log
>
> efi: ... (MEMATTR=0x1d4b9018 unusable) (INITRD=0x1d4bcf98 unusable)
>
> and run normally.
>
> - v7.3.6, with a debug print before the wipe: without a fix the
> kexec'd kernels read what looks like their own text at the table's
> address (e.g. base 0x74fb894800000002 size 0x7400000208b73b26) and
> clear it, without any visible failure this time. With your patch the
> table is disregarded and the wipe never runs - also with the flash
> locked to SMM (-global driver=cfi.pflash01,property=secure,value=on).
>
> - v6.18.65: applies, both kexecs fine.
>
> Tested-by: Sebastien WENSKE <sebastien@xxxxxxxxx>
>

Excellent!