From: sashiko-bot@kernel.org
To: "Narayana Murty N" <nnmlinux@linux.ibm.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v2 1/3] KVM: PPC: Book3S: Hold a reference to sPAPR TCE tables during hcalls
Date: Thu, 26 Nov 2026 09:03:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-235075@kernel.org> (raw)
In-Reply-To: <20261126085008.34532-4-nnmlinux@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] KVM: PPC: Book3S: missing Fixes trailer for commit cad32d9d42e8
--
commit e9c775c6ce258aa52807c78d9ed640f4c2596501
Author: Narayana Murty N <nnmlinux@linux.ibm.com>
> KVM: PPC: Book3S: Hold a reference to sPAPR TCE tables during hcalls
>
> Commit cad32d9d42e8 ("KVM: PPC: Book3s: Retire H_PUT_TCE/etc real
> mode handlers") moved TCE hypercalls to preemptible virtual
> mode. However, kvmppc_find_table() returns a table pointer without
> holding a reference, allowing concurrent fd release to free it
> while a hypercall is still using it.
>
> Add a kref to the sPAPR TCE table and acquire it under RCU during
> lookup. Release the reference when the hypercall completes.
>
> Use kvm->srcu to synchronize active table accesses with fd release
> before dropping the locked-memory accounting.
>
> Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
[Severity: Low]
This fixes a use-after-free introduced when TCE hypercalls were moved to
preemptible virtual mode. Should this include:
Fixes: cad32d9d42e8 ("KVM: PPC: Book3s: Retire H_PUT_TCE/etc real mode handlers")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126084351.32375-5-nnmlinux@linux.ibm.com?part=1
prev parent reply other threads:[~2026-11-26 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 8:43 [PATCH v2 0/3] KVM: PPC: Book3S: Protect TCE IOMMU table walks with RCU Narayana Murty N
2026-11-26 8:50 ` [PATCH v2 1/3] KVM: PPC: Book3S: Hold a reference to sPAPR TCE tables during hcalls Narayana Murty N
2026-11-26 8:50 ` [PATCH v2 2/3] KVM: PPC: Book3S: Synchronize TCE hcalls with IOMMU table detach Narayana Murty N
2026-11-26 9:03 ` sashiko-bot
2026-11-26 8:50 ` [PATCH v2 3/3] KVM: PPC: Book3S: Free child IOMMU tables after an SRCU grace period Narayana Murty N
2026-11-26 9:03 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-235075@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=nnmlinux@linux.ibm.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).