# 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-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 5c4e0a21fae877a7ef89be6dcc6263ec672372b8 # < make -s -j 48 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.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 48 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 48 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig # make -s -j 48 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-objdump: mm/kfence/kfence_test.o: unable to initialize decompress status for section .debug_info /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-objdump: mm/kfence/kfence_test.o: unable to initialize decompress status for section .debug_info /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-objdump: mm/kfence/kfence_test.o: File format not recognized 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()+0x8: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: do_int80_syscall_32()+0x8: 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()+0x24: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: fixup_bad_iret()+0x21: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: pv_ops[22]: xen_cpuid vmlinux.o: warning: objtool: pv_ops[22]: native_cpuid vmlinux.o: warning: objtool: mce_setup()+0xcb: call to pv_ops[22]() leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x28: 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 /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: mm/kfence/kfence_test.o: unable to initialize decompress status for section .debug_info /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: mm/kfence/kfence_test.o: unable to initialize decompress status for section .debug_info /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: mm/kfence/kfence_test.o: unable to initialize decompress status for section .debug_info /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: mm/kfence/kfence_test.o: unable to initialize decompress status for section .debug_info mm/kfence/kfence_test.o: file not recognized: File format not recognized make[3]: *** [/kisskb/src/scripts/Makefile.modfinal:60: mm/kfence/kfence_test.ko] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/scripts/Makefile.modpost:140: __modpost] Error 2 make[1]: *** [/kisskb/src/Makefile:1787: modules] Error 2 make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 48 ARCH=x86 O=/kisskb/build/linus_x86-allmodconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_x86-allmodconfig_x86_64-gcc8 # Build took: 0:30:26.765030