From: "Carlos López" <clopez@suse.de>
To: kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: maz@kernel.org, oupton@kernel.org, joey.gouly@arm.com,
seiden@linux.ibm.com, suzuki.poulose@arm.com,
yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org,
"Carlos López" <clopez@suse.de>
Subject: [PATCH v3 0/2] KVM: arm64: vgic: Fix racy LPI release and re-registration handling
Date: Fri, 3 Jul 2026 13:01:28 +0200 [thread overview]
Message-ID: <20260703110130.2609872-2-clopez@suse.de> (raw)
Fix a couple of potential issues that could arise from racy LPI release
and re-registration for the same INTID.
The issue fixed in patch 1 can manifest itself through either a
leaked LPI structure, or a prematurely deleted LPI. The issue fixed
in patch 2 could materialize as a spurious -ENOMEM failure when
registering an LPI.
v3:
* Use refcount_dec_and_lock_irqsave() instead of unconditionally
grabbing the xarray lock in patch 1.
* Add patch 2.
v2:
* Address Sashiko's review. Fix the direct release path by decrementing
the refcount under the xarray spinlock, preventing a UAF that would
have been introduced in v1.
Carlos López (2):
KVM: arm64: vgic: Fix race between LPI release and re-registration
KVM: arm64: vgic: Mitigate potential LPI registration failure
arch/arm64/kvm/vgic/vgic-its.c | 10 +++++++++-
arch/arm64/kvm/vgic/vgic.c | 10 ++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
base-commit: 1ee27dacbe5dc4def481794d899d67b0d4570094
--
2.51.0
next reply other threads:[~2026-07-03 11:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 11:01 Carlos López [this message]
2026-07-03 11:01 ` [PATCH v3 1/2] KVM: arm64: vgic: Fix race between LPI release and re-registration Carlos López
2026-07-03 11:01 ` [PATCH v3 2/2] KVM: arm64: vgic: Mitigate potential LPI registration failure Carlos López
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=20260703110130.2609872-2-clopez@suse.de \
--to=clopez@suse.de \
--cc=catalin.marinas@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/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