public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ingo Franzki <ifranzki@linux.ibm.com>
Cc: linux-crypto@vger.kernel.org, Eric Biggers <ebiggers@kernel.org>,
	Harald Freudenberger <freude@linux.ibm.com>,
	Holger Dengler <dengler@linux.ibm.com>
Subject: Re: CI: Selftest failures of s390 SHA3 and HMAC on next kernel
Date: Fri, 23 May 2025 19:41:18 +0800	[thread overview]
Message-ID: <aDBe3o77jZTFWY9B@gondor.apana.org.au> (raw)
In-Reply-To: <623a7fcb-b4cb-48e6-9833-57ad2b32a252@linux.ibm.com>

On Thu, May 22, 2025 at 04:13:59PM +0200, Ingo Franzki wrote:
>
> May 22 15:59:44 b3545036.lnxne.boe kernel: alg: ahash: sha3-224-s390 test failed (wrong result) on test vector "random: psize=388 ksize=0", cfg="random: may_sleep use_final src_divs=[<flush>100.0%@+2585] key_offset=82"
> May 22 15:59:44 b3545036.lnxne.boe kernel: alg: self-tests for sha3-224 using sha3-224-s390 failed (rc=-22)

I have no idea what's going on with the sha3 export state, perhaps
the hardware just stores things in a different byte-order?

Please apply this debugging patch and send me the results on s390.
It goes on top of commit 0413bcf0fc460a68a2a7a8354aee833293d7d693.
If you've already reverted 18c438b228558e05ede7dccf947a6547516fc0c7
you would need to reapply it first.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 737064b31480..42aaf2e7c164 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -158,7 +158,7 @@ struct alg_test_desc {
 	} suite;
 };
 
-static void hexdump(unsigned char *buf, unsigned int len)
+static void hexdump(const unsigned char *buf, unsigned int len)
 {
 	print_hex_dump(KERN_CONT, "", DUMP_PREFIX_OFFSET,
 			16, 1,
@@ -1485,6 +1485,11 @@ static int check_ahash_export(struct ahash_request *req,
 		       driver, err, vec_name, cfg->name);
 		return err;
 	}
+	if (!memcmp(driver, "sha3", 4) && memcmp(hashstate, vec->state, 200)) {
+		pr_err("alg: ahash: sha3 export state different from generic: %s\n", driver);
+		hexdump(vec->state, 200);
+		hexdump(hashstate, 200);
+	}
 	err = crypto_ahash_import(req, vec->state);
 	if (err) {
 		pr_err("alg: ahash: %s mixed import() failed with err %d on test vector %s, cfg=\"%s\"\n",

  parent reply	other threads:[~2025-05-23 11:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 14:13 CI: Selftest failures of s390 SHA3 and HMAC on next kernel Ingo Franzki
2025-05-23  5:51 ` Herbert Xu
2025-05-23  8:02   ` Ingo Franzki
2025-05-23 11:24     ` [PATCH] crypto: s390/hmac - Fix counter in export state Herbert Xu
2025-05-23 11:41       ` Ingo Franzki
2025-05-23 11:41 ` Herbert Xu [this message]
2025-05-23 12:03   ` CI: Selftest failures of s390 SHA3 and HMAC on next kernel Ingo Franzki
2025-05-23 12:06     ` Herbert Xu
2025-05-23 12:28     ` [PATCH] crypto: s390/sha3 - Use cpu byte-order when exporting Herbert Xu
2025-05-23 12:54       ` Ingo Franzki
2025-05-23 12:56         ` Herbert Xu

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=aDBe3o77jZTFWY9B@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=dengler@linux.ibm.com \
    --cc=ebiggers@kernel.org \
    --cc=freude@linux.ibm.com \
    --cc=ifranzki@linux.ibm.com \
    --cc=linux-crypto@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox