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: <202502131419.R9s0l3RE-lkp@intel.com>
Date: Thu, 13 Feb 2025 14:26:11 +0800
From: kernel test robot <lkp@...el.com>
To: Akhil R <akhilrajeev@...dia.com>, herbert@...dor.apana.org.au,
	davem@...emloft.net, thierry.reding@...il.com, jonathanh@...dia.com,
	linux-crypto@...r.kernel.org, linux-tegra@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Akhil R <akhilrajeev@...dia.com>
Subject: Re: [PATCH v2 06/10] crypto: tegra: Fix HASH intermediate result
 handling

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ