linux-stable/arch/arm64/kernel
Will Deacon 22f15745c4 arm64: ssbs: Fix context-switch when SSBS is present on all CPUs
commit fca3d33d8a upstream.

When all CPUs in the system implement the SSBS extension, the SSBS field
in PSTATE is the definitive indication of the mitigation state. Further,
when the CPUs implement the SSBS manipulation instructions (advertised
to userspace via an HWCAP), EL0 can toggle the SSBS field directly and
so we cannot rely on any shadow state such as TIF_SSBD at all.

Avoid forcing the SSBS field in context-switch on such a system, and
simply rely on the PSTATE register instead.

Cc: <stable@vger.kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Srinivas Ramana <sramana@codeaurora.org>
Fixes: cbdf8a189a ("arm64: Force SSBS on context switch")
Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-19 19:53:02 +01:00
..
probes arm64: kprobes: Recover pstate.D in single-step exception handler 2019-08-02 11:55:50 +01:00
vdso arm64: vdso: Remove stale files from old assembly implementation 2019-10-07 11:07:16 +01:00
vdso32 arm64: vdso32: Rename COMPATCC to CC_COMPAT 2019-10-07 13:32:13 +01:00
.gitignore
acpi.c arm64: acpi: fix DAIF manipulation with pNMI 2020-02-11 04:35:15 -08:00
acpi_numa.c
acpi_parking_protocol.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
alternative.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
armv8_deprecated.c arm64: armv8_deprecated: Checking return value for memory allocation 2019-10-08 13:34:04 +01:00
asm-offsets.c arm64: vdso: Remove unnecessary asm-offsets.c definitions 2019-06-26 07:28:10 +02:00
cacheinfo.c arm64 updates for 5.3: 2019-07-08 09:54:55 -07:00
cpu-reset.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpu-reset.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpu_errata.c arm64: cpu_errata: Add Hisilicon TSV110 to spectre-v2 safe list 2020-01-12 12:21:42 +01:00
cpu_ops.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
cpufeature.c arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly 2020-02-14 16:34:17 -05:00
cpuidle.c PSCI: cpuidle: Refactor CPU suspend power_state parameter handling 2019-08-09 17:51:39 +01:00
cpuinfo.c arm64: constify icache_policy_str[] 2019-08-13 18:32:17 +01:00
crash_core.c
crash_dump.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
debug-monitors.c arm64: Remove unneeded rcu_read_lock from debug handlers 2019-08-01 15:00:27 +01:00
efi-entry.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
efi-header.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
efi-rt-wrapper.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
efi.c mm/pgtable: drop pgtable_t variable from pte_fn_t functions 2019-07-12 11:05:46 -07:00
entry-fpsimd.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
entry-ftrace.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
entry.S Merge branch 'errata/tx2-219' into for-next/fixes 2019-10-17 13:42:42 -07:00
fpsimd.c arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly 2020-02-14 16:34:18 -05:00
ftrace.c arm64: ftrace: Ensure synchronisation in PLT setup for Neoverse-N1 #1542419 2019-10-04 11:44:05 +01:00
head.S Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
hibernate-asm.S arm64: mm: Logic to make offset_ttbr1 conditional 2019-08-09 11:17:24 +01:00
hibernate.c arm64: hibernate: check pgd table allocation 2019-10-14 17:57:29 -07:00
hw_breakpoint.c arm64: hw_breakpoint: Fix warnings about implicit fallthrough 2019-07-29 11:59:15 +01:00
hyp-stub.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
image-vars.h arm64/efi: Move variable assignments after SECTIONS 2019-08-14 17:18:15 +01:00
image.h arm64/efi: Move variable assignments after SECTIONS 2019-08-14 17:18:15 +01:00
insn.c arm64: constify aarch64_insn_encoding_class[] 2019-08-13 18:32:17 +01:00
io.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
irq.c arm64 updates for 5.3: 2019-07-08 09:54:55 -07:00
jump_label.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
kaslr.c Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
kexec_image.c arm64/kexec: Use consistent convention of initializing 'kxec_buf.mem' with KEXEC_BUF_MEM_UNKNOWN 2019-08-05 11:06:33 +01:00
kgdb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
kuser32.S docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
machine_kexec.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
machine_kexec_file.c Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
Makefile arm64: vdso: Enable vDSO compat support 2019-06-22 21:21:09 +02:00
module-plts.c arm64: Replace strncmp with str_has_prefix 2019-08-05 11:06:34 +01:00
module.c arm64: module: Mark expected switch fall-through 2019-07-29 11:59:36 +01:00
module.lds
paravirt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pci.c pci-v5.3-changes 2019-07-15 20:44:49 -07:00
perf_callchain.c arm64: stacktrace: Factor out backtrace initialisation 2019-07-22 11:44:08 +01:00
perf_event.c arm64: perf_event: Add missing header needed for smp_processor_id() 2019-08-20 17:10:05 +01:00
perf_regs.c
pointer_auth.c
process.c arm64: ssbs: Fix context-switch when SSBS is present on all CPUs 2020-02-19 19:53:02 +01:00
psci.c arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill() 2019-12-31 16:44:21 +01:00
ptrace.c arm64: ptrace: nofpsimd: Fail FP/SIMD regset operations 2020-02-14 16:34:17 -05:00
reloc_test_core.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
reloc_test_syms.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
relocate_kernel.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
return_address.c arm64: unwind: Prohibit probing on return_address() 2019-08-01 15:00:26 +01:00
sdei.c
setup.c Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
signal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
signal32.c arm64: compat: Get sigreturn trampolines from vDSO 2019-06-22 21:21:09 +02:00
sigreturn32.S
sleep.S arm64: kernel: use aff3 instead of aff2 in comment 2019-06-04 14:51:01 +01:00
smccc-call.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
smp.c arm64: smp: Treat unknown boot failures as being 'stuck in kernel' 2019-08-27 17:37:05 +01:00
smp_spin_table.c arm64: prefer __section from compiler_attributes.h 2019-08-13 18:32:15 +01:00
ssbd.c arm64: ssbd: explicitly depend on <linux/prctl.h> 2019-06-17 18:38:10 +01:00
stacktrace.c arm64: unwind: Prohibit probing on return_address() 2019-08-01 15:00:26 +01:00
suspend.c
sys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
sys32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 452 2019-06-19 17:09:08 +02:00
sys_compat.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
syscall.c arm64: errata: Add workaround for Cortex-A76 erratum #1463225 2019-05-23 11:38:10 +01:00
time.c arm64: stacktrace: Factor out backtrace initialisation 2019-07-22 11:44:08 +01:00
topology.c Merge tag 'common/for-v5.4-rc1/cpu-topology' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux into for-next/cpu-topology 2019-08-14 10:07:00 +01:00
trace-events-emulation.h
traps.c arm64 updates for 5.4: 2019-09-16 14:31:40 -07:00
vdso.c arm64: compat: VDSO setup for compat layer 2019-06-22 21:21:08 +02:00
vmlinux.lds.S arm64/efi: Move variable assignments after SECTIONS 2019-08-14 17:18:15 +01:00