Re: [4.4] broken conversion from efi to kernel page table
From: Pavel Tatashin
Date: Fri Jan 12 2018 - 09:03:00 EST
Hi Jiri,
This patch solves a different problem than _PAGE_NX. The problem it
solves is similar to
+ efi_pgd = (pgd_t *)__get_free_pages(gfp_mask,
PGD_ALLOCATION_ORDER);, Where after applying PTI mask CR3 can point to
invalid page table.
But, this patch is specific to stable 4.4.110 since it uses
trampoline_pgd from realmode, instead of allocating its own page table
as 4.6 and later do.
Thank you,
Pavel
On Fri, Jan 12, 2018 at 5:04 AM, Jiri Kosina <jikos@xxxxxxxxxx> wrote:
> On Thu, 11 Jan 2018, Pavel Tatashin wrote:
>
>> This fixes boot panics, hangs which I reported in this thread:
>
> Are you using EFI old_memmap?
>
> If so, then
>
> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/pti&id=de53c3786a3ce162a1c815d0c04c766c23ec9c0a
>
> ("x86/pti: Unbreak EFI old_memmap") should be the cure.
>
> If not, you might be missing this in in arch/x86/platform/efi/efi_64.c
>
> - efi_pgd = (pgd_t *)__get_free_page(gfp_mask);
> + efi_pgd = (pgd_t *)__get_free_pages(gfp_mask, PGD_ALLOCATION_ORDER);
>
> Could you please let me know if either of this fixes your problem?
>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
>