# 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/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 5c4e0a21fae877a7ef89be6dcc6263ec672372b8 # < make -s -j 10 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-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 10 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 10 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig # make -s -j 10 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- vmlinux.o: warning: objtool: __do_fast_syscall_32()+0xa: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: do_syscall_64()+0x9: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: do_int80_syscall_32()+0x9: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: xen_irq_disable()+0xa: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: xen_irq_enable()+0xb: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: exc_general_protection()+0x22: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: fixup_bad_iret()+0x20: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: mce_setup()+0x18: call to memset() leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x27: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: .entry.text+0x10e6: call to stackleak_erase() leaves .noinstr.text section vmlinux.o: warning: objtool: .entry.text+0x143: call to stackleak_erase() leaves .noinstr.text section vmlinux.o: warning: objtool: .entry.text+0x17d9: call to stackleak_erase() leaves .noinstr.text section Completed OK # rm -rf /kisskb/build/linus_x86-allmodconfig_x86_64-gcc11 # Build took: 1:17:03.946423