Re: [PATCHv13 4/9] x86/boot/compressed: Handle unaccepted memory
From: Borislav Petkov
Date: Fri Jun 02 2023 - 12:13:04 EST
On Fri, Jun 02, 2023 at 05:59:16PM +0200, Ard Biesheuvel wrote:
> The problem is that on x86, there is buggy vendor/OEM EFI code that
> registers for internal events that trigger when SetVirtualAddressMap()
> is called, and assume that at that point, EfiBootServicesData memory
> regions have not been touched by the loader yet, which is probably
> true if you are booting Windows.
>
> So on x86, the kernel proper also preserves these regions until after
> it calls SetVirtualAddressMap() (efi_free_boot_services() in
> arch/x86/platform/efi/quirks.c)
>
> So for the same reason, this code needs to disregard those regions as well.
I'd like for us to have this explanation in the comment since it is
being touched anyway.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette