linux/arch/s390/kvm
Christian Borntraeger dc7e0192c4 KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler
[ Upstream commit 0bc380beb7 ]

We do check for target CPU == -1, but this might change at the time we
are going to use it. Hold the physical target CPU in a local variable to
avoid out-of-bound accesses to the cpu arrays.

Cc: Pierre Morel <pmorel@linux.ibm.com>
Fixes: 87e28a15c4 ("KVM: s390: diag9c (directed yield) forwarding")
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-07-19 16:36:38 +02:00
..
diag.c KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler 2023-07-19 16:36:38 +02:00
gaccess.c KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg 2023-02-07 18:06:00 +01:00
gaccess.h KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg 2023-02-07 18:06:00 +01:00
guestdbg.c KVM: s390: Add memcg accounting to KVM allocations 2020-12-10 13:36:05 +01:00
intercept.c KVM: s390: pv: fix external interruption loop not always detected 2023-03-28 07:16:37 +00:00
interrupt.c KVM: s390: interrupt: fix virtual-physical confusion for next alert GISA 2023-04-20 16:26:20 +02:00
Kconfig kvm: Remove "select SRCU" 2023-04-05 13:47:42 +00:00
kvm-s390.c KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes 2023-07-19 16:36:35 +02:00
kvm-s390.h KVM: s390: Mark __kvm_s390_init() and its descendants as __init 2022-12-29 15:41:22 -05:00
Makefile KVM: s390: pci: add basic kvm_zdev structure 2022-07-11 09:54:27 +02:00
pci.c KVM: s390: pci: fix virtual-physical confusion on module unload/load 2023-04-20 16:30:35 +02:00
pci.h KVM: s390: Mark __kvm_s390_init() and its descendants as __init 2022-12-29 15:41:22 -05:00
priv.c KVM: s390: sida: sort out physical vs virtual pointers usage 2022-10-26 14:27:41 +02:00
pv.c KVM: s390: pv: fix asynchronous teardown for small VMs 2023-05-04 18:24:41 +02:00
sigp.c KVM: s390: pv: don't present the ecall interrupt twice 2022-07-19 15:48:14 +02:00
trace-s390.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vsie.c KVM: s390: vsie: fix the length of APCB bitmap 2023-07-19 16:36:38 +02:00