[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202509070251.7MfOWGUB-lkp@intel.com>
Date: Sun, 7 Sep 2025 03:21:49 +0800
From: kernel test robot <lkp@...el.com>
To: T Pratham <t-pratham@...com>, Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org, Kamlesh Gurudasani <kamlesh@...com>,
Manorit Chawdhry <m-chawdhry@...com>,
Vignesh Raghavendra <vigneshr@...com>,
Praneeth Bajjuri <praneeth@...com>,
Vishal Mahaveer <vishalm@...com>,
Kavitha Malarvizhi <k-malarvizhi@...com>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] crypto: ti: Add support for AES-CCM in DTHEv2 driver
Hi Pratham,
kernel test robot noticed the following build warnings:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on next-20250905]
[cannot apply to herbert-crypto-2.6/master linus/master v6.17-rc4]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/T-Pratham/crypto-ti-Add-support-for-AES-XTS-in-DTHEv2-driver/20250905-214245
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/20250905133504.2348972-8-t-pratham%40ti.com
patch subject: [PATCH 4/4] crypto: ti: Add support for AES-CCM in DTHEv2 driver
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250907/202509070251.7MfOWGUB-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250907/202509070251.7MfOWGUB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509070251.7MfOWGUB-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/crypto/ti/dthev2-aes.c:818:7: warning: variable 'unpadded_cryptlen' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
818 | if (!dst) {
| ^~~~
drivers/crypto/ti/dthev2-aes.c:962:6: note: uninitialized use occurs here
962 | if (unpadded_cryptlen % AES_BLOCK_SIZE)
| ^~~~~~~~~~~~~~~~~
drivers/crypto/ti/dthev2-aes.c:818:3: note: remove the 'if' if its condition is always false
818 | if (!dst) {
| ^~~~~~~~~~~
819 | ret = -ENOMEM;
| ~~~~~~~~~~~~~~
820 | goto aead_prep_dst_err;
| ~~~~~~~~~~~~~~~~~~~~~~~
821 | }
| ~
drivers/crypto/ti/dthev2-aes.c:779:32: note: initialize the variable 'unpadded_cryptlen' to silence this warning
779 | unsigned int unpadded_cryptlen;
| ^
| = 0
>> drivers/crypto/ti/dthev2-aes.c:995:49: warning: result of comparison of constant 2305843009213693951 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
995 | (ctx->aes_mode == DTHE_AES_CCM && cryptlen > DTHE_AES_CCM_CRYPT_MAXLEN)) {
| ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +995 drivers/crypto/ti/dthev2-aes.c
973
974 static int dthe_aead_crypt(struct aead_request *req)
975 {
976 struct dthe_tfm_ctx *ctx = crypto_aead_ctx(crypto_aead_reqtfm(req));
977 struct dthe_aes_req_ctx *rctx = aead_request_ctx(req);
978 struct dthe_data *dev_data = dthe_get_dev(ctx);
979 struct crypto_engine *engine;
980 unsigned int cryptlen = req->cryptlen;
981
982 // In decryption, last authsize bytes are the TAG
983 if (!rctx->enc)
984 cryptlen -= ctx->authsize;
985
986 /* Need to fallback to software in the following cases due to HW restrictions:
987 * - Both AAD and plaintext/ciphertext are zero length
988 * - For AES-GCM, AAD length is more than 2^32 - 1 bytes
989 * - For AES-CCM, AAD length is more than 2^16 - 2^8 bytes
990 * - For AES-CCM, ciphertext length is more than 2^61 - 1 bytes
991 */
992 if ((req->assoclen == 0 && cryptlen == 0) ||
993 (ctx->aes_mode == DTHE_AES_GCM && req->assoclen > DTHE_AES_GCM_AAD_MAXLEN) ||
994 (ctx->aes_mode == DTHE_AES_CCM && req->assoclen > DTHE_AES_CCM_AAD_MAXLEN) ||
> 995 (ctx->aes_mode == DTHE_AES_CCM && cryptlen > DTHE_AES_CCM_CRYPT_MAXLEN)) {
996 struct aead_request *subreq = &rctx->fb_req;
997 int ret;
998
999 aead_request_set_tfm(subreq, ctx->aead_fb);
1000 aead_request_set_callback(subreq, req->base.flags,
1001 req->base.complete, req->base.data);
1002 aead_request_set_crypt(subreq, req->src, req->dst,
1003 req->cryptlen, req->iv);
1004 aead_request_set_ad(subreq, req->assoclen);
1005
1006 ret = rctx->enc ? crypto_aead_encrypt(subreq) :
1007 crypto_aead_decrypt(subreq);
1008
1009 return ret;
1010 }
1011
1012 engine = dev_data->engine;
1013 return crypto_transfer_aead_request_to_engine(engine, req);
1014 }
1015
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists