From: Pranjal Shrivastava <praan@google.com>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: Will Deacon <will@kernel.org>, Jason Gunthorpe <jgg@nvidia.com>,
Robin Murphy <robin.murphy@arm.com>,
joro@8bytes.org, Kevin Tian <kevin.tian@intel.com>,
linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] iommufd: Fix vDEVICE allocation lifecycle bugs
Date: Tue, 14 Jul 2026 14:20:43 +0000 [thread overview]
Message-ID: <alZFuwNz0RCcqawZ@google.com> (raw)
In-Reply-To: <cover.1783311134.git.nicolinc@nvidia.com>
On Sun, Jul 05, 2026 at 10:36:08PM -0700, Nicolin Chen wrote:
> Sashiko flagged a few bugs in how IOMMU_VDEVICE_ALLOC creates and validates
> a vDEVICE on a vIOMMU:
>
> - the core publishes a vDEVICE into the vIOMMU xarray before the driver's
> vdevice_init() runs, so a concurrent invalidation can reach one it has
> not yet accepted;
> - the undersized-vdevice_size guard returns holding the igroup mutex,
> deadlocking later vDEVICE operations on that group;
> - the Arm SMMUv3 vIOMMU accepts a device without exactly one Stream ID:
> an out-of-bounds streams[] read for none, stale ATC/IOTLB for several.
>
> Fix each of them properly.
>
> This is on Github:
> https://github.com/nicolinc/iommufd/commits/fix_vdevice_sashiko-v2
>
> Changelog
> v2
> * Add "Reviewed-by" from Kevin
> * Patch-2: Add "Cc stable"; drop the out_release label by inlining the
> xa_release() call
> * Patch-2: Note that the reserved slot is hidden only via xa_* helpers
> * Patch-3: Return -EOPNOTSUPP instead of -EINVAL
> v1
> https://lore.kernel.org/all/cover.1782767110.git.nicolinc@nvidia.com/
>
> Nicolin Chen (3):
> iommufd/viommu: Release the igroup lock on the vdevice_size error path
> iommufd/viommu: Publish a vDEVICE only after vdevice_init() succeeds
> iommu/arm-smmu-v3-iommufd: Require exactly one Stream ID for a vDEVICE
>
> .../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 15 +++++++++++++
> drivers/iommu/iommufd/viommu.c | 22 ++++++++++++++-----
> 2 files changed, 31 insertions(+), 6 deletions(-)
>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Thanks,
Praan
prev parent reply other threads:[~2026-07-14 14:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 5:36 [PATCH v2 0/3] iommufd: Fix vDEVICE allocation lifecycle bugs Nicolin Chen
2026-07-06 5:36 ` [PATCH v2 1/3] iommufd/viommu: Release the igroup lock on the vdevice_size error path Nicolin Chen
2026-07-06 5:36 ` [PATCH v2 2/3] iommufd/viommu: Publish a vDEVICE only after vdevice_init() succeeds Nicolin Chen
2026-07-06 17:23 ` Jason Gunthorpe
2026-07-06 18:05 ` Nicolin Chen
2026-07-06 19:47 ` Jason Gunthorpe
2026-07-06 5:36 ` [PATCH v2 3/3] iommu/arm-smmu-v3-iommufd: Require exactly one Stream ID for a vDEVICE Nicolin Chen
2026-07-14 14:06 ` [PATCH v2 0/3] iommufd: Fix vDEVICE allocation lifecycle bugs Jason Gunthorpe
2026-07-14 14:23 ` Pranjal Shrivastava
2026-07-14 14:20 ` Pranjal Shrivastava [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=alZFuwNz0RCcqawZ@google.com \
--to=praan@google.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.