tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: d8941b5947e4e827f27bdc4de80b27a9a094e39d
commit: 217252a8f88782be21b4151e58ea05197f6900c3 [41/72] kvm: avoid speculation-based
attacks from out-of-range memslot accesses
config: mips-randconfig-r014-20210613 (attached as .config)
compiler: mipsel-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
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 217252a8f88782be21b4151e58ea05197f6900c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/mips/kvm/../../../virt/kvm/kvm_main.c:673:12: warning: no previous prototype for
'kvm_arch_post_init_vm' [-Wmissing-prototypes]
673 | int __weak kvm_arch_post_init_vm(struct kvm *kvm)
| ^~~~~~~~~~~~~~~~~~~~~
arch/mips/kvm/../../../virt/kvm/kvm_main.c:682:13: warning: no previous prototype for
'kvm_arch_pre_destroy_vm' [-Wmissing-prototypes]
682 | void __weak kvm_arch_pre_destroy_vm(struct kvm *kvm)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/mips/kvm/../../../virt/kvm/kvm_main.c:18:
In function '__gfn_to_hva_memslot',
inlined from '__gfn_to_hva_many' at
arch/mips/kvm/../../../virt/kvm/kvm_main.c:1446:9,
inlined from '__gfn_to_hva_many' at
arch/mips/kvm/../../../virt/kvm/kvm_main.c:1434:22:
> include/linux/compiler.h:417:38: error: call to
'__compiletime_assert_85' declared with attribute error: BUILD_BUG_ON failed:
sizeof(_i) > sizeof(long)
417 | _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler.h:398:4: note: in definition of macro
'__compiletime_assert'
398 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler.h:417:2: note: in expansion of macro
'_compiletime_assert'
417 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
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)
| ^~~~~~~~~~~~~~~~
include/linux/nospec.h:55:2: note: in expansion of macro 'BUILD_BUG_ON'
55 | BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
| ^~~~~~~~~~~~
include/linux/kvm_host.h:1054:25: note: in expansion of macro
'array_index_nospec'
1054 | unsigned long offset = array_index_nospec(gfn - slot->base_gfn,
| ^~~~~~~~~~~~~~~~~~
vim +/__compiletime_assert_85 +417 include/linux/compiler.h
9a8ab1c39970a4 Daniel Santos 2013-02-21 403
9a8ab1c39970a4 Daniel Santos 2013-02-21 404 #define _compiletime_assert(condition, msg,
prefix, suffix) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 405 __compiletime_assert(condition, msg,
prefix, suffix)
9a8ab1c39970a4 Daniel Santos 2013-02-21 406
9a8ab1c39970a4 Daniel Santos 2013-02-21 407 /**
9a8ab1c39970a4 Daniel Santos 2013-02-21 408 * compiletime_assert - break build and emit
msg if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 409 * @condition: a compile-time constant
condition to check
9a8ab1c39970a4 Daniel Santos 2013-02-21 410 * @msg: a message to emit if
condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 411 *
9a8ab1c39970a4 Daniel Santos 2013-02-21 412 * In tradition of POSIX assert, this macro
will break the build if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 413 * supplied condition is *false*, emitting
the supplied error message if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 414 * compiler has support to do so.
9a8ab1c39970a4 Daniel Santos 2013-02-21 415 */
9a8ab1c39970a4 Daniel Santos 2013-02-21 416 #define compiletime_assert(condition, msg)
\
3910babeac1ab0 Vegard Nossum 2020-04-06 @417 _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
9a8ab1c39970a4 Daniel Santos 2013-02-21 418
:::::: The code at line 417 was first introduced by commit
:::::: 3910babeac1ab031f4e178042cbd1af9a9a0ec51 compiler.h: fix error in BUILD_BUG_ON()
reporting
:::::: TO: Vegard Nossum <vegard.nossum(a)oracle.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org