1
0
Fork 0
alistair23-linux/arch/arm64/kvm
Marc Zyngier d96ef8fa95 KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
commit ef3e40a7ea upstream.

When using the PtrAuth feature in a guest, we need to save the host's
keys before allowing the guest to program them. For that, we dump
them in a per-CPU data structure (the so called host context).

But both call sites that do this are in preemptible context,
which may end up in disaster should the vcpu thread get preempted
before reentering the guest.

Instead, save the keys eagerly on each vcpu_load(). This has an
increased overhead, but is at least safe.

Cc: stable@vger.kernel.org
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-17 16:40:38 +02:00
..
hyp arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly 2020-02-14 16:34:18 -05:00
Kconfig Make anon_inodes unconditional 2019-04-19 14:03:11 +02:00
Makefile arm64: KVM: Add accessors to track guest/host only counters 2019-04-24 15:35:30 +01:00
debug.c KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE 2020-02-01 09:34:52 +00:00
fpsimd.c arm64/fpsimd: Introduce fpsimd_save_and_flush_cpu_state() and use it 2019-06-04 13:17:30 +01:00
guest.c KVM: arm64: Fix 32bit PC wrap-around 2020-05-14 07:58:26 +02:00
handle_exit.c KVM: arm64: Save the host's PtrAuth keys in non-preemptible context 2020-06-17 16:40:38 +02:00
hyp-init.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
hyp.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
inject_fault.c KVM: arm64: Correct PSTATE on exception entry 2020-02-11 04:35:16 -08:00
irq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
pmu.c KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentation 2019-05-24 14:53:20 +01:00
regmap.c arm64: KVM: regmap: Fix unexpected switch fall-through 2019-07-26 15:33:41 +01:00
reset.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
sys_regs.c KVM: arm64: Stop writing aarch32's CSSELR into ACTLR 2020-06-17 16:40:34 +02:00
sys_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
sys_regs_generic_v8.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
trace.h arm64: KVM: Add trapped system register access tracepoint 2018-12-19 17:47:08 +00:00
va_layout.c arm64: mm: Introduce vabits_actual 2019-08-09 11:17:21 +01:00
vgic-sys-reg-v3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00