oe-kbuild-all.lists.linux.dev archive mirror
 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>,
	Thomas BOURGOIN <thomas.bourgoin@foss.st.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] crypto: hash - Remove maximum statesize limit
Date: Fri, 31 Mar 2023 20:45:44 +0800	[thread overview]
Message-ID: <202303312021.84WtsA4u-lkp@intel.com> (raw)
In-Reply-To: <ZCJllZQBWfjMCaoQ@gondor.apana.org.au>

Hi Herbert,

I love your patch! Perhaps something to improve:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on next-20230331]
[cannot apply to herbert-crypto-2.6/master linus/master v6.3-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/Herbert-Xu/crypto-hash-Remove-maximum-statesize-limit/20230328-115842
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link:    https://lore.kernel.org/r/ZCJllZQBWfjMCaoQ%40gondor.apana.org.au
patch subject: [PATCH] crypto: hash - Remove maximum statesize limit
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20230331/202303312021.84WtsA4u-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/5258657ff30097b887ac972b95a5563918f4448f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Herbert-Xu/crypto-hash-Remove-maximum-statesize-limit/20230328-115842
        git checkout 5258657ff30097b887ac972b95a5563918f4448f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303312021.84WtsA4u-lkp@intel.com/

All warnings (new ones prefixed by >>):

   crypto/algif_hash.c: In function 'hash_accept':
   crypto/algif_hash.c:238:20: error: 'HASH_MAX_STATESIZE' undeclared (first use in this function); did you mean 'HASH_MAX_DESCSIZE'?
     238 |         char state[HASH_MAX_STATESIZE];
         |                    ^~~~~~~~~~~~~~~~~~
         |                    HASH_MAX_DESCSIZE
   crypto/algif_hash.c:238:20: note: each undeclared identifier is reported only once for each function it appears in
>> crypto/algif_hash.c:238:14: warning: unused variable 'state' [-Wunused-variable]
     238 |         char state[HASH_MAX_STATESIZE];
         |              ^~~~~


vim +/state +238 crypto/algif_hash.c

fe869cdb89c95d0 Herbert Xu    2010-10-19  230  
cdfbabfb2f0ce98 David Howells 2017-03-09  231  static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
cdfbabfb2f0ce98 David Howells 2017-03-09  232  		       bool kern)
fe869cdb89c95d0 Herbert Xu    2010-10-19  233  {
fe869cdb89c95d0 Herbert Xu    2010-10-19  234  	struct sock *sk = sock->sk;
fe869cdb89c95d0 Herbert Xu    2010-10-19  235  	struct alg_sock *ask = alg_sk(sk);
fe869cdb89c95d0 Herbert Xu    2010-10-19  236  	struct hash_ctx *ctx = ask->private;
fe869cdb89c95d0 Herbert Xu    2010-10-19  237  	struct ahash_request *req = &ctx->req;
b68a7ec1e9a3efa Kees Cook     2018-08-07 @238  	char state[HASH_MAX_STATESIZE];
fe869cdb89c95d0 Herbert Xu    2010-10-19  239  	struct sock *sk2;
fe869cdb89c95d0 Herbert Xu    2010-10-19  240  	struct alg_sock *ask2;
fe869cdb89c95d0 Herbert Xu    2010-10-19  241  	struct hash_ctx *ctx2;
4afa5f961792745 Herbert Xu    2015-11-01  242  	bool more;
fe869cdb89c95d0 Herbert Xu    2010-10-19  243  	int err;
fe869cdb89c95d0 Herbert Xu    2010-10-19  244  
4afa5f961792745 Herbert Xu    2015-11-01  245  	lock_sock(sk);
4afa5f961792745 Herbert Xu    2015-11-01  246  	more = ctx->more;
4afa5f961792745 Herbert Xu    2015-11-01  247  	err = more ? crypto_ahash_export(req, state) : 0;
4afa5f961792745 Herbert Xu    2015-11-01  248  	release_sock(sk);
4afa5f961792745 Herbert Xu    2015-11-01  249  
fe869cdb89c95d0 Herbert Xu    2010-10-19  250  	if (err)
fe869cdb89c95d0 Herbert Xu    2010-10-19  251  		return err;
fe869cdb89c95d0 Herbert Xu    2010-10-19  252  
cdfbabfb2f0ce98 David Howells 2017-03-09  253  	err = af_alg_accept(ask->parent, newsock, kern);
fe869cdb89c95d0 Herbert Xu    2010-10-19  254  	if (err)
fe869cdb89c95d0 Herbert Xu    2010-10-19  255  		return err;
fe869cdb89c95d0 Herbert Xu    2010-10-19  256  
fe869cdb89c95d0 Herbert Xu    2010-10-19  257  	sk2 = newsock->sk;
fe869cdb89c95d0 Herbert Xu    2010-10-19  258  	ask2 = alg_sk(sk2);
fe869cdb89c95d0 Herbert Xu    2010-10-19  259  	ctx2 = ask2->private;
4afa5f961792745 Herbert Xu    2015-11-01  260  	ctx2->more = more;
4afa5f961792745 Herbert Xu    2015-11-01  261  
4afa5f961792745 Herbert Xu    2015-11-01  262  	if (!more)
4afa5f961792745 Herbert Xu    2015-11-01  263  		return err;
fe869cdb89c95d0 Herbert Xu    2010-10-19  264  
fe869cdb89c95d0 Herbert Xu    2010-10-19  265  	err = crypto_ahash_import(&ctx2->req, state);
fe869cdb89c95d0 Herbert Xu    2010-10-19  266  	if (err) {
fe869cdb89c95d0 Herbert Xu    2010-10-19  267  		sock_orphan(sk2);
fe869cdb89c95d0 Herbert Xu    2010-10-19  268  		sock_put(sk2);
fe869cdb89c95d0 Herbert Xu    2010-10-19  269  	}
fe869cdb89c95d0 Herbert Xu    2010-10-19  270  
fe869cdb89c95d0 Herbert Xu    2010-10-19  271  	return err;
fe869cdb89c95d0 Herbert Xu    2010-10-19  272  }
fe869cdb89c95d0 Herbert Xu    2010-10-19  273  

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

       reply	other threads:[~2023-03-31 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ZCJllZQBWfjMCaoQ@gondor.apana.org.au>
2023-03-31 12:45 ` kernel test robot [this message]
2023-04-02  1:29 ` [PATCH] crypto: hash - Remove maximum statesize limit kernel test robot

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=202303312021.84WtsA4u-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=thomas.bourgoin@foss.st.com \
    /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;
as well as URLs for NNTP newsgroup(s).