All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavitrakumar M <pavitrakumarm@vayavyalabs.com>,
	herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Ruud.Derwig@synopsys.com, manjunath.hadli@vayavyalabs.com,
	Pavitrakumar M <pavitrakumarm@vayavyalabs.com>
Subject: Re: [PATCH 4/4] Enable Driver compilation in crypto Kconfig and Makefile file
Date: Wed, 6 Mar 2024 14:43:10 +0800	[thread overview]
Message-ID: <202403061443.w2hFEVfJ-lkp@intel.com> (raw)
In-Reply-To: <20240305112831.3380896-5-pavitrakumarm@vayavyalabs.com>

Hi Pavitrakumar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master linus/master v6.8-rc7 next-20240305]
[cannot apply to xilinx-xlnx/master]
[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/Pavitrakumar-M/Add-SPAcc-driver-to-Linux-kernel/20240305-193337
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link:    https://lore.kernel.org/r/20240305112831.3380896-5-pavitrakumarm%40vayavyalabs.com
patch subject: [PATCH 4/4] Enable Driver compilation in crypto Kconfig and Makefile file
config: i386-buildonly-randconfig-004-20240306 (https://download.01.org/0day-ci/archive/20240306/202403061443.w2hFEVfJ-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240306/202403061443.w2hFEVfJ-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/202403061443.w2hFEVfJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/crypto/dwc-spacc/spacc_ahash.c:271:9: warning: variable 'sgl_buffer' is uninitialized when used here [-Wuninitialized]
     271 |                                                   sgl_buffer,
         |                                                   ^~~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:231:18: note: initialize the variable 'sgl_buffer' to silence this warning
     231 |         char *sgl_buffer;
         |                         ^
         |                          = NULL
   drivers/crypto/dwc-spacc/spacc_ahash.c:679:18: warning: variable 'priv' is uninitialized when used here [-Wuninitialized]
     679 |                                 spacc_close(&priv->spacc, tctx->handle);
         |                                              ^~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:666:25: note: initialize the variable 'priv' to silence this warning
     666 |         struct spacc_priv *priv;
         |                                ^
         |                                 = NULL
>> drivers/crypto/dwc-spacc/spacc_ahash.c:1008:6: warning: variable 'total_len' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    1008 |         if (rc < 0)
         |             ^~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1057:28: note: uninitialized use occurs here
    1057 |         ctx->fb.hash_req.nbytes = total_len;
         |                                   ^~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1008:2: note: remove the 'if' if its condition is always false
    1008 |         if (rc < 0)
         |         ^~~~~~~~~~~
    1009 |                 goto fallback;
         |                 ~~~~~~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1003:6: warning: variable 'total_len' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    1003 |         if (tctx->handle < 0 || !tctx->ctx_valid ||
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1004 |             req->nbytes > priv->max_msg_len)
         |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1057:28: note: uninitialized use occurs here
    1057 |         ctx->fb.hash_req.nbytes = total_len;
         |                                   ^~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1003:2: note: remove the 'if' if its condition is always false
    1003 |         if (tctx->handle < 0 || !tctx->ctx_valid ||
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1004 |             req->nbytes > priv->max_msg_len)
         |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1005 |                 goto fallback;
         |                 ~~~~~~~~~~~~~
>> drivers/crypto/dwc-spacc/spacc_ahash.c:1003:6: warning: variable 'total_len' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
    1003 |         if (tctx->handle < 0 || !tctx->ctx_valid ||
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1057:28: note: uninitialized use occurs here
    1057 |         ctx->fb.hash_req.nbytes = total_len;
         |                                   ^~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1003:6: note: remove the '||' if its condition is always false
    1003 |         if (tctx->handle < 0 || !tctx->ctx_valid ||
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/crypto/dwc-spacc/spacc_ahash.c:1003:6: warning: variable 'total_len' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
    1003 |         if (tctx->handle < 0 || !tctx->ctx_valid ||
         |             ^~~~~~~~~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1057:28: note: uninitialized use occurs here
    1057 |         ctx->fb.hash_req.nbytes = total_len;
         |                                   ^~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:1003:6: note: remove the '||' if its condition is always false
    1003 |         if (tctx->handle < 0 || !tctx->ctx_valid ||
         |             ^~~~~~~~~~~~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_ahash.c:985:19: note: initialize the variable 'total_len' to silence this warning
     985 |         int rc, total_len;
         |                          ^
         |                           = 0
   6 warnings generated.
--
   drivers/crypto/dwc-spacc/spacc_skcipher.c:149:16: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
     149 |         int err = -1, rc;
         |                       ^
>> drivers/crypto/dwc-spacc/spacc_skcipher.c:176:40: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
     176 |         if (ctx->mode != CRYPTO_MODE_DES_ECB  ||
         |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
     177 |             ctx->mode != CRYPTO_MODE_DES_CBC  ||
         |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/crypto/dwc-spacc/spacc_skcipher.c:400:6: warning: variable 'ivsize' set but not used [-Wunused-but-set-variable]
     400 |         int ivsize;
         |             ^
   3 warnings generated.
--
   drivers/crypto/dwc-spacc/spacc_core.c:984:26: warning: unused variable 'names' [-Wunused-const-variable]
     984 | static const char *const names[] = {
         |                          ^~~~~
>> drivers/crypto/dwc-spacc/spacc_core.c:2835:56: warning: unused variable 'reg_names' [-Wunused-const-variable]
    2835 | static const struct { unsigned int addr; char *name; } reg_names[] = {
         |                                                        ^~~~~~~~~
   2 warnings generated.


vim +1008 drivers/crypto/dwc-spacc/spacc_ahash.c

6ad822cec22644 Pavitrakumar M 2024-03-05   981  
6ad822cec22644 Pavitrakumar M 2024-03-05   982  static int spacc_hash_digest(struct ahash_request *req)
6ad822cec22644 Pavitrakumar M 2024-03-05   983  {
6ad822cec22644 Pavitrakumar M 2024-03-05   984  	int final = 0;
6ad822cec22644 Pavitrakumar M 2024-03-05   985  	int rc, total_len;
6ad822cec22644 Pavitrakumar M 2024-03-05   986  	struct crypto_ahash *reqtfm = crypto_ahash_reqtfm(req);
6ad822cec22644 Pavitrakumar M 2024-03-05   987  	struct spacc_crypto_ctx *tctx = crypto_ahash_ctx(reqtfm);
6ad822cec22644 Pavitrakumar M 2024-03-05   988  	struct spacc_crypto_reqctx *ctx = ahash_request_ctx(req);
6ad822cec22644 Pavitrakumar M 2024-03-05   989  	struct spacc_priv *priv = dev_get_drvdata(tctx->dev);
6ad822cec22644 Pavitrakumar M 2024-03-05   990  
6ad822cec22644 Pavitrakumar M 2024-03-05   991  	if (tctx->flag_ppp) {
6ad822cec22644 Pavitrakumar M 2024-03-05   992  		/* from finup */
6ad822cec22644 Pavitrakumar M 2024-03-05   993  		ctx->single_shot = 0;
6ad822cec22644 Pavitrakumar M 2024-03-05   994  		ctx->final_part_pck = 1;
6ad822cec22644 Pavitrakumar M 2024-03-05   995  		final = 2;
6ad822cec22644 Pavitrakumar M 2024-03-05   996  	} else {
6ad822cec22644 Pavitrakumar M 2024-03-05   997  		/* direct single shot digest call */
6ad822cec22644 Pavitrakumar M 2024-03-05   998  		ctx->single_shot = 1;
6ad822cec22644 Pavitrakumar M 2024-03-05   999  		ctx->rem_len = 0;
6ad822cec22644 Pavitrakumar M 2024-03-05  1000  		ctx->total_nents = sg_nents(req->src);
6ad822cec22644 Pavitrakumar M 2024-03-05  1001  	}
6ad822cec22644 Pavitrakumar M 2024-03-05  1002  
6ad822cec22644 Pavitrakumar M 2024-03-05 @1003  	if (tctx->handle < 0 || !tctx->ctx_valid ||
6ad822cec22644 Pavitrakumar M 2024-03-05  1004  	    req->nbytes > priv->max_msg_len)
6ad822cec22644 Pavitrakumar M 2024-03-05  1005  		goto fallback;
6ad822cec22644 Pavitrakumar M 2024-03-05  1006  
6ad822cec22644 Pavitrakumar M 2024-03-05  1007  	rc = spacc_hash_init_dma(tctx->dev, req, final);
6ad822cec22644 Pavitrakumar M 2024-03-05 @1008  	if (rc < 0)
6ad822cec22644 Pavitrakumar M 2024-03-05  1009  		goto fallback;
6ad822cec22644 Pavitrakumar M 2024-03-05  1010  
6ad822cec22644 Pavitrakumar M 2024-03-05  1011  	if (rc == 0)
6ad822cec22644 Pavitrakumar M 2024-03-05  1012  		return 0;
6ad822cec22644 Pavitrakumar M 2024-03-05  1013  
6ad822cec22644 Pavitrakumar M 2024-03-05  1014  	if (final) {
6ad822cec22644 Pavitrakumar M 2024-03-05  1015  		if (ctx->total_nents) {
6ad822cec22644 Pavitrakumar M 2024-03-05  1016  			/* INIT-UPDATE-UPDATE-FINUP/FINAL */
6ad822cec22644 Pavitrakumar M 2024-03-05  1017  			total_len = tctx->ppp_sgl[0].length;
6ad822cec22644 Pavitrakumar M 2024-03-05  1018  		} else if (req->src->length == 0 && ctx->total_nents == 0) {
6ad822cec22644 Pavitrakumar M 2024-03-05  1019  			/* zero msg handling */
6ad822cec22644 Pavitrakumar M 2024-03-05  1020  			total_len = 0;
6ad822cec22644 Pavitrakumar M 2024-03-05  1021  		} else {
6ad822cec22644 Pavitrakumar M 2024-03-05  1022  			/* handle INIT-FINUP sequence, process req->nbytes */
6ad822cec22644 Pavitrakumar M 2024-03-05  1023  			total_len = req->nbytes;
6ad822cec22644 Pavitrakumar M 2024-03-05  1024  		}
6ad822cec22644 Pavitrakumar M 2024-03-05  1025  
6ad822cec22644 Pavitrakumar M 2024-03-05  1026  		rc = spacc_packet_enqueue_ddt(&priv->spacc, ctx->acb.new_handle,
6ad822cec22644 Pavitrakumar M 2024-03-05  1027  				&ctx->src, &ctx->dst, total_len,
6ad822cec22644 Pavitrakumar M 2024-03-05  1028  				0, total_len, 0, 0, 0);
6ad822cec22644 Pavitrakumar M 2024-03-05  1029  	} else {
6ad822cec22644 Pavitrakumar M 2024-03-05  1030  		rc = spacc_packet_enqueue_ddt(&priv->spacc, ctx->acb.new_handle,
6ad822cec22644 Pavitrakumar M 2024-03-05  1031  				&ctx->src, &ctx->dst, req->nbytes,
6ad822cec22644 Pavitrakumar M 2024-03-05  1032  				0, req->nbytes, 0, 0, 0);
6ad822cec22644 Pavitrakumar M 2024-03-05  1033  	}
6ad822cec22644 Pavitrakumar M 2024-03-05  1034  
6ad822cec22644 Pavitrakumar M 2024-03-05  1035  	if (rc < 0) {
6ad822cec22644 Pavitrakumar M 2024-03-05  1036  		spacc_hash_cleanup_dma(tctx->dev, req);
6ad822cec22644 Pavitrakumar M 2024-03-05  1037  		spacc_close(&priv->spacc, ctx->acb.new_handle);
6ad822cec22644 Pavitrakumar M 2024-03-05  1038  
6ad822cec22644 Pavitrakumar M 2024-03-05  1039  		if (rc != -EBUSY) {
6ad822cec22644 Pavitrakumar M 2024-03-05  1040  			pr_debug("Failed to enqueue job, ERR: %d\n", rc);
6ad822cec22644 Pavitrakumar M 2024-03-05  1041  			return rc;
6ad822cec22644 Pavitrakumar M 2024-03-05  1042  		}
6ad822cec22644 Pavitrakumar M 2024-03-05  1043  
6ad822cec22644 Pavitrakumar M 2024-03-05  1044  		if (!(req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
6ad822cec22644 Pavitrakumar M 2024-03-05  1045  			return -EBUSY;
6ad822cec22644 Pavitrakumar M 2024-03-05  1046  
6ad822cec22644 Pavitrakumar M 2024-03-05  1047  		goto fallback;
6ad822cec22644 Pavitrakumar M 2024-03-05  1048  	}
6ad822cec22644 Pavitrakumar M 2024-03-05  1049  
6ad822cec22644 Pavitrakumar M 2024-03-05  1050  	return -EINPROGRESS;
6ad822cec22644 Pavitrakumar M 2024-03-05  1051  
6ad822cec22644 Pavitrakumar M 2024-03-05  1052  fallback:
6ad822cec22644 Pavitrakumar M 2024-03-05  1053  	/* Start from scratch as init is not called before digest */
6ad822cec22644 Pavitrakumar M 2024-03-05  1054  	ctx->fb.hash_req.base = req->base;
6ad822cec22644 Pavitrakumar M 2024-03-05  1055  	ahash_request_set_tfm(&ctx->fb.hash_req, tctx->fb.hash);
6ad822cec22644 Pavitrakumar M 2024-03-05  1056  
6ad822cec22644 Pavitrakumar M 2024-03-05  1057  	ctx->fb.hash_req.nbytes = total_len;
6ad822cec22644 Pavitrakumar M 2024-03-05  1058  	ctx->fb.hash_req.src = req->src;
6ad822cec22644 Pavitrakumar M 2024-03-05  1059  	ctx->fb.hash_req.result = req->result;
6ad822cec22644 Pavitrakumar M 2024-03-05  1060  
6ad822cec22644 Pavitrakumar M 2024-03-05  1061  	return crypto_ahash_digest(&ctx->fb.hash_req);
6ad822cec22644 Pavitrakumar M 2024-03-05  1062  }
6ad822cec22644 Pavitrakumar M 2024-03-05  1063  

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

  parent reply	other threads:[~2024-03-06  6:44 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 11:28 [PATCH 0/4] Add spacc crypto driver support Pavitrakumar M
2024-03-05 11:28 ` [PATCH 1/4] Add SPAcc driver to Linux kernel Pavitrakumar M
2024-03-05 11:28 ` [PATCH 2/4] Add SPACC Kconfig and Makefile Pavitrakumar M
2024-03-06  5:42   ` Easwar Hariharan
2024-03-06  6:38     ` Pavitrakumar Managutte
2024-03-05 11:28 ` [PATCH 3/4] Add SPAcc dts overlay Pavitrakumar M
2024-03-05 11:28 ` [PATCH 4/4] Enable Driver compilation in crypto Kconfig and Makefile file Pavitrakumar M
2024-03-06  4:08   ` kernel test robot
2024-03-06  6:43   ` kernel test robot
2024-03-06  6:43   ` kernel test robot [this message]
2024-03-06  7:26   ` kernel test robot
2024-03-07 14:24   ` Dan Carpenter
2024-03-11  7:40   ` Dan Carpenter
2024-03-13 10:43   ` kernel test robot
2024-03-05 21:13 ` [PATCH 0/4] Add spacc crypto driver support Eric Biggers
2024-03-06  3:46   ` Pavitrakumar Managutte
2024-03-06  4:00     ` Eric Biggers
2024-03-06  5:07       ` Pavitrakumar Managutte
  -- strict thread matches above, loose matches on Subject: below --
2024-03-13  5:08 [PATCH 4/4] Enable Driver compilation in crypto Kconfig and Makefile file kernel test robot
2024-03-11  2:38 kernel test robot
2024-03-10 15:40 kernel test robot
2024-03-07 14:17 kernel test robot
2023-11-14 13:42 kernel test robot
2023-11-15  2:00 ` kernel test robot
2023-11-14 11:45 kernel test robot
2023-11-15  1:58 ` kernel test robot
2023-11-14 10:40 kernel test robot
2023-11-15  1:57 ` kernel test robot
2023-11-14  5:05 [PATCH 0/4] Add crypto spacc driver to support cipher, hash and aead Pavitrakumar M
2023-11-14  5:05 ` [PATCH 4/4] Enable Driver compilation in crypto Kconfig and Makefile file Pavitrakumar M

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=202403061443.w2hFEVfJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Ruud.Derwig@synopsys.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=manjunath.hadli@vayavyalabs.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pavitrakumarm@vayavyalabs.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 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.