[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZNPCNQxUesiMD1wM@nvidia.com>
Date: Wed, 9 Aug 2023 13:43:33 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Yi Liu <yi.l.liu@...el.com>
Cc: joro@...tes.org, alex.williamson@...hat.com, kevin.tian@...el.com,
robin.murphy@....com, baolu.lu@...ux.intel.com, cohuck@...hat.com,
eric.auger@...hat.com, nicolinc@...dia.com, kvm@...r.kernel.org,
mjrosato@...ux.ibm.com, chao.p.peng@...ux.intel.com,
yi.y.sun@...ux.intel.com, peterx@...hat.com, jasowang@...hat.com,
shameerali.kolothum.thodi@...wei.com, lulu@...hat.com,
suravee.suthikulpanit@....com, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
zhenzhong.duan@...el.com
Subject: Re: [PATCH v6 3/4] iommufd: Add IOMMU_GET_HW_INFO
On Tue, Aug 08, 2023 at 08:35:09AM -0700, Yi Liu wrote:
> +static int iommufd_zero_fill_user(void __user *ptr, size_t bytes)
> +{
> + int index = 0;
> +
> + for (; index < bytes; index++) {
> + if (put_user(0, (uint8_t __user *)(ptr + index)))
> + return -EFAULT;
> + }
I've recently learned this routine is spelled 'clear_user()'
Jason
Powered by blists - more mailing lists