linux/arch/s390
Sean Christopherson 2031f28768 KVM: Add helpers to wrap vcpu->srcu_idx and yell if it's abused
Add wrappers to acquire/release KVM's SRCU lock when stashing the index
in vcpu->src_idx, along with rudimentary detection of illegal usage,
e.g. re-acquiring SRCU and thus overwriting vcpu->src_idx.  Because the
SRCU index is (currently) either 0 or 1, illegal nesting bugs can go
unnoticed for quite some time and only cause problems when the nested
lock happens to get a different index.

Wrap the WARNs in PROVE_RCU=y, and make them ONCE, otherwise KVM will
likely yell so loudly that it will bring the kernel to its knees.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Tested-by: Fabiano Rosas <farosas@linux.ibm.com>
Message-Id: <20220415004343.2203171-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-04-21 13:16:11 -04:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
configs s390: enable CONFIG_HARDENED_USERCOPY in debug_defconfig 2022-04-12 11:56:08 +02:00
crypto s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01:00
hypfs s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
include s390: current_stack_pointer shouldn't be a function 2022-04-12 11:56:08 +02:00
kernel s390/kexec: silence -Warray-bounds warning 2022-04-07 12:36:54 +02:00
kvm KVM: Add helpers to wrap vcpu->srcu_idx and yell if it's abused 2022-04-21 13:16:11 -04:00
lib s390: current_stack_pointer shouldn't be a function 2022-04-12 11:56:08 +02:00
mm s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01:00
net s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
pci s390/pci: rename get_zdev_by_bus() to zdev_from_bus() 2022-03-27 22:18:40 +02:00
purgatory s390: enable KCSAN 2021-07-30 17:09:23 +02:00
tools s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390: allow to compile with z16 optimizations 2022-04-06 13:08:50 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile s390: allow to compile with z16 optimizations 2022-04-06 13:08:50 +02:00