Skip to content

Clean up pgd handling and fix VSYSCALL and LDT

Andy Lutomirski lkml stable 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 15 repliesIn review
  2. v26 patches 11 repliesSuperseded
  3. v1 RFC3 patches 4 repliesSuperseded

Changes from v1 from the cover letter

- vsyscalls actually work.
- Added the "Warn and fail" patch to prevent the testing goof I had on v1.
- Lots of cleanups

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10x86/espfix/64: Fix espfix double-fault handling on 5-level systemsarch/x86/kernel/traps.c+1 -11 reply
2/10x86/pti: Vastly simplify pgd synchronizationarch/x86/include/asm/pgtable_64.h arch/x86/mm/pti.c+39 -870 replies
3/10x86/pti/64: Fix ESPFIX64 user mappingarch/x86/kernel/espfix_64.c arch/x86/mm/pti.c init/main.c+44 -254 replies
4/10Revert "x86/mm/pti: Disable native VSYSCALL"arch/x86/Kconfig+0 -80 replies
5/10x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchyarch/x86/entry/vsyscall/vsyscall_64.c+32 -10 replies
6/10x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE modearch/x86/entry/vsyscall/vsyscall_64.c+4 -00 replies
7/10x86/pti: Map the vsyscall page if neededarch/x86/entry/vsyscall/vsyscall_64.c arch/x86/include/asm/pgtable.h arch/x86/include/asm/pgtable_64.h +2 more+78 -70 replies
8/10x86/mm/64: Improve the memory map documentationDocumentation/x86/x86_64/mm.txt+6 -40 replies
9/10x86/mm/64: Make a full PGD-entry size hole in the memory mapDocumentation/x86/x86_64/mm.txt arch/x86/include/asm/pgtable_64_types.h+4 -42 replies
10/10x86/pti: Put the LDT in its own PGD if PTI is onDocumentation/x86/x86_64/mm.txt arch/x86/include/asm/mmu_context.h arch/x86/include/asm/pgtable_64_types.h +3 more+225 -203 replies

Reviews trailers per patch

2 of 10 patches have a Reviewed-by or Acked-by.

PatchKirill A. Shutemov
1/10A-b
2/10
3/10A-b
4/10
5/10
6/10
7/10
8/10
9/10
10/10

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

Read the v3 thread

Cover letter [PATCH PTI v3 00/10] Clean up pgd handling and fix VSYSCALL and LDT

This should fix some existing 5-level bugs and get VSYSCALL and LDT working with PTI.

Changes from v1:
- vsyscalls actually work.
- Added the "Warn and fail" patch to prevent the testing goof I had on v1.
- Lots of cleanups

Andy Lutomirski (10):
x86/espfix/64: Fix espfix double-fault handling on 5-level systems x86/pti: Vastly simplify pgd synchronization
x86/pti/64: Fix ESPFIX64 user mapping
Revert "x86/mm/pti: Disable native VSYSCALL" x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode x86/pti: Map the vsyscall page if needed
x86/mm/64: Improve the memory map documentation
x86/mm/64: Make a full PGD-entry size hole in the memory map x86/pti: Put the LDT in its own PGD if PTI is on

 Documentation/x86/x86_64/mm.txt         |  15 +--
 arch/x86/Kconfig                        |   8 --
 arch/x86/entry/vsyscall/vsyscall_64.c   |  37 +++++++-
 arch/x86/include/asm/mmu_context.h      |  48 +++++++++-
 arch/x86/include/asm/pgtable.h          |   6 +-
 arch/x86/include/asm/pgtable_64.h       |  77 +++++++---------
 arch/x86/include/asm/pgtable_64_types.h |   8 +-
 arch/x86/include/asm/processor.h        |  23 +++--
 arch/x86/include/asm/vsyscall.h         |   1 +
 arch/x86/kernel/espfix_64.c             |  16 ----
 arch/x86/kernel/ldt.c                   | 155 +++++++++++++++++++++++++++++--
 arch/x86/kernel/traps.c                 |   2 +-
 arch/x86/mm/dump_pagetables.c           |  12 +++
 arch/x86/mm/pti.c                       | 157 ++++++++++++++++++++++----------
 init/main.c                             |  11 ++-
 15 files changed, 426 insertions(+), 150 deletions(-)
Signature · 1 line
2.13.6