public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 6/6] crypto: hmac - Add ahash support
Date: Sat, 10 May 2025 23:42:59 +0800	[thread overview]
Message-ID: <202505102347.IvvpwcPQ-lkp@intel.com> (raw)
In-Reply-To: <f67cc874594fd2cc873667530c83e239ae09db81.1746448291.git.herbert@gondor.apana.org.au>

Hi Herbert,

kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on next-20250509]
[cannot apply to herbert-crypto-2.6/master linus/master v6.15-rc5]
[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/Herbert-Xu/crypto-ahash-Handle-partial-blocks-in-API/20250505-203411
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link:    https://lore.kernel.org/r/f67cc874594fd2cc873667530c83e239ae09db81.1746448291.git.herbert%40gondor.apana.org.au
patch subject: [PATCH 6/6] crypto: hmac - Add ahash support
config: mips-eyeq6_defconfig (https://download.01.org/0day-ci/archive/20250510/202505102347.IvvpwcPQ-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250510/202505102347.IvvpwcPQ-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505102347.IvvpwcPQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> crypto/hmac.c:231:12: warning: stack frame size (1152) exceeds limit (1024) in 'hmac_setkey_ahash' [-Wframe-larger-than]
     231 | static int hmac_setkey_ahash(struct crypto_ahash *parent,
         |            ^
   1 warning generated.


vim +/hmac_setkey_ahash +231 crypto/hmac.c

   230	
 > 231	static int hmac_setkey_ahash(struct crypto_ahash *parent,
   232				     const u8 *inkey, unsigned int keylen)
   233	{
   234		struct ahash_hmac_ctx *tctx = crypto_ahash_ctx(parent);
   235		struct crypto_ahash *fb = crypto_ahash_fb(tctx->hash);
   236		int ds = crypto_ahash_digestsize(parent);
   237		int bs = crypto_ahash_blocksize(parent);
   238		int ss = crypto_ahash_statesize(parent);
   239		HASH_REQUEST_ON_STACK(req, fb);
   240		u8 *opad = &tctx->pads[ss];
   241		u8 *ipad = &tctx->pads[0];
   242		int err, i;
   243	
   244		if (fips_enabled && (keylen < 112 / 8))
   245			return -EINVAL;
   246	
   247		ahash_request_set_callback(req, 0, NULL, NULL);
   248	
   249		if (keylen > bs) {
   250			ahash_request_set_virt(req, inkey, ipad, keylen);
   251			err = crypto_ahash_digest(req);
   252			if (err)
   253				goto out_zero_req;
   254	
   255			keylen = ds;
   256		} else
   257			memcpy(ipad, inkey, keylen);
   258	
   259		memset(ipad + keylen, 0, bs - keylen);
   260		memcpy(opad, ipad, bs);
   261	
   262		for (i = 0; i < bs; i++) {
   263			ipad[i] ^= HMAC_IPAD_VALUE;
   264			opad[i] ^= HMAC_OPAD_VALUE;
   265		}
   266	
   267		ahash_request_set_virt(req, ipad, NULL, bs);
   268		err = crypto_ahash_init(req) ?:
   269		      crypto_ahash_update(req) ?:
   270		      crypto_ahash_export(req, ipad);
   271	
   272		ahash_request_set_virt(req, opad, NULL, bs);
   273		err = err ?:
   274		      crypto_ahash_init(req) ?:
   275		      crypto_ahash_update(req) ?:
   276		      crypto_ahash_export(req, opad);
   277	
   278	out_zero_req:
   279		HASH_REQUEST_ZERO(req);
   280		return err;
   281	}
   282	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      reply	other threads:[~2025-05-10 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05 12:32 [PATCH 1/6] crypto: hash - Move core export and import into internel/hash.h Herbert Xu
2025-05-05 12:32 ` [PATCH 2/6] crypto: ahash - Handle partial blocks in API Herbert Xu
2025-05-08 22:03   ` kernel test robot
2025-05-05 12:32 ` [PATCH 3/6] crypto: hmac - Zero shash desc in setkey Herbert Xu
2025-05-05 12:32 ` [PATCH 4/6] crypto: shash - Set reqsize in shash_alg Herbert Xu
2025-05-05 12:32 ` [PATCH 5/6] crypto: algapi - Add driver template support to crypto_inst_setname Herbert Xu
2025-05-05 12:32 ` [PATCH 6/6] crypto: hmac - Add ahash support Herbert Xu
2025-05-10 15:42   ` kernel test robot [this message]

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=202505102347.IvvpwcPQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --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