* [ardb:hctr2 3/8] crypto/hctr2.c:151 hctr2_hash_message() error: uninitialized symbol 'err'.
@ 2022-02-08 23:10 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-02-08 23:10 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3768 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Nathan Huckleberry <nhuck@google.com>
CC: Ard Biesheuvel <ardb@kernel.org>
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git hctr2
head: 5bb01649223080b7cde5740f441eb5e758ec357f
commit: 09533ad0ea8fa56420aa6e866b11c0685e862bd1 [3/8] crypto: hctr2 - Add HCTR2 support
:::::: branch date: 12 hours ago
:::::: commit date: 2 days ago
config: openrisc-randconfig-m031-20220208 (https://download.01.org/0day-ci/archive/20220209/202202090709.CprWuydG-lkp(a)intel.com/config)
compiler: or1k-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
crypto/hctr2.c:151 hctr2_hash_message() error: uninitialized symbol 'err'.
vim +/err +151 crypto/hctr2.c
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 130
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 131 static int hctr2_hash_message(struct skcipher_request *req,
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 132 struct scatterlist *sgl,
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 133 u8 digest[POLYVAL_DIGEST_SIZE])
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 134 {
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 135 u8 padding[BLOCKCIPHER_BLOCK_SIZE];
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 136 struct hctr2_request_ctx *rctx = skcipher_request_ctx(req);
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 137 struct shash_desc *hash_desc = &rctx->u.hash_desc;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 138 const unsigned int bulk_len = req->cryptlen - BLOCKCIPHER_BLOCK_SIZE;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 139 struct sg_mapping_iter miter;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 140 unsigned int remainder = bulk_len % BLOCKCIPHER_BLOCK_SIZE;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 141 int err;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 142
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 143 sg_miter_start(&miter, sgl, sg_nents(sgl),
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 144 SG_MITER_FROM_SG | SG_MITER_ATOMIC);
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 145 while (sg_miter_next(&miter)) {
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 146 err = crypto_shash_update(hash_desc, miter.addr, miter.length);
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 147 if (err)
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 148 break;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 149 }
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 150 sg_miter_stop(&miter);
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 @151 if (err)
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 152 return err;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 153
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 154 if (remainder) {
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 155 memset(padding, 0, BLOCKCIPHER_BLOCK_SIZE);
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 156 padding[0] = 0x01;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 157 err = crypto_shash_update(hash_desc, padding, BLOCKCIPHER_BLOCK_SIZE - remainder);
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 158 if (err)
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 159 return err;
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 160 }
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 161 return crypto_shash_final(hash_desc, digest);
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 162 }
09533ad0ea8fa5 Nathan Huckleberry 2022-01-24 163
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-08 23:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 23:10 [ardb:hctr2 3/8] crypto/hctr2.c:151 hctr2_hash_message() error: uninitialized symbol 'err' kernel test robot
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.