summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorWei-Lin Chang <weilin.chang@arm.com>2026-09-24 10:49:50 +0100
committerMarc Zyngier <maz@kernel.org>2026-09-24 21:14:00 +0100
commit7d7199bdf77a3a6ed74d0037133f435a7febe97c (patch)
treef9cb9453c85fb72043b7c7f8c1a91510f1f98c3d /tools/perf/scripts/python
parent862fa568078514d0a41bd0946a65c23a0c0edec9 (diff)
KVM: arm64: ptdump: Check the page tables aren't freed when accessing
An open debugfs file keeps the KVM structure alive, but does not prevent mmu notifier release from freeing the stage-2 page tables when the VMM’s address space is torn down. Therefore page tables belonging to the mmus could have been freed when a thread opens or reads the ptdump files. Take the mmu_lock and check mmu->pgt is still alive before accessing the page tables. Also for the ipa_range file and stage2_levels file, switch from keeping the pointer to the page tables to keeping the pointer to the mmu. Fixes: 7c4f73548ed1 ("KVM: arm64: Register ptdump with debugfs on guest creation") Reported-by: Sashiko AI <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/kvmarm/20260623144054.B91D21F000E9@smtp.kernel.org/ Reviewed-by: Vincent Donnefort <vdonnefort@google.com> Tested-by: Vincent Donnefort <vdonnefort@google.com> Tested-by: Itaru Kitayama <itaru.kitayama@fujitsu.com> Signed-off-by: Wei-Lin Chang <weilin.chang@arm.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260924094951.727352-2-weilin.chang@arm.com Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions