x86/pti: Final XMAS release
Get series with b4
b4 am [email protected]Versions newest first
- v181 Latest54 patches 11 repliesIn review
Changes since V163 from the cover letter
- Moved the cpu entry area out of the fixmap because that caused failures due to fixmap size and cleanup_highmap() zapping fixmap PTEs.
- Moved all cpu entry area related code into separate files. The hodgepodge in cpu/common.c was really not appropriate.
- Folded Juergens XEN PV fix for vsyscall
- Folded Peters ACCESS bit simplification
- Cleaned up and fixed dump_pagetables
- Added Vlastimils PTI/NOPTI marker for dumpstack
- Addressed various minor review comments
Patches in v181 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/54 | x86/Kconfig: Limit NR_CPUS on 32bit to a sane amountarch/ | +2 | 0 replies | |
| 2/54 | x86/mm/dump_pagetables: Check PAGE_PRESENT for realarch/ | +1 | 0 replies | |
| 3/54 | x86/mm/dump_pagetables: Make the address hints correct and readablearch/ | +53 | 0 replies | |
| 4/54 | x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchyarch/ | +33 | 0 replies | |
| 5/54 | x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE modearch/ | +4 | 0 replies | |
| 6/54 | arch: Allow arch_dup_mmap() to failarch/ arch/ arch/ +3 more | +14 | 0 replies | |
| 7/54 | x86/ldt: Rework lockingarch/ arch/ arch/ | +26 | 0 replies | |
| 8/54 | x86/ldt: Prevent ldt inheritance on execarch/ arch/ tools/ | +22 | 0 replies | |
| 9/54 | x86/mm/64: Improve the memory map documentationDocumentation/ | +6 | 0 replies | |
| 10/54 | x86/doc: Remove obvious weirdnessDocumentation/ | +3 | 0 replies | |
| 11/54 | x86/entry: Remove SYSENTER_stack namingarch/ arch/ arch/ +8 more | +44 | 0 replies | |
| 12/54 | x86/uv: Use the right tlbflush APIarch/ | +1 | 0 replies | |
| 13/54 | x86/microcode: Dont abuse the tlbflush interfacearch/ arch/ | +6 | 0 replies | |
| 14/54 | x86/mm: Use __flush_tlb_one() for kernel memoryarch/ | +1 | 0 replies | |
| 15/54 | x86/mm: Remove superfluous barriersarch/ | +1 | 0 replies | |
| 16/54 | x86/mm: Clarify which functions are supposed to flush whatarch/ | +21 | 0 replies | |
| 17/54 | x86/mm: Move the CR3 construction functions to tlbflush.harch/ arch/ arch/ | +31 | 0 replies | |
| 18/54 | x86/mm: Remove hard-coded ASID limit checksarch/ | +18 | 0 replies | |
| 19/54 | x86/mm: Put MMU to hardware ASID translation in one placearch/ | +18 | 0 replies | |
| 20/54 | x86/mm: Create asm/invpcid.harch/ arch/ | +54 | 0 replies | |
| 21/54 | x86/cpu_entry_area: Move it to a separate unitarch/ arch/ arch/ +3 more | +157 | 1 reply | |
| 22/54 | x86/cpu_entry_area: Move it out of fixmapDocumentation/ arch/ arch/ +11 more | +128 | 2 replies | |
| 23/54 | init: Invoke init_espfix_bsp() from mm_init()arch/ arch/ include/ +1 more | +12 | 0 replies | |
| 24/54 | x86/cpufeatures: Add X86_BUG_CPU_INSECUREarch/ arch/ arch/ | +13 | 0 replies | |
| 25/54 | x86/mm/pti: Disable global pages if PAGE_TABLE_ISOLATION=yarch/ | +9 | 0 replies | |
| 26/54 | x86/mm/pti: Prepare the x86/entry assembly code for entry/exit CR3 switchingarch/ arch/ arch/ | +128 | 0 replies | |
| 27/54 | x86/mm/pti: Add infrastructure for page table isolationDocumentation/ arch/ arch/ +6 more | +122 | 0 replies | |
| 28/54 | x86/mm/pti: Add mapping helper functionsarch/ arch/ arch/ | +138 | 0 replies | |
| 29/54 | x86/mm/pti: Allow NX poison to be set in p4d/pgdarch/ | +12 | 0 replies | |
| 30/54 | x86/mm/pti: Allocate a separate user PGDarch/ arch/ | +41 | 0 replies | |
| 31/54 | x86/mm/pti: Populate user PGDarch/ | +8 | 0 replies | |
| 32/54 | x86/mm/pti: Add functions to clone kernel PMDsarch/ | +127 | 0 replies | |
| 33/54 | x86/mm/pti: Force entry through trampoline when PTI activearch/ | +4 | 0 replies | |
| 34/54 | x86/mm/pti: Share cpu_entry_area with user space page tablesarch/ | +25 | 0 replies | |
| 35/54 | x86/entry: Align entry text section to PMD boundaryarch/ | +8 | 2 replies | |
| 36/54 | x86/mm/pti: Share entry text PMDarch/ | +10 | 0 replies | |
| 37/54 | x86/mm/pti: Map ESPFIX into user spacearch/ | +11 | 0 replies | |
| 38/54 | x86/cpu_entry_area: Add debugstore entries to cpu_entry_areaarch/ arch/ arch/ +2 more | +86 | 0 replies | |
| 39/54 | x86/events/intel/ds: Map debug buffers in cpu_entry_areaarch/ arch/ | +82 | 0 replies | |
| 40/54 | x86/mm/64: Make a full PGD-entry size hole in the memory mapDocumentation/ arch/ | +4 | 0 replies | |
| 41/54 | x86/pti: Put the LDT in its own PGD if PTI is onDocumentation/ arch/ arch/ +3 more | +220 | 0 replies | |
| 42/54 | x86/pti: Map the vsyscall page if neededarch/ arch/ arch/ | +67 | 0 replies | |
| 43/54 | x86/mm: Allow flushing for future ASID switchesarch/ arch/ | +64 | 0 replies | |
| 44/54 | x86/mm: Abstract switching CR3arch/ | +20 | 0 replies | |
| 45/54 | x86/mm: Use/Fix PCID to optimize user/kernel switchesarch/ arch/ arch/ +6 more | +162 | 0 replies | |
| 46/54 | x86/mm: Optimize RESTORE_CR3arch/ arch/ | +30 | 0 replies | |
| 47/54 | x86/mm: Use INVPCID for __native_flush_tlb_single()arch/ arch/ arch/ | +60 | 0 replies | |
| 48/54 | x86/mm: Clarify the whole ASID/kernel PCID/user PCID namingarch/ | +43 | 0 replies | |
| 49/54 | x86/dumpstack: Indicate in Oops whether pti is configured and enabledarch/ | +4 | 1 reply | |
| 50/54 | x86/mm/pti: Add Kconfigsecurity/ | +10 | 0 replies | |
| 51/54 | x86/mm/dump_pagetables: Add page table directoryarch/ | +10 | 0 replies | |
| 52/54 | x86/mm/dump_pagetables: Check user space page table for WX pagesarch/ arch/ arch/ | +27 | 0 replies | |
| 53/54 | x86/mm/dump_pagetables: Allow dumping current pagetablesarch/ arch/ arch/ | +73 | 0 replies | |
| 54/54 | x86/ldt: Make the LDT mapping ROarch/ arch/ arch/ +1 more | +11 | 0 replies |
Reviews trailers per patch
9 of 54 patches have a Reviewed-by or Acked-by.
| Patch | Andrew Banman | Borislav Petkov | Thomas Gleixner | Eduardo Valentin | Dave Hansen | Jiri Kosina | Kirill A. Shutemov |
|---|---|---|---|---|---|---|---|
| Series | T-b | ||||||
| 1/54 | |||||||
| 2/54 | |||||||
| 3/54 | |||||||
| 4/54 | |||||||
| 5/54 | |||||||
| 6/54 | |||||||
| 7/54 | |||||||
| 8/54 | |||||||
| 9/54 | |||||||
| 10/54 | |||||||
| 11/54 | |||||||
| 12/54 | A-b | ||||||
| 13/54 | |||||||
| 14/54 | |||||||
| 15/54 | |||||||
| 16/54 | |||||||
| 17/54 | |||||||
| 18/54 | |||||||
| 19/54 | |||||||
| 20/54 | |||||||
| 21/54 | |||||||
| 22/54 | |||||||
| 23/54 | |||||||
| 24/54 | |||||||
| 25/54 | R-b | ||||||
| 26/54 | R-b | R-b | |||||
| 27/54 | R-b | ||||||
| 28/54 | |||||||
| 29/54 | R-b | ||||||
| 30/54 | R-b | ||||||
| 31/54 | R-b | ||||||
| 32/54 | Originally-by | ||||||
| 33/54 | R-b | ||||||
| 34/54 | |||||||
| 35/54 | |||||||
| 36/54 | |||||||
| 37/54 | |||||||
| 38/54 | |||||||
| 39/54 | |||||||
| 40/54 | |||||||
| 41/54 | |||||||
| 42/54 | |||||||
| 43/54 | |||||||
| 44/54 | |||||||
| 45/54 | |||||||
| 46/54 | |||||||
| 47/54 | |||||||
| 48/54 | |||||||
| 49/54 | R-b | A-b | A-b | ||||
| 50/54 | |||||||
| 51/54 | |||||||
| 52/54 | |||||||
| 53/54 | |||||||
| 54/54 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.
Cover letter [patch V181 00/54] x86/pti: Final XMAS release
Changes since V163:
- Moved the cpu entry area out of the fixmap because that caused failures due to fixmap size and cleanup_highmap() zapping fixmap PTEs.
- Moved all cpu entry area related code into separate files. The hodgepodge in cpu/common.c was really not appropriate.
- Folded Juergens XEN PV fix for vsyscall
- Folded Peters ACCESS bit simplification
- Cleaned up and fixed dump_pagetables
- Added Vlastimils PTI/NOPTI marker for dumpstack
- Addressed various minor review comments
Diffstat against V163 appended.
Thanks to everyone who looked and cared!
It's perfect now because I'm going to have quiet holidays no matter what.
Nevertheless, please review and test the hell out of it.
The lot is based on:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/pti.entry
The series is also available from git:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/pti
The patch tarball is at:
https://tglx.de/~tglx/patches-pti-181.tar.bz2
sha1sum of decompressed tarball: 3b9c1729efe58e793a40031f54e82cac8aba3884
Thanks,
tglx
---
Documentation/x86/x86_64/mm.txt | 4 arch/x86/Kconfig | 3 arch/x86/entry/vsyscall/vsyscall_64.c | 7 - arch/x86/events/intel/ds.c | 53 ++++++---- arch/x86/include/asm/cpu_entry_area.h | 87 +++++++++++++++++ arch/x86/include/asm/desc.h | 1 arch/x86/include/asm/fixmap.h | 96 ------------------- arch/x86/include/asm/pgtable.h | 4 arch/x86/include/asm/pgtable_32_types.h | 15 ++- arch/x86/include/asm/pgtable_64_types.h | 55 ++++++----- arch/x86/kernel/cpu/common.c | 126 ------------------------- arch/x86/kernel/dumpstack.c | 7 + arch/x86/kernel/tls.c | 11 -- arch/x86/kernel/traps.c | 6 - arch/x86/mm/Makefile | 8 - arch/x86/mm/cpu_entry_area.c | 159 ++++++++++++++++++++++++++++++++ arch/x86/mm/dump_pagetables.c | 105 ++++++++++++--------- arch/x86/mm/init_32.c | 6 + arch/x86/mm/kasan_init_64.c | 6 - arch/x86/mm/pgtable_32.c | 1 arch/x86/mm/pti.c | 52 +++++----- arch/x86/xen/mmu_pv.c | 2 22 files changed, 449 insertions(+), 365 deletions(-)