# git rev-parse -q --verify 4d8cbf6dbcdaebe949461b0a933ae4c71cb53edc^{commit} # git fetch -q -n -f https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/kspp # git rev-parse -q --verify 4d8cbf6dbcdaebe949461b0a933ae4c71cb53edc^{commit} 4d8cbf6dbcdaebe949461b0a933ae4c71cb53edc # git checkout -q -f -B kisskb 4d8cbf6dbcdaebe949461b0a933ae4c71cb53edc # git clean -qxdf # < git log -1 # commit 4d8cbf6dbcdaebe949461b0a933ae4c71cb53edc # Author: Gustavo A. R. Silva # Date: Fri Jul 14 13:56:37 2023 -0600 # # fs: omfs: Use flexible-array member in struct omfs_extent # # Memory for 'struct omfs_extent' and a 'e_extent_count' number of extent # entries is indirectly allocated through 'bh->b_data', which is a pointer # to data within the page. This implies that the member 'e_entry' # (which is the start of extent entries) functions more like an array than # a single object of type 'struct omfs_extent_entry'. # # So we better turn this object into a proper array, in this case a # flexible-array member, and with that, fix the following # -Wstringop-overflow warning seen after building s390 architecture with # allyesconfig (GCC 13): # # fs/omfs/file.c: In function 'omfs_grow_extent': # include/linux/fortify-string.h:57:33: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=] # 57 | #define __underlying_memcpy __builtin_memcpy # | ^ # include/linux/fortify-string.h:648:9: note: in expansion of macro '__underlying_memcpy' # 648 | __underlying_##op(p, q, __fortify_size); \ # | ^~~~~~~~~~~~~ # include/linux/fortify-string.h:693:26: note: in expansion of macro '__fortify_memcpy_chk' # 693 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ # | ^~~~~~~~~~~~~~~~~~~~ # fs/omfs/file.c:170:9: note: in expansion of macro 'memcpy' # 170 | memcpy(terminator, entry, sizeof(struct omfs_extent_entry)); # | ^~~~~~ # In file included from fs/omfs/omfs.h:8, # from fs/omfs/file.c:11: # fs/omfs/omfs_fs.h:80:34: note: at offset 16 into destination object 'e_entry' of size 16 # 80 | struct omfs_extent_entry e_entry; /* start of extent entries */ # | ^~~~~~~ # # There are some binary differences before and after changes, but this are # expected due to the change in the size of 'struct omfs_extent' and the # necessary adjusments. # # This helps with the ongoing efforts to globally enable # -Wstringop-overflow. # # Link: https://github.com/KSPP/linux/issues/330 # Reviewed-by: Kees Cook # Signed-off-by: Gustavo A. R. Silva # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/s390-linux/bin/s390-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/s390-linux/bin/s390-linux-ld --version # < git log --format=%s --max-count=1 4d8cbf6dbcdaebe949461b0a933ae4c71cb53edc # make -s -j 32 ARCH=s390 O=/kisskb/build/gustavoars_allmodconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/s390-linux/bin/s390-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_GCC_PLUGINS=n # Added to kconfig # < make -s -j 32 ARCH=s390 O=/kisskb/build/gustavoars_allmodconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/s390-linux/bin/s390-linux- help # make -s -j 32 ARCH=s390 O=/kisskb/build/gustavoars_allmodconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/s390-linux/bin/s390-linux- olddefconfig # make -s -j 32 ARCH=s390 O=/kisskb/build/gustavoars_allmodconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/s390-linux/bin/s390-linux- In file included from /kisskb/src/include/linux/string.h:254, from /kisskb/src/include/linux/bitmap.h:11, from /kisskb/src/include/linux/cpumask.h:12, from /kisskb/src/include/linux/smp.h:13, from /kisskb/src/include/linux/lockdep.h:14, from /kisskb/src/include/linux/rcupdate.h:29, from /kisskb/src/include/linux/rculist.h:11, from /kisskb/src/include/linux/pid.h:5, from /kisskb/src/include/linux/sched.h:14, from /kisskb/src/arch/s390/kernel/setup.c:21: In function 'strlcat', inlined from 'strcat' at /kisskb/src/include/linux/fortify-string.h:432:6, inlined from 'setup_zfcpdump' at /kisskb/src/arch/s390/kernel/setup.c:308:2, inlined from 'setup_arch' at /kisskb/src/arch/s390/kernel/setup.c:1008:2: /kisskb/src/include/linux/fortify-string.h:57:29: error: '__builtin_memcpy' offset -32 is out of the bounds of object 'boot_command_line' with type 'char[]' [-Werror=array-bounds] #define __underlying_memcpy __builtin_memcpy ^ /kisskb/src/include/linux/fortify-string.h:405:2: note: in expansion of macro '__underlying_memcpy' __underlying_memcpy(p + p_len, q, copy_len); ^~~~~~~~~~~~~~~~~~~ In file included from /kisskb/src/include/linux/printk.h:6, from /kisskb/src/include/asm-generic/bug.h:22, from /kisskb/src/arch/s390/include/asm/bug.h:69, from /kisskb/src/include/linux/bug.h:5, from /kisskb/src/include/linux/mmdebug.h:5, from /kisskb/src/arch/s390/include/asm/cmpxchg.h:11, from /kisskb/src/arch/s390/include/asm/atomic.h:16, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/linux/rcupdate.h:25, from /kisskb/src/include/linux/rculist.h:11, from /kisskb/src/include/linux/pid.h:5, from /kisskb/src/include/linux/sched.h:14, from /kisskb/src/arch/s390/kernel/setup.c:21: /kisskb/src/arch/s390/kernel/setup.c: In function 'setup_arch': /kisskb/src/include/linux/init.h:146:24: note: 'boot_command_line' declared here extern char __initdata boot_command_line[]; ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:243: arch/s390/kernel/setup.o] Error 1 make[4]: *** [/kisskb/src/scripts/Makefile.build:477: arch/s390/kernel] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:477: arch/s390] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/Makefile:2020: .] Error 2 make[1]: *** [/kisskb/src/Makefile:234: __sub-make] Error 2 make: *** [Makefile:234: __sub-make] Error 2 Command 'make -s -j 32 ARCH=s390 O=/kisskb/build/gustavoars_allmodconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/s390-linux/bin/s390-linux- ' returned non-zero exit status 2. # rm -rf /kisskb/build/gustavoars_allmodconfig_s390x-gcc8 # Build took: 0:13:51.528560