Re: [PATCH] x86/efi: Setup separate EFI page tables in kexec paths

From: Matt Fleming
Date: Thu Jan 21 2016 - 15:58:32 EST


On Fri, 22 Jan, at 01:03:32AM, Srikar Dronamraju wrote:
> * Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx> [2016-01-21 14:11:59]:
>
> > The switch to using a new dedicated page table for EFI runtime calls
> > in commit commit 67a9108ed431 ("x86/efi: Build our own page table
> > structures") failed to take into account changes required for the
> > kexec code paths, which are unfortunately duplicated in the EFI code.
> >
> > Call the allocation and setup functions in kexec_enter_virtual_mode()
> > just like we do for __efi_enter_virtual_mode() to avoid hitting
> > NULL-pointer dereferences when making EFI runtime calls.
> >
> > At the very least, the call to efi_setup_page_tables() should have
> > existed for kexec before commit 67a9108ed431. Things just magically
> > worked because we were actually using the kernel's page tables that
> > contained the required mappings.
> >
> > Reported-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
> > Cc: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>
> > Cc: Dave Young <dyoung@xxxxxxxxxx>
> > Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> > Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> > Cc: Borislav Petkov <bp@xxxxxxxxx>
> > Signed-off-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx>
>
> Applied this patch on top of tip/x86/efi and was able to build and boot
> the kernel.

Fantastic, thanks for testing!

Ingo, this commit should unblock the EFI changes for v4.5.