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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108190906.sM7mmI8t-lkp@intel.com>
Date:   Thu, 19 Aug 2021 09:59:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yuri Nudelman <ynudelman@...ana.ai>
Cc:     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:358:76: warning: format '%llx'
 expects argument of type 'long long unsigned int', but argument 4 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: arc-randconfig-r043-20210818 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
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
        # 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=gcc-11.2.0 make.cross ARCH=arc 

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: In function 'userptr_lookup_show':
>> drivers/misc/habanalabs/common/debugfs.c:358:76: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
     358 |                                         seq_printf(s, " 0x%-18llx  0x%-16llx  %-8u  0x%-16llx %-12llu\n",
         |                                                                      ~~~~~~^
         |                                                                            |
         |                                                                            long long unsigned int
         |                                                                      %-16x
     359 |                                                 dev_entry->userptr_lookup,
     360 |                                                 dma_addr, userptr->pid,
         |                                                 ~~~~~~~~                    
         |                                                 |
         |                                                 dma_addr_t {aka unsigned int}


vim +358 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" (42921 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ