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]
Date:   Wed, 17 Aug 2022 16:12:43 +0800
From:   kernel test robot <lkp@...el.com>
To:     Coly Li <colyli@...e.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [colyli-bcache:nvdimm-meta 16/16] drivers/md/bcache/alloc.c:488:9:
 warning: argument 1 null where non-null expected

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git nvdimm-meta
head:   b3a2634cd2ac86de5e7ac607104db6866b1b9f6b
commit: b3a2634cd2ac86de5e7ac607104db6866b1b9f6b [16/16] bcache: support storing bcache btree nodes into NVDIMM meta device
config: openrisc-randconfig-r014-20220815
compiler: or1k-linux-gcc (GCC) 12.1.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/colyli/linux-bcache.git/commit/?id=b3a2634cd2ac86de5e7ac607104db6866b1b9f6b
        git remote add colyli-bcache https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git
        git fetch --no-tags colyli-bcache nvdimm-meta
        git checkout b3a2634cd2ac86de5e7ac607104db6866b1b9f6b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/md/bcache/

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 >>):

   In file included from drivers/md/bcache/nvmpg.h:8,
                    from drivers/md/bcache/alloc.c:66:
   drivers/md/bcache/nvmpg_format.h:132:19: warning: 'bch_nvmpg_recs_magic' defined but not used [-Wunused-const-variable=]
     132 | static const __u8 bch_nvmpg_recs_magic[] = {
         |                   ^~~~~~~~~~~~~~~~~~~~
   drivers/md/bcache/nvmpg_format.h:129:19: warning: 'bch_nvmpg_magic' defined but not used [-Wunused-const-variable=]
     129 | static const __u8 bch_nvmpg_magic[] = {
         |                   ^~~~~~~~~~~~~~~
   In function '__bch_nvmpg_bucket_free',
       inlined from 'bch_bucket_free' at drivers/md/bcache/alloc.c:497:3:
>> drivers/md/bcache/alloc.c:488:9: warning: argument 1 null where non-null expected [-Wnonnull]
     488 |         memset(bch_nvmpg_offset_to_ptr(nvmpg_offset), 0, 1<<order);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:20,
                    from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:62,
                    from include/linux/wait.h:9,
                    from include/linux/mempool.h:8,
                    from include/linux/bio.h:8,
                    from drivers/md/bcache/bcache.h:181,
                    from drivers/md/bcache/alloc.c:64:
   arch/openrisc/include/asm/string.h: In function 'bch_bucket_free':
   arch/openrisc/include/asm/string.h:6:14: note: in a call to function 'memset' declared 'nonnull'
       6 | extern void *memset(void *s, int c, __kernel_size_t n);
         |              ^~~~~~
--
   In file included from drivers/md/bcache/nvmpg.h:8,
                    from drivers/md/bcache/btree.c:29:
   drivers/md/bcache/nvmpg_format.h:132:19: warning: 'bch_nvmpg_recs_magic' defined but not used [-Wunused-const-variable=]
     132 | static const __u8 bch_nvmpg_recs_magic[] = {
         |                   ^~~~~~~~~~~~~~~~~~~~
   drivers/md/bcache/nvmpg_format.h:129:19: warning: 'bch_nvmpg_magic' defined but not used [-Wunused-const-variable=]
     129 | static const __u8 bch_nvmpg_magic[] = {
         |                   ^~~~~~~~~~~~~~~
   In function '__bch_nvmpg_btree_node_read',
       inlined from 'bch_btree_node_read' at drivers/md/bcache/btree.c:311:3:
>> drivers/md/bcache/btree.c:298:9: warning: argument 2 null where non-null expected [-Wnonnull]
     298 |         memcpy(b->keys.set[0].data, ptr, KEY_SIZE(&b->key) << 9);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:20,
                    from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:62,
                    from include/linux/wait.h:9,
                    from include/linux/mempool.h:8,
                    from include/linux/bio.h:8,
                    from drivers/md/bcache/bcache.h:181,
                    from drivers/md/bcache/btree.c:24:
   arch/openrisc/include/asm/string.h: In function 'bch_btree_node_read':
   arch/openrisc/include/asm/string.h:9:14: note: in a call to function 'memcpy' declared 'nonnull'
       9 | extern void *memcpy(void *dest, __const void *src, __kernel_size_t n);
         |              ^~~~~~


vim +488 drivers/md/bcache/alloc.c

   480	
   481	static void __bch_nvmpg_bucket_free(struct cache_set *c, struct bkey *k)
   482	{
   483		int order;
   484		unsigned long nvmpg_offset;
   485	
   486		order = ilog2(c->cache->sb.bucket_size / PAGE_SECTORS);
   487		nvmpg_offset = bkey_offset_to_nvmpg_offset(PTR_OFFSET(k, 0));
 > 488		memset(bch_nvmpg_offset_to_ptr(nvmpg_offset), 0, 1<<order);
   489		bch_nvmpg_free_pages(nvmpg_offset, order, c->set_uuid);
   490	}
   491	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ