Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] KVM: arm64: vgic: Fix racy LPI release and re-registration handling
@ 2026-07-03 11:01 Carlos López
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Carlos López @ 2026-07-03 11:01 UTC (permalink / raw)
  To: kvmarm, linux-kernel
  Cc: maz, oupton, joey.gouly, seiden, suzuki.poulose, yuzenghui,
	catalin.marinas, will, linux-arm-kernel, Carlos López

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-03 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 11:01 [PATCH v3 0/2] KVM: arm64: vgic: Fix racy LPI release and re-registration handling Carlos López
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox