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: <202204181659.gwd7pDJ8-lkp@intel.com>
Date:   Mon, 18 Apr 2022 17:01:43 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [norov:bitmap 45/47] include/linux/bitmap.h:305:25: error: cast to
 pointer from integer of different size

tree:   https://github.com/norov/linux bitmap
head:   45a9e3feb171ccf077979b7ff6a0c6a732cfc17b
commit: 1a21df17d726b4f3c19a148e10d09ec632603f1c [45/47] lib: add bitmap_{from,to}_arr64
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20220418/202204181659.gwd7pDJ8-lkp@intel.com/config)
compiler: nios2-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://github.com/norov/linux/commit/1a21df17d726b4f3c19a148e10d09ec632603f1c
        git remote add norov https://github.com/norov/linux
        git fetch --no-tags norov bitmap
        git checkout 1a21df17d726b4f3c19a148e10d09ec632603f1c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash lib/

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

All errors (new ones prefixed by >>):

   In file included from include/linux/cpumask.h:12,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from lib/test_bitops.c:9:
   include/linux/bitmap.h: In function 'bitmap_from_u64':
>> include/linux/bitmap.h:305:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     305 |                         (const unsigned long *) (buf), (nbits))
         |                         ^
   include/linux/bitmap.h:615:16: note: in expansion of macro 'bitmap_from_arr64'
     615 |         return bitmap_from_arr64(dst, mask, 64);
         |                ^~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +305 include/linux/bitmap.h

   292	
   293	/*
   294	 * On 64-bit systems bitmaps are represented as u64 arrays internally. On LE32
   295	 * machines the order of hi and lo parts of nubmers match the bitmap structure.
   296	 * In both cases conversion is not needed when copying data from/to arrays of
   297	 * u64.
   298	 */
   299	#if (BITS_PER_LONG == 32) && defined (__BIG_ENDIAN)
   300	void bitmap_from_arr64(unsigned long *bitmap, const u64 *buf, unsigned int nbits);
   301	void bitmap_to_arr64(u64 *buf, const unsigned long *bitmap, unsigned int nbits);
   302	#else
   303	#define bitmap_from_arr64(bitmap, buf, nbits)			\
   304		bitmap_copy_clear_tail((unsigned long *) (bitmap),	\
 > 305				(const unsigned long *) (buf), (nbits))
   306	#define bitmap_to_arr64(buf, bitmap, nbits)			\
   307		bitmap_copy_clear_tail((unsigned long *) (buf),		\
   308				(const unsigned long *) (bitmap), (nbits))
   309	#endif
   310	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ