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]
Message-ID: <202006160036.sb0wuWhH%lkp@intel.com>
Date:   Tue, 16 Jun 2020 00:47:48 +0800
From:   kernel test robot <lkp@...el.com>
To:     Syed Nayyar Waris <syednwaris@...il.com>, linus.walleij@...aro.org,
        akpm@...ux-foundation.org
Cc:     kbuild-all@...ts.01.org, andriy.shevchenko@...ux.intel.com,
        vilhelm.gray@...il.com, arnd@...db.de, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 1/4] bitops: Introduce the for_each_set_clump macro

Hi Syed,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on 444fc5cde64330661bf59944c43844e7d4c2ccd8]

url:    https://github.com/0day-ci/linux/commits/Syed-Nayyar-Waris/Introduce-the-for_each_set_clump-macro/20200615-205729
base:    444fc5cde64330661bf59944c43844e7d4c2ccd8
config: ia64-randconfig-r003-20200615 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 >>, old ones prefixed by <<):

scripts/Makefile.build:59: 'arch/ia64/kernel/palinfo.ko' 'arch/ia64/kernel/mca_recovery.ko' 'arch/ia64/kernel/err_inject.ko' will not be built even though obj-m is specified.
scripts/Makefile.build:60: You cannot use subdir-y/m to visit a module Makefile. Use obj-y/m instead.
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/bitmap.h: In function 'bitmap_get_value':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
|                            ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
|                                                              ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^~~~~~~~~~~~~~~~~~~
>> include/linux/bitmap.h:590:35: note: in expansion of macro 'GENMASK'
590 |   return (map[index] >> offset) & GENMASK(nbits - 1, 0);
|                                   ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
|                                        ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
|                                                              ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^~~~~~~~~~~~~~~~~~~
>> include/linux/bitmap.h:590:35: note: in expansion of macro 'GENMASK'
590 |   return (map[index] >> offset) & GENMASK(nbits - 1, 0);
|                                   ^~~~~~~
include/linux/bitmap.h: In function 'bitmap_set_value':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
|                            ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
|                                                              ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^~~~~~~~~~~~~~~~~~~
include/linux/bitmap.h:630:11: note: in expansion of macro 'GENMASK'
630 |  value &= GENMASK(nbits - 1, 0);
|           ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
|                                        ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
|                                                              ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^~~~~~~~~~~~~~~~~~~
include/linux/bitmap.h:630:11: note: in expansion of macro 'GENMASK'
630 |  value &= GENMASK(nbits - 1, 0);
|           ^~~~~~~
In file included from arch/ia64/include/asm/pgtable.h:154,
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 arch/ia64/kernel/asm-offsets.c:10:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:137:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
137 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
|                                         ^~~~~~~
arch/ia64/kernel/asm-offsets.c: At top level:
arch/ia64/kernel/asm-offsets.c:23:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
23 | void foo(void)
|      ^~~
<stdin>:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]

vim +/GENMASK +590 include/linux/bitmap.h

   569	
   570	/**
   571	 * bitmap_get_value - get a value of n-bits from the memory region
   572	 * @map: address to the bitmap memory region
   573	 * @start: bit offset of the n-bit value
   574	 * @nbits: size of value in bits
   575	 *
   576	 * Returns value of nbits located at the @start bit offset within the @map
   577	 * memory region.
   578	 */
   579	static inline unsigned long bitmap_get_value(const unsigned long *map,
   580						      unsigned long start,
   581						      unsigned long nbits)
   582	{
   583		const size_t index = BIT_WORD(start);
   584		const unsigned long offset = start % BITS_PER_LONG;
   585		const unsigned long ceiling = roundup(start + 1, BITS_PER_LONG);
   586		const unsigned long space = ceiling - start;
   587		unsigned long value_low, value_high;
   588	
   589		if (space >= nbits)
 > 590			return (map[index] >> offset) & GENMASK(nbits - 1, 0);
   591		else {
   592			value_low = map[index] & BITMAP_FIRST_WORD_MASK(start);
   593			value_high = map[index + 1] & BITMAP_LAST_WORD_MASK(start + nbits);
   594			return (value_low >> offset) | (value_high << space);
   595		}
   596	}
   597	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ