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:   Sat, 24 Sep 2022 05:36:37 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Jason A. Donenfeld" <zx2c4@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        0day robot <lkp@...el.com>
Subject: include/linux/build_bug.h:16:51: error: negative width in bit-field
 '<anonymous>'

tree:   https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220923-234348/Jason-A-Donenfeld/minmax-clamp-more-efficiently-by-avoiding-extra-comparison/20220923-180728
head:   50f8b5576755b00cc3995b17674bdb8cfd988118
commit: 50f8b5576755b00cc3995b17674bdb8cfd988118 minmax: clamp more efficiently by avoiding extra comparison
date:   6 hours ago
config: parisc-buildonly-randconfig-r004-20220923
compiler: hppa-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://github.com/intel-lab-lkp/linux/commit/50f8b5576755b00cc3995b17674bdb8cfd988118
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review UPDATE-20220923-234348/Jason-A-Donenfeld/minmax-clamp-more-efficiently-by-avoiding-extra-comparison/20220923-180728
        git checkout 50f8b5576755b00cc3995b17674bdb8cfd988118
        # 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=parisc SHELL=/bin/bash drivers/hwmon/

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

All errors (new ones prefixed by >>):

   In file included from include/linux/bits.h:22,
                    from include/linux/bitops.h:6,
                    from include/linux/log2.h:12,
                    from include/asm-generic/div64.h:55,
                    from ./arch/parisc/include/generated/asm/div64.h:1,
                    from include/linux/math.h:6,
                    from include/linux/delay.h:22,
                    from drivers/hwmon/sht4x.c:12:
   drivers/hwmon/sht4x.c: In function 'sht4x_interval_write':
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/minmax.h:50:10: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
      50 |         (BUILD_BUG_ON_ZERO(__builtin_choose_expr(                               \
         |          ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:54:9: note: in expansion of macro '__clamp_input_check'
      54 |         __clamp_input_check(lo, hi) +                                           \
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:145:36: note: in expansion of macro '__careful_clamp'
     145 | #define clamp_t(type, val, lo, hi) __careful_clamp((type)(val), (type)(lo), (type)(hi))
         |                                    ^~~~~~~~~~~~~~~
   include/linux/minmax.h:158:32: note: in expansion of macro 'clamp_t'
     158 | #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
         |                                ^~~~~~~
   drivers/hwmon/sht4x.c:132:33: note: in expansion of macro 'clamp_val'
     132 |         data->update_interval = clamp_val(val, SHT4X_MIN_POLL_INTERVAL, UINT_MAX);
         |                                 ^~~~~~~~~


vim +16 include/linux/build_bug.h

bc6245e5efd70c Ian Abbott       2017-07-10   6  
bc6245e5efd70c Ian Abbott       2017-07-10   7  #ifdef __CHECKER__
bc6245e5efd70c Ian Abbott       2017-07-10   8  #define BUILD_BUG_ON_ZERO(e) (0)
bc6245e5efd70c Ian Abbott       2017-07-10   9  #else /* __CHECKER__ */
bc6245e5efd70c Ian Abbott       2017-07-10  10  /*
bc6245e5efd70c Ian Abbott       2017-07-10  11   * Force a compilation error if condition is true, but also produce a
8788994376d84d Rikard Falkeborn 2019-12-04  12   * result (of value 0 and type int), so the expression can be used
bc6245e5efd70c Ian Abbott       2017-07-10  13   * e.g. in a structure initializer (or where-ever else comma expressions
bc6245e5efd70c Ian Abbott       2017-07-10  14   * aren't permitted).
bc6245e5efd70c Ian Abbott       2017-07-10  15   */
8788994376d84d Rikard Falkeborn 2019-12-04 @16  #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
527edbc18a70e7 Masahiro Yamada  2019-01-03  17  #endif /* __CHECKER__ */
527edbc18a70e7 Masahiro Yamada  2019-01-03  18  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ