lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 11 Jan 2024 11:40:31 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: kernel test robot <lkp@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Kevin Tian <kevin.tian@...el.com>,
	Eric Auger <eric.auger@...hat.com>,
	Nicolin Chen <nicolinc@...dia.com>
Subject: Re: drivers/iommu/iommufd/vfio_compat.c:315:17: sparse: sparse: cast
 removes address space '__user' of expression

On Thu, Jan 11, 2024 at 11:05:36PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   de927f6c0b07d9e698416c5b287c521b07694cac
> commit: d624d6652a65ad4f47a58b8651a1ec1163bb81d3 iommufd: vfio container FD ioctl compatibility
> date:   1 year, 1 month ago
> config: arm64-randconfig-r132-20240105 (https://download.01.org/0day-ci/archive/20240111/202401112201.oMA1N8EM-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 13.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20240111/202401112201.oMA1N8EM-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202401112201.oMA1N8EM-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/iommu/iommufd/vfio_compat.c:315:17: sparse: sparse: cast removes address space '__user' of expression
> 
> vim +/__user +315 drivers/iommu/iommufd/vfio_compat.c
> 
>    309	
>    310	static int iommufd_fill_cap_iova(struct iommufd_ioas *ioas,
>    311					 struct vfio_info_cap_header __user *cur,
>    312					 size_t avail)
>    313	{
>    314		struct vfio_iommu_type1_info_cap_iova_range __user *ucap_iovas =
>  > 315			container_of(cur,
>    316				     struct vfio_iommu_type1_info_cap_iova_range __user,
>    317				     header);

I think this is a limitation of sparse, the __user tags are correct
here..

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ