Re: [PATCH v3 14/15] iommufd: vfio container FD ioctl compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 05, 2022 at 08:07:24AM +0800, Baolu Lu wrote:

> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/iommu/iommufd/vfio_compat.c:294:17: sparse: sparse: cast removes
> address space '__user' of expression
> 
> vim +/__user +294 drivers/iommu/iommufd/vfio_compat.c
> 
>    288	
>    289	static int iommufd_fill_cap_iova(struct iommufd_ioas *ioas,
>    290					 struct vfio_info_cap_header __user *cur,
>    291					 size_t avail)
>    292	{
>    293		struct vfio_iommu_type1_info_cap_iova_range __user *ucap_iovas =
>  > 294			container_of(cur,
>    295				     struct vfio_iommu_type1_info_cap_iova_range __user,
>    296				     header);

I think this is correct as-written. Sparse is flagging the casting
inside container_of. I don't think ti is worth trying to fix

Jason



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux