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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 17 Dec 2022 11:49:48 +0800
From:   kernel test robot <lkp@...el.com>
To:     Keith Busch <kbusch@...a.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Matthew Wilcox <willy@...radead.org>
Cc:     oe-kbuild-all@...ts.linux.dev,
        Tony Battersby <tonyb@...ernetics.com>,
        Kernel Team <kernel-team@...a.com>,
        Keith Busch <kbusch@...nel.org>
Subject: Re: [PATCHv2 11/11] dmapool: link blocks across pages

Hi Keith,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.1]
[cannot apply to next-20221216]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Keith-Busch/dmapool-enhancements/20221217-041918
patch link:    https://lore.kernel.org/r/20221216201625.2362737-12-kbusch%40meta.com
patch subject: [PATCHv2 11/11] dmapool: link blocks across pages
config: i386-randconfig-a001
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/360d95fe292a507a2035bbedcd5e7a1c0c9027b2
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Keith-Busch/dmapool-enhancements/20221217-041918
        git checkout 360d95fe292a507a2035bbedcd5e7a1c0c9027b2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 olddefconfig
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

   mm/dmapool.c: In function 'pools_show':
>> mm/dmapool.c:82:60: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      82 |                 size += sysfs_emit_at(buf, size, "%-16s %4ld %4ld %4u %2ld\n",
         |                                                         ~~~^
         |                                                            |
         |                                                            long int
         |                                                         %4d
      83 |                                       pool->name, pool->nr_active,
         |                                                   ~~~~~~~~~~~~~~~
         |                                                       |
         |                                                       size_t {aka unsigned int}
   mm/dmapool.c:82:65: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      82 |                 size += sysfs_emit_at(buf, size, "%-16s %4ld %4ld %4u %2ld\n",
         |                                                              ~~~^
         |                                                                 |
         |                                                                 long int
         |                                                              %4d
      83 |                                       pool->name, pool->nr_active,
      84 |                                       pool->nr_blocks, pool->size,
         |                                       ~~~~~~~~~~~~~~~            
         |                                           |
         |                                           size_t {aka unsigned int}
   mm/dmapool.c:82:74: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      82 |                 size += sysfs_emit_at(buf, size, "%-16s %4ld %4ld %4u %2ld\n",
         |                                                                       ~~~^
         |                                                                          |
         |                                                                          long int
         |                                                                       %2d
   ......
      85 |                                       pool->nr_pages);
         |                                       ~~~~~~~~~~~~~~                      
         |                                           |
         |                                           size_t {aka unsigned int}


vim +82 mm/dmapool.c

    71	
    72	static ssize_t pools_show(struct device *dev, struct device_attribute *attr, char *buf)
    73	{
    74		struct dma_pool *pool;
    75		unsigned size;
    76	
    77		size = sysfs_emit(buf, "poolinfo - 0.1\n");
    78	
    79		mutex_lock(&pools_lock);
    80		list_for_each_entry(pool, &dev->dma_pools, pools) {
    81			/* per-pool info, no real statistics yet */
  > 82			size += sysfs_emit_at(buf, size, "%-16s %4ld %4ld %4u %2ld\n",
    83					      pool->name, pool->nr_active,
    84					      pool->nr_blocks, pool->size,
    85					      pool->nr_pages);
    86		}
    87		mutex_unlock(&pools_lock);
    88	
    89		return size;
    90	}
    91	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (154053 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ