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:   Tue, 16 Nov 2021 05:21:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, 0day robot <lkp@...el.com>
Subject: drivers/md/bcache/util.c:280:16: warning: comparison of distinct
 pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof ((1UL <<
 16) - offset) *' (aka 'unsigned long *'))

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20211105-042601/Coly-Li/bcache-Revert-bcache-use-bvec_virt/20211103-231427
head:   d9060ab757bd509ac3746469f23bf3e22a53f8ea
commit: d9060ab757bd509ac3746469f23bf3e22a53f8ea bcache: Revert "bcache: use bvec_virt"
date:   11 days ago
config: hexagon-randconfig-r045-20211105 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 847a6807332b13f43704327c2d30103ec0347c77)
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://github.com/0day-ci/linux/commit/d9060ab757bd509ac3746469f23bf3e22a53f8ea
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review UPDATE-20211105-042601/Coly-Li/bcache-Revert-bcache-use-bvec_virt/20211103-231427
        git checkout d9060ab757bd509ac3746469f23bf3e22a53f8ea
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon 

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/md/bcache/util.c:280:16: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof ((1UL << 16) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
                   size_t len = min(size, PAGE_SIZE - offset);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:45:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(x, y, <)
                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
           __builtin_choose_expr(__safe_cmp(x, y), \
                                 ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
                   (__typecheck(x, y) && __no_side_effects(x, y))
                    ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
           (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                      ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.


vim +280 drivers/md/bcache/util.c

   257	
   258	/**
   259	 * bch_bio_alloc_pages - allocates a single page for each bvec in a bio
   260	 * @bio: bio to allocate pages for
   261	 * @data: if non-NULL copy data from here into the newly allocate pages
   262	 * @size: size to allocate
   263	 * @gfp_mask: flags for allocation
   264	 *
   265	 * Allocates pages up to @bio->bi_vcnt.
   266	 *
   267	 * Returns 0 on success, -ENOMEM on failure. On failure, any allocated pages are
   268	 * freed.
   269	 */
   270	int bch_bio_alloc_pages(struct bio *bio, void *data, size_t size, gfp_t gfp)
   271	{
   272		struct bvec_iter iter;
   273		struct bio_vec bv;
   274	
   275		BUG_ON(bio->bi_vcnt);
   276	
   277		while (size) {
   278			struct page *page = alloc_page(gfp);
   279			unsigned int offset = offset_in_page(page);
 > 280			size_t len = min(size, PAGE_SIZE - offset);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ