Skip to content

x86 entry-stack and Kaiser series, 2017/11/24 version

Ingo Molnar lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest43 patches 32 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/43x86/decoder: Add new TEST instruction patternarch/x86/lib/x86-opcode-map.txt+1 -12 replies
2/43x86/entry/64: Allocate and enable the SYSENTER stackarch/x86/entry/entry_64_compat.S arch/x86/include/asm/processor.h arch/x86/kernel/asm-offsets.c +4 more+10 -140 replies
3/43x86/dumpstack: Add get_stack_info() support for the SYSENTER stackarch/x86/include/asm/stacktrace.h arch/x86/kernel/dumpstack.c arch/x86/kernel/dumpstack_32.c +1 more+34 -00 replies
4/43x86/gdt: Put per-cpu GDT remaps in ascending orderarch/x86/include/asm/desc.h+1 -10 replies
5/43x86/fixmap: Generalize the GDT fixmap mechanismarch/x86/include/asm/desc.h arch/x86/include/asm/fixmap.h arch/x86/kernel/cpu/common.c +1 more+41 -181 reply
6/43x86/kasan/64: Teach KASAN about the cpu_entry_areaarch/x86/mm/kasan_init_64.c+12 -10 replies
7/43x86/entry: Fix assumptions that the HW TSS is at the beginning of cpu_tssarch/x86/include/asm/desc.h arch/x86/include/asm/processor.h arch/x86/kernel/cpu/common.c +2 more+31 -320 replies
8/43x86/dumpstack: Handle stack overflow on all stacksarch/x86/kernel/dumpstack.c+14 -100 replies
9/43x86/entry: Move SYSENTER_stack to the beginning of struct tss_structarch/x86/include/asm/processor.h arch/x86/kernel/cpu/common.c+33 -91 reply
10/43x86/entry: Remap the TSS into the cpu entry areaarch/x86/entry/entry_32.S arch/x86/include/asm/fixmap.h arch/x86/kernel/asm-offsets.c +3 more+54 -140 replies
11/43x86/entry/64: Separate cpu_current_top_of_stack from TSS.sp0arch/x86/include/asm/processor.h arch/x86/include/asm/thread_info.h arch/x86/kernel/asm-offsets_64.c +2 more+26 -61 reply
12/43x86/espfix/64: Stop assuming that pt_regs is on the entry stackarch/x86/kernel/traps.c+3 -20 replies
13/43x86/entry/64: Use a percpu trampoline stack for IDT entriesarch/x86/entry/entry_64.S arch/x86/entry/entry_64_compat.S arch/x86/include/asm/switch_to.h +3 more+68 -311 reply
14/43x86/entry/64: Return to userspace from the trampoline stackarch/x86/entry/entry_64.S+51 -41 reply
15/43x86/entry/64: Create a percpu SYSCALL entry trampolinearch/x86/entry/entry_64.S arch/x86/include/asm/fixmap.h arch/x86/kernel/asm-offsets.c +2 more+72 -11 reply
16/43x86/irq: Remove an old outdated comment about context tracking racesarch/x86/kernel/irq.c+0 -121 reply
17/43x86/irq/64: Print the offending IP in the stack overflow warningarch/x86/kernel/irq_64.c+2 -21 reply
18/43x86/entry/64: Move the IST stacks into cpu_entry_areaarch/x86/include/asm/fixmap.h arch/x86/kernel/cpu/common.c+35 -151 reply
19/43x86/entry/64: Remove the SYSENTER stack canaryarch/x86/include/asm/processor.h arch/x86/kernel/dumpstack.c arch/x86/kernel/process.c +1 more+1 -111 reply
20/43x86/entry: Clean up SYSENTER_stack codearch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/fixmap.h +4 more+21 -231 reply
21/43x86/mm/kaiser: Disable global pages by default with KAISERarch/x86/include/asm/pgtable_types.h arch/x86/mm/pageattr.c+21 -90 replies
22/43x86/mm/kaiser: Prepare assembly for entry/exit CR3 switchingarch/x86/entry/calling.h arch/x86/entry/entry_64.S arch/x86/entry/entry_64_compat.S+137 -44 replies
23/43x86/mm/kaiser: Introduce user-mapped per-cpu areasinclude/asm-generic/vmlinux.lds.h include/linux/percpu-defs.h+37 -00 replies
24/43x86/mm/kaiser: Mark per-cpu data structures required for entry/exitarch/x86/include/asm/desc.h arch/x86/include/asm/processor.h arch/x86/kernel/cpu/common.c +1 more+5 -50 replies
25/43x86/mm/kaiser: Unmap kernel from userspace page tables (core patch)Documentation/x86/kaiser.txt arch/x86/boot/compressed/pagetable.c arch/x86/entry/calling.h +12 more+881 -69 replies
26/43x86/mm/kaiser: Allow NX poison to be set in p4d/pgdarch/x86/include/asm/pgtable.h+12 -20 replies
27/43x86/mm/kaiser: Make sure static PGDs are 8k in sizearch/x86/kernel/head_64.S+16 -00 replies
28/43x86/mm/kaiser: Map CPU entry areaarch/x86/include/asm/kaiser.h arch/x86/kernel/cpu/common.c arch/x86/mm/kaiser.c +1 more+44 -01 reply
29/43x86/mm/kaiser: Map dynamically-allocated LDTsarch/x86/kernel/ldt.c+20 -50 replies
30/43x86/mm/kaiser: Map espfix structuresarch/x86/kernel/espfix_64.c+9 -34 replies
31/43x86/mm/kaiser: Map entry stack variablearch/x86/kernel/process_64.c+1 -10 replies
32/43x86/mm/kaiser: Map virtually-addressed performance monitoring buffersarch/x86/events/intel/ds.c+37 -120 replies
33/43x86/mm: Move CR3 construction functionsarch/x86/include/asm/mmu_context.h arch/x86/include/asm/tlbflush.h arch/x86/mm/tlb.c+32 -320 replies
34/43x86/mm: Remove hard-coded ASID limit checksarch/x86/include/asm/tlbflush.h+15 -20 replies
35/43x86/mm: Put mmu-to-h/w ASID translation in one placearch/x86/include/asm/tlbflush.h+18 -120 replies
36/43x86/mm: Allow flushing for future ASID switchesarch/x86/include/asm/tlbflush.h arch/x86/mm/tlb.c+72 -100 replies
37/43x86/mm/kaiser: Use PCID feature to make user and kernel switches fasterarch/x86/entry/calling.h arch/x86/entry/entry_64.S arch/x86/include/asm/cpufeatures.h +6 more+262 -600 replies
38/43x86/mm/kaiser: Disable native VSYSCALLarch/x86/Kconfig+8 -00 replies
39/43x86/mm/kaiser: Add debugfs file to turn KAISER on/off at runtimearch/x86/mm/kaiser.c+48 -00 replies
40/43x86/mm/kaiser: Add a function to check for KAISER being enabledarch/x86/include/asm/kaiser.h include/linux/kaiser.h+10 -00 replies
41/43x86/mm/kaiser: Un-poison PGDs at runtimearch/x86/include/asm/pgtable_64.h arch/x86/mm/kaiser.c include/linux/kaiser.h+55 -20 replies
42/43x86/mm/kaiser: Allow KAISER to be enabled/disabled at runtimearch/x86/entry/calling.h arch/x86/mm/kaiser.c+78 -40 replies
43/43x86/mm/kaiser: Add Kconfigsecurity/Kconfig+10 -00 replies

Reviews trailers per patch

19 of 43 patches have a Reviewed-by or Acked-by.

PatchBorislav PetkovThomas Gleixner
1/43
2/43R-b R-b
3/43R-b
4/43R-b R-b
5/43R-b R-b
6/43
7/43R-b R-b
8/43R-b
9/43R-b R-b
10/43R-b
11/43R-b R-b
12/43R-b
13/43R-b
14/43R-b
15/43R-b
16/43R-b
17/43R-b
18/43R-b
19/43R-b
20/43R-b
21/43R-b R-b
22/43
23/43
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.

Read the v1 thread

Cover letter [PATCH 00/43] x86 entry-stack and Kaiser series, 2017/11/24 version

This is a linear series of patches 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), plus fixes - for easier review.

The code should be the latest posted by Andy and Dave.

Any bugs caused by mis-merges, mis-backmerges or mis-fixes are mine.

Thanks,

Ingo

Andy Lutomirski (19):
x86/entry/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/entry: Fix assumptions that the HW TSS is at the beginning of cpu_tss x86/dumpstack: Handle stack overflow on all stacks
x86/entry: Move SYSENTER_stack to the beginning of struct tss_struct x86/entry: Remap the TSS into the cpu entry area x86/entry/64: Separate cpu_current_top_of_stack from TSS.sp0 x86/espfix/64: Stop assuming that pt_regs is on the entry stack x86/entry/64: Use a percpu trampoline stack for IDT entries x86/entry/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: Print the offending IP in the stack overflow warning 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: 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                   | 215 ++++++++--
 arch/x86/entry/entry_64_compat.S            |  39 +-
 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, 2259 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