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: <202110310318.xkcCYGtA-lkp@intel.com>
Date:   Sun, 31 Oct 2021 03:13:25 +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 23/23] drivers/md/bcache/btree.c:287:9:
 warning: argument 2 null where non-null expected

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git nvdimm-meta
head:   ae554f9c5f1d65c3279a7a6e6881569487483403
commit: ae554f9c5f1d65c3279a7a6e6881569487483403 [23/23] bcache: store btree nodes on nvdimm
config: ia64-randconfig-r011-20211031 (attached as .config)
compiler: ia64-linux-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/colyli/linux-bcache.git/commit/?id=ae554f9c5f1d65c3279a7a6e6881569487483403
        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 ae554f9c5f1d65c3279a7a6e6881569487483403
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64 

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

   In file included from arch/ia64/include/asm/pgtable.h:153,
                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from include/linux/highmem.h:5,
                    from include/linux/bvec.h:10,
                    from include/linux/blk_types.h:10,
                    from include/linux/bio.h:11,
                    from drivers/md/bcache/bcache.h:181,
                    from drivers/md/bcache/btree.c:24:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |         unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                                ^~~~~~~
   In file included from drivers/md/bcache/nvmpg.h:8,
                    from drivers/md/bcache/btree.c:29:
   At top level:
   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:307:3:
>> drivers/md/bcache/btree.c:287:9: warning: argument 2 null where non-null expected [-Wnonnull]
     287 |         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:10,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    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:
   drivers/md/bcache/btree.c: In function 'bch_btree_node_read':
   arch/ia64/include/asm/string.h:19:14: note: in a call to function 'memcpy' declared 'nonnull'
      19 | extern void *memcpy (void *, const void *, __kernel_size_t);
         |              ^~~~~~
   In file included from include/linux/bitmap.h:10,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    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:
   In function 'memcpy_flushcache',
       inlined from '__do_nvmpg_btree_node_write' at drivers/md/bcache/btree.c:475:2,
       inlined from 'do_btree_node_write' at drivers/md/bcache/btree.c:491:3,
       inlined from '__bch_btree_node_write' at drivers/md/bcache/btree.c:517:2:
>> include/linux/string.h:167:9: warning: argument 1 null where non-null expected [-Wnonnull]
     167 |         memcpy(dst, src, cnt);
         |         ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:20,
                    from include/linux/bitmap.h:10,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    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:
   drivers/md/bcache/btree.c: In function '__bch_btree_node_write':
   arch/ia64/include/asm/string.h:19:14: note: in a call to function 'memcpy' declared 'nonnull'
      19 | extern void *memcpy (void *, const void *, __kernel_size_t);
         |              ^~~~~~


vim +287 drivers/md/bcache/btree.c

   280	
   281	static void __bch_nvmpg_btree_node_read(struct btree *b)
   282	{
   283		uint64_t start_time = local_clock();
   284		void *ptr;
   285	
   286		ptr = bkey_offset_to_nvmpg_ptr(PTR_OFFSET(&b->key, 0));
 > 287		memcpy(b->keys.set[0].data, ptr, KEY_SIZE(&b->key) << 9);
   288	
   289		if (btree_node_io_error(b))
   290			goto err;
   291	
   292		bch_btree_node_read_done(b);
   293		bch_time_stats_update(&b->c->btree_read_time, start_time);
   294	
   295	err:
   296		bch_cache_set_error(b->c,
   297			"io error reading NVDIMM pages at 0x%p\n", ptr);
   298	}
   299	
   300	static void bch_btree_node_read(struct btree *b)
   301	{
   302		trace_bcache_btree_read(b);
   303	
   304		if (!KEY_NVMPG(&b->key))
   305			__bch_btree_node_read(b);
   306		else
 > 307			__bch_nvmpg_btree_node_read(b);
   308	}
   309	

---
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" (36741 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ