Skip to contentSkip to conversation

iommufd: Add three missing structures in ucmd_buffer

PATCH In review Yi Liu 2 participants 2 messages Jan 20, 2023 – Jan 23, 2023

Subsystems (3)
lore
Share & tools
lore

Yi Liu

author
#0 lore raw

PATCH v2 1/1 iommufd: Add three missing structures in ucmd_buffer

struct iommu_ioas_copy, struct iommu_option and struct iommu_vfio_ioas are missed in ucmd_buffer. Although they are smaller than the size of ucmd_buffer, it is safer to list them in ucmd_buffer explicitly.

Fixes aad37e71d5c4 ("iommufd: IOCTLs for the io_pagetable")
Fixes d624d6652a65 ("iommufd: vfio container FD ioctl compatibility")

---
v2:
- add iommu_ioas_copy as KevinT pointed

v1: https://lore.kernel.org/kvm/[email protected]/

 drivers/iommu/iommufd/main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/iommu/iommufd/main.c +3 -0
index 083e6fcbe10a..3fbe636c3d8a 100644
@@ -252,9 +252,12 @@ union ucmd_buffer {
 	struct iommu_destroy destroy;
 	struct iommu_ioas_alloc alloc;
 	struct iommu_ioas_allow_iovas allow_iovas;
+	struct iommu_ioas_copy ioas_copy;
 	struct iommu_ioas_iova_ranges iova_ranges;
 	struct iommu_ioas_map map;
 	struct iommu_ioas_unmap unmap;
+	struct iommu_option option;
+	struct iommu_vfio_ioas vfio_ioas;
 #ifdef CONFIG_IOMMUFD_TEST
 	struct iommu_test_cmd test;
 #endif
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 4 lines · Yi Liu

struct iommu_ioas_copy, struct iommu_option and struct iommu_vfio_ioas are missed in ucmd_buffer. Although they are smaller than the size of ucmd_buffer, it is safer to list them in ucmd_buffer explicitly.

Quoted 8 lines
Fixes aad37e71d5c4 ("iommufd: IOCTLs for the io_pagetable")
Fixes d624d6652a65 ("iommufd: vfio container FD ioctl compatibility")

---
v2:
- add iommu_ioas_copy as KevinT pointed

v1: https://lore.kernel.org/kvm/[email protected]/

Applied thanks

Jason