summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorDan Carpenter <dan@pereq.eu>2026-11-18 16:05:44 +0300
committerMarc Zyngier <maz@kernel.org>2026-11-19 11:14:49 +0000
commit5651590be08a6dc7e36cbef415c8f23af1cda4d9 (patch)
treefa0bd8df0af00512c26b6680d1e9c9f4ac24a087 /tools/perf/scripts/python/bin/stackcollapse-report
parent49703de92bfdb784447937a8d65ad6ef1db9b23d (diff)
KVM: arm64: Load the vcpu in KVM_SET_VCPU_EVENTS
Nested virtualization can trigger a NULL pointer dereference of vcpu->arch.hw_mmu in kvm_inject_nested(): Unable to handle kernel NULL pointer dereference at virtual address 0000000000000084 kvm_vcpu_put_hw_mmu (arch/arm64/kvm/nested.c:1046) (P) vhe_vcpu_put (arch/arm64/kvm/arm.c:827) kvm_arch_vcpu_put (arch/arm64/kvm/arm.c:860) kvm_inject_nested (arch/arm64/kvm/emulate-nested.c:2903) kvm_inject_nested_serror (arch/arm64/kvm/emulate-nested.c:2976) kvm_inject_serror_esr (arch/arm64/kvm/inject_fault.c:365) __kvm_arm_vcpu_set_events (arch/arm64/kvm/guest.c:827) kvm_arch_vcpu_ioctl (arch/arm64/kvm/arm.c:2017 arch/arm64/kvm/arm.c:2157) kvm_vcpu_ioctl (arch/arm64/kvm/../../../virt/kvm/kvm_main.c:4772) The KVM_SET_VCPU_EVENTS ioctl does not load the vcpu, it just injects a pending SError or external abort straight away. If the vcpu is in L2 context and L1 has asked for the exception, kvm_inject_nested() puts and loads a vcpu that is not loaded which leads to a NULL pointer dereference. Load the vcpu in kvm_arm_vcpu_set_events() so that kvm_inject_nested() always finds a loaded vcpu. Fixes: 9aba641b9ec2 ("KVM: arm64: nv: Respect exception routing rules for SEAs") Fixes: 77ee70a07357 ("KVM: arm64: nv: Honor SError exception routing / masking") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan@pereq.eu> Link: https://patch.msgid.link/033a2d49e0f48426281b46eb1131ae64012aba18.1795006659.git.dan@pereq.eu Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions