Merge tag 'x86_shstk_for_6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 31 Aug 2023 19:20:12 +0000 (12:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 31 Aug 2023 19:20:12 +0000 (12:20 -0700)
commitdf57721f9a63e8a1fb9b9b2e70de4aa4c7e0cd2e
treeb77ba91405ebc69c36ccbb55476ed0d018d7fba4
parentb97d64c722598ffed42ece814a2cb791336c6679
parent1fe428d3692fb10a0e8d85fafe719b154e43ad4e
Merge tag 'x86_shstk_for_6.6-rc1' of git://git./linux/kernel/git/tip/tip

Pull x86 shadow stack support from Dave Hansen:
 "This is the long awaited x86 shadow stack support, part of Intel's
  Control-flow Enforcement Technology (CET).

  CET consists of two related security features: shadow stacks and
  indirect branch tracking. This series implements just the shadow stack
  part of this feature, and just for userspace.

  The main use case for shadow stack is providing protection against
  return oriented programming attacks. It works by maintaining a
  secondary (shadow) stack using a special memory type that has
  protections against modification. When executing a CALL instruction,
  the processor pushes the return address to both the normal stack and
  to the special permission shadow stack. Upon RET, the processor pops
  the shadow stack copy and compares it to the normal stack copy.

  For more information, refer to the links below for the earlier
  versions of this patch set"

Link: https://lore.kernel.org/lkml/20220130211838.8382-1-rick.p.edgecombe@intel.com/
Link: https://lore.kernel.org/lkml/20230613001108.3040476-1-rick.p.edgecombe@intel.com/
* tag 'x86_shstk_for_6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (47 commits)
  x86/shstk: Change order of __user in type
  x86/ibt: Convert IBT selftest to asm
  x86/shstk: Don't retry vm_munmap() on -EINTR
  x86/kbuild: Fix Documentation/ reference
  x86/shstk: Move arch detail comment out of core mm
  x86/shstk: Add ARCH_SHSTK_STATUS
  x86/shstk: Add ARCH_SHSTK_UNLOCK
  x86: Add PTRACE interface for shadow stack
  selftests/x86: Add shadow stack test
  x86/cpufeatures: Enable CET CR4 bit for shadow stack
  x86/shstk: Wire in shadow stack interface
  x86: Expose thread features in /proc/$PID/status
  x86/shstk: Support WRSS for userspace
  x86/shstk: Introduce map_shadow_stack syscall
  x86/shstk: Check that signal frame is shadow stack mem
  x86/shstk: Check that SSP is aligned on sigreturn
  x86/shstk: Handle signals for shadow stack
  x86/shstk: Introduce routines modifying shstk
  x86/shstk: Handle thread shadow stack
  x86/shstk: Add user-mode shadow stack support
  ...
67 files changed:
Documentation/filesystems/proc.rst
arch/Kconfig
arch/alpha/include/asm/pgtable.h
arch/arc/include/asm/pgtable-bits-arcv2.h
arch/arm/include/asm/pgtable.h
arch/arm64/include/asm/pgtable.h
arch/arm64/kernel/signal.c
arch/arm64/mm/trans_pgd.c
arch/csky/include/asm/pgtable.h
arch/hexagon/include/asm/pgtable.h
arch/ia64/include/asm/pgtable.h
arch/loongarch/include/asm/pgtable.h
arch/m68k/include/asm/mcf_pgtable.h
arch/m68k/include/asm/motorola_pgtable.h
arch/m68k/include/asm/sun3_pgtable.h
arch/microblaze/include/asm/pgtable.h
arch/mips/include/asm/pgtable.h
arch/nios2/include/asm/pgtable.h
arch/openrisc/include/asm/pgtable.h
arch/parisc/include/asm/pgtable.h
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/riscv/include/asm/pgtable.h
arch/s390/Kconfig
arch/s390/include/asm/pgtable.h
arch/sh/include/asm/pgtable_32.h
arch/sparc/include/asm/pgtable_32.h
arch/sparc/include/asm/pgtable_64.h
arch/um/include/asm/pgtable.h
arch/x86/Kconfig
arch/x86/entry/syscalls/syscall_64.tbl
arch/x86/include/asm/cpufeatures.h
arch/x86/include/asm/idtentry.h
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_types.h
arch/x86/include/asm/processor.h
arch/x86/include/asm/tlbflush.h
arch/x86/kernel/Makefile
arch/x86/kernel/cpu/common.c
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/xstate.c
arch/x86/kernel/idt.c
arch/x86/kernel/process.c
arch/x86/kernel/traps.c
arch/x86/mm/fault.c
arch/x86/mm/pgtable.c
arch/x86/xen/enlighten_pv.c
arch/x86/xen/mmu_pv.c
arch/xtensa/include/asm/pgtable.h
fs/aio.c
fs/proc/task_mmu.c
include/linux/mm.h
include/linux/pgtable.h
include/linux/syscalls.h
include/uapi/linux/elf.h
mm/debug_vm_pgtable.c
mm/gup.c
mm/huge_memory.c
mm/internal.h
mm/memory.c
mm/migrate.c
mm/migrate_device.c
mm/mmap.c
mm/mprotect.c
mm/nommu.c
mm/userfaultfd.c
mm/util.c