Re: [PATCH v6 04/13] iommufd: Verify object in iommufd_object_finalize/abort()

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:34:30PM -0700, Nicolin Chen wrote: > To support driver-allocated vIOMMU objects, it's required for IOMMU driver > to call the provided iommufd_viommu_alloc helper to embed the core struct. > However, there is no guarantee that every driver will call it and allocate > obje

[PATCH v6 04/13] iommufd: Verify object in iommufd_object_finalize/abort()

2024-10-30 Thread Nicolin Chen
To support driver-allocated vIOMMU objects, it's required for IOMMU driver to call the provided iommufd_viommu_alloc helper to embed the core struct. However, there is no guarantee that every driver will call it and allocate objects properly. Make the iommufd_object_finalize/abort functions more r