Skip to content

EFI memmap and other fixes, v3

Borislav Petkov linux-efi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 9 repliesIn review

Changelog from the cover letter

* v2:

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5x86, ptdump: Add the functionality to dump an arbitrary pagetablearch/x86/include/asm/pgtable.h arch/x86/mm/dump_pagetables.c+56 -310 replies
2/5efi: Dump the EFI page tablearch/x86/Kconfig arch/x86/include/asm/efi.h arch/x86/platform/efi/efi.c +2 more+21 -02 replies
3/5x86, pageattr: Export page unmapping interfacearch/x86/include/asm/pgtable_types.h arch/x86/mm/pageattr.c+33 -130 replies
4/5efi: Make efi virtual runtime map passing more robustarch/x86/include/asm/efi.h arch/x86/platform/efi/efi.c arch/x86/platform/efi/efi_32.c +1 more+114 -260 replies
5/5efi: Split efi_enter_virtual_modearch/x86/platform/efi/efi.c include/linux/efi.h+99 -503 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchToshi Kani
1/5T-b
2/5T-b
3/5T-b
4/5T-b
5/5T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] EFI memmap and other fixes, v3

From: Borislav Petkov <[email protected]>

Hi all,

this is the latest incarnation which should hopefully work just fine. It tpasses esting at least on all our boxes so we have *some* coverage.

It took us a long time to debug the unmapping path and realize how exactly we're doing the PGD sharing between the kernel and the EFI page table. I've commented on this verbosely in 4/5 for future reference because this stuff is not trivial.

We definitely should have this in mind when we do more changes on how we handle the EFI page table and what we do with it, maybe even decouple it completely from the kernel one. I dunno - it is all future stuff to pay attention to.

Anyway, if anyone with an EFI box wants to give it a run, feel free to do so.

As always, all comments and suggestions are appreciated.

Thanks.

Changelog:

* v2:

here's v2 rebased and rediffed against tip (which has the relevant efi branches).

* v1:

this is the result of Toshi and me debugging a #GP on one of his big HP boxes sporting UEFI. Each commit message should be self-explanatory so please look there.

This has more or less an RFC nature thus I'm sending it now to collect feedback. It is going to wait in the EFI queue anyway after the kexec stuff gets sorted out first.

Borislav Petkov (5):
x86, ptdump: Add the functionality to dump an arbitrary pagetable
efi: Dump the EFI page table
x86, pageattr: Export page unmapping interface
efi: Make efi virtual runtime map passing more robust
efi: Split efi_enter_virtual_mode

 arch/x86/Kconfig                     |   9 ++
 arch/x86/include/asm/efi.h           |   4 +-
 arch/x86/include/asm/pgtable.h       |   3 +-
 arch/x86/include/asm/pgtable_types.h |   2 +
 arch/x86/mm/dump_pagetables.c        |  84 +++++++++-----
 arch/x86/mm/pageattr.c               |  44 +++++---
 arch/x86/platform/efi/efi.c          | 210 ++++++++++++++++++++++++++---------
 arch/x86/platform/efi/efi_32.c       |   7 +-
 arch/x86/platform/efi/efi_64.c       |  41 ++++++-
 include/linux/efi.h                  |   1 +
 10 files changed, 304 insertions(+), 101 deletions(-)
Signature · 1 line
1.8.5.2.192.g7794a68