x86 entry-stack and Kaiser series, 2017/11/24, v2 version
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest43 patches 58 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/43 | x86/decoder: Add new TEST instruction patternarch/ | +1 | 0 replies | |
| 2/43 | x86/asm/64: Allocate and enable the SYSENTER stackarch/ arch/ arch/ +4 more | +10 | 0 replies | |
| 3/43 | x86/dumpstack: Add get_stack_info() support for the SYSENTER stackarch/ arch/ arch/ +1 more | +34 | 0 replies | |
| 4/43 | x86/gdt: Put per-cpu GDT remaps in ascending orderarch/ | +1 | 0 replies | |
| 5/43 | x86/fixmap: Generalize the GDT fixmap mechanismarch/ arch/ arch/ +1 more | +41 | 0 replies | |
| 6/43 | x86/kasan/64: Teach KASAN about the cpu_entry_areaarch/ | +12 | 0 replies | |
| 7/43 | x86/asm: Fix assumptions that the HW TSS is at the beginning of cpu_tssarch/ arch/ arch/ +2 more | +31 | 0 replies | |
| 8/43 | x86/dumpstack: Handle stack overflow on all stacksarch/ | +14 | 0 replies | |
| 9/43 | x86/asm: Move SYSENTER_stack to the beginning of struct tss_structarch/ arch/ | +33 | 0 replies | |
| 10/43 | x86/asm: Remap the TSS into the cpu entry areaarch/ arch/ arch/ +3 more | +54 | 0 replies | |
| 11/43 | x86/asm/64: Separate cpu_current_top_of_stack from TSS.sp0arch/ arch/ arch/ +2 more | +26 | 0 replies | |
| 12/43 | x86/espfix/64: Stop assuming that pt_regs is on the entry stackarch/ | +3 | 5 replies | |
| 13/43 | x86/asm/64: Use a percpu trampoline stack for IDT entriesarch/ arch/ arch/ +3 more | +68 | 2 replies | |
| 14/43 | x86/asm/64: Return to userspace from the trampoline stackarch/ | +51 | 3 replies | |
| 15/43 | x86/entry/64: Create a percpu SYSCALL entry trampolinearch/ arch/ arch/ +2 more | +72 | 3 replies | |
| 16/43 | x86/irq: Remove an old outdated comment about context tracking racesarch/ | +0 | 1 reply | |
| 17/43 | x86/irq/64: In the stack overflow warning, print the offending IParch/ | +2 | 1 reply | |
| 18/43 | x86/entry/64: Move the IST stacks into cpu_entry_areaarch/ arch/ | +35 | 1 reply | |
| 19/43 | x86/entry/64: Remove the SYSENTER stack canaryarch/ arch/ arch/ +1 more | +1 | 1 reply | |
| 20/43 | x86/entry: Clean up SYSENTER_stack codearch/ arch/ arch/ +4 more | +21 | 7 replies | |
| 21/43 | x86/mm/kaiser: Disable global pages by default with KAISERarch/ arch/ | +21 | 0 replies | |
| 22/43 | x86/mm/kaiser: Prepare assembly for entry/exit CR3 switchingarch/ arch/ arch/ | +122 | 6 replies | |
| 23/43 | x86/mm/kaiser: Introduce user-mapped per-cpu areasinclude/ include/ | +37 | 3 replies | |
| 24/43 | x86/mm/kaiser: Mark per-cpu data structures required for entry/exitarch/ arch/ arch/ +1 more | +5 | 2 replies | |
| 25/43 | x86/mm/kaiser: Unmap kernel from userspace page tables (core patch)Documentation/ arch/ arch/ +12 more | +881 | 6 replies | |
| 26/43 | x86/mm/kaiser: Allow NX poison to be set in p4d/pgdarch/ | +12 | 0 replies | |
| 27/43 | x86/mm/kaiser: Make sure static PGDs are 8k in sizearch/ | +16 | 0 replies | |
| 28/43 | x86/mm/kaiser: Map cpu entry areaarch/ arch/ arch/ +1 more | +44 | 2 replies | |
| 29/43 | x86/mm/kaiser: Map dynamically-allocated LDTsarch/ | +20 | 0 replies | |
| 30/43 | x86/mm/kaiser: Map espfix structuresarch/ | +9 | 0 replies | |
| 31/43 | x86/mm/kaiser: Map entry stack variablearch/ | +1 | 0 replies | |
| 32/43 | x86/mm/kaiser: Map virtually-addressed performance monitoring buffersarch/ | +37 | 0 replies | |
| 33/43 | x86/mm: Move CR3 construction functionsarch/ arch/ arch/ | +32 | 0 replies | |
| 34/43 | x86/mm: Remove hard-coded ASID limit checksarch/ | +15 | 0 replies | |
| 35/43 | x86/mm: Put mmu-to-h/w ASID translation in one placearch/ | +18 | 0 replies | |
| 36/43 | x86/mm/kaiser: Allow flushing for future ASID switchesarch/ arch/ | +72 | 0 replies | |
| 37/43 | x86/mm/kaiser: Use PCID feature to make user and kernel switches fasterarch/ arch/ arch/ +5 more | +261 | 0 replies | |
| 38/43 | x86/mm/kaiser: Disable native VSYSCALLarch/ | +8 | 0 replies | |
| 39/43 | x86/mm/kaiser: Add debugfs file to turn KAISER on/off at runtimearch/ | +48 | 0 replies | |
| 40/43 | x86/mm/kaiser: Add a function to check for KAISER being enabledarch/ include/ | +10 | 0 replies | |
| 41/43 | x86/mm/kaiser: Un-poison PGDs at runtimearch/ arch/ include/ | +55 | 0 replies | |
| 42/43 | x86/mm/kaiser: Allow KAISER to be enabled/disabled at runtimearch/ arch/ | +78 | 7 replies | |
| 43/43 | x86/mm/kaiser: Add Kconfigsecurity/ | +10 | 0 replies |
Reviews trailers per patch
20 of 43 patches have a Reviewed-by or Acked-by.
| Patch | Thomas Gleixner | Borislav Petkov |
|---|---|---|
| 1/43 | ||
| 2/43 | R-b | R-b |
| 3/43 | R-b | |
| 4/43 | R-b | R-b |
| 5/43 | R-b | |
| 6/43 | ||
| 7/43 | R-b | R-b |
| 8/43 | R-b | |
| 9/43 | R-b | |
| 10/43 | R-b | |
| 11/43 | R-b | |
| 12/43 | R-b | R-b |
| 13/43 | R-b | |
| 14/43 | R-b | |
| 15/43 | R-b | R-b |
| 16/43 | R-b | |
| 17/43 | R-b | |
| 18/43 | R-b | |
| 19/43 | R-b | |
| 20/43 | ||
| 21/43 | R-b | R-b |
| 22/43 | R-b R-b | |
| 23/43 | R-b | |
| 24/43 | ||
| 25/43 | ||
| 26/43 | ||
| 27/43 | ||
| 28/43 | ||
| 29/43 | ||
| 30/43 | ||
| 31/43 | ||
| 32/43 | ||
| 33/43 | ||
| 34/43 | ||
| 35/43 | ||
| 36/43 | ||
| 37/43 | ||
| 38/43 | ||
| 39/43 | ||
| 40/43 | ||
| 41/43 | ||
| 42/43 | ||
| 43/43 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/43] x86 entry-stack and Kaiser series, 2017/11/24, v2 version
This is a repost of the latest entry-stack plus Kaiser bits from Andy Lutomirski (v3 series from today) and Dave Hansen (kaiser-414-tipwip-20171123 version), on top of latest tip:x86/urgent (12a78d43de76).
This version is pretty well tested, at least on the usual x86 tree test systems. It has a couple of merge mistakes fixed, the biggest difference is in patch #22:
x86/mm/kaiser: Prepare assembly for entry/exit CR3 switching
The other patches are identical or very close to what I posted earlier today.
Any remaining bugs caused by mis-merges, mis-backmerges or mis-fixes are mine.
Thanks,
Ingo
Andy Lutomirski (19):
x86/asm/64: Allocate and enable the SYSENTER stack x86/dumpstack: Add get_stack_info() support for the SYSENTER stack x86/gdt: Put per-cpu GDT remaps in ascending order x86/fixmap: Generalize the GDT fixmap mechanism x86/kasan/64: Teach KASAN about the cpu_entry_area
x86/asm: Fix assumptions that the HW TSS is at the beginning of cpu_tss x86/dumpstack: Handle stack overflow on all stacks
x86/asm: Move SYSENTER_stack to the beginning of struct tss_struct x86/asm: Remap the TSS into the cpu entry area
x86/asm/64: Separate cpu_current_top_of_stack from TSS.sp0 x86/espfix/64: Stop assuming that pt_regs is on the entry stack x86/asm/64: Use a percpu trampoline stack for IDT entries x86/asm/64: Return to userspace from the trampoline stack x86/entry/64: Create a percpu SYSCALL entry trampoline x86/irq: Remove an old outdated comment about context tracking races x86/irq/64: In the stack overflow warning, print the offending IP x86/entry/64: Move the IST stacks into cpu_entry_area x86/entry/64: Remove the SYSENTER stack canary
x86/entry: Clean up SYSENTER_stack code
Dave Hansen (22):
x86/mm/kaiser: Disable global pages by default with KAISER x86/mm/kaiser: Prepare assembly for entry/exit CR3 switching x86/mm/kaiser: Introduce user-mapped per-cpu areas x86/mm/kaiser: Mark per-cpu data structures required for entry/exit x86/mm/kaiser: Unmap kernel from userspace page tables (core patch) x86/mm/kaiser: Allow NX poison to be set in p4d/pgd x86/mm/kaiser: Make sure static PGDs are 8k in size x86/mm/kaiser: Map cpu entry area
x86/mm/kaiser: Map dynamically-allocated LDTs x86/mm/kaiser: Map espfix structures
x86/mm/kaiser: Map entry stack variable
x86/mm: Move CR3 construction functions
x86/mm: Remove hard-coded ASID limit checks
x86/mm: Put mmu-to-h/w ASID translation in one place x86/mm/kaiser: Allow flushing for future ASID switches x86/mm/kaiser: Use PCID feature to make user and kernel switches faster x86/mm/kaiser: Disable native VSYSCALL
x86/mm/kaiser: Add debugfs file to turn KAISER on/off at runtime x86/mm/kaiser: Add a function to check for KAISER being enabled x86/mm/kaiser: Un-poison PGDs at runtime
x86/mm/kaiser: Allow KAISER to be enabled/disabled at runtime x86/mm/kaiser: Add Kconfig
Hugh Dickins (1):
x86/mm/kaiser: Map virtually-addressed performance monitoring buffers
Masami Hiramatsu (1):
x86/decoder: Add new TEST instruction pattern
Documentation/x86/kaiser.txt | 162 ++++++++ arch/x86/Kconfig | 8 + arch/x86/boot/compressed/pagetable.c | 6 + arch/x86/entry/calling.h | 89 ++++ arch/x86/entry/entry_32.S | 6 +- arch/x86/entry/entry_64.S | 207 ++++++++-- arch/x86/entry/entry_64_compat.S | 31 +- arch/x86/events/intel/ds.c | 49 ++- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/desc.h | 13 +- arch/x86/include/asm/fixmap.h | 58 ++- arch/x86/include/asm/kaiser.h | 68 +++ arch/x86/include/asm/mmu_context.h | 29 +- arch/x86/include/asm/pgtable.h | 19 +- arch/x86/include/asm/pgtable_64.h | 146 +++++++ arch/x86/include/asm/pgtable_types.h | 25 +- arch/x86/include/asm/processor.h | 49 ++- arch/x86/include/asm/stacktrace.h | 3 + arch/x86/include/asm/switch_to.h | 2 +- arch/x86/include/asm/thread_info.h | 2 +- arch/x86/include/asm/tlbflush.h | 208 ++++++++-- arch/x86/include/asm/traps.h | 1 - arch/x86/include/uapi/asm/processor-flags.h | 3 +- arch/x86/kernel/asm-offsets.c | 7 + arch/x86/kernel/asm-offsets_32.c | 5 - arch/x86/kernel/asm-offsets_64.c | 1 + arch/x86/kernel/cpu/common.c | 139 +++++-- arch/x86/kernel/doublefault.c | 36 +- arch/x86/kernel/dumpstack.c | 42 +- arch/x86/kernel/dumpstack_32.c | 6 + arch/x86/kernel/dumpstack_64.c | 6 + arch/x86/kernel/espfix_64.c | 27 +- arch/x86/kernel/head_64.S | 30 +- arch/x86/kernel/irq.c | 12 - arch/x86/kernel/irq_64.c | 4 +- arch/x86/kernel/ldt.c | 25 +- arch/x86/kernel/process.c | 15 +- arch/x86/kernel/process_64.c | 3 +- arch/x86/kernel/traps.c | 27 +- arch/x86/kernel/vmlinux.lds.S | 10 + arch/x86/kvm/x86.c | 3 +- arch/x86/lib/x86-opcode-map.txt | 2 +- arch/x86/mm/Makefile | 1 + arch/x86/mm/init.c | 75 ++-- arch/x86/mm/kaiser.c | 620 ++++++++++++++++++++++++++++ arch/x86/mm/kasan_init_64.c | 13 +- arch/x86/mm/pageattr.c | 18 +- arch/x86/mm/pgtable.c | 16 +- arch/x86/mm/tlb.c | 105 ++++- arch/x86/power/cpu.c | 16 +- arch/x86/xen/mmu_pv.c | 2 +- include/asm-generic/vmlinux.lds.h | 7 + include/linux/kaiser.h | 38 ++ include/linux/percpu-defs.h | 30 ++ init/main.c | 3 + kernel/fork.c | 1 + security/Kconfig | 10 + 57 files changed, 2243 insertions(+), 297 deletions(-) create mode 100644 Documentation/x86/kaiser.txt create mode 100644 arch/x86/include/asm/kaiser.h create mode 100644 arch/x86/mm/kaiser.c create mode 100644 include/linux/kaiser.h
Signature · 1 line
2.14.1