# git rev-parse -q --verify 021533194476035883300d60fbb3136426ac8ea5^{commit} 021533194476035883300d60fbb3136426ac8ea5 already have revision, skipping fetch # git checkout -q -f -B kisskb 021533194476035883300d60fbb3136426ac8ea5 # git clean -qxdf # < git log -1 # commit 021533194476035883300d60fbb3136426ac8ea5 # Author: Linus Torvalds # Date: Thu Feb 1 14:57:17 2024 -0800 # # Kconfig: Disable -Wstringop-overflow for GCC globally # # It turns out it was never just gcc-11 that was broken. Apparently it # just happens to work on x86-64 with other gcc versions. # # On arm64, I see warnings with gcc version 13.2.1, and the kernel test # robot reports the same problem on s390 with gcc 13.2.0. # # Admittedly it seems to be just the new Xe drm driver, but this is # keeping me from doing my normal arm64 build testing. So it gets # reverted until somebody figures out what causes the problem (and why it # doesn't show on x86-64, which is what makes me suspect it was never just # about gcc-11, and more about just random happenstance). # # This also changes the Kconfig naming a bit - just make the "disable this # for GCC" conditional be one simple Kconfig entry, and we can put the gcc # version dependencies in that entry once we figure out what the correct # rules are. # # The version dependency _may_ still end up being "gcc version larger than # 11" if the issue is purely in the Xe driver, but even if that ends up # the case, let's make that all part of the "GCC_NO_STRINGOP_OVERFLOW" # logic. # # For now, we just disable it for all gcc versions while the exact cause # is unknown. # # Link: https://lore.kernel.org/all/202401161031.hjGJHMiJ-lkp@intel.com/T/ # Cc: Gustavo A. R. Silva # Cc: Kees Cook # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 021533194476035883300d60fbb3136426ac8ea5 # make -s -j 40 ARCH=mips O=/kisskb/build/linus_allmodconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- allmodconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_SAMPLES=n # Added to kconfig CONFIG_MIPS_CPS_NS16550_BASE=0x1b0003f8 # Added to kconfig CONFIG_MIPS_CPS_NS16550_SHIFT=0 # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig # < make -s -j 40 ARCH=mips O=/kisskb/build/linus_allmodconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- help # make -s -j 40 ARCH=mips O=/kisskb/build/linus_allmodconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- olddefconfig .config:14882:warning: override: reassigning to symbol MIPS_CPS_NS16550_SHIFT # make -s -j 40 ARCH=mips O=/kisskb/build/linus_allmodconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- In file included from /kisskb/src/include/linux/string.h:292, from /kisskb/src/include/linux/bitmap.h:12, from /kisskb/src/include/linux/cpumask.h:12, from /kisskb/src/include/linux/smp.h:13, from /kisskb/src/arch/mips/include/asm/cpu-type.h:12, from /kisskb/src/arch/mips/include/asm/timex.h:19, from /kisskb/src/include/linux/timex.h:67, from /kisskb/src/include/linux/time32.h:13, from /kisskb/src/include/linux/time.h:60, from /kisskb/src/include/linux/jiffies.h:10, from /kisskb/src/include/linux/ktime.h:25, from /kisskb/src/include/linux/iopoll.h:11, from /kisskb/src/drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.c:3: In function 'fortify_memcpy_chk', inlined from 'adf_gen4_init_thd2arb_map' at /kisskb/src/drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.c:401:3: /kisskb/src/include/linux/fortify-string.h:528:4: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror] __write_overflow_field(p_size_field, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/include/linux/fortify-string.h:537:4: error: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror] __read_overflow2_field(q_size_field, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[8]: *** [/kisskb/src/scripts/Makefile.build:243: drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.o] Error 1 make[7]: *** [/kisskb/src/scripts/Makefile.build:481: drivers/crypto/intel/qat/qat_common] Error 2 make[6]: *** [/kisskb/src/scripts/Makefile.build:481: drivers/crypto/intel/qat] Error 2 make[5]: *** [/kisskb/src/scripts/Makefile.build:481: drivers/crypto/intel] Error 2 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:481: drivers/crypto] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:481: drivers] Error 2 make[2]: *** [/kisskb/src/Makefile:1921: .] Error 2 make[1]: *** [/kisskb/src/Makefile:240: __sub-make] Error 2 make: *** [Makefile:240: __sub-make] Error 2 Command 'make -s -j 40 ARCH=mips O=/kisskb/build/linus_allmodconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- ' returned non-zero exit status 2. # rm -rf /kisskb/build/linus_allmodconfig_mips-gcc8 # Build took: 0:08:50.735139