linux-stable/arch/arm64
Andre Przywara 27ea98a4c5 KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock
commit bf308242ab upstream.

kvm_read_guest() will eventually look up in kvm_memslots(), which requires
either to hold the kvm->slots_lock or to be inside a kvm->srcu critical
section.
In contrast to x86 and s390 we don't take the SRCU lock on every guest
exit, so we have to do it individually for each kvm_read_guest() call.

Provide a wrapper which does that and use that everywhere.

Note that ending the SRCU critical section before returning from the
kvm_read_guest() wrapper is safe, because the data has been *copied*, so
we don't need to rely on valid references to the memslot anymore.

Cc: Stable <stable@vger.kernel.org> # 4.8+
Reported-by: Jan Glauber <jan.glauber@caviumnetworks.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-22 18:53:57 +02:00
..
boot arm64: dts: rockchip: remove vdd_log from rk3399-puma 2018-04-29 11:33:16 +02:00
configs ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
crypto crypto: arm64/aes-ce-cipher - move assembler code to .S file 2018-04-12 12:32:21 +02:00
include KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock 2018-05-22 18:53:57 +02:00
kernel arm64: cpufeature: Fix CTR_EL0 field definitions 2018-02-28 10:19:42 +01:00
kvm arm/arm64: KVM: Add PSCI version selection API 2018-05-01 12:58:27 -07:00
lib arm64: uaccess: Mask __user pointers for __arch_{clear, copy_*}_user 2018-02-16 20:22:52 +01:00
mm arm64: Add work around for Arm Cortex-A55 Erratum 1024718 2018-05-16 10:10:25 +02:00
net bpf, arm64: fix out of bounds access in tail call 2018-03-11 16:23:22 +01:00
xen arm64: kpti: Fix the interaction between ASID switching and software PAN 2018-02-16 20:22:49 +01:00
Kconfig arm64: Add work around for Arm Cortex-A55 Erratum 1024718 2018-05-16 10:10:25 +02:00
Kconfig.debug arm64: relocation testing module 2017-04-04 17:03:32 +01:00
Kconfig.platforms ARM: arm64: Devicetree updates for v4.14 2017-09-10 20:54:48 -07:00
Makefile arm64: prevent regressions in compressed kernel image size when upgrading to binutils 2.27 2017-12-20 10:10:29 +01:00