public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] iommu: Fix domain check on release
@ 2024-03-05  1:33 Lu Baolu
  2024-03-05  1:33 ` [PATCH v3 1/5] iommu: Add static iommu_ops->release_domain Lu Baolu
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Lu Baolu @ 2024-03-05  1:33 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon, Robin Murphy, Jason Gunthorpe,
	Kevin Tian, Eric Badger
  Cc: iommu, linux-kernel, Lu Baolu

This is a follow-up to the discussion thread here:

https://lore.kernel.org/linux-iommu/20240221154012.GC13491@ziepe.ca/

It fixes a NULL pointer dereference issue in the Intel iommu driver and
strengthens the iommu core to possibly prevent similar failures in other
iommu drivers.

There are two parts of this topic:
[x] Introduce release_domain and fix a kernel NULL pointer dereference
    issue in the intel iommu driver.
[x] Follow-up patches to cleanup intel iommu driver.

Best regards,
baolu

Change log:
v3:
 - Avoid global IOTLB and PASID cache invalidation in normal release
   path to mitigate the impact on other devices.
 - Comment and code refinements.

v2:
 - https://lore.kernel.org/linux-iommu/20240229094613.121575-1-baolu.lu@linux.intel.com/
 - https://lore.kernel.org/linux-iommu/20240229094804.121610-1-baolu.lu@linux.intel.com/
 - The scalable mode context entry should be removed in the release path
   as it's not part of the blocking domain.

v1: https://lore.kernel.org/linux-iommu/20240223051302.177596-1-baolu.lu@linux.intel.com/

Lu Baolu (5):
  iommu: Add static iommu_ops->release_domain
  iommu/vt-d: Fix NULL domain on device release
  iommu/vt-d: Setup scalable mode context entry in probe path
  iommu/vt-d: Remove scalable mode context entry setup from attach_dev
  iommu/vt-d: Remove scalabe mode in domain_context_clear_one()

 include/linux/iommu.h       |   1 +
 drivers/iommu/intel/pasid.h |   2 +
 drivers/iommu/intel/iommu.c | 214 +++++++++++-------------------------
 drivers/iommu/intel/pasid.c | 202 ++++++++++++++++++++++++++++++++++
 drivers/iommu/iommu.c       |  19 +++-
 5 files changed, 283 insertions(+), 155 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-04-11 13:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05  1:33 [PATCH v3 0/5] iommu: Fix domain check on release Lu Baolu
2024-03-05  1:33 ` [PATCH v3 1/5] iommu: Add static iommu_ops->release_domain Lu Baolu
2024-04-10 15:26   ` Jason Gunthorpe
2024-04-10 16:37     ` Robin Murphy
2024-04-11 13:41       ` Jason Gunthorpe
2024-03-05  1:33 ` [PATCH v3 2/5] iommu/vt-d: Fix NULL domain on device release Lu Baolu
2024-03-05  1:48   ` Tian, Kevin
2024-03-05  1:33 ` [PATCH v3 3/5] iommu/vt-d: Setup scalable mode context entry in probe path Lu Baolu
2024-03-05  1:50   ` Tian, Kevin
2024-03-05  1:33 ` [PATCH v3 4/5] iommu/vt-d: Remove scalable mode context entry setup from attach_dev Lu Baolu
2024-03-05  1:33 ` [PATCH v3 5/5] iommu/vt-d: Remove scalabe mode in domain_context_clear_one() Lu Baolu
2024-03-05  7:54 ` [PATCH v3 0/5] iommu: Fix domain check on release Joerg Roedel
2024-03-05 12:01   ` Baolu Lu

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