CC: [email protected] CC: [email protected] BCC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Ard Biesheuvel <[email protected]> TO: [email protected] CC: [email protected] CC: [email protected] CC: Ard Biesheuvel <[email protected]>
Hi Ard, I love your patch! Perhaps something to improve: [auto build test WARNING on herbert-cryptodev-2.6/master] [also build test WARNING on herbert-crypto-2.6/master sunxi/sunxi/for-next v5.18-rc1 next-20220407] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Ard-Biesheuvel/crypto-avoid-DMA-padding-for-request-structures/20220407-010855 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master :::::: branch date: 26 hours ago :::::: commit date: 26 hours ago config: arm-randconfig-c002-20220406 (https://download.01.org/0day-ci/archive/20220408/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6b306233f78876a1d197ed6e1f05785505de7c63) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/intel-lab-lkp/linux/commit/9ee3fae5a9cb824bb1a8a7f0cc52910bb5a186ad git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ard-Biesheuvel/crypto-avoid-DMA-padding-for-request-structures/20220407-010855 git checkout 9ee3fae5a9cb824bb1a8a7f0cc52910bb5a186ad # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE' __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ ^ include/linux/tracepoint.h:343:4: note: expanded from macro '__DECLARE_TRACE' { } \ ^ fs/erofs/data.c:120:2: note: Returning from 'trace_erofs_map_blocks_enter' trace_erofs_map_blocks_enter(inode, map, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/data.c:122:6: note: Assuming field 'm_la' is < field 'i_size' if (map->m_la >= inode->i_size) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/data.c:122:2: note: Taking false branch if (map->m_la >= inode->i_size) { ^ fs/erofs/data.c:129:6: note: Assuming field 'datalayout' is equal to EROFS_INODE_CHUNK_BASED if (vi->datalayout != EROFS_INODE_CHUNK_BASED) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/data.c:129:2: note: Taking false branch if (vi->datalayout != EROFS_INODE_CHUNK_BASED) { ^ fs/erofs/data.c:134:6: note: Assuming the condition is false if (vi->chunkformat & EROFS_CHUNK_FORMAT_INDEXES) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/data.c:134:2: note: Taking false branch if (vi->chunkformat & EROFS_CHUNK_FORMAT_INDEXES) ^ fs/erofs/data.c:144:2: note: Taking true branch if (IS_ERR(kaddr)) { ^ fs/erofs/data.c:146:3: note: Control jumps to line 180 goto out; ^ fs/erofs/data.c:180:7: note: 'err' is not equal to 0 if (!err) ^~~ fs/erofs/data.c:180:2: note: Taking false branch if (!err) ^ fs/erofs/data.c:182:2: note: Calling 'trace_erofs_map_blocks_exit' trace_erofs_map_blocks_exit(inode, map, flags, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/trace/events/erofs.h:224:1: note: Returning without writing to 'map->m_flags' DEFINE_EVENT(erofs__map_blocks_exit, erofs_map_blocks_exit, ^ include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT' DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) ^ include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE' __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ ^ include/linux/tracepoint.h:343:4: note: expanded from macro '__DECLARE_TRACE' { } \ ^ fs/erofs/data.c:182:2: note: Returning from 'trace_erofs_map_blocks_exit' trace_erofs_map_blocks_exit(inode, map, flags, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/data.c:183:2: note: Returning without writing to 'map->m_flags' return err; ^ fs/erofs/data.c:242:8: note: Returning from 'erofs_map_blocks' ret = erofs_map_blocks(inode, &map, EROFS_GET_BLOCKS_RAW); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/erofs/data.c:243:6: note: 'ret' is >= 0 if (ret < 0) ^~~ fs/erofs/data.c:243:2: note: Taking false branch if (ret < 0) ^ fs/erofs/data.c:251:6: note: Assuming 'ret' is 0 if (ret) ^~~ fs/erofs/data.c:251:2: note: Taking false branch if (ret) ^ fs/erofs/data.c:255:2: note: Taking false branch if (flags & IOMAP_DAX) { ^ fs/erofs/data.c:265:20: note: The left operand of '&' is a garbage value if (!(map.m_flags & EROFS_MAP_MAPPED)) { ~~~~~~~~~~~ ^ 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. >> crypto/ctr.c:23:8: warning: Excessive padding in 'struct >> crypto_rfc3686_req_ctx' (40 padding bytes, where 8 is optimal). Optimal fields order: subreq, iv, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct crypto_rfc3686_req_ctx { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ crypto/ctr.c:23:8: note: Excessive padding in 'struct crypto_rfc3686_req_ctx' (40 padding bytes, where 8 is optimal). Optimal fields order: subreq, iv, consider reordering the fields or adding explicit padding members struct crypto_rfc3686_req_ctx { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. drivers/mfd/tps65010.c:650:5: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = 0; ^ ~ drivers/mfd/tps65010.c:650:5: note: Value stored to 'status' is never read status = 0; ^ ~ 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. drivers/iio/industrialio-buffer.c:854:2: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) { ^ include/linux/list.h:640:13: note: expanded from macro 'list_for_each_entry' pos = list_next_entry(pos, member)) ^ include/linux/list.h:564:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^ include/linux/list.h:520:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ include/linux/container_of.h:18:25: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^ drivers/iio/industrialio-buffer.c:1303:8: note: Calling 'strtobool' ret = strtobool(buf, &requested_state); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kstrtox.h:152:9: note: Value assigned to 'requested_state', which participates in a condition later return kstrtobool(s, res); ^~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:1303:8: note: Returning from 'strtobool' ret = strtobool(buf, &requested_state); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:1304:6: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ drivers/iio/industrialio-buffer.c:1304:2: note: Taking false branch if (ret < 0) ^ drivers/iio/industrialio-buffer.c:1312:6: note: Assuming 'inlist' is not equal to 'requested_state' if (inlist == requested_state) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:1312:2: note: Taking false branch if (inlist == requested_state) ^ drivers/iio/industrialio-buffer.c:1315:6: note: Assuming 'requested_state' is true if (requested_state) ^~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:1315:2: note: Taking true branch if (requested_state) ^ drivers/iio/industrialio-buffer.c:1316:9: note: Calling '__iio_update_buffers' ret = __iio_update_buffers(indio_dev, buffer, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:1197:8: note: Calling 'iio_verify_update' ret = iio_verify_update(indio_dev, insert_buffer, remove_buffer, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:834:6: note: 'insert_buffer' is non-null if (insert_buffer && ^~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:834:6: note: Left side of '&&' is true drivers/iio/industrialio-buffer.c:835:6: note: Calling 'bitmap_empty' bitmap_empty(insert_buffer->scan_mask, indio_dev->masklength)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/bitmap.h:385:6: note: Left side of '&&' is false if (small_const_nbits(nbits)) ^ include/asm-generic/bitsperlong.h:36:31: note: expanded from macro 'small_const_nbits' vim +23 crypto/ctr.c 23e353c8a681cc3 Joy Latten 2007-10-23 22 69d3150cfc2075d Jussi Kivilinna 2012-12-28 @23 struct crypto_rfc3686_req_ctx { 69d3150cfc2075d Jussi Kivilinna 2012-12-28 24 u8 iv[CTR_RFC3686_BLOCK_SIZE]; b2b39c2f976bc7b Herbert Xu 2016-07-12 25 struct skcipher_request subreq CRYPTO_MINALIGN_ATTR; 69d3150cfc2075d Jussi Kivilinna 2012-12-28 26 }; 69d3150cfc2075d Jussi Kivilinna 2012-12-28 27 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
