Re: [PATCH 1/2] efi: Fix reservation of unaccepted memory table
From: Kiryl Shutsemau
Date: Fri Feb 13 2026 - 11:16:42 EST
On Fri, Feb 13, 2026 at 08:01:55AM -0800, Dave Hansen wrote:
> On 2/13/26 07:48, Kiryl Shutsemau (Meta) wrote:
> > static __init void reserve_unaccepted(struct efi_unaccepted_memory *unaccepted)
> > {
> > - phys_addr_t start, size;
> > + phys_addr_t start, end;
> >
> > start = PAGE_ALIGN_DOWN(efi.unaccepted);
>
> Why are we even aligning the start? Isn't *that* the bug?
How so? It is up to EFI how the table is allocated. We need to be sure
that this memory is mapped and not overwritten.
> The memblock code seems to be able to handle arbitrary alignment just fine.
Memblock will track it, but, as the comment says, anything smaller than
page size will not be mapped, but we need the table to be accessible by
kernel.
--
Kiryl Shutsemau / Kirill A. Shutemov