# git rev-parse -q --verify a33082bd198c21dada3f05913a116538b5d758b6^{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 a33082bd198c21dada3f05913a116538b5d758b6^{commit} a33082bd198c21dada3f05913a116538b5d758b6 # git checkout -q -f -B kisskb a33082bd198c21dada3f05913a116538b5d758b6 # git clean -qxdf # < git log -1 # commit a33082bd198c21dada3f05913a116538b5d758b6 # Author: Len Baker # Date: Sun Sep 12 15:10:57 2021 +0200 # # nfp: Prefer struct_size over open coded arithmetic # # As noted in the "Deprecated Interfaces, Language Features, Attributes, # and Conventions" documentation [1], size calculations (especially # multiplication) should not be performed in memory allocator (or similar) # function arguments due to the risk of them overflowing. This could lead # to values wrapping around and a smaller allocation being made than the # caller was expecting. Using those allocations could lead to linear # overflows of heap memory and other misbehaviors. # # So, use the struct_size() helper to do the arithmetic instead of the # argument "size + count * size" in the kzalloc() function. # # [1] https://www.kernel.org/doc/html/v5.14/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments # # Signed-off-by: Len Baker # Reviewed-by: Gustavo A. R. Silva # Reviewed-by: Simon Horman # Signed-off-by: Gustavo A. R. Silva # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux-ld --version # < git log --format=%s --max-count=1 a33082bd198c21dada3f05913a116538b5d758b6 # < make -s -j 48 ARCH=parisc O=/kisskb/build/gustavoars_generic-32bit_defconfig_parisc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux- generic-32bit_defconfig # < make -s -j 48 ARCH=parisc O=/kisskb/build/gustavoars_generic-32bit_defconfig_parisc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux- help # make -s -j 48 ARCH=parisc O=/kisskb/build/gustavoars_generic-32bit_defconfig_parisc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux- olddefconfig # make -s -j 48 ARCH=parisc O=/kisskb/build/gustavoars_generic-32bit_defconfig_parisc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux- /kisskb/src/block/genhd.c: In function 'diskstats_show': /kisskb/src/block/genhd.c:1169:1: warning: the frame size of 1672 bytes is larger than 1536 bytes [-Wframe-larger-than=] } ^ /kisskb/src/drivers/scsi/ncr53c8xx.c:8000:26: warning: 'retrieve_from_waiting_list' defined but not used [-Wunused-function] static struct scsi_cmnd *retrieve_from_waiting_list(int to_remove, struct ncb *np, struct scsi_cmnd *cmd) ^~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/lib/xxhash.c: In function 'xxh64': /kisskb/src/lib/xxhash.c:236:1: warning: the frame size of 1616 bytes is larger than 1536 bytes [-Wframe-larger-than=] } ^ Completed OK # rm -rf /kisskb/build/gustavoars_generic-32bit_defconfig_parisc-gcc8 # Build took: 0:01:47.789386