Re: [PATCH v3 08/17] x86/efi: Allow ranges_to_free array to grow beyond initial size

Mike Rapoport <[email protected]>
Newsgroups org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, Apr 23, 2026 at 05:20:33PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <[email protected]>
> 
> In order to avoid the need to mangle the EFI memory map, which is being
> done to keep track of which boot services data regions are really reallyo

                                                       typo: really reallyo

> reserved, and which ones are only reserved temporarily, this information
> needs to be recorded in a different manner.
> 
> The temporary ranges_to_free array is a suitable candidate, as it is
> specifically intended to capture which boot services data regions should
> be handed back to the page allocator once deferred struct page
> initialization is done.
> 
> This requires that boot services data regions are intersected with the
> memblock reserved list, and this may result in more ranges_to_free
> elements than the current upper bound of the number of EFI memory map
> entries.
> 
> So reallocate the array when running out of slots.
> 
> Signed-off-by: Ard Biesheuvel <[email protected]>

Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>

> ---
>  arch/x86/platform/efi/quirks.c | 40 ++++++++++++++++----
>  1 file changed, 32 insertions(+), 8 deletions(-)

-- 
Sincerely yours,
Mike.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.