lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1740600272.git.nicolinc@nvidia.com>
Date: Wed, 26 Feb 2025 12:16:03 -0800
From: Nicolin Chen <nicolinc@...dia.com>
To: <robin.murphy@....com>, <joro@...tes.org>, <will@...nel.org>,
	<alex.williamson@...hat.com>
CC: <jgg@...dia.com>, <iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
	<kvm@...r.kernel.org>
Subject: [PATCH v1 0/4] iommu: Isolate iova_cookie to actual owners

Now, iommufd implements its own sw_msi function that does not touch the
domain->iova_cookie but domain->iommufd_hwpt, as a domain owner pointer.

Isolate the iova_cookie from iommufd by putting it into the union where
the iommufd_hwpt is located.

This requires a set of preparations to move iommu_put_dma_cookie() out
of the common path of iommu_domain_free() that iommufd still calls.

Make thing cleaner that any caller of iommu_get_dma/msi_cookie() should
explicitly call the pairing iommu_put_dma/msi_cookie().

This is a clean-up series for the sw_msi Part-1 core series, prior to
the Part-2/3 series. It's on github:
https://github.com/nicolinc/iommufd/commits/iommufd_msi_cleanup-v1

Thanks
Nicolin

Nicolin Chen (4):
  iommu: Define iommu_get/put_msi_cookie() under CONFIG_IRQ_MSI_IOMMU
  iommu: Add iommu_default_domain_free helper
  iommu: Request iova_cookie owner to put cookie explicitly
  iommu: Turn iova_cookie to dma-iommu private pointer

 include/linux/iommu.h           | 12 ++++++++----
 drivers/iommu/dma-iommu.c       | 12 ++++++++++++
 drivers/iommu/iommu.c           | 13 +++++++++----
 drivers/vfio/vfio_iommu_type1.c |  4 ++++
 4 files changed, 33 insertions(+), 8 deletions(-)


base-commit: 598749522d4254afb33b8a6c1bea614a95896868
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ