* [sean-jc:x86/svm_handler_nospec 5/5] include/linux/compiler_types.h:597:45: error: call to '__compiletime_assert_1122' declared with attribute error: BUILD_BUG_ON failed: sizeof(_i) > sizeof(long)
@ 2025-11-05 13:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-05 13:02 UTC (permalink / raw)
To: Sean Christopherson; +Cc: oe-kbuild-all
tree: https://github.com/sean-jc/linux x86/svm_handler_nospec
head: bac6bf1a9360d8301e58c5ea06be70c71a665b75
commit: bac6bf1a9360d8301e58c5ea06be70c71a665b75 [5/5] KVM: SVM: Harden exit_code against being used in Spectre-like attacks
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20251105/202511052041.SuRW3wII-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511052041.SuRW3wII-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511052041.SuRW3wII-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from <command-line>:
arch/x86/kvm/svm/svm.c: In function 'svm_invoke_exit_handler':
>> include/linux/compiler_types.h:597:45: error: call to '__compiletime_assert_1122' declared with attribute error: BUILD_BUG_ON failed: sizeof(_i) > sizeof(long)
597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:578:25: note: in definition of macro '__compiletime_assert'
578 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:597:9: note: in expansion of macro '_compiletime_assert'
597 | _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:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/nospec.h:61:9: note: in expansion of macro 'BUILD_BUG_ON'
61 | BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
| ^~~~~~~~~~~~
arch/x86/kvm/svm/svm.c:3469:17: note: in expansion of macro 'array_index_nospec'
3469 | index = array_index_nospec(exit_code, ARRAY_SIZE(svm_exit_handlers));
| ^~~~~~~~~~~~~~~~~~
--
In file included from <command-line>:
svm/svm.c: In function 'svm_invoke_exit_handler':
>> include/linux/compiler_types.h:597:45: error: call to '__compiletime_assert_1122' declared with attribute error: BUILD_BUG_ON failed: sizeof(_i) > sizeof(long)
597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:578:25: note: in definition of macro '__compiletime_assert'
578 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:597:9: note: in expansion of macro '_compiletime_assert'
597 | _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:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/nospec.h:61:9: note: in expansion of macro 'BUILD_BUG_ON'
61 | BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
| ^~~~~~~~~~~~
svm/svm.c:3469:17: note: in expansion of macro 'array_index_nospec'
3469 | index = array_index_nospec(exit_code, ARRAY_SIZE(svm_exit_handlers));
| ^~~~~~~~~~~~~~~~~~
vim +/__compiletime_assert_1122 +597 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 583
eb5c2d4b45e3d2 Will Deacon 2020-07-21 584 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 585 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 586
eb5c2d4b45e3d2 Will Deacon 2020-07-21 587 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 588 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 589 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 590 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 591 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 592 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 593 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 594 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 595 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 596 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @597 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 598
:::::: The code at line 597 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will@kernel.org>
:::::: CC: Will Deacon <will@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-05 13:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 13:02 [sean-jc:x86/svm_handler_nospec 5/5] include/linux/compiler_types.h:597:45: error: call to '__compiletime_assert_1122' declared with attribute error: BUILD_BUG_ON failed: sizeof(_i) > sizeof(long) kernel 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.