Re: [PATCH 0/5] x86/efi: Re-enable memory attributes table for kexec
From: Dave Young
Date: Mon Mar 30 2026 - 06:57:10 EST
On Thu, 26 Mar 2026 at 21:27, Ard Biesheuvel <ardb+git@xxxxxxxxxx> wrote:
>
> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> The EFI memory attributes table augments the EFI memory map, and
> provides permission attributes for all runtime code and data regions
> that are otherwise mapped read-write-execute in their entirety.
>
> Currently, this table is disregarded when doing kexec boot on x86, for
> two reasons:
> - the boot services data region that holds the table is not reserved
> correctly, and may contain garbage at kexec time
> - a misguided sanity check on the size of the table is likely to trigger
> on kexec, as the EFI memory map has been trimmed down by that time.
>
> Fix both issues, so that the EFI memory attributes table can be taken
> into account again at kexec time. Note that this requires that the call
> to efi_memattr_init() is moved to a later point for x86.
I vaguely remember when we discussed this issue in old threads
efi_mem_reserve can not work for kexec_load syscall, but I think after
the commit a2498e5c453b it should just work. So I think it looks
good, thanks Ard!
Thanks
Dave