All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH 5/8] crypto: skcipher - avoid rounding up request size to DMA alignment
Date: Fri, 08 Apr 2022 03:00:11 +0800	[thread overview]
Message-ID: <202204080201.rcMuCSVx-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 14153 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220406142715.2270256-6-ardb@kernel.org>
References: <20220406142715.2270256-6-ardb@kernel.org>
TO: Ard Biesheuvel <ardb@kernel.org>
TO: linux-crypto(a)vger.kernel.org
CC: herbert(a)gondor.apana.org.au
CC: keescook(a)chromium.org
CC: Ard Biesheuvel <ardb@kernel.org>

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/202204080201.rcMuCSVx-lkp(a)intel.com/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 <lkp@intel.com>


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

             reply	other threads:[~2022-04-07 19:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 19:00 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-06 14:27 [PATCH 0/8] crypto: avoid DMA padding for request structures Ard Biesheuvel
2022-04-06 14:27 ` [PATCH 5/8] crypto: skcipher - avoid rounding up request size to DMA alignment Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202204080201.rcMuCSVx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.