* crypto/hmac.c:301:1: warning: the frame size of 1040 bytes is larger than 1024 bytes
@ 2026-06-10 2:17 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-10 2:17 UTC (permalink / raw)
To: Herbert Xu; +Cc: oe-kbuild-all, linux-kernel
Hi Herbert,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: acb7500801e98639f6d8c2d796ed9f64cba83d3a
commit: 9d9b193ed73a65ec47cf1fd39925b09da8216461 crypto: hash - Increase HASH_MAX_DESCSIZE for hmac(sha3-224-s390)
date: 10 months ago
config: mips-lemote2f_defconfig (https://download.01.org/0day-ci/archive/20260610/202606101048.ma5faTxi-lkp@intel.com/config)
compiler: mips64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260610/202606101048.ma5faTxi-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
| Fixes: 9d9b193ed73a ("crypto: hash - Increase HASH_MAX_DESCSIZE for hmac(sha3-224-s390)")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606101048.ma5faTxi-lkp@intel.com/
All warnings (new ones prefixed by >>):
crypto/hmac.c: In function 'hmac_setkey_ahash':
>> crypto/hmac.c:301:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
301 | }
| ^
vim +301 crypto/hmac.c
0796ae061e6da5 Herbert Xu 2006-08-21 250
c3103416d52176 Herbert Xu 2025-05-15 251 static int hmac_setkey_ahash(struct crypto_ahash *parent,
c3103416d52176 Herbert Xu 2025-05-15 252 const u8 *inkey, unsigned int keylen)
c3103416d52176 Herbert Xu 2025-05-15 253 {
c3103416d52176 Herbert Xu 2025-05-15 254 struct ahash_hmac_ctx *tctx = crypto_ahash_ctx(parent);
c3103416d52176 Herbert Xu 2025-05-15 255 struct crypto_ahash *fb = crypto_ahash_fb(tctx->hash);
c3103416d52176 Herbert Xu 2025-05-15 256 int ds = crypto_ahash_digestsize(parent);
c3103416d52176 Herbert Xu 2025-05-15 257 int bs = crypto_ahash_blocksize(parent);
c3103416d52176 Herbert Xu 2025-05-15 258 int ss = crypto_ahash_statesize(parent);
c3103416d52176 Herbert Xu 2025-05-15 259 HASH_REQUEST_ON_STACK(req, fb);
c3103416d52176 Herbert Xu 2025-05-15 260 u8 *opad = &tctx->pads[ss];
c3103416d52176 Herbert Xu 2025-05-15 261 u8 *ipad = &tctx->pads[0];
c3103416d52176 Herbert Xu 2025-05-15 262 int err, i;
c3103416d52176 Herbert Xu 2025-05-15 263
c3103416d52176 Herbert Xu 2025-05-15 264 if (fips_enabled && (keylen < 112 / 8))
c3103416d52176 Herbert Xu 2025-05-15 265 return -EINVAL;
c3103416d52176 Herbert Xu 2025-05-15 266
c3103416d52176 Herbert Xu 2025-05-15 267 ahash_request_set_callback(req, 0, NULL, NULL);
c3103416d52176 Herbert Xu 2025-05-15 268
c3103416d52176 Herbert Xu 2025-05-15 269 if (keylen > bs) {
c3103416d52176 Herbert Xu 2025-05-15 270 ahash_request_set_virt(req, inkey, ipad, keylen);
c3103416d52176 Herbert Xu 2025-05-15 271 err = crypto_ahash_digest(req);
c3103416d52176 Herbert Xu 2025-05-15 272 if (err)
c3103416d52176 Herbert Xu 2025-05-15 273 goto out_zero_req;
c3103416d52176 Herbert Xu 2025-05-15 274
c3103416d52176 Herbert Xu 2025-05-15 275 keylen = ds;
c3103416d52176 Herbert Xu 2025-05-15 276 } else
c3103416d52176 Herbert Xu 2025-05-15 277 memcpy(ipad, inkey, keylen);
c3103416d52176 Herbert Xu 2025-05-15 278
c3103416d52176 Herbert Xu 2025-05-15 279 memset(ipad + keylen, 0, bs - keylen);
c3103416d52176 Herbert Xu 2025-05-15 280 memcpy(opad, ipad, bs);
c3103416d52176 Herbert Xu 2025-05-15 281
c3103416d52176 Herbert Xu 2025-05-15 282 for (i = 0; i < bs; i++) {
c3103416d52176 Herbert Xu 2025-05-15 283 ipad[i] ^= HMAC_IPAD_VALUE;
c3103416d52176 Herbert Xu 2025-05-15 284 opad[i] ^= HMAC_OPAD_VALUE;
c3103416d52176 Herbert Xu 2025-05-15 285 }
c3103416d52176 Herbert Xu 2025-05-15 286
c3103416d52176 Herbert Xu 2025-05-15 287 ahash_request_set_virt(req, ipad, NULL, bs);
c3103416d52176 Herbert Xu 2025-05-15 288 err = crypto_ahash_init(req) ?:
c3103416d52176 Herbert Xu 2025-05-15 289 crypto_ahash_update(req) ?:
c3103416d52176 Herbert Xu 2025-05-15 290 crypto_ahash_export(req, ipad);
c3103416d52176 Herbert Xu 2025-05-15 291
c3103416d52176 Herbert Xu 2025-05-15 292 ahash_request_set_virt(req, opad, NULL, bs);
c3103416d52176 Herbert Xu 2025-05-15 293 err = err ?:
c3103416d52176 Herbert Xu 2025-05-15 294 crypto_ahash_init(req) ?:
c3103416d52176 Herbert Xu 2025-05-15 295 crypto_ahash_update(req) ?:
c3103416d52176 Herbert Xu 2025-05-15 296 crypto_ahash_export(req, opad);
c3103416d52176 Herbert Xu 2025-05-15 297
c3103416d52176 Herbert Xu 2025-05-15 298 out_zero_req:
c3103416d52176 Herbert Xu 2025-05-15 299 HASH_REQUEST_ZERO(req);
c3103416d52176 Herbert Xu 2025-05-15 300 return err;
c3103416d52176 Herbert Xu 2025-05-15 @301 }
c3103416d52176 Herbert Xu 2025-05-15 302
:::::: The code at line 301 was first introduced by commit
:::::: c3103416d5217655d707d9417aaf66f184e3d72f crypto: hmac - Add ahash support
:::::: TO: Herbert Xu <herbert@gondor.apana.org.au>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-10 2:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 2:17 crypto/hmac.c:301:1: warning: the frame size of 1040 bytes is larger than 1024 bytes 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.