All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/43] x86 entry-stack and Kaiser series, 2017/11/24 version
@ 2017-11-24  9:14 Ingo Molnar
  2017-11-24  9:14 ` [PATCH 01/43] x86/decoder: Add new TEST instruction pattern Ingo Molnar
                   ` (44 more replies)
  0 siblings, 45 replies; 79+ messages in thread
From: Ingo Molnar @ 2017-11-24  9:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dave Hansen, Andy Lutomirski, Thomas Gleixner, H . Peter Anvin,
	Peter Zijlstra, Borislav Petkov, Linus Torvalds

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

-- 
2.14.1

^ permalink raw reply	[flat|nested] 79+ messages in thread
* [PATCH 00/43] x86 entry-stack and Kaiser series, 2017/11/24, v2 version
@ 2017-11-24 17:23 Ingo Molnar
  2017-11-24 17:24 ` [PATCH 38/43] x86/mm/kaiser: Disable native VSYSCALL Ingo Molnar
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2017-11-24 17:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dave Hansen, Andy Lutomirski, Thomas Gleixner, H . Peter Anvin,
	Peter Zijlstra, Borislav Petkov, Linus Torvalds

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

-- 
2.14.1

^ permalink raw reply	[flat|nested] 79+ messages in thread

end of thread, other threads:[~2017-12-02  7:39 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-24  9:14 [PATCH 00/43] x86 entry-stack and Kaiser series, 2017/11/24 version Ingo Molnar
2017-11-24  9:14 ` [PATCH 01/43] x86/decoder: Add new TEST instruction pattern Ingo Molnar
2017-11-24 10:38   ` Borislav Petkov
2017-12-02  7:39   ` Robert Elliott (Persistent Memory)
2017-11-24  9:14 ` [PATCH 02/43] x86/entry/64: Allocate and enable the SYSENTER stack Ingo Molnar
2017-11-24  9:14 ` [PATCH 03/43] x86/dumpstack: Add get_stack_info() support for " Ingo Molnar
2017-11-24  9:14 ` [PATCH 04/43] x86/gdt: Put per-cpu GDT remaps in ascending order Ingo Molnar
2017-11-24  9:14 ` [PATCH 05/43] x86/fixmap: Generalize the GDT fixmap mechanism Ingo Molnar
2017-11-24 11:00   ` Borislav Petkov
2017-11-24  9:14 ` [PATCH 06/43] x86/kasan/64: Teach KASAN about the cpu_entry_area Ingo Molnar
2017-11-24  9:14 ` [PATCH 07/43] x86/entry: Fix assumptions that the HW TSS is at the beginning of cpu_tss Ingo Molnar
2017-11-24  9:14 ` [PATCH 08/43] x86/dumpstack: Handle stack overflow on all stacks Ingo Molnar
2017-11-24  9:14 ` [PATCH 09/43] x86/entry: Move SYSENTER_stack to the beginning of struct tss_struct Ingo Molnar
2017-11-24 11:44   ` Borislav Petkov
2017-11-24  9:14 ` [PATCH 10/43] x86/entry: Remap the TSS into the cpu entry area Ingo Molnar
2017-11-24  9:14 ` [PATCH 11/43] x86/entry/64: Separate cpu_current_top_of_stack from TSS.sp0 Ingo Molnar
2017-11-24 14:19   ` Borislav Petkov
2017-11-24  9:14 ` [PATCH 12/43] x86/espfix/64: Stop assuming that pt_regs is on the entry stack Ingo Molnar
2017-11-24  9:14 ` [PATCH 13/43] x86/entry/64: Use a percpu trampoline stack for IDT entries Ingo Molnar
2017-11-24 11:27   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 14/43] x86/entry/64: Return to userspace from the trampoline stack Ingo Molnar
2017-11-24 13:46   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 15/43] x86/entry/64: Create a percpu SYSCALL entry trampoline Ingo Molnar
2017-11-24 13:52   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 16/43] x86/irq: Remove an old outdated comment about context tracking races Ingo Molnar
2017-11-24 13:53   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 17/43] x86/irq/64: Print the offending IP in the stack overflow warning Ingo Molnar
2017-11-24 14:22   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 18/43] x86/entry/64: Move the IST stacks into cpu_entry_area Ingo Molnar
2017-11-24 14:23   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 19/43] x86/entry/64: Remove the SYSENTER stack canary Ingo Molnar
2017-11-24 14:23   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code Ingo Molnar
2017-11-24 14:24   ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 21/43] x86/mm/kaiser: Disable global pages by default with KAISER Ingo Molnar
2017-11-24  9:14 ` [PATCH 22/43] x86/mm/kaiser: Prepare assembly for entry/exit CR3 switching Ingo Molnar
2017-11-24 12:05   ` Peter Zijlstra
2017-11-24 12:17     ` Ingo Molnar
2017-11-24 12:45       ` Peter Zijlstra
2017-11-24 13:04         ` Thomas Gleixner
2017-11-24  9:14 ` [PATCH 23/43] x86/mm/kaiser: Introduce user-mapped per-cpu areas Ingo Molnar
2017-11-24  9:14 ` [PATCH 24/43] x86/mm/kaiser: Mark per-cpu data structures required for entry/exit Ingo Molnar
2017-11-24  9:14 ` [PATCH 25/43] x86/mm/kaiser: Unmap kernel from userspace page tables (core patch) Ingo Molnar
2017-11-24 12:13   ` Peter Zijlstra
2017-11-24 13:46     ` Ingo Molnar
2017-11-24 12:16   ` Peter Zijlstra
2017-11-24 16:33     ` Dave Hansen
2017-11-26 15:13       ` Ingo Molnar
2017-11-24 13:30   ` Peter Zijlstra
2017-11-26 15:15     ` Ingo Molnar
2017-11-27  8:59       ` [PATCH] x86/mm/kaiser: Use the other page_table_lock pattern Peter Zijlstra
2017-11-27  8:59       ` [PATCH] mm: Unify page_table_lock allocation pattern Peter Zijlstra
2017-11-24  9:14 ` [PATCH 26/43] x86/mm/kaiser: Allow NX poison to be set in p4d/pgd Ingo Molnar
2017-11-24  9:14 ` [PATCH 27/43] x86/mm/kaiser: Make sure static PGDs are 8k in size Ingo Molnar
2017-11-24  9:14 ` [PATCH 28/43] x86/mm/kaiser: Map CPU entry area Ingo Molnar
2017-11-24 13:43   ` Peter Zijlstra
2017-11-24  9:14 ` [PATCH 29/43] x86/mm/kaiser: Map dynamically-allocated LDTs Ingo Molnar
2017-11-24  9:14 ` [PATCH 30/43] x86/mm/kaiser: Map espfix structures Ingo Molnar
2017-11-24 13:47   ` Peter Zijlstra
2017-11-24 16:17     ` Andy Lutomirski
2017-11-27  9:14       ` Peter Zijlstra
2017-11-27 15:35         ` Peter Zijlstra
2017-11-24  9:14 ` [PATCH 31/43] x86/mm/kaiser: Map entry stack variable Ingo Molnar
2017-11-24  9:14 ` [PATCH 32/43] x86/mm/kaiser: Map virtually-addressed performance monitoring buffers Ingo Molnar
2017-11-24  9:14 ` [PATCH 33/43] x86/mm: Move CR3 construction functions Ingo Molnar
2017-11-24  9:14 ` [PATCH 34/43] x86/mm: Remove hard-coded ASID limit checks Ingo Molnar
2017-11-24  9:14 ` [PATCH 35/43] x86/mm: Put mmu-to-h/w ASID translation in one place Ingo Molnar
2017-11-24  9:14 ` [PATCH 36/43] x86/mm: Allow flushing for future ASID switches Ingo Molnar
2017-11-24  9:14 ` [PATCH 37/43] x86/mm/kaiser: Use PCID feature to make user and kernel switches faster Ingo Molnar
2017-11-24  9:14 ` [PATCH 38/43] x86/mm/kaiser: Disable native VSYSCALL Ingo Molnar
2017-11-24  9:14 ` [PATCH 39/43] x86/mm/kaiser: Add debugfs file to turn KAISER on/off at runtime Ingo Molnar
2017-11-24  9:14 ` [PATCH 40/43] x86/mm/kaiser: Add a function to check for KAISER being enabled Ingo Molnar
2017-11-24  9:14 ` [PATCH 41/43] x86/mm/kaiser: Un-poison PGDs at runtime Ingo Molnar
2017-11-24  9:14 ` [PATCH 42/43] x86/mm/kaiser: Allow KAISER to be enabled/disabled " Ingo Molnar
2017-11-24  9:14 ` [PATCH 43/43] x86/mm/kaiser: Add Kconfig Ingo Molnar
2017-11-24 13:55 ` [PATCH 00/43] x86 entry-stack and Kaiser series, 2017/11/24 version Ingo Molnar
2017-11-24 15:23 ` Thomas Gleixner
2017-11-24 17:19   ` Ingo Molnar
2017-11-24 17:23 [PATCH 00/43] x86 entry-stack and Kaiser series, 2017/11/24, v2 version Ingo Molnar
2017-11-24 17:24 ` [PATCH 38/43] x86/mm/kaiser: Disable native VSYSCALL Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.