WSL2-Linux-Kernel/arch/x86/platform/efi
Matt Fleming f6697df36b x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y
Booting an EFI mixed mode kernel has been crashing since commit:

  e37e43a497 ("x86/mm/64: Enable vmapped stacks (CONFIG_HAVE_ARCH_VMAP_STACK=y)")

The user-visible effect in my test setup was the kernel being unable
to find the root file system ramdisk. This was likely caused by silent
memory or page table corruption.

Enabling CONFIG_DEBUG_VIRTUAL=y immediately flagged the thunking code as
abusing virt_to_phys() because it was passing addresses that were not
part of the kernel direct mapping.

Use the slow version instead, which correctly handles all memory
regions by performing a page table walk.

Suggested-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161112210424.5157-3-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-11-13 08:26:40 +01:00
..
Makefile objtool: Mark non-standard object files and directories 2016-02-29 08:35:02 +01:00
early_printk.c treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
efi-bgrt.c x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data 2016-09-09 16:08:38 +01:00
efi.c x86/efi: Fix EFI memmap pointer size warning 2016-11-13 08:26:40 +01:00
efi_32.c x86/mm: Remove kernel_unmap_pages_in_pgd() and efi_cleanup_page_tables() 2016-07-15 10:26:26 +02:00
efi_64.c x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y 2016-11-13 08:26:40 +01:00
efi_stub_32.S x86/efi: Mark initialization code as such 2014-10-03 18:41:03 +01:00
efi_stub_64.S x86/efi: Fix 7-parameter efi_call()s 2016-05-17 08:25:06 +02:00
efi_thunk_64.S x86/efi: Avoid triple faults during EFI mixed mode calls 2015-02-13 15:42:56 +00:00
quirks.c x86/efi: Round EFI memmap reservations to EFI_PAGE_SIZE 2016-09-20 15:43:31 +01:00