lkml.org 
[lkml]   [2026]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 08/17] x86/efi: Allow ranges_to_free array to grow beyond initial size
On Thu, Apr 23, 2026 at 05:20:33PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
>
> 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 <ardb@kernel.org>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

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

--
Sincerely yours,
Mike.

\
 
 \ /
  Last update: 2026-04-28 10:51    [W:0.155 / U:30.383 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog