iommufd: Add two missing structures in ucmd_buffer
PATCH 1/1 iommufd: Add two missing structures in ucmd_buffer
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.
--- drivers/iommu/iommufd/main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/iommu/iommufd/main.c +2 -0
@@ -255,6 +255,8 @@ union ucmd_buffer {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
Tian, Kevin
maintainerQuoted 20 lines
From: Liu, Yi L <[email protected]>
Sent: Friday, January 20, 2023 1:58 PMstruct
iommu_optionand structiommu_vfio_ioasare missed inucmd_buffer. Although they are smaller than the size ofucmd_buffer, it is safer to list them inucmd_bufferexplicitly.Fixes aad37e71d5c4 ("iommufd: IOCTLs for the io_pagetable")Fixes d624d6652a65 ("iommufd: vfio container FD ioctl compatibility")Signed-off-by Yi Liu <[email protected]>--- drivers/iommu/iommufd/main.c | 2 ++ 1 file changed, 2 insertions(+)drivers/iommu/iommufd/main.c +0
-0
drivers/iommu/iommufd/main.c union ucmd_buffer { · line 262
Quoted 8 lines
drivers/iommu/iommufd/main.c +2
-0@@ -255,6 +255,8 @@ union ucmd_buffer {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
while at it can you also add iommu_ioas_copy?
Quoted 18 lines
From: Tian, Kevin <[email protected]>
Sent: Friday, January 20, 2023 3:02 PMQuoted 4 lines
From: Liu, Yi L <[email protected]>
Sent: Friday, January 20, 2023 1:58 PMstruct
iommu_optionand structiommu_vfio_ioasare missed in
ucmd_buffer.Quoted 10 lines
Although they are smaller than the size of
ucmd_buffer, it is safer to list them inucmd_bufferexplicitly.Fixes aad37e71d5c4 ("iommufd: IOCTLs for the io_pagetable")Fixes d624d6652a65 ("iommufd: vfio container FD ioctl compatibility")Signed-off-by Yi Liu <[email protected]>--- drivers/iommu/iommufd/main.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 16 lines
Quoted 6 lines
drivers/iommu/iommufd/main.c +0
-0drivers/iommu/iommufd/main.c union ucmd_buffer { · line 262
Quoted 8 lines
drivers/iommu/iommufd/main.c +2
-0@@ -255,6 +255,8 @@ union ucmd_buffer {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 while at it can you also add
iommu_ioas_copy?
Done in v2.
https://lore.kernel.org/kvm/[email protected]/T/#u
Regards,
Yi Liu