1
0
Fork 0
alistair23-linux/arch/arm64/kvm
Marc Zyngier ef3e40a7ea KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
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>
2020-06-09 10:44:40 +01:00
..
hyp KVM: arm64: vgic-v3: Take cpu_if pointer directly instead of vcpu 2020-05-28 11:57:10 +01:00
vgic KVM: arm64: vgic-v3: Take cpu_if pointer directly instead of vcpu 2020-05-28 11:57:10 +01:00
Kconfig KVM: arm64: Change CONFIG_KVM to a menuconfig entry 2020-05-16 15:04:18 +01:00
Makefile KVM: arm64: Clean up kvm makefiles 2020-05-16 15:04:18 +01:00
aarch32.c KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
arch_timer.c KVM: arm64: Simplify __kvm_timer_set_cntvoff implementation 2020-05-16 15:04:18 +01:00
arm.c KVM: arm64: Save the host's PtrAuth keys in non-preemptible context 2020-06-09 10:44:40 +01:00
debug.c KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE 2020-01-22 18:38:04 +00:00
fpsimd.c KVM: Remove unnecessary asm/kvm_host.h includes 2020-03-16 17:57:34 +01:00
guest.c KVM: Fix spelling in code comments 2020-05-16 15:05:01 +01:00
handle_exit.c KVM: arm64: Save the host's PtrAuth keys in non-preemptible context 2020-06-09 10:44:40 +01:00
hyp-init.S arm64: use mov_q instead of literal ldr 2020-03-24 11:48:24 +00:00
hyp.S arm64: kvm: Annotate assembly using modern annoations 2020-03-09 17:35:29 +00:00
hypercalls.c KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
inject_fault.c KVM: arm64: Parametrize exception entry with a target EL 2020-05-28 13:16:55 +01:00
irq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
mmio.c KVM: Fix spelling in code comments 2020-05-16 15:05:01 +01:00
mmu.c KVM: arm64: Remove obsolete kvm_virt_to_phys abstraction 2020-05-25 16:16:27 +01:00
perf.c KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
pmu-emul.c KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
pmu.c KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentation 2019-05-24 14:53:20 +01:00
psci.c KVM: Fix spelling in code comments 2020-05-16 15:05:01 +01:00
pvtime.c KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
regmap.c arm64: KVM: regmap: Fix unexpected switch fall-through 2019-07-26 15:33:41 +01:00
reset.c KVM: arm64: Don't use empty structures as CPU reset state 2020-05-28 12:00:40 +01:00
sys_regs.c KVM: arm64: Move sysreg reset check to boot time 2020-05-28 11:57:10 +01:00
sys_regs.h KVM: arm64: Sanely ratelimit sysreg messages 2019-12-06 11:41:45 +00:00
sys_regs_generic_v8.c KVM: Remove unnecessary asm/kvm_host.h includes 2020-03-16 17:57:34 +01:00
trace.h KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
trace_arm.h KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
trace_handle_exit.h KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
va_layout.c arm64: kvm: Fix IDMAP overlap with HYP VA 2020-01-19 16:05:23 +00:00
vgic-sys-reg-v3.c KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00