Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1714803rdd; Thu, 11 Jan 2024 07:16:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IENMHlWjUwFdLpIbABaEQ+jf9f8X7qS5+HqqLkG554p7tEQJfIeHKfyYjWs2zWU1dQCXZmm X-Received: by 2002:a05:6a20:bca3:b0:199:f6f3:6cdc with SMTP id fx35-20020a056a20bca300b00199f6f36cdcmr1096582pzb.63.1704986216373; Thu, 11 Jan 2024 07:16:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704986216; cv=none; d=google.com; s=arc-20160816; b=jHVBpiGY7hE0Lwa3USlwturCOJdLAyarmTZjIhP60fSiYfR3YOI1e0ruSgqZaO7VHD 5enluJvH85oZDmcTwCvsCkJc2vYnMVt0UgFioRqBBzTV/Sv+8fWSFR994Jz783yD/dw6 e2+vtIXbqoY1WN88Ra8Rr3/BA4EBygVvJNj5CCUNA2go33viE07V9ZX2maKWy1wNSABh 4TxRAvpSnMzJrHZ3uerBKzQ9tLGYM30fr7EbFlxKFdx46hLS3gVqVzmIYlDb46g7MP2V A1wQPlTxa7JEEgp9/AL+bq17qJKpX2ZmrTGsfgKXnInBvB17C2WAs059tWdwIQZDWt45 Z4WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=9N8TFpbADlfqNrNw0v46reMeH8aMqCs//2j1ui8+mFI=; fh=Jumd29v7ggj+4aRvwDSRF1hDaYQ7t6IUOkmopinrXtk=; b=L7ZGJszUkWwP2sS9UwHb9JdsHHjlFrKAK0L9jTvbR6yqylZrWPqzJv65wrimjLqUA3 GtaPYu77Q83GbDkXO6puJH098Wkk8vhKKaHEK7TbvbAvsnhF9ebN99aMa+Ty43m7POI7 /6blfzqoifcnRwRW10JtvmS4Hn9krw1EQKyaHJodgFqoIjkt3pxgbSQe6/ls5NYhtu4l YzkYkV7TxpflynLPqVUH3yzQkngnUwaVRBV3yfa8kMJo92S5ZLsNT8SjnI4QpTMyloP/ qxXLD0WakamRaIZiCMFh/dQ1jMa/rNXyw2p7rhUP/4hiUgxTjSQxEvIqd33zUuLN3Dgv FikA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MPJqSVE/"; spf=pass (google.com: domain of linux-kernel+bounces-23762-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i3-20020a654843000000b005cec914717dsi1241388pgs.440.2024.01.11.07.16.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 07:16:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23762-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MPJqSVE/"; spf=pass (google.com: domain of linux-kernel+bounces-23762-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C07CA289B18 for ; Thu, 11 Jan 2024 15:07:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EAAE4B5CB; Thu, 11 Jan 2024 15:06:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MPJqSVE/" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56CEC4E1A3 for ; Thu, 11 Jan 2024 15:06:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704985613; x=1736521613; h=date:from:to:cc:subject:message-id:mime-version; bh=rmn9GtoIH8QVlbyLqym7TUipHb7yWcfUb9mJnaRvgeo=; b=MPJqSVE/KpIrKHSkIDIb+AsmF+j1QidM6bLeP1IRiPh/80lMqDrhveWT acUv+DyUaYDvU0dJm8INzJ+XqqlkXBSbvJdGh23ziAUVaSMQzmJYvadii OrUeBeq9ZgFe+NgEmJZ9sJZJRYOnilAobZYe7Pe9qiVeOqGvnqVYrl50Q hsXeE+8h/K7g577/qg+vu+qlTdG6bDD/f/5tjtzLSDg4hYWdnkDCTDc29 cJT43cznzSJ4FKXEvx3Ul6OaHewbFIey60XzrsSXjexM0FbdETvNA+cqt mcGw59q+hn0pgHQgRbokG2CfDgBjNvy4n9v4so6Yv7l6nK12Ms/wdabU0 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10950"; a="485044267" X-IronPort-AV: E=Sophos;i="6.04,186,1695711600"; d="scan'208";a="485044267" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 07:06:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,186,1695711600"; d="scan'208";a="17073185" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by fmviesa002.fm.intel.com with ESMTP; 11 Jan 2024 07:06:50 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rNwdr-0008OM-2U; Thu, 11 Jan 2024 15:06:47 +0000 Date: Thu, 11 Jan 2024 23:05:36 +0800 From: kernel test robot To: Jason Gunthorpe Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Kevin Tian , Eric Auger , Nicolin Chen Subject: drivers/iommu/iommufd/vfio_compat.c:315:17: sparse: sparse: cast removes address space '__user' of expression Message-ID: <202401112201.oMA1N8EM-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 | 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); 318 struct vfio_iommu_type1_info_cap_iova_range cap_iovas = { 319 .header = { 320 .id = VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE, 321 .version = 1, 322 }, 323 }; 324 struct interval_tree_span_iter span; 325 326 interval_tree_for_each_span(&span, &ioas->iopt.reserved_itree, 0, 327 ULONG_MAX) { 328 struct vfio_iova_range range; 329 330 if (!span.is_hole) 331 continue; 332 range.start = span.start_hole; 333 range.end = span.last_hole; 334 if (avail >= struct_size(&cap_iovas, iova_ranges, 335 cap_iovas.nr_iovas + 1) && 336 copy_to_user(&ucap_iovas->iova_ranges[cap_iovas.nr_iovas], 337 &range, sizeof(range))) 338 return -EFAULT; 339 cap_iovas.nr_iovas++; 340 } 341 if (avail >= struct_size(&cap_iovas, iova_ranges, cap_iovas.nr_iovas) && 342 copy_to_user(ucap_iovas, &cap_iovas, sizeof(cap_iovas))) 343 return -EFAULT; 344 return struct_size(&cap_iovas, iova_ranges, cap_iovas.nr_iovas); 345 } 346 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki