summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2025-12-05 10:32:16 +0100
committerArd Biesheuvel <ardb@kernel.org>2026-01-08 12:41:38 +0100
commit6e62d1c6f2c7dba31db976e60ca0d6edf96cf8d5 (patch)
tree55aec67fd92b4a1b3a773a188b854f0b7ef89254 /include/uapi
parentcfe54f4591e675cedf2c0d25287ff4c0a2e0cb9d (diff)
efi: Wipe INITRD config table from memory after consumption
When the EFI stub itself loads the initrd and puts it in memory (rather than simply passing on a struct boot_params or device tree that already carries initrd information), it exposes this information to the core kernel via a INITRD configuration table. Given that config tables are preserved across kexec, this means that subsequent kexec boots will observe the same information, even though it most likely has become stale by that point. On x86, this information is usually superseded by the initrd info passed via bootparams, in which case this stale information is simply ignored. However, when performing a kexec boot without passing an initrd, the loader falls back to this stale information and explodes. So wipe the base and size from the INITRD config table as soon as it has been consumed. This fixes the issue for kexec on all EFI architectures. Reported-by: James Le Cuirot <chewi@gentoo.org> Tested-by: James Le Cuirot <chewi@gentoo.org> Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com> Link: https://lore.kernel.org/all/20251126173209.374755-2-chewi@gentoo.org Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions