[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <157727033419.30329.4854144376331074852.tip-bot2@tip-bot2>
Date: Wed, 25 Dec 2019 10:38:54 -0000
From: "tip-bot2 for Ard Biesheuvel" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Ard Biesheuvel <ardb@...nel.org>, <stable@...r.kernel.org>,
Arvind Sankar <nivedita@...m.mit.edu>,
Hans de Goede <hdegoede@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-efi@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
x86 <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [tip: efi/urgent] x86/efistub: Disable paging at mixed mode entry
The following commit has been merged into the efi/urgent branch of tip:
Commit-ID: 4911ee401b7ceff8f38e0ac597cbf503d71e690c
Gitweb: https://git.kernel.org/tip/4911ee401b7ceff8f38e0ac597cbf503d71e690c
Author: Ard Biesheuvel <ardb@...nel.org>
AuthorDate: Tue, 24 Dec 2019 14:29:09 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 25 Dec 2019 10:46:07 +01:00
x86/efistub: Disable paging at mixed mode entry
The EFI mixed mode entry code goes through the ordinary startup_32()
routine before jumping into the kernel's EFI boot code in 64-bit
mode. The 32-bit startup code must be entered with paging disabled,
but this is not documented as a requirement for the EFI handover
protocol, and so we should disable paging explicitly when entering
the kernel from 32-bit EFI firmware.
Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
Cc: <stable@...r.kernel.org>
Cc: Arvind Sankar <nivedita@...m.mit.edu>
Cc: Hans de Goede <hdegoede@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-efi@...r.kernel.org
Link: https://lkml.kernel.org/r/20191224132909.102540-4-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/boot/compressed/head_64.S | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 58a512e..ee60b81 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -244,6 +244,11 @@ SYM_FUNC_START(efi32_stub_entry)
leal efi32_config(%ebp), %eax
movl %eax, efi_config(%ebp)
+ /* Disable paging */
+ movl %cr0, %eax
+ btrl $X86_CR0_PG_BIT, %eax
+ movl %eax, %cr0
+
jmp startup_32
SYM_FUNC_END(efi32_stub_entry)
#endif
Powered by blists - more mailing lists