Re: [GIT PULL] x86/urgent for v5.13-rc5

From: Borislav Petkov
Date: Tue Jun 08 2021 - 16:02:04 EST


On Tue, Jun 08, 2021 at 12:22:50PM -0700, Linus Torvalds wrote:
> On Tue, Jun 8, 2021 at 11:33 AM Borislav Petkov <bp@xxxxxxxxx> wrote:
> >
> > Linus, maybe we should at least give it a try and see whether someone
> > complains and revert, potentially...?
>
> I already merged the change that did that.

Oh yeah, I meant: let's leave it in and try it and only revert if there's
trouble.

> It might be worth adding a comment about the verified Windows behavior
> here, but I think otherwise we're all done.

How's that (comment re-flowed):

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 1e720626069a..b58cdc70f86b 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1084,17 +1084,18 @@ void __init setup_arch(char **cmdline_p)
#endif

/*
- * Find free memory for the real mode trampoline and place it
- * there.
- * If there is not enough free memory under 1M, on EFI-enabled
- * systems there will be additional attempt to reclaim the memory
- * for the real mode trampoline at efi_free_boot_services().
+ * Find free memory for the real mode trampoline and place it there. If
+ * there is not enough free memory under 1M, on EFI-enabled systems
+ * there will be additional attempt to reclaim the memory for the real
+ * mode trampoline at efi_free_boot_services().
*
- * Unconditionally reserve the entire first 1M of RAM because
- * BIOSes are know to corrupt low memory and several
- * hundred kilobytes are not worth complex detection what memory gets
- * clobbered. Moreover, on machines with SandyBridge graphics or in
- * setups that use crashkernel the entire 1M is reserved anyway.
+ * Unconditionally reserve the entire first 1M of RAM because BIOSes
+ * are known to corrupt low memory and several hundred kilobytes are not
+ * worth complex detection what memory gets clobbered. Windows does the
+ * same thing for very similar reasons.
+ *
+ * Moreover, on machines with SandyBridge graphics or in setups that use
+ * crashkernel the entire 1M is reserved anyway.
*/
reserve_real_mode();


Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette