Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4 September 2015 at 20:23, Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 04 Sep, at 03:24:21PM, Ard Biesheuvel wrote:
>>
>> Since the UEFI spec does not mandate an enumeration order for
>> GetMemoryMap(), it seems to me that you still need to sort its output
>> before laying out the VA space. Since you need to sort it anyway, why
>> not simply sort it in reverse order and keep all the original code?
>> Considering that this is meant for stable, that would keep the delta
>> *much* smaller.
>
> Hmm... that'd be a neat trick and while it would save on the diff
> size, I don't think it would be smaller in terms of change complexity.
>
> EDK2 sorts the memory map when EFI_PROPERTIES_TABLE is enabled, so we
> can be reasonably sure the entry order returned by GetMemoryMap() is
> compatible with the split regions, even if it's not mandated by the
> spec.
>

EDK2 does sort it, but the spec does not mandate it so another
implementation may do something different entirely.

> For the non-EFI_PROPERTIES_TABLE case, things have been working fine
> without the sorting, so I'm reluctant to introduce it now (it's also
> much less of an issue there).
>

I see. I do wonder, since the VA mapping preserves the modulo 2 MB
alignment of each region, aren't you using much more VA space when
mapping in reverse order as you are doing now?

-- 
Ard.
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux