include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_515' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg)
From: kernel test robot
Date: Wed Sep 29 2021 - 23:00:17 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 02d5e016800d082058b3d3b7c3ede136cdc6ddcb
commit: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
date: 1 year, 2 months ago
config: arm-randconfig-r026-20210930 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/torvalds/linux.git/commit/?id=eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/clocksource/ net/smc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from <command-line>:
net/smc/smc_llc.c: In function 'smc_llc_add_pending_send':
>> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_515' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg)
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert'
338 | _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)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:348:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
348 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_516' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_llc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send()
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert'
338 | _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)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:351:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
351 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
In function 'smc_llc_send_message_wait',
inlined from 'smc_llc_send_link_delete_all' at net/smc/smc_llc.c:1263:3:
net/smc/smc_llc.c:577:9: warning: 'memcpy' reading 60 bytes from a region of size 48 [-Wstringop-overread]
577 | memcpy(wr_buf, llcbuf, sizeof(union smc_llc_msg));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c: In function 'smc_llc_send_link_delete_all':
net/smc/smc_llc.c:1250:37: note: source object 'delllc' of size 48
1250 | struct smc_llc_msg_del_link delllc = {0};
| ^~~~~~
--
In file included from <command-line>:
In function 'smc_cdc_add_pending_send',
inlined from 'smc_cdc_msg_send' at net/smc/smc_cdc.c:101:2:
>> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_493' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_cdc_msg)
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert'
338 | _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)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_cdc.c:78:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
78 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_494' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_cdc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send()
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert'
338 | _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)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_cdc.c:81:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
81 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
vim +/__compiletime_assert_515 +338 include/linux/compiler_types.h
324
325 #define _compiletime_assert(condition, msg, prefix, suffix) \
326 __compiletime_assert(condition, msg, prefix, suffix)
327
328 /**
329 * compiletime_assert - break build and emit msg if condition is false
330 * @condition: a compile-time constant condition to check
331 * @msg: a message to emit if condition is false
332 *
333 * In tradition of POSIX assert, this macro will break the build if the
334 * supplied condition is *false*, emitting the supplied error message if the
335 * compiler has support to do so.
336 */
337 #define compiletime_assert(condition, msg) \
> 338 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
339
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip