From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: David Howells <dhowells@redhat.com>, Eric Biggers <ebiggers@kernel.org>
Cc: "Jason A . Donenfeld" <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
Stephan Mueller <smueller@chronox.de>,
Lukas Wunner <lukas@wunner.de>,
Ignat Korchagin <ignat@cloudflare.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
linux-crypto@vger.kernel.org, keyrings@vger.kernel.org,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
Harald Freudenberger <freude@linux.ibm.com>,
Holger Dengler <dengler@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH v6 01/17] s390/sha3: Rename conflicting functions
Date: Sat, 18 Oct 2025 10:59:24 +0200 [thread overview]
Message-ID: <395b82fc-728b-45da-afa8-c4ac8b625a45@csgroup.eu> (raw)
In-Reply-To: <20251017144311.817771-2-dhowells@redhat.com>
Le 17/10/2025 à 16:42, David Howells a écrit :
> Rename the s390 sha3_* functions to have an "s390_" prefix to avoid
> conflict with generic code.
The functions are static, why would they conflict with generic code ?
Also generic code doesn't have such functions at the moment, are they
added by a follow patch ?
Christophe
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Acked-By: Harald Freudenberger <freude@linux.ibm.com>
> cc: Eric Biggers <ebiggers@kernel.org>
> cc: Jason A. Donenfeld <Jason@zx2c4.com>
> cc: Ard Biesheuvel <ardb@kernel.org>
> cc: Holger Dengler <dengler@linux.ibm.com>
> cc: Herbert Xu <herbert@gondor.apana.org.au>
> cc: Stephan Mueller <smueller@chronox.de>
> cc: linux-crypto@vger.kernel.org
> cc: linux-s390@vger.kernel.org
> ---
> arch/s390/crypto/sha3_256_s390.c | 26 +++++++++++++-------------
> arch/s390/crypto/sha3_512_s390.c | 26 +++++++++++++-------------
> 2 files changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/arch/s390/crypto/sha3_256_s390.c b/arch/s390/crypto/sha3_256_s390.c
> index 03bb4f4bab70..fd5ecae60a57 100644
> --- a/arch/s390/crypto/sha3_256_s390.c
> +++ b/arch/s390/crypto/sha3_256_s390.c
> @@ -19,7 +19,7 @@
>
> #include "sha.h"
>
> -static int sha3_256_init(struct shash_desc *desc)
> +static int s390_sha3_256_init(struct shash_desc *desc)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
>
> @@ -32,7 +32,7 @@ static int sha3_256_init(struct shash_desc *desc)
> return 0;
> }
>
> -static int sha3_256_export(struct shash_desc *desc, void *out)
> +static int s390_sha3_256_export(struct shash_desc *desc, void *out)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
> union {
> @@ -50,7 +50,7 @@ static int sha3_256_export(struct shash_desc *desc, void *out)
> return 0;
> }
>
> -static int sha3_256_import(struct shash_desc *desc, const void *in)
> +static int s390_sha3_256_import(struct shash_desc *desc, const void *in)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
> union {
> @@ -68,22 +68,22 @@ static int sha3_256_import(struct shash_desc *desc, const void *in)
> return 0;
> }
>
> -static int sha3_224_import(struct shash_desc *desc, const void *in)
> +static int s390_sha3_224_import(struct shash_desc *desc, const void *in)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
>
> - sha3_256_import(desc, in);
> + s390_sha3_256_import(desc, in);
> sctx->func = CPACF_KIMD_SHA3_224;
> return 0;
> }
>
> static struct shash_alg sha3_256_alg = {
> .digestsize = SHA3_256_DIGEST_SIZE, /* = 32 */
> - .init = sha3_256_init,
> + .init = s390_sha3_256_init,
> .update = s390_sha_update_blocks,
> .finup = s390_sha_finup,
> - .export = sha3_256_export,
> - .import = sha3_256_import,
> + .export = s390_sha3_256_export,
> + .import = s390_sha3_256_import,
> .descsize = S390_SHA_CTX_SIZE,
> .statesize = SHA3_STATE_SIZE,
> .base = {
> @@ -96,22 +96,22 @@ static struct shash_alg sha3_256_alg = {
> }
> };
>
> -static int sha3_224_init(struct shash_desc *desc)
> +static int s390_sha3_224_init(struct shash_desc *desc)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
>
> - sha3_256_init(desc);
> + s390_sha3_256_init(desc);
> sctx->func = CPACF_KIMD_SHA3_224;
> return 0;
> }
>
> static struct shash_alg sha3_224_alg = {
> .digestsize = SHA3_224_DIGEST_SIZE,
> - .init = sha3_224_init,
> + .init = s390_sha3_224_init,
> .update = s390_sha_update_blocks,
> .finup = s390_sha_finup,
> - .export = sha3_256_export, /* same as for 256 */
> - .import = sha3_224_import, /* function code different! */
> + .export = s390_sha3_256_export, /* same as for 256 */
> + .import = s390_sha3_224_import, /* function code different! */
> .descsize = S390_SHA_CTX_SIZE,
> .statesize = SHA3_STATE_SIZE,
> .base = {
> diff --git a/arch/s390/crypto/sha3_512_s390.c b/arch/s390/crypto/sha3_512_s390.c
> index a5c9690eecb1..f4b52a3a0433 100644
> --- a/arch/s390/crypto/sha3_512_s390.c
> +++ b/arch/s390/crypto/sha3_512_s390.c
> @@ -18,7 +18,7 @@
>
> #include "sha.h"
>
> -static int sha3_512_init(struct shash_desc *desc)
> +static int s390_sha3_512_init(struct shash_desc *desc)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
>
> @@ -31,7 +31,7 @@ static int sha3_512_init(struct shash_desc *desc)
> return 0;
> }
>
> -static int sha3_512_export(struct shash_desc *desc, void *out)
> +static int s390_sha3_512_export(struct shash_desc *desc, void *out)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
> union {
> @@ -49,7 +49,7 @@ static int sha3_512_export(struct shash_desc *desc, void *out)
> return 0;
> }
>
> -static int sha3_512_import(struct shash_desc *desc, const void *in)
> +static int s390_sha3_512_import(struct shash_desc *desc, const void *in)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
> union {
> @@ -67,22 +67,22 @@ static int sha3_512_import(struct shash_desc *desc, const void *in)
> return 0;
> }
>
> -static int sha3_384_import(struct shash_desc *desc, const void *in)
> +static int s390_sha3_384_import(struct shash_desc *desc, const void *in)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
>
> - sha3_512_import(desc, in);
> + s390_sha3_512_import(desc, in);
> sctx->func = CPACF_KIMD_SHA3_384;
> return 0;
> }
>
> static struct shash_alg sha3_512_alg = {
> .digestsize = SHA3_512_DIGEST_SIZE,
> - .init = sha3_512_init,
> + .init = s390_sha3_512_init,
> .update = s390_sha_update_blocks,
> .finup = s390_sha_finup,
> - .export = sha3_512_export,
> - .import = sha3_512_import,
> + .export = s390_sha3_512_export,
> + .import = s390_sha3_512_import,
> .descsize = S390_SHA_CTX_SIZE,
> .statesize = SHA3_STATE_SIZE,
> .base = {
> @@ -97,22 +97,22 @@ static struct shash_alg sha3_512_alg = {
>
> MODULE_ALIAS_CRYPTO("sha3-512");
>
> -static int sha3_384_init(struct shash_desc *desc)
> +static int s390_sha3_384_init(struct shash_desc *desc)
> {
> struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
>
> - sha3_512_init(desc);
> + s390_sha3_512_init(desc);
> sctx->func = CPACF_KIMD_SHA3_384;
> return 0;
> }
>
> static struct shash_alg sha3_384_alg = {
> .digestsize = SHA3_384_DIGEST_SIZE,
> - .init = sha3_384_init,
> + .init = s390_sha3_384_init,
> .update = s390_sha_update_blocks,
> .finup = s390_sha_finup,
> - .export = sha3_512_export, /* same as for 512 */
> - .import = sha3_384_import, /* function code different! */
> + .export = s390_sha3_512_export, /* same as for 512 */
> + .import = s390_sha3_384_import, /* function code different! */
> .descsize = S390_SHA_CTX_SIZE,
> .statesize = SHA3_STATE_SIZE,
> .base = {
>
>
next prev parent reply other threads:[~2025-10-18 9:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 14:42 [PATCH v6 00/17] lib/crypto: Move SHA3 to lib/crypto, add SHAKE* and add ML-DSA signing David Howells
2025-10-17 14:42 ` [PATCH v6 01/17] s390/sha3: Rename conflicting functions David Howells
2025-10-18 8:59 ` Christophe Leroy [this message]
2025-10-18 12:17 ` David Howells
2025-10-17 14:42 ` [PATCH v6 02/17] arm64/sha3: " David Howells
2025-10-18 9:00 ` Christophe Leroy
2025-10-17 14:42 ` [PATCH v6 03/17] lib/crypto: Add SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256 David Howells
2025-10-17 14:42 ` [PATCH v6 04/17] lib/crypto: Move the SHA3 Iota transform into the single round function David Howells
2025-10-17 14:42 ` [PATCH v6 05/17] lib/crypto: Add SHA3 kunit tests David Howells
2025-10-17 14:42 ` [PATCH v6 06/17] crypto/jitterentropy: Use lib/crypto/sha3 David Howells
2025-10-17 14:42 ` [PATCH v6 07/17] crypto/sha3: " David Howells
2025-10-17 14:42 ` [PATCH v6 08/17] crypto/sha3: Add SHAKE128/256 support David Howells
2025-10-17 14:42 ` [PATCH v6 09/17] crypto: SHAKE tests David Howells
2025-10-17 14:42 ` [PATCH v6 10/17] crypto: Add ML-DSA/Dilithium support David Howells
2025-10-17 14:42 ` [PATCH v6 11/17] crypto: Add ML-DSA/Dilithium keypair generation support David Howells
2025-10-17 14:42 ` [PATCH v6 12/17] crypto: Add ML-DSA-44 pure rejection test vectors as a kunit test David Howells
2025-10-17 14:42 ` [PATCH v6 13/17] crypto: Add ML-DSA-65 " David Howells
2025-10-17 14:42 ` [PATCH v6 14/17] crypto: Add ML-DSA-87 " David Howells
2025-10-17 14:42 ` [PATCH v6 15/17] pkcs7: Allow the signing algo to calculate the digest itself David Howells
2025-10-17 14:43 ` [PATCH v6 16/17] pkcs7, x509: Add ML-DSA support David Howells
2025-10-17 14:43 ` [PATCH v6 17/17] modsign: Enable ML-DSA module signing David Howells
2025-10-21 13:51 ` Petr Pavlu
2025-11-06 17:37 ` David Howells
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=395b82fc-728b-45da-afa8-c4ac8b625a45@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=da.gomez@kernel.org \
--cc=dengler@linux.ibm.com \
--cc=dhowells@redhat.com \
--cc=ebiggers@kernel.org \
--cc=freude@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=ignat@cloudflare.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®