All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Akhil R <akhilrajeev@nvidia.com>,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	linux-crypto@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Akhil R <akhilrajeev@nvidia.com>
Subject: Re: [PATCH v2 06/10] crypto: tegra: Fix HASH intermediate result handling
Date: Thu, 13 Feb 2025 14:26:11 +0800	[thread overview]
Message-ID: <202502131419.R9s0l3RE-lkp@intel.com> (raw)
In-Reply-To: <20250211171713.65770-7-akhilrajeev@nvidia.com>

Hi Akhil,

kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-crypto-2.6/master]
[also build test WARNING on herbert-cryptodev-2.6/master linus/master v6.14-rc2 next-20250212]
[cannot apply to tegra/for-next]
[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/crypto-tegra-Use-separate-buffer-for-setkey/20250212-012434
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git master
patch link:    https://lore.kernel.org/r/20250211171713.65770-7-akhilrajeev%40nvidia.com
patch subject: [PATCH v2 06/10] crypto: tegra: Fix HASH intermediate result handling
config: nios2-randconfig-r112-20250213 (https://download.01.org/0day-ci/archive/20250213/202502131419.R9s0l3RE-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250213/202502131419.R9s0l3RE-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/202502131419.R9s0l3RE-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/crypto/tegra/tegra-se-hash.c:258:41: sparse: sparse: cast to restricted __be32
>> drivers/crypto/tegra/tegra-se-hash.c:258:41: sparse: sparse: cast to restricted __be32
>> drivers/crypto/tegra/tegra-se-hash.c:258:41: sparse: sparse: cast to restricted __be32
>> drivers/crypto/tegra/tegra-se-hash.c:258:41: sparse: sparse: cast to restricted __be32
>> drivers/crypto/tegra/tegra-se-hash.c:258:41: sparse: sparse: cast to restricted __be32
>> drivers/crypto/tegra/tegra-se-hash.c:258:41: sparse: sparse: cast to restricted __be32
   drivers/crypto/tegra/tegra-se-hash.c: note: in included file (through include/uapi/linux/swab.h, include/linux/swab.h, include/uapi/linux/byteorder/little_endian.h, ...):
   arch/nios2/include/uapi/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini

vim +258 drivers/crypto/tegra/tegra-se-hash.c

   214	
   215	static int tegra_se_insert_hash_result(struct tegra_sha_ctx *ctx, u32 *cpuvaddr,
   216				      struct tegra_sha_reqctx *rctx)
   217	{
   218		u32 *res = (u32 *)rctx->intr_res.buf;
   219		int i = 0, j;
   220	
   221		cpuvaddr[i++] = 0;
   222		cpuvaddr[i++] = host1x_opcode_setpayload(HASH_RESULT_REG_COUNT);
   223		cpuvaddr[i++] = se_host1x_opcode_incr_w(SE_SHA_HASH_RESULT);
   224	
   225		for (j = 0; j < HASH_RESULT_REG_COUNT; j++) {
   226			int idx = j;
   227	
   228			/*
   229			 * The initial, intermediate and final hash value of SHA-384, SHA-512
   230			 * in SHA_HASH_RESULT registers follow the below layout of bytes.
   231			 *
   232			 * +---------------+------------+
   233			 * | HASH_RESULT_0 | B4...B7    |
   234			 * +---------------+------------+
   235			 * | HASH_RESULT_1 | B0...B3    |
   236			 * +---------------+------------+
   237			 * | HASH_RESULT_2 | B12...B15  |
   238			 * +---------------+------------+
   239			 * | HASH_RESULT_3 | B8...B11   |
   240			 * +---------------+------------+
   241			 * |            ......          |
   242			 * +---------------+------------+
   243			 * | HASH_RESULT_14| B60...B63  |
   244			 * +---------------+------------+
   245			 * | HASH_RESULT_15| B56...B59  |
   246			 * +---------------+------------+
   247			 *
   248			 */
   249			if (ctx->alg == SE_ALG_SHA384 || ctx->alg == SE_ALG_SHA512)
   250				idx = (j % 2) ? j - 1 : j + 1;
   251	
   252			/* For SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 the initial
   253			 * intermediate and final hash value when stored in
   254			 * SHA_HASH_RESULT registers, the byte order is NOT in
   255			 * little-endian.
   256			 */
   257			if (ctx->alg <= SE_ALG_SHA512)
 > 258				cpuvaddr[i++] = be32_to_cpu(res[idx]);
   259			else
   260				cpuvaddr[i++] = res[idx];
   261		}
   262	
   263		return i;
   264	}
   265	

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

  parent reply	other threads:[~2025-02-13  6:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 17:17 [PATCH v2 00/10] Tegra Security Engine driver improvements Akhil R
2025-02-11 17:17 ` [PATCH v2 01/10] crypto: tegra: Use separate buffer for setkey Akhil R
2025-02-11 17:17 ` [PATCH v2 02/10] crypto: tegra: Do not use fixed size buffers Akhil R
2025-02-11 17:17 ` [PATCH v2 03/10] crypto: tegra: finalize crypto req on error Akhil R
2025-02-11 17:17 ` [PATCH v2 04/10] crypto: tegra: check return value for hash do_one_req Akhil R
2025-02-11 17:17 ` [PATCH v2 05/10] crypto: tegra: Transfer HASH init function to crypto engine Akhil R
2025-02-13  7:46   ` kernel test robot
2025-02-11 17:17 ` [PATCH v2 06/10] crypto: tegra: Fix HASH intermediate result handling Akhil R
2025-02-13  4:49   ` kernel test robot
2025-02-13  6:26   ` kernel test robot [this message]
2025-02-13 10:04   ` kernel test robot
2025-02-11 17:17 ` [PATCH v2 07/10] crypto: tegra: Fix CMAC " Akhil R
2025-02-11 17:17 ` [PATCH v2 08/10] crypto: tegra: Set IV to NULL explicitly for AES ECB Akhil R
2025-02-11 17:17 ` [PATCH v2 09/10] crypto: tegra: Reserve keyslots to allocate dynamically Akhil R
2025-02-13  8:30   ` kernel test robot
2025-02-11 17:17 ` [PATCH v2 10/10] crypto: tegra: Use HMAC fallback when keyslots are full Akhil R

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=202502131419.R9s0l3RE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akhilrajeev@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jonathanh@nvidia.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=thierry.reding@gmail.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.