From: Lu Baolu <baolu.lu@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
Lu Baolu <baolu.lu@linux.intel.com>
Subject: [PATCH 0/2] iommu/vt-d: Fix SVA teardown races with process exit
Date: Wed, 4 Nov 2026 13:10:56 +0800 [thread overview]
Message-ID: <20261104051059.1345010-1-baolu.lu@linux.intel.com> (raw)
When a process using SVA exits while a device still has DMA and page
requests in flight for its PASID, the Intel IOMMU driver can mishandle
the teardown of that PASID. This series aims to fix two such issues.
The first is a use-after-free in the iopf handling path. After the
process exits, the later SVA unbind no longer drains the page request
queue for the PASID before the SVA attach handle is freed. Page
requests queued before the exit are then handled by
iommu_sva_handle_iopf() on the freed handle.
The second is a race between process exit and an SVA unbind of the
PASID. The mm release callback can return before the unbind completes
invalidating the PASID cache, IOTLB and device TLB. The exiting process
may then free its page tables while the IOMMU and the device still hold
translations that reference them.
Please review and comments.
Lu Baolu (2):
iommu/vt-d: Set FPD when tearing down a PASID entry with fault_ignore
iommu/vt-d: Serialize SVA unbind teardown with intel_mm_release()
drivers/iommu/intel/pasid.h | 11 +++++++++++
drivers/iommu/intel/iommu.c | 10 ++++++++++
drivers/iommu/intel/pasid.c | 30 +++++++++++-------------------
3 files changed, 32 insertions(+), 19 deletions(-)
--
2.43.0
next reply other threads:[~2026-11-04 5:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 5:10 Lu Baolu [this message]
2026-11-04 5:10 ` [PATCH 1/2] iommu/vt-d: Set FPD when tearing down a PASID entry with fault_ignore Lu Baolu
2026-11-04 5:10 ` [PATCH 2/2] iommu/vt-d: Serialize SVA unbind teardown with intel_mm_release() Lu Baolu
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=20261104051059.1345010-1-baolu.lu@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®