linux/arch/arm64/kernel
Mark Rutland 724750c88a arm64: errata: Expand speculative SSBS workaround
[ Upstream commit 75b3c43eab ]

A number of Arm Ltd CPUs suffer from errata whereby an MSR to the SSBS
special-purpose register does not affect subsequent speculative
instructions, permitting speculative store bypassing for a window of
time.

We worked around this for Cortex-X4 and Neoverse-V3, in commit:

  7187bb7d0b ("arm64: errata: Add workaround for Arm errata 3194386 and 3312417")

... as per their Software Developer Errata Notice (SDEN) documents:

* Cortex-X4 SDEN v8.0, erratum 3194386:
  https://developer.arm.com/documentation/SDEN-2432808/0800/

* Neoverse-V3 SDEN v6.0, erratum 3312417:
  https://developer.arm.com/documentation/SDEN-2891958/0600/

Since then, similar errata have been published for a number of other Arm Ltd
CPUs, for which the mitigation is the same. This is described in their
respective SDEN documents:

* Cortex-A710 SDEN v19.0, errataum 3324338
  https://developer.arm.com/documentation/SDEN-1775101/1900/?lang=en

* Cortex-A720 SDEN v11.0, erratum 3456091
  https://developer.arm.com/documentation/SDEN-2439421/1100/?lang=en

* Cortex-X2 SDEN v19.0, erratum 3324338
  https://developer.arm.com/documentation/SDEN-1775100/1900/?lang=en

* Cortex-X3 SDEN v14.0, erratum 3324335
  https://developer.arm.com/documentation/SDEN-2055130/1400/?lang=en

* Cortex-X925 SDEN v8.0, erratum 3324334
  https://developer.arm.com/documentation/109108/800/?lang=en

* Neoverse-N2 SDEN v17.0, erratum 3324339
  https://developer.arm.com/documentation/SDEN-1982442/1700/?lang=en

* Neoverse-V2 SDEN v9.0, erratum 3324336
  https://developer.arm.com/documentation/SDEN-2332927/900/?lang=en

Note that due to shared design lineage, some CPUs share the same erratum
number.

Add these to the existing mitigation under CONFIG_ARM64_ERRATUM_3194386.
As listing all of the erratum IDs in the runtime description would be
unwieldy, this is reduced to:

	"SSBS not fully self-synchronizing"

... matching the description of the errata in all of the SDENs.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240603111812.1514101-6-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[ Mark: fix conflicts and renames ]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:45:41 +02:00
..
probes kprobes: treewide: Cleanup the error messages for kprobes 2023-02-22 12:57:00 +01:00
vdso arm64: vdso: fix makefile dependency on vdso.so 2022-05-18 10:26:50 +02:00
vdso32 arm64: vdso: fix makefile dependency on vdso.so 2022-05-18 10:26:50 +02:00
.gitignore
acpi_numa.c arm64, numa: Change the numa init functions name to be generic 2021-01-14 15:08:54 -08:00
acpi_parking_protocol.c arm64: use function_nocfi with __pa_symbol 2021-04-08 16:04:22 -07:00
acpi.c Revert "ACPI: Add memory semantics to acpi_os_map_memory()" 2021-09-23 20:39:36 +02:00
alternative.c arm64: alternatives: mark patch_alternative() as noinstr 2022-04-20 09:34:16 +02:00
armv8_deprecated.c arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process 2024-07-27 10:46:09 +02:00
asm-offsets.c arm64: mte: rename gcr_user_excl to mte_ctrl 2021-07-28 18:33:19 +01:00
cacheinfo.c arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level 2022-09-15 11:30:01 +02:00
cpu_errata.c arm64: errata: Expand speculative SSBS workaround 2024-08-19 05:45:41 +02:00
cpu_ops.c
cpu-reset.h arm64: add __nocfi to functions that jump to a physical address 2021-04-08 16:04:22 -07:00
cpu-reset.S arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart 2021-03-18 15:51:07 +00:00
cpufeature.c arm64: errata: Add workaround for Arm errata 3194386 and 3312417 2024-08-19 05:45:40 +02:00
cpuidle.c cpuidle: PSCI: Move the has_lpi check to the beginning of the function 2022-04-20 09:34:04 +02:00
cpuinfo.c arm64: cpufeature: add HWCAP for FEAT_RPRES 2022-03-11 12:22:33 +01:00
crash_core.c arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo 2020-07-02 17:56:49 +01:00
crash_dump.c arm64: kdump: update ppos when reading elfcorehdr 2021-03-22 12:46:38 +00:00
debug-monitors.c arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step 2023-05-11 23:00:24 +09:00
efi-entry.S arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
efi-header.S arm64: head: tidy up the Image header definition 2020-11-17 16:14:20 +00:00
efi-rt-wrapper.S efi: rt-wrapper: Add missing include 2023-01-24 07:22:48 +01:00
efi.c arm64: efi: Make efi_rt_lock a raw_spinlock 2023-03-17 08:48:51 +01:00
entry-common.c arm64: split EL0/EL1 UNDEF handlers 2023-10-19 23:05:38 +02:00
entry-fpsimd.S arm64/sve: Add some comments for sve_save/load_state() 2021-08-24 16:44:23 +01:00
entry-ftrace.S arm64: ftrace: add missing BTIs 2021-12-08 09:04:47 +01:00
entry.S arm64: sdei: abort running SDEI handlers during crash 2023-09-19 12:22:52 +02:00
fpsimd.c arm64: Treat ESR_ELx as a 64-bit register 2022-12-31 13:13:58 +01:00
ftrace.c arm64: ftrace: fix module PLTs with mcount 2022-10-26 12:35:01 +02:00
head.S arm64: Always load shadow stack pointer directly from the task struct 2023-05-11 23:00:15 +09:00
hibernate-asm.S arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
hibernate.c Revert "arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags"" 2022-09-15 11:30:07 +02:00
hw_breakpoint.c hw_breakpoint: fix single-stepping when using bpf_overflow_handler 2023-09-23 11:09:55 +02:00
hyp-stub.S Merge remote-tracking branch 'arm64/for-next/vhe-only' into kvmarm-master/next 2021-04-13 15:42:40 +01:00
idle.c Merge branch 'for-next/entry' into for-next/core 2021-06-24 14:01:55 +01:00
idreg-override.c arm64/cpufeature: Optionally disable MTE via command-line 2021-08-03 15:48:01 +01:00
image-vars.h arm64: Use the clearbhb instruction in mitigations 2022-03-11 12:22:35 +01:00
image.h arm64: get rid of TEXT_OFFSET 2020-09-07 15:00:52 +01:00
io.c
irq.c arm64: irq: set the correct node for shadow call stack 2024-02-23 08:54:55 +01:00
jump_label.c arm64: insn: decouple patching from insn code 2021-06-11 11:19:27 +01:00
kaslr.c arm64: fix the doc of RANDOMIZE_MODULE_REGION_FULL 2021-08-03 10:36:42 +01:00
kexec_image.c arm64: kexec_file: Fix sparse warning 2020-11-10 13:11:44 +00:00
kgdb.c arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step 2023-05-11 23:00:24 +09:00
kuser32.S
machine_kexec_file.c arm64: kexec: Fix missing error code 'ret' warning in load_other_segments() 2021-12-22 09:32:45 +01:00
machine_kexec.c set_memory: allow querying whether set_direct_map_*() is actually enabled 2021-07-08 11:48:20 -07:00
Makefile arm64: vdso: fix makefile dependency on vdso.so 2022-05-18 10:26:50 +02:00
module-plts.c arm64: module: Use module_init_layout_section() to spot init sections 2023-09-02 09:17:07 +02:00
module.c mm: defer kmemleak object creation of module_alloc() 2022-03-08 19:12:38 +01:00
mte.c arm64: mte: Avoid setting PG_mte_tagged if no tags cleared or restored 2022-12-08 11:28:37 +01:00
paravirt.c arm64: paravirt: Use RCU read locks to guard stolen_time 2022-05-25 09:57:28 +02:00
patching.c arm64: patch_text: Fixup last cpu should be master 2022-04-13 20:59:23 +02:00
pci.c arm64: PCI: Support root bridge preparation for Hyper-V 2021-08-23 10:59:26 +01:00
perf_callchain.c perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
perf_event.c drivers/perf: pmuv3: don't expose SW_INCR event in sysfs 2024-02-23 08:54:36 +01:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
pointer_auth.c arm64: move preemption disablement to prctl handlers 2021-07-28 18:33:49 +01:00
process.c arm64: errata: Fix exec handling in erratum 1418040 workaround 2022-01-27 11:02:58 +01:00
proton-pack.c arm64: errata: Unify speculative SSBS errata logic 2024-08-19 05:45:41 +02:00
psci.c arm64: use function_nocfi with __pa_symbol 2021-04-08 16:04:22 -07:00
ptrace.c Merge remote-tracking branch 'tip/sched/arm64' into for-next/core 2021-08-31 09:10:00 +01:00
reloc_test_core.c
reloc_test_syms.S
relocate_kernel.S arm64: kexec: arm64_relocate_new_kernel don't use x0 as temp 2021-01-27 15:41:12 +00:00
return_address.c arm64: stacktrace: Make stack walk callback consistent with generic code 2020-09-18 14:24:16 +01:00
sdei.c arm64: sdei: abort running SDEI handlers during crash 2023-09-19 12:22:52 +02:00
setup.c arm64: convert to setup_initial_init_mm() 2021-07-08 11:48:21 -07:00
signal32.c signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:22:48 +02:00
signal.c signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:22:48 +02:00
sigreturn32.S
sleep.S kasan: remove redundant config option 2021-04-16 16:10:36 -07:00
smccc-call.S arm64: smccc: Save lr before calling __arm_smccc_sve_check() 2021-07-21 11:23:25 +01:00
smp_spin_table.c arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
smp.c arm64: sdei: abort running SDEI handlers during crash 2023-09-19 12:22:52 +02:00
stacktrace.c arm64: Mark start_backtrace() notrace and NOKPROBE_SYMBOL 2022-03-08 19:12:32 +01:00
suspend.c arm64: mte: move register initialization to C 2022-10-29 10:12:57 +02:00
sys32.c
sys_compat.c arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall 2022-06-09 10:22:35 +02:00
sys.c
syscall.c arm64: fix compat syscall return truncation 2021-08-03 10:35:03 +01:00
time.c
topology.c arm64: topology: move store_cpu_topology() to shared code 2022-10-26 12:34:22 +02:00
trace-events-emulation.h
traps.c arm64: armv8_deprecated: rework deprected instruction handling 2023-10-19 23:05:38 +02:00
vdso32-wrap.S arm64: do not descend to vdso directories twice 2021-01-20 12:18:46 +00:00
vdso-wrap.S arm64: do not descend to vdso directories twice 2021-01-20 12:18:46 +00:00
vdso.c arm64: vdso: Pass (void *) to virt_to_page() 2023-06-09 10:32:25 +02:00
vmlinux.lds.S arm64: entry: Allow the trampoline text to occupy multiple pages 2022-03-11 12:22:34 +01:00