# git rev-parse -q --verify 47307c31d90ae7d52cebbbc7c1d4ff213213d4e9^{commit} 47307c31d90ae7d52cebbbc7c1d4ff213213d4e9 already have revision, skipping fetch # git checkout -q -f -B kisskb 47307c31d90ae7d52cebbbc7c1d4ff213213d4e9 # git clean -qxdf # < git log -1 # commit 47307c31d90ae7d52cebbbc7c1d4ff213213d4e9 # Author: Kees Cook # Date: Wed Jan 12 12:38:11 2022 -0800 # # crypto: octeontx2 - Avoid stack variable overflow # # Building with -Warray-bounds showed a stack variable array index # overflow. Increase the expected size of the array to avoid the warning: # # In file included from ./include/linux/printk.h:555, # from ./include/asm-generic/bug.h:22, # from ./arch/x86/include/asm/bug.h:84, # from ./include/linux/bug.h:5, # from ./include/linux/mmdebug.h:5, # from ./include/linux/gfp.h:5, # from ./include/linux/firmware.h:7, # from drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:5: # drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c: In function 'otx2_cpt_print_uc_dbg_info': # ./include/linux/dynamic_debug.h:162:33: warning: array subscript 4 is above array bounds of 'u32[4]' {aka 'unsigned int[4]'} [-Warray-bounds] # 162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ # | ^ # ./include/linux/dynamic_debug.h:134:17: note: in definition of macro '__dynamic_func_call' # 134 | func(&id, ##__VA_ARGS__); \ # | ^~~~ # ./include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call' # 162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ # | ^~~~~~~~~~~~~~~~~~ # ./include/linux/printk.h:570:9: note: in expansion of macro 'dynamic_pr_debug' # 570 | dynamic_pr_debug(fmt, ##__VA_ARGS__) # | ^~~~~~~~~~~~~~~~ # drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1807:41: note: in expansion of macro 'pr_debug' # 1807 | pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x %8.8x", # | ^~~~~~~~ # drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1765:13: note: while referencing 'mask' # 1765 | u32 mask[4]; # | ^~~~ # # This is justified because the mask size (eng_grps->engs_num) can be at # most 144 (OTX2_CPT_MAX_ENGINES bits), which is larger than available # storage. 4 * 32 == 128, so this must be 5: 5 * 32bit = 160. # # Additionally clear the mask before conversion so trailing bits are zero. # # Cc: Herbert Xu # Cc: Boris Brezillon # Cc: Arnaud Ebalard # Cc: Srujana Challa # Cc: "David S. Miller" # Cc: Suheil Chandran # Cc: Shijith Thotton # Cc: Lukasz Bartosik # Cc: linux-crypto@vger.kernel.org # Fixes: d9d7749773e8 ("crypto: octeontx2 - add apis for custom engine groups") # Acked-by: Ard Biesheuvel # Signed-off-by: Kees Cook # Signed-off-by: Herbert Xu # < /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 47307c31d90ae7d52cebbbc7c1d4ff213213d4e9 # < make -s -j 10 ARCH=x86 O=/kisskb/build/crypto_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 10 ARCH=x86 O=/kisskb/build/crypto_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 10 ARCH=x86 O=/kisskb/build/crypto_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 10 ARCH=x86 O=/kisskb/build/crypto_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: 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: do_machine_check()+0x27: call to stackleak_track_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: .text+0x4584e: 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+0x10eb: call to stackleak_erase() leaves .noinstr.text section vmlinux.o: warning: objtool: .entry.text+0x17f9: 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:1746: modules] Error 2 make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 10 ARCH=x86 O=/kisskb/build/crypto_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/crypto_x86-allmodconfig_x86_64-gcc8 # Build took: 1:12:15.764703