From: Jason Gunthorpe <jgg@nvidia.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Kevin Tian <kevin.tian@intel.com>,
Eric Auger <eric.auger@redhat.com>,
Nicolin Chen <nicolinc@nvidia.com>
Subject: Re: drivers/iommu/iommufd/vfio_compat.c:315:17: sparse: sparse: cast removes address space '__user' of expression
Date: Thu, 11 Jan 2024 11:40:31 -0400 [thread overview]
Message-ID: <20240111154031.GI439767@nvidia.com> (raw)
In-Reply-To: <202401112201.oMA1N8EM-lkp@intel.com>
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@intel.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
next prev parent reply other threads:[~2024-01-11 15:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 15:05 drivers/iommu/iommufd/vfio_compat.c:315:17: sparse: sparse: cast removes address space '__user' of expression kernel test robot
2024-01-11 15:40 ` Jason Gunthorpe [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-09-10 13:16 kernel test robot
2023-09-10 3:25 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111154031.GI439767@nvidia.com \
--to=jgg@nvidia.com \
--cc=eric.auger@redhat.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=nicolinc@nvidia.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox