lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202312150118.ydw2nowl-lkp@intel.com>
Date:   Fri, 15 Dec 2023 02:08:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     Akhil R <akhilrajeev@...dia.com>, herbert@...dor.apana.org.au,
        davem@...emloft.net, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org, thierry.reding@...il.com,
        jonathanh@...dia.com, linux-tegra@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, Akhil R <akhilrajeev@...dia.com>
Subject: Re: [PATCH 3/5] crypto: tegra: Add Tegra Security Engine driver

Hi Akhil,

kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on drm/drm-next arm64/for-next/core robh/for-next linus/master v6.7-rc5 next-20231214]
[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/Akhil-R/dt-bindings-crypto-Add-Tegra-SE-DT-binding-doc/20231213-202407
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link:    https://lore.kernel.org/r/20231213122030.11734-4-akhilrajeev%40nvidia.com
patch subject: [PATCH 3/5] crypto: tegra: Add Tegra Security Engine driver
config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/20231215/202312150118.ydw2nowl-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312150118.ydw2nowl-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312150118.ydw2nowl-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/crypto/tegra/tegra-se-hash.c:22:
   drivers/crypto/tegra/tegra-se-hash.c: In function 'tegra_sha_get_config':
   drivers/crypto/tegra/tegra-se.h:55:57: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
      55 | #define SE_SHA_CFG_ENC_ALG(x)                           FIELD_PREP(GENMASK(15, 12), x)
         |                                                         ^~~~~~~~~~
   drivers/crypto/tegra/tegra-se.h:59:57: note: in expansion of macro 'SE_SHA_CFG_ENC_ALG'
      59 | #define SE_SHA_ENC_ALG_SHA                              SE_SHA_CFG_ENC_ALG(3)
         |                                                         ^~~~~~~~~~~~~~~~~~
   drivers/crypto/tegra/tegra-se-hash.c:53:24: note: in expansion of macro 'SE_SHA_ENC_ALG_SHA'
      53 |                 cfg |= SE_SHA_ENC_ALG_SHA;
         |                        ^~~~~~~~~~~~~~~~~~
   drivers/crypto/tegra/tegra-se-hash.c: In function 'tegra_sha_init':
>> drivers/crypto/tegra/tegra-se-hash.c:457:21: warning: variable 'algname' set but not used [-Wunused-but-set-variable]
     457 |         const char *algname;
         |                     ^~~~~~~
   cc1: some warnings being treated as errors


vim +/algname +457 drivers/crypto/tegra/tegra-se-hash.c

   450	
   451	static int tegra_sha_init(struct ahash_request *req)
   452	{
   453		struct tegra_sha_reqctx *rctx = ahash_request_ctx(req);
   454		struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
   455		struct tegra_sha_ctx *ctx = crypto_ahash_ctx(tfm);
   456		struct tegra_se *se = ctx->se;
 > 457		const char *algname;
   458	
   459		if (ctx->fallback)
   460			return tegra_sha_fallback_init(req);
   461	
   462		algname = crypto_tfm_alg_name(&tfm->base);
   463	
   464		rctx->total_len = 0;
   465		rctx->datbuf.size = 0;
   466		rctx->residue.size = 0;
   467		rctx->key_id = ctx->key_id;
   468		rctx->task = SHA_FIRST;
   469		rctx->alg = ctx->alg;
   470		rctx->blk_size = crypto_ahash_blocksize(tfm);
   471		rctx->digest.size = crypto_ahash_digestsize(tfm);
   472	
   473		rctx->digest.buf = dma_alloc_coherent(se->dev, rctx->digest.size,
   474						      &rctx->digest.addr, GFP_KERNEL);
   475		if (!rctx->digest.buf)
   476			goto digbuf_fail;
   477	
   478		rctx->residue.buf = dma_alloc_coherent(se->dev, rctx->blk_size,
   479						       &rctx->residue.addr, GFP_KERNEL);
   480		if (!rctx->residue.buf)
   481			goto resbuf_fail;
   482	
   483		rctx->datbuf.buf = dma_alloc_coherent(se->dev, SE_SHA_BUFLEN,
   484						      &rctx->datbuf.addr, GFP_KERNEL);
   485		if (!rctx->datbuf.buf)
   486			goto datbuf_fail;
   487	
   488		return 0;
   489	
   490	datbuf_fail:
   491		dma_free_coherent(se->dev, rctx->blk_size, rctx->residue.buf,
   492				  rctx->residue.addr);
   493	resbuf_fail:
   494		dma_free_coherent(se->dev, SE_SHA_BUFLEN, rctx->datbuf.buf,
   495				  rctx->datbuf.addr);
   496	digbuf_fail:
   497		return -ENOMEM;
   498	}
   499	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ