kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] iommufd: Add three missing structures in ucmd_buffer
@ 2023-01-20 12:20 Yi Liu
  2023-01-23 18:30 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Liu @ 2023-01-20 12:20 UTC (permalink / raw)
  To: jgg, kevin.tian; +Cc: yi.l.liu, kvm, iommu

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")
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
---
v2:
  - add iommu_ioas_copy as KevinT pointed

v1: https://lore.kernel.org/kvm/20230120055757.67879-1-yi.l.liu@intel.com/

 drivers/iommu/iommufd/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/iommufd/main.c b/drivers/iommu/iommufd/main.c
index 083e6fcbe10a..3fbe636c3d8a 100644
--- a/drivers/iommu/iommufd/main.c
+++ b/drivers/iommu/iommufd/main.c
@@ -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
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] iommufd: Add three missing structures in ucmd_buffer
  2023-01-20 12:20 [PATCH v2] iommufd: Add three missing structures in ucmd_buffer Yi Liu
@ 2023-01-23 18:30 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2023-01-23 18:30 UTC (permalink / raw)
  To: Yi Liu; +Cc: kevin.tian, kvm, iommu

On Fri, Jan 20, 2023 at 04:20:40AM -0800, Yi Liu wrote:
> 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")
> Signed-off-by: Yi Liu <yi.l.liu@intel.com>
> ---
> v2:
>   - add iommu_ioas_copy as KevinT pointed
> 
> v1: https://lore.kernel.org/kvm/20230120055757.67879-1-yi.l.liu@intel.com/

Applied thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-23 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 12:20 [PATCH v2] iommufd: Add three missing structures in ucmd_buffer Yi Liu
2023-01-23 18:30 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).