# git rev-parse -q --verify 5c4e0a21fae877a7ef89be6dcc6263ec672372b8^{commit} 5c4e0a21fae877a7ef89be6dcc6263ec672372b8 already have revision, skipping fetch # git checkout -q -f -B kisskb 5c4e0a21fae877a7ef89be6dcc6263ec672372b8 # git clean -qxdf # < git log -1 # commit 5c4e0a21fae877a7ef89be6dcc6263ec672372b8 # Author: Guenter Roeck # Date: Tue Nov 2 07:24:20 2021 -0700 # # string: uninline memcpy_and_pad # # When building m68k:allmodconfig, recent versions of gcc generate the # following error if the length of UTS_RELEASE is less than 8 bytes. # # In function 'memcpy_and_pad', # inlined from 'nvmet_execute_disc_identify' at # drivers/nvme/target/discovery.c:268:2: arch/m68k/include/asm/string.h:72:25: error: # '__builtin_memcpy' reading 8 bytes from a region of size 7 # # Discussions around the problem suggest that this only happens if an # architecture does not provide strlen(), if -ffreestanding is provided as # compiler option, and if CONFIG_FORTIFY_SOURCE=n. All of this is the case # for m68k. The exact reasons are unknown, but seem to be related to the # ability of the compiler to evaluate the return value of strlen() and # the resulting execution flow in memcpy_and_pad(). It would be possible # to work around the problem by using sizeof(UTS_RELEASE) instead of # strlen(UTS_RELEASE), but that would only postpone the problem until the # function is called in a similar way. Uninline memcpy_and_pad() instead # to solve the problem for good. # # Suggested-by: Linus Torvalds # Reviewed-by: Geert Uytterhoeven # Acked-by: Andy Shevchenko # Signed-off-by: Guenter Roeck # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux-ld --version # < git log --format=%s --max-count=1 5c4e0a21fae877a7ef89be6dcc6263ec672372b8 # < make -s -j 32 ARCH=m68k O=/kisskb/build/linus_m68k-allmodconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- allmodconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_SAMPLES=n # < make -s -j 32 ARCH=m68k O=/kisskb/build/linus_m68k-allmodconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- help # make -s -j 32 ARCH=m68k O=/kisskb/build/linus_m68k-allmodconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- olddefconfig # make -s -j 32 ARCH=m68k O=/kisskb/build/linus_m68k-allmodconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- :1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp] In file included from : In function 'prestera_hw_build_tests', inlined from 'prestera_hw_switch_init' at /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:788:2: /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_351' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_switch_attr_req) != 16 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:501:9: note: in expansion of macro 'BUILD_BUG_ON' 501 | BUILD_BUG_ON(sizeof(struct prestera_msg_switch_attr_req) != 16); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_356' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_bridge_req) != 16 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:506:9: note: in expansion of macro 'BUILD_BUG_ON' 506 | BUILD_BUG_ON(sizeof(struct prestera_msg_bridge_req) != 16); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_358' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_acl_ruleset_bind_req) != 16 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:508:9: note: in expansion of macro 'BUILD_BUG_ON' 508 | BUILD_BUG_ON(sizeof(struct prestera_msg_acl_ruleset_bind_req) != 16); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_359' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_acl_ruleset_req) != 8 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:509:9: note: in expansion of macro 'BUILD_BUG_ON' 509 | BUILD_BUG_ON(sizeof(struct prestera_msg_acl_ruleset_req) != 8); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_360' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_span_req) != 16 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:510:9: note: in expansion of macro 'BUILD_BUG_ON' 510 | BUILD_BUG_ON(sizeof(struct prestera_msg_span_req) != 16); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_362' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_rxtx_req) != 8 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:512:9: note: in expansion of macro 'BUILD_BUG_ON' 512 | BUILD_BUG_ON(sizeof(struct prestera_msg_rxtx_req) != 8); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_363' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_lag_req) != 16 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:513:9: note: in expansion of macro 'BUILD_BUG_ON' 513 | BUILD_BUG_ON(sizeof(struct prestera_msg_lag_req) != 16); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_364' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_cpu_code_counter_req) != 8 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:514:9: note: in expansion of macro 'BUILD_BUG_ON' 514 | BUILD_BUG_ON(sizeof(struct prestera_msg_cpu_code_counter_req) != 8); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_369' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_port_info_resp) != 20 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:521:9: note: in expansion of macro 'BUILD_BUG_ON' 521 | BUILD_BUG_ON(sizeof(struct prestera_msg_port_info_resp) != 20); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_370' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_bridge_resp) != 12 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:522:9: note: in expansion of macro 'BUILD_BUG_ON' 522 | BUILD_BUG_ON(sizeof(struct prestera_msg_bridge_resp) != 12); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_373' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_acl_ruleset_resp) != 12 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:525:9: note: in expansion of macro 'BUILD_BUG_ON' 525 | BUILD_BUG_ON(sizeof(struct prestera_msg_acl_ruleset_resp) != 12); | ^~~~~~~~~~~~ /kisskb/src/include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_374' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_span_resp) != 12 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler_types.h:298:25: note: in definition of macro '__compiletime_assert' 298 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert' 317 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/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) | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/prestera/prestera_hw.c:526:9: note: in expansion of macro 'BUILD_BUG_ON' 526 | BUILD_BUG_ON(sizeof(struct prestera_msg_span_resp) != 12); | ^~~~~~~~~~~~ make[6]: *** [/kisskb/src/scripts/Makefile.build:277: drivers/net/ethernet/marvell/prestera/prestera_hw.o] Error 1 make[5]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/net/ethernet/marvell/prestera] Error 2 make[4]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/net/ethernet/marvell] Error 2 make[3]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/net/ethernet] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/net] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/kisskb/src/Makefile:1872: drivers] Error 2 make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 32 ARCH=m68k O=/kisskb/build/linus_m68k-allmodconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_m68k-allmodconfig_m68k-gcc11 # Build took: 0:07:59.306599