Files
linux/arch/arm64/include/asm
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
..
2017-08-08 16:28:13 +01:00
2014-04-18 11:40:33 +02:00
2017-08-08 16:28:13 +01:00
2017-03-20 16:17:02 +00:00
2017-08-09 12:15:45 +01:00
2012-09-17 13:42:21 +01:00
2016-09-09 11:41:13 +01:00
2016-11-07 18:15:21 +00:00
2014-11-05 09:03:25 +01:00
2017-08-09 11:00:43 +01:00
2012-09-17 13:42:04 +01:00
2016-03-04 18:19:17 +00:00
2012-09-17 13:41:56 +01:00
2014-11-28 10:24:59 +00:00
2014-07-10 11:06:00 +01:00
2017-04-17 12:52:22 -04:00
2017-04-17 12:52:22 -04:00
2016-11-07 18:15:21 +00:00
2012-09-17 13:42:09 +01:00