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>] [day] [month] [year] [list]
Message-ID: <202108190437.9DrEQFIg-lkp@intel.com>
Date:   Thu, 19 Aug 2021 04:05:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yuri Nudelman <ynudelman@...ana.ai>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Oded Gabbay <ogabbay@...nel.org>
Subject: [ogabbay:habanalabs-next 51/55]
 drivers/misc/habanalabs/common/debugfs.c:360:7: warning: format specifies
 type 'unsigned long long' but the argument has type 'dma_addr_t' (aka
 'unsigned int')

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head:   7ff0882e4eb53de988df67bc47c0d153dc343962
commit: bff4f13b946858c7fb2c1e56d7b34a4109fae5f7 [51/55] habanalabs: add userptr_lookup node in debugfs
config: riscv-randconfig-r042-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d2b574a4dea5b718e4386bf2e26af0126e5978ce)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=bff4f13b946858c7fb2c1e56d7b34a4109fae5f7
        git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
        git fetch --no-tags ogabbay habanalabs-next
        git checkout bff4f13b946858c7fb2c1e56d7b34a4109fae5f7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/misc/habanalabs/common/debugfs.c:360:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
                                                   dma_addr, userptr->pid,
                                                   ^~~~~~~~
   1 warning generated.


vim +360 drivers/misc/habanalabs/common/debugfs.c

   322	
   323	static int userptr_lookup_show(struct seq_file *s, void *data)
   324	{
   325		struct hl_debugfs_entry *entry = s->private;
   326		struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
   327		struct scatterlist *sg;
   328		struct hl_userptr *userptr;
   329		bool first = true;
   330		u64 total_npages, npages, sg_start, sg_end;
   331		dma_addr_t dma_addr;
   332		int i;
   333	
   334		spin_lock(&dev_entry->userptr_spinlock);
   335	
   336		list_for_each_entry(userptr, &dev_entry->userptr_list, debugfs_list) {
   337			if (dev_entry->userptr_lookup >= userptr->addr &&
   338			dev_entry->userptr_lookup < userptr->addr + userptr->size) {
   339				total_npages = 0;
   340				for_each_sg(userptr->sgt->sgl, sg, userptr->sgt->nents,
   341						i) {
   342					npages = hl_get_sg_info(sg, &dma_addr);
   343					sg_start = userptr->addr +
   344						total_npages * PAGE_SIZE;
   345					sg_end = userptr->addr +
   346						(total_npages + npages) * PAGE_SIZE;
   347	
   348					if (dev_entry->userptr_lookup >= sg_start &&
   349					    dev_entry->userptr_lookup < sg_end) {
   350						dma_addr += (dev_entry->userptr_lookup -
   351								sg_start);
   352						if (first) {
   353							first = false;
   354							seq_puts(s, "\n");
   355							seq_puts(s, " user virtual address         dma address       pid        region start     region size\n");
   356							seq_puts(s, "---------------------------------------------------------------------------------------\n");
   357						}
   358						seq_printf(s, " 0x%-18llx  0x%-16llx  %-8u  0x%-16llx %-12llu\n",
   359							dev_entry->userptr_lookup,
 > 360							dma_addr, userptr->pid,
   361							userptr->addr, userptr->size);
   362					}
   363					total_npages += npages;
   364				}
   365			}
   366		}
   367	
   368		spin_unlock(&dev_entry->userptr_spinlock);
   369	
   370		if (!first)
   371			seq_puts(s, "\n");
   372	
   373		return 0;
   374	}
   375	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (34762 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ