All of lore.kernel.org
 help / color / mirror / Atom feed
* [jgunthorpe:iommu_pt_all 43/62] drivers/iommu/generic_pt/fmt/../iommu_pt.h:729 vtdss_cut_mapping() warn: sizeof(NUMBER)?
@ 2025-06-18 16:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-18 16:53 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Jason Gunthorpe <jgg@nvidia.com>

tree:   https://github.com/jgunthorpe/linux iommu_pt_all
head:   95229c50e3ce2b6ecb8126b5f765996c1b73f4c1
commit: dfb9a34e74ddeb4a364d4a79f9e111c70ad83152 [43/62] iommupt: Add cut_mapping op
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-141-20250618 (https://download.01.org/0day-ci/archive/20250619/202506190033.eaf2Apel-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202506190033.eaf2Apel-lkp@intel.com/

New smatch warnings:
drivers/iommu/generic_pt/fmt/../iommu_pt.h:729 vtdss_cut_mapping() warn: sizeof(NUMBER)?
drivers/iommu/generic_pt/fmt/../iommu_pt.h:729 x86_64_cut_mapping() warn: sizeof(NUMBER)?

Old smatch warnings:
drivers/iommu/generic_pt/fmt/../pt_defs.h:206 pt_feature() warn: bitwise AND condition is false here
drivers/iommu/generic_pt/fmt/../iommu_pt.h:180 pt_iommu_vtdss_iova_to_phys() warn: sizeof(NUMBER)?
drivers/iommu/generic_pt/fmt/../iommu_pt.h:321 vtdss_set_dirty() warn: sizeof(NUMBER)?
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1012 increase_top() error: uninitialized symbol 'table_mem'.
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1012 increase_top() error: uninitialized symbol 'new_level'.
drivers/iommu/generic_pt/fmt/../iommu_pt.h:961 increase_top() warn: missing unwind goto?
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1100 pt_iommu_vtdss_map_pages() warn: impossible condition '(paddr > 18446744073709551615) => (0-u64max > u64max)'
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1372 pt_init_common() warn: bitwise AND condition is false here
drivers/iommu/generic_pt/fmt/../pt_defs.h:206 pt_feature() warn: bitwise AND condition is false here
drivers/iommu/generic_pt/fmt/../iommu_pt.h:180 pt_iommu_x86_64_iova_to_phys() warn: sizeof(NUMBER)?
drivers/iommu/generic_pt/fmt/../iommu_pt.h:321 x86_64_set_dirty() warn: sizeof(NUMBER)?
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1012 increase_top() error: uninitialized symbol 'table_mem'.
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1012 increase_top() error: uninitialized symbol 'new_level'.
drivers/iommu/generic_pt/fmt/../iommu_pt.h:961 increase_top() warn: missing unwind goto?
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1100 pt_iommu_x86_64_map_pages() warn: impossible condition '(paddr > 18446744073709551615) => (0-u64max > u64max)'
drivers/iommu/generic_pt/fmt/../iommu_pt.h:1372 pt_init_common() warn: bitwise AND condition is false here

vim +729 drivers/iommu/generic_pt/fmt/../iommu_pt.h

dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  710  
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  711  /*
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  712   * FIXME this is currently incompatible with active dirty tracking as we
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  713   * don't take care to capture or propagate the dirty bits during the mutation.
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  714   */
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  715  static int NS(cut_mapping)(struct pt_iommu *iommu_table, dma_addr_t cut_iova,
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  716  			   gfp_t gfp)
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  717  {
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  718  	struct pt_common *common = common_from_iommu(iommu_table);
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  719  	struct pt_write_attrs cut_attrs = {
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  720  		.gfp = gfp,
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  721  	};
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  722  	struct pt_range range;
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  723  	int ret;
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  724  
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  725  	ret = pt_iommu_set_prot(common, &cut_attrs, IOMMU_READ);
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  726  	if (ret)
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  727  		return ret;
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  728  
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03 @729  	ret = make_range(common_from_iommu(iommu_table), &range, cut_iova, 1);
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  730  	if (ret)
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  731  		return ret;
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  732  
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  733  	return pt_walk_range(&range, __cut_mapping, &cut_attrs);
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  734  }
dfb9a34e74ddeb Jason Gunthorpe 2025-04-03  735  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-18 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 16:53 [jgunthorpe:iommu_pt_all 43/62] drivers/iommu/generic_pt/fmt/../iommu_pt.h:729 vtdss_cut_mapping() warn: sizeof(NUMBER)? kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.