All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH 4/4] Enable Driver compilation in crypto Kconfig and Makefile file
Date: Thu, 7 Mar 2024 22:17:44 +0800	[thread overview]
Message-ID: <202403072256.em3Fk3At-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240305112831.3380896-5-pavitrakumarm@vayavyalabs.com>
References: <20240305112831.3380896-5-pavitrakumarm@vayavyalabs.com>
TO: Pavitrakumar M <pavitrakumarm@vayavyalabs.com>
TO: herbert@gondor.apana.org.au
TO: linux-crypto@vger.kernel.org
CC: Ruud.Derwig@synopsys.com
CC: manjunath.hadli@vayavyalabs.com
CC: Pavitrakumar M <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-20240307]
[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
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: m68k-randconfig-r081-20240307 (https://download.01.org/0day-ci/archive/20240307/202403072256.em3Fk3At-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202403072256.em3Fk3At-lkp@intel.com/

New smatch warnings:
drivers/crypto/dwc-spacc/spacc_ahash.c:1057 spacc_hash_digest() error: uninitialized symbol 'total_len'.

Old smatch warnings:
drivers/crypto/dwc-spacc/spacc_ahash.c:271 spacc_hash_init_dma() error: uninitialized symbol 'sgl_buffer'.

vim +/total_len +1057 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

             reply	other threads:[~2024-03-07 14:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 14:17 kernel test robot [this message]
  -- 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-05 11:28 [PATCH 0/4] Add spacc crypto driver support 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
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
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
2023-11-15  1:57   ` kernel test robot
2023-11-14 10:40     ` kernel test robot
2023-11-15  1:58   ` kernel test robot
2023-11-14 11:45     ` kernel test robot
2023-11-15  2:00   ` kernel test robot
2023-11-14 13:42     ` 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=202403072256.em3Fk3At-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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 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.