Re: [PATCH v6 05/10] iommu: Add iommu_copy_struct_from_full_user_array helper
From: Jason Gunthorpe
Date: Thu Oct 31 2024 - 11:33:40 EST
On Wed, Oct 30, 2024 at 02:35:31PM -0700, Nicolin Chen wrote:
> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
>
> The iommu_copy_struct_from_user_array helper can be used to copy a single
> entry from a user array which might not be efficient if the array is big.
>
> Add a new iommu_copy_struct_from_full_user_array to copy the entire user
> array at once. Update the existing iommu_copy_struct_from_user_array kdoc
> accordingly.
>
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
> ---
> include/linux/iommu.h | 48 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 47 insertions(+), 1 deletion(-)
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason