All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [jgunthorpe:iommu_pt_all 43/62] drivers/iommu/generic_pt/fmt/../iommu_pt.h:729 vtdss_cut_mapping() warn: sizeof(NUMBER)?
Date: Thu, 19 Jun 2025 00:53:05 +0800	[thread overview]
Message-ID: <202506190033.eaf2Apel-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-06-18 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202506190033.eaf2Apel-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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 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.