linux-stable/arch/x86/kernel
Linus Torvalds 7001052160 Add support for Intel CET-IBT, available since Tigerlake (11th gen), which is a
coarse grained, hardware based, forward edge Control-Flow-Integrity mechanism
 where any indirect CALL/JMP must target an ENDBR instruction or suffer #CP.
 
 Additionally, since Alderlake (12th gen)/Sapphire-Rapids, speculation is
 limited to 2 instructions (and typically fewer) on branch targets not starting
 with ENDBR. CET-IBT also limits speculation of the next sequential instruction
 after the indirect CALL/JMP [1].
 
 CET-IBT is fundamentally incompatible with retpolines, but provides, as
 described above, speculation limits itself.
 
 [1] https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEv3OU3/byMaA0LqWJdkfhpEvA5LoFAmI/LI8VHHBldGVyekBp
 bmZyYWRlYWQub3JnAAoJEHZH4aRLwOS6ZnkP/2QCgQLTu6oRxv9O020CHwlaSEeD
 1Hoy3loum5q5hAi1Ik3dR9p0H5u64c9qbrBVxaFoNKaLt5GKrtHaDSHNk2L/CFHX
 urpH65uvTLxbyZzcahkAahoJ71XU+m7PcrHLWMunw9sy10rExYVsUOlFyoyG6XCF
 BDCNZpdkC09ZM3vwlWGMZd5Pp+6HcZNPyoV9tpvWAS2l+WYFWAID7mflbpQ+tA8b
 y/hM6b3Ud0rT2ubuG1iUpopgNdwqQZ+HisMPGprh+wKZkYwS2l8pUTrz0MaBkFde
 go7fW16kFy2HQzGm6aIEBmfcg0palP/mFVaWP0zS62LwhJSWTn5G6xWBr3yxSsht
 9gWCiI0oDZuTg698MedWmomdG2SK6yAuZuqmdKtLLoWfWgviPEi7TDFG/cKtZdAW
 ag8GM8T4iyYZzpCEcWO9GWbjo6TTGq30JBQefCBG47GjD0csv2ubXXx0Iey+jOwT
 x3E8wnv9dl8V9FSd/tMpTFmje8ges23yGrWtNpb5BRBuWTeuGiBPZED2BNyyIf+T
 dmewi2ufNMONgyNp27bDKopY81CPAQq9cVxqNm9Cg3eWPFnpOq2KGYEvisZ/rpEL
 EjMQeUBsy/C3AUFAleu1vwNnkwP/7JfKYpN00gnSyeQNZpqwxXBCKnHNgOMTXyJz
 beB/7u2KIUbKEkSN
 =jZfK
 -----END PGP SIGNATURE-----

Merge tag 'x86_core_for_5.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 CET-IBT (Control-Flow-Integrity) support from Peter Zijlstra:
 "Add support for Intel CET-IBT, available since Tigerlake (11th gen),
  which is a coarse grained, hardware based, forward edge
  Control-Flow-Integrity mechanism where any indirect CALL/JMP must
  target an ENDBR instruction or suffer #CP.

  Additionally, since Alderlake (12th gen)/Sapphire-Rapids, speculation
  is limited to 2 instructions (and typically fewer) on branch targets
  not starting with ENDBR. CET-IBT also limits speculation of the next
  sequential instruction after the indirect CALL/JMP [1].

  CET-IBT is fundamentally incompatible with retpolines, but provides,
  as described above, speculation limits itself"

[1] https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html

* tag 'x86_core_for_5.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
  kvm/emulate: Fix SETcc emulation for ENDBR
  x86/Kconfig: Only allow CONFIG_X86_KERNEL_IBT with ld.lld >= 14.0.0
  x86/Kconfig: Only enable CONFIG_CC_HAS_IBT for clang >= 14.0.0
  kbuild: Fixup the IBT kbuild changes
  x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy
  x86: Remove toolchain check for X32 ABI capability
  x86/alternative: Use .ibt_endbr_seal to seal indirect calls
  objtool: Find unused ENDBR instructions
  objtool: Validate IBT assumptions
  objtool: Add IBT/ENDBR decoding
  objtool: Read the NOENDBR annotation
  x86: Annotate idtentry_df()
  x86,objtool: Move the ASM_REACHABLE annotation to objtool.h
  x86: Annotate call_on_stack()
  objtool: Rework ASM_REACHABLE
  x86: Mark __invalid_creds() __noreturn
  exit: Mark do_group_exit() __noreturn
  x86: Mark stop_this_cpu() __noreturn
  objtool: Ignore extra-symbol code
  objtool: Rename --duplicate to --lto
  ...
2022-03-27 10:17:23 -07:00
..
acpi Power management updates for 5.18-rc1 2022-03-21 14:26:28 -07:00
apic bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
cpu Add support for Intel CET-IBT, available since Tigerlake (11th gen), which is a 2022-03-27 10:17:23 -07:00
fpu Reenable ENQCMD/PASID support: 2022-03-21 12:28:13 -07:00
kprobes x86/ibt: Annotate text references 2022-03-15 10:32:40 +01:00
.gitignore
alternative.c Add support for Intel CET-IBT, available since Tigerlake (11th gen), which is a 2022-03-27 10:17:23 -07:00
amd_gart_64.c
amd_nb.c hwmon updates for v5.17 2022-01-11 10:25:36 -08:00
aperture_64.c proc/vmcore: convert oldmem_pfn_is_ram callback to more generic vmcore callbacks 2021-11-09 10:02:48 -08:00
apm_32.c x86/ibt: Disable IBT around firmware 2022-03-15 10:32:40 +01:00
asm-offsets.c um, x86: bury crypto_tfm_ctx_offset 2021-12-21 21:31:35 +01:00
asm-offsets_32.c
asm-offsets_64.c
audit_64.c
bootflag.c
check.c
cpuid.c
crash.c
crash_core_32.c
crash_core_64.c
crash_dump_32.c
crash_dump_64.c
devicetree.c Devicetree updates for v5.16: 2021-11-02 22:22:13 -07:00
doublefault_32.c
dumpstack.c x86: remove __range_not_ok() 2022-02-25 09:36:05 +01:00
dumpstack_32.c
dumpstack_64.c
e820.c x86/boot: Fix memremap of setup_indirect structures 2022-03-09 12:49:44 +01:00
early-quirks.c Merge drm/drm-next into drm-intel-next 2022-01-31 13:19:33 -05:00
early_printk.c usb: early: xhci-dbc: Remove duplicate keep parsing 2022-03-15 18:20:34 +01:00
ebda.c
eisa.c
espfix_64.c
ftrace.c x86/ibt,ftrace: Make function-graph play nice 2022-03-15 10:32:37 +01:00
ftrace_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
ftrace_64.S x86/ibt,ftrace: Annotate ftrace code patching 2022-03-15 10:32:41 +01:00
head32.c
head64.c x86/head64: Add missing __head annotation to sme_postprocess_startup() 2022-02-12 11:37:09 +01:00
head_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
head_64.S x86/ibt,sev: Annotations 2022-03-15 10:32:41 +01:00
hpet.c rtc: Check return value from mc146818_get_time() 2021-12-16 21:50:06 +01:00
hw_breakpoint.c
i8237.c
i8253.c
i8259.c
idt.c x86/ibt: Add IBT feature, MSR and #CP handling 2022-03-15 10:32:39 +01:00
io_delay.c
ioport.c
irq.c
irq_32.c
irq_64.c
irq_work.c
irqflags.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
irqinit.c
itmt.c
jailhouse.c
jump_label.c
kdebugfs.c x86/boot: Fix memremap of setup_indirect structures 2022-03-09 12:49:44 +01:00
kexec-bzimage64.c
kgdb.c
ksysfs.c x86/boot: Fix memremap of setup_indirect structures 2022-03-09 12:49:44 +01:00
kvm.c x86/ibt,paravirt: Sprinkle ENDBR 2022-03-15 10:32:36 +01:00
kvmclock.c x86/kvmclock: Fix Hyper-V Isolated VM's boot issue when vCPUs > 64 2022-02-25 10:09:34 -05:00
ldt.c
machine_kexec_32.c
machine_kexec_64.c x86/ibt,kexec: Disable CET on kexec 2022-03-15 10:32:39 +01:00
Makefile x86/cc: Move arch/x86/{kernel/cc_platform.c => coco/core.c} 2022-02-23 18:25:58 +01:00
mmconf-fam10h_64.c
module.c Add support for Intel CET-IBT, available since Tigerlake (11th gen), which is a 2022-03-27 10:17:23 -07:00
mpparse.c
msr.c
nmi.c x86/nmi: Remove the 'strange power saving mode' hint from unknown NMI handler 2022-03-16 11:02:41 +01:00
nmi_selftest.c
paravirt-spinlocks.c
paravirt.c x86/ibt,paravirt: Sprinkle ENDBR 2022-03-15 10:32:36 +01:00
pci-dma.c
pci-iommu_table.c
pci-swiotlb.c
pcspeaker.c
perf_regs.c
platform-quirks.c
pmem.c
probe_roms.c
process.c Merge branch 'x86/cpu' into x86/core, to resolve conflicts 2022-03-15 12:52:51 +01:00
process.h x86: Snapshot thread flags 2021-12-01 00:06:43 +01:00
process_32.c
process_64.c x86: Remove toolchain check for X32 ABI capability 2022-03-15 10:32:48 +01:00
ptrace.c x86/ptrace: Fix xfpregs_set()'s incorrect xmm clearing 2022-02-18 11:23:21 +01:00
pvclock.c
quirks.c
reboot.c x86/mm: Flush global TLB when switching to trampoline page-table 2021-12-06 09:54:10 +01:00
reboot_fixups_32.c
relocate_kernel_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
relocate_kernel_64.S x86/ibt: Annotate text references 2022-03-15 10:32:40 +01:00
resource.c x86/PCI: revert "Ignore E820 reservations for bridge windows on newer systems" 2022-02-09 19:42:58 +01:00
rtc.c
setup.c x86/setup: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef 2022-03-23 19:00:34 -07:00
setup_percpu.c mm: percpu: add generic pcpu_populate_pte() function 2022-01-20 08:52:52 +02:00
sev-shared.c x86/sev: Shorten GHCB terminate macro names 2021-11-15 20:31:16 +01:00
sev.c - Add support for decoding instructions which do MMIO accesses in order 2022-01-10 10:00:03 -08:00
sev_verify_cbit.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
signal.c
signal_compat.c
smp.c
smpboot.c x86/ACPI: CPPC: Move init_freq_invariance_cppc() into x86 CPPC 2022-03-08 19:16:43 +01:00
stacktrace.c x86: remove __range_not_ok() 2022-02-25 09:36:05 +01:00
static_call.c x86: Add straight-line-speculation mitigation 2021-12-09 13:32:25 +01:00
step.c
sys_ia32.c
sys_x86_64.c
tboot.c
time.c
tls.c
tls.h
topology.c drivers/base/node: consolidate node device subsystem initialization in node_dev_init() 2022-03-22 15:57:10 -07:00
trace.c
trace_clock.c
tracepoint.c
traps.c Reenable ENQCMD/PASID support: 2022-03-21 12:28:13 -07:00
tsc.c x86/tsc: Be consistent about use_tsc_delay() 2022-03-15 18:20:33 +01:00
tsc_msr.c
tsc_sync.c x86/tsc: Add a timer to make sure TSC_adjust is always checked 2021-12-02 00:40:35 +01:00
umip.c
unwind_frame.c
unwind_guess.c
unwind_orc.c Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
uprobes.c
verify_cpu.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
vm86_32.c signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-19 09:15:58 -06:00
vmlinux.lds.S objtool: Find unused ENDBR instructions 2022-03-15 10:32:47 +01:00
vsmp_64.c
x86_init.c x86/mm/cpa: Generalize __set_memory_enc_pgtable() 2022-02-23 19:14:29 +01:00