All of lore.kernel.org
 help / color / mirror / Atom feed
* [ebiggers:fscrypt-pending 3/5] include/linux/compiler.h:350:38: error: call to '__compiletime_assert_84' declared with attribute error: BUILD_BUG failed
@ 2019-10-21 23:53 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-10-21 23:53 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6922 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git fscrypt-pending
head:   c90923946c2d809cc3918e59fd24078a63b54ab0
commit: 6f1c756c2a8fb460b754350f5d65736800905082 [3/5] fscrypt: avoid data race on fscrypt_mode::logged_impl_name
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 6f1c756c2a8fb460b754350f5d65736800905082
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs/crypto/keysetup.c: In function 'fscrypt_allocate_skcipher':
   fs/crypto/keysetup.c:84:5: warning: '__ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (!xchg(&mode->logged_impl_name, true)) {
        ^
   In file included from arch/riscv/include/asm/bug.h:9:0,
                    from include/linux/bug.h:5,
                    from arch/riscv/include/asm/cmpxchg.h:9,
                    from arch/riscv/include/asm/atomic.h:19,
                    from include/linux/atomic.h:7,
                    from include/linux/crypto.h:15,
                    from include/crypto/skcipher.h:11,
                    from fs/crypto/keysetup.c:11:
>> include/linux/compiler.h:350:38: error: call to '__compiletime_assert_84' declared with attribute error: BUILD_BUG failed
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
    #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                        ^~~~~~~~~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:138:3: note: in expansion of macro 'BUILD_BUG'
      BUILD_BUG();      \
      ^~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:146:23: note: in expansion of macro '__xchg'
     (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr))); \
                          ^~~~~~
   fs/crypto/keysetup.c:84:7: note: in expansion of macro 'xchg'
     if (!xchg(&mode->logged_impl_name, true)) {
          ^~~~
--
   fs//crypto/keysetup.c: In function 'fscrypt_allocate_skcipher':
   fs//crypto/keysetup.c:84:5: warning: '__ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (!xchg(&mode->logged_impl_name, true)) {
        ^
   In file included from arch/riscv/include/asm/bug.h:9:0,
                    from include/linux/bug.h:5,
                    from arch/riscv/include/asm/cmpxchg.h:9,
                    from arch/riscv/include/asm/atomic.h:19,
                    from include/linux/atomic.h:7,
                    from include/linux/crypto.h:15,
                    from include/crypto/skcipher.h:11,
                    from fs//crypto/keysetup.c:11:
>> include/linux/compiler.h:350:38: error: call to '__compiletime_assert_84' declared with attribute error: BUILD_BUG failed
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
    #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                        ^~~~~~~~~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:138:3: note: in expansion of macro 'BUILD_BUG'
      BUILD_BUG();      \
      ^~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:146:23: note: in expansion of macro '__xchg'
     (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr))); \
                          ^~~~~~
   fs//crypto/keysetup.c:84:7: note: in expansion of macro 'xchg'
     if (!xchg(&mode->logged_impl_name, true)) {
          ^~~~

vim +/__compiletime_assert_84 +350 include/linux/compiler.h

9a8ab1c39970a4 Daniel Santos 2013-02-21  336  
9a8ab1c39970a4 Daniel Santos 2013-02-21  337  #define _compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c39970a4 Daniel Santos 2013-02-21  338  	__compiletime_assert(condition, msg, prefix, suffix)
9a8ab1c39970a4 Daniel Santos 2013-02-21  339  
9a8ab1c39970a4 Daniel Santos 2013-02-21  340  /**
9a8ab1c39970a4 Daniel Santos 2013-02-21  341   * compiletime_assert - break build and emit msg if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21  342   * @condition: a compile-time constant condition to check
9a8ab1c39970a4 Daniel Santos 2013-02-21  343   * @msg:       a message to emit if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21  344   *
9a8ab1c39970a4 Daniel Santos 2013-02-21  345   * In tradition of POSIX assert, this macro will break the build if the
9a8ab1c39970a4 Daniel Santos 2013-02-21  346   * supplied condition is *false*, emitting the supplied error message if the
9a8ab1c39970a4 Daniel Santos 2013-02-21  347   * compiler has support to do so.
9a8ab1c39970a4 Daniel Santos 2013-02-21  348   */
9a8ab1c39970a4 Daniel Santos 2013-02-21  349  #define compiletime_assert(condition, msg) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 @350  	_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
9a8ab1c39970a4 Daniel Santos 2013-02-21  351  

:::::: The code at line 350 was first introduced by commit
:::::: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG

:::::: TO: Daniel Santos <daniel.santos@pobox.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60006 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-21 23:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21 23:53 [ebiggers:fscrypt-pending 3/5] include/linux/compiler.h:350:38: error: call to '__compiletime_assert_84' declared with attribute error: BUILD_BUG failed kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.