Skip to content

iommu: Fix domain check on release

Lu Baolu linux-iommu lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 7 repliesIn review
  2. v22 patches 4 repliesSuperseded
  3. v12 patches 7 repliesSuperseded

Changes in v3 from the cover letter

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

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5iommu: Add static iommu_ops->release_domaindrivers/iommu/iommu.c include/linux/iommu.h+16 -43 replies
2/5iommu/vt-d: Fix NULL domain on device releasedrivers/iommu/intel/iommu.c drivers/iommu/intel/pasid.c drivers/iommu/intel/pasid.h+71 -251 reply
3/5iommu/vt-d: Setup scalable mode context entry in probe pathdrivers/iommu/intel/iommu.c drivers/iommu/intel/pasid.c drivers/iommu/intel/pasid.h+151 -01 reply
4/5iommu/vt-d: Remove scalable mode context entry setup from attach_devdrivers/iommu/intel/iommu.c+44 -1120 replies
5/5iommu/vt-d: Remove scalabe mode in domain_context_clear_one()drivers/iommu/intel/iommu.c+1 -140 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchKevin Tian
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] iommu: Fix domain check on release

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

https://lore.kernel.org/linux-iommu/[email protected]/

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/[email protected]/
- https://lore.kernel.org/linux-iommu/[email protected]/
- 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/[email protected]/

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(-)
Signature · 1 line
2.34.1