mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: crypto/hmac.c:301:1: warning: the frame size of 1040 bytes is larger than 1024 bytes
Date: Wed, 10 Jun 2026 10:17:30 +0800	[thread overview]
Message-ID: <202606101048.ma5faTxi-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-06-10  2:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202606101048.ma5faTxi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®