All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: include/linux/compiler.h:344:38: error: call to '__compiletime_assert_172' declared with attribute error: BUILD_BUG_ON failed: KASAN_SHADOW_START & ~PGDIR_MASK
Date: Sun, 24 May 2020 23:15:45 +0800	[thread overview]
Message-ID: <20200524151545.GA17853@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   051143e1602d90ea71887d92363edd539d411de5
commit: 305d60012304684bd59ea1f67703e51662e4906a powerpc/kasan: add missing/lost Makefile
config: powerpc-randconfig-r024-20200522 (attached as .config)
compiler: powerpc-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
        git checkout 305d60012304684bd59ea1f67703e51662e4906a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

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

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

arch/powerpc/mm/kasan/kasan_init_32.c:135:7: warning: no previous prototype for 'module_alloc' [-Wmissing-prototypes]
135 | void *module_alloc(unsigned long size)
|       ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from arch/powerpc/include/asm/page.h:15,
from arch/powerpc/include/asm/kasan.h:17,
from include/linux/kasan.h:14,
from arch/powerpc/mm/kasan/kasan_init_32.c:5:
arch/powerpc/mm/kasan/kasan_init_32.c: In function 'kasan_early_init':
>> include/linux/compiler.h:344:38: error: call to '__compiletime_assert_172' declared with attribute error: BUILD_BUG_ON failed: KASAN_SHADOW_START & ~PGDIR_MASK
344 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
|                                      ^
include/linux/compiler.h:325:4: note: in definition of macro '__compiletime_assert'
325 |    prefix ## suffix();             |    ^~~~~~
include/linux/compiler.h:344:2: note: in expansion of macro '_compiletime_assert'
344 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
|  ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
|                                     ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
|  ^~~~~~~~~~~~~~~~
>> arch/powerpc/mm/kasan/kasan_init_32.c:172:2: note: in expansion of macro 'BUILD_BUG_ON'
172 |  BUILD_BUG_ON(KASAN_SHADOW_START & ~PGDIR_MASK);
|  ^~~~~~~~~~~~

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=305d60012304684bd59ea1f67703e51662e4906a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 305d60012304684bd59ea1f67703e51662e4906a
vim +/__compiletime_assert_172 +344 include/linux/compiler.h

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

:::::: The code at line 344 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 CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: include/linux/compiler.h:344:38: error: call to '__compiletime_assert_172' declared with attribute error: BUILD_BUG_ON failed: KASAN_SHADOW_START & ~PGDIR_MASK
Date: Sun, 24 May 2020 23:15:45 +0800	[thread overview]
Message-ID: <20200524151545.GA17853@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   051143e1602d90ea71887d92363edd539d411de5
commit: 305d60012304684bd59ea1f67703e51662e4906a powerpc/kasan: add missing/lost Makefile
config: powerpc-randconfig-r024-20200522 (attached as .config)
compiler: powerpc-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
        git checkout 305d60012304684bd59ea1f67703e51662e4906a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

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

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

arch/powerpc/mm/kasan/kasan_init_32.c:135:7: warning: no previous prototype for 'module_alloc' [-Wmissing-prototypes]
135 | void *module_alloc(unsigned long size)
|       ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from arch/powerpc/include/asm/page.h:15,
from arch/powerpc/include/asm/kasan.h:17,
from include/linux/kasan.h:14,
from arch/powerpc/mm/kasan/kasan_init_32.c:5:
arch/powerpc/mm/kasan/kasan_init_32.c: In function 'kasan_early_init':
>> include/linux/compiler.h:344:38: error: call to '__compiletime_assert_172' declared with attribute error: BUILD_BUG_ON failed: KASAN_SHADOW_START & ~PGDIR_MASK
344 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
|                                      ^
include/linux/compiler.h:325:4: note: in definition of macro '__compiletime_assert'
325 |    prefix ## suffix();             |    ^~~~~~
include/linux/compiler.h:344:2: note: in expansion of macro '_compiletime_assert'
344 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
|  ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
|                                     ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
|  ^~~~~~~~~~~~~~~~
>> arch/powerpc/mm/kasan/kasan_init_32.c:172:2: note: in expansion of macro 'BUILD_BUG_ON'
172 |  BUILD_BUG_ON(KASAN_SHADOW_START & ~PGDIR_MASK);
|  ^~~~~~~~~~~~

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=305d60012304684bd59ea1f67703e51662e4906a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 305d60012304684bd59ea1f67703e51662e4906a
vim +/__compiletime_assert_172 +344 include/linux/compiler.h

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

:::::: The code at line 344 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 CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

             reply	other threads:[~2020-05-24 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 15:15 kbuild test robot [this message]
2020-05-24 15:15 ` include/linux/compiler.h:344:38: error: call to '__compiletime_assert_172' declared with attribute error: BUILD_BUG_ON failed: KASAN_SHADOW_START & ~PGDIR_MASK kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200524151545.GA17853@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.