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:54 +0300
committerMarc Zyngier <maz@kernel.org>2026-11-19 11:14:49 +0000
commit09edd2a7ed8a1aaae8e472ab11313faab9f401cc (patch)
treef28f06039bdb5e893f0f2779316899c84ce5a1dd /tools/perf/scripts/python/bin/stackcollapse-report
parent5651590be08a6dc7e36cbef415c8f23af1cda4d9 (diff)
KVM: arm64: nv: Fix NULL dereference in kvm_pmu_nested_transition()
With the KVM_ARM_VCPU_PMU_V3_STRICT feature, kvm->arch.arm_pmu stays NULL until userspace selects a PMU with the KVM_ARM_VCPU_PMU_V3_SET_PMU attribute. The KVM_SET_VCPU_EVENTS ioctl can inject an SError or external abort before that which leads to a NULL pointer dereference. Unable to handle kernel NULL pointer dereference at virtual address 00000000000001e8 kvm_pmu_create_perf_event (arch/arm64/kvm/pmu-emul.c:710) (P) kvm_pmu_nested_transition (arch/arm64/kvm/pmu-emul.c:1357) kvm_inject_nested (arch/arm64/kvm/emulate-nested.c:2927) kvm_inject_nested_serror (arch/arm64/kvm/emulate-nested.c:2979) 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:2161) kvm_vcpu_ioctl (arch/arm64/kvm/../../../virt/kvm/kvm_main.c:4772) Return early if the PMU hasn't been initialized to fix this. After all, we can't transition a PMU that doesn't exist. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/all/sashiko-outbox-217134@kernel.org/ Fixes: ad220e275c39 ("KVM: arm64: Add KVM_ARM_VCPU_PMU_V3_STRICT vCPU feature") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan@pereq.eu> Link: https://patch.msgid.link/0f35f6e21bec19774e23c991370488fa99fb37da.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