From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>, Eric Biggers <ebiggers@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, dhowells@redhat.com,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
Stephan Mueller <smueller@chronox.de>,
linux-crypto@vger.kernel.org, keyrings@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/crypto: Add SHA3-224, SHA3-256, SHA3-384, SHA-512, SHAKE128, SHAKE256
Date: Fri, 19 Sep 2025 19:33:10 +0800 [thread overview]
Message-ID: <202509191938.PrHY82Kd-lkp@intel.com> (raw)
In-Reply-To: <3605112.1758233248@warthog.procyon.org.uk>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on ebiggers/libcrypto-fixes]
[also build test WARNING on herbert-cryptodev-2.6/master herbert-crypto-2.6/master linus/master v6.17-rc6 next-20250918]
[cannot apply to ebiggers/libcrypto-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/David-Howells/lib-crypto-Add-SHA3-224-SHA3-256-SHA3-384-SHA-512-SHAKE128-SHAKE256/20250919-061024
base: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-fixes
patch link: https://lore.kernel.org/r/3605112.1758233248%40warthog.procyon.org.uk
patch subject: [PATCH] lib/crypto: Add SHA3-224, SHA3-256, SHA3-384, SHA-512, SHAKE128, SHAKE256
config: arc-randconfig-r112-20250919 (https://download.01.org/0day-ci/archive/20250919/202509191938.PrHY82Kd-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250919/202509191938.PrHY82Kd-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/202509191938.PrHY82Kd-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> lib/crypto/sha3.c:317:11: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le64 [usertype] *s @@ got unsigned long long * @@
lib/crypto/sha3.c:317:11: sparse: expected restricted __le64 [usertype] *s
lib/crypto/sha3.c:317:11: sparse: got unsigned long long *
>> lib/crypto/sha3.c:319:36: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
lib/crypto/sha3.c:319:36: sparse: expected unsigned long long [usertype] val
lib/crypto/sha3.c:319:36: sparse: got restricted __le64 [usertype]
vim +317 lib/crypto/sha3.c
271
272 /**
273 * sha3_final() - Finish computing a SHA3 message digest of any type
274 * @ctx: the context to finalize; must have been initialized
275 * @out: (output) the resulting message digest
276 *
277 * Finish the computation of a SHA3 message digest of any type and perform the
278 * "Keccak sponge squeezing" phase. The digest is written to @out buffer and
279 * the size of the digest is returned. Before returning, the context @ctx is
280 * cleared so that the caller does not need to do it.
281 */
282 int sha3_final(struct sha3_ctx *ctx, u8 *out)
283 {
284 struct sha3_state *state = &ctx->state;
285 unsigned int digest_size = ctx->digest_size;
286 unsigned int bsize = ctx->block_size;
287 u8 end_marker = 0x80;
288
289 sha3_absorb_xorle(ctx, &ctx->padding, 1);
290 ctx->partial = bsize - 1;
291 sha3_absorb_xorle(ctx, &end_marker, 1);
292 sha3_keccakf(ctx->state.st);
293
294 #ifdef __LITTLE_ENDIAN
295 for (;;) {
296 unsigned int part = umin(digest_size, bsize);
297
298 memcpy(out, state->st, part);
299 digest_size -= part;
300 if (!digest_size)
301 goto done;
302 out += part;
303 sha3_keccakf(ctx->state.st);
304 }
305 #else
306 __le64 *digest = (__le64 *)out, *s;
307
308 while (digest_size >= bsize) {
309 for (int i = 0; i < bsize / 8; i++)
310 put_unaligned_le64(state->st[i], digest++);
311 digest_size -= bsize;
312 if (!digest_size)
313 goto done;
314 sha3_keccakf(ctx->state.st);
315 }
316
> 317 s = state->st;
318 for (; digest_size >= 8; digest_size -= 8)
> 319 put_unaligned_le64(*s++, digest++);
320
321 u8 *sc = (u8 *)s;
322 u8 *dc = (u8 *)digest;
323
324 for (; digest_size >= 1; digest_size -= 1)
325 *dc++ = *sc++;
326 #endif
327 done:
328 digest_size = ctx->digest_size;
329 memzero_explicit(ctx, sizeof(*ctx));
330 return digest_size;
331 }
332 EXPORT_SYMBOL_GPL(sha3_final);
333
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-09-19 11:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 22:07 [PATCH] lib/crypto: Add SHA3-224, SHA3-256, SHA3-384, SHA-512, SHAKE128, SHAKE256 David Howells
2025-09-19 2:42 ` Stephan Müller
2025-09-19 6:17 ` David Howells
2025-09-19 13:59 ` Simo Sorce
2025-09-19 15:34 ` David Howells
2025-09-19 15:40 ` Stephan Müller
2025-09-19 10:10 ` kernel test robot
2025-09-19 10:20 ` kernel test robot
2025-09-19 11:33 ` kernel test robot [this message]
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=202509191938.PrHY82Kd-lkp@intel.com \
--to=lkp@intel.com \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=dhowells@redhat.com \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=smueller@chronox.de \
/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.