linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2 PATCH 0/9] crypto: sha256 - Use partial block API
@ 2025-05-02  5:30 Herbert Xu
  2025-05-02  5:30 ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash Herbert Xu
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:30 UTC (permalink / raw)
  To: Linux Crypto Mailing List

This is based on

	https://patchwork.kernel.org/project/linux-crypto/list/?series=957785

which in turn is applied on top of

	https://patchwork.kernel.org/project/linux-crypto/list/?series=957558

Rather than going through the lib/sha256 partial block handling,
use the native shash partial block API.  Add two extra shash
algorithms to provide testing coverage for lib/sha256.

Herbert Xu (9):
  crypto: lib/sha256 - Add helpers for block-based shash
  crypto: sha256 - Use the partial block API for generic
  crypto: arch/sha256 - Export block functions as GPL only
  crypto: arm/sha256 - Add simd block function
  crypto: arm64/sha256 - Add simd block function
  crypto: riscv/sha256 - Add simd block function
  crypto: x86/sha256 - Add simd block function
  crypto: lib/sha256 - Use generic block helper
  crypto: sha256 - Use the partial block API

 arch/arm/lib/crypto/Kconfig                   |   1 +
 arch/arm/lib/crypto/sha256-armv4.pl           |  20 +--
 arch/arm/lib/crypto/sha256.c                  |  16 +-
 arch/arm64/crypto/sha512-glue.c               |   6 +-
 arch/arm64/lib/crypto/Kconfig                 |   1 +
 arch/arm64/lib/crypto/sha2-armv8.pl           |   2 +-
 arch/arm64/lib/crypto/sha256.c                |  16 +-
 .../mips/cavium-octeon/crypto/octeon-sha256.c |   4 +-
 arch/powerpc/lib/crypto/sha256.c              |   4 +-
 arch/riscv/lib/crypto/Kconfig                 |   1 +
 arch/riscv/lib/crypto/sha256.c                |  17 +-
 arch/s390/lib/crypto/sha256.c                 |   4 +-
 arch/sparc/lib/crypto/sha256.c                |   4 +-
 arch/x86/lib/crypto/Kconfig                   |   1 +
 arch/x86/lib/crypto/sha256.c                  |  16 +-
 crypto/sha256.c                               | 148 +++++++++++-------
 include/crypto/internal/sha2.h                |  52 +++++-
 include/crypto/sha2.h                         |  14 +-
 lib/crypto/Kconfig                            |   8 +
 lib/crypto/sha256.c                           |  97 ++----------
 20 files changed, 239 insertions(+), 193 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
@ 2025-05-02  5:30 ` Herbert Xu
  2025-06-03  4:56   ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash (RT build failure) Guenter Roeck
  2025-06-03 13:49   ` Regression: hash - Add HASH_REQUEST_ON_STACK causes asynch hashes to fail Harald Freudenberger
  2025-05-02  5:30 ` [v2 PATCH 2/9] crypto: sha256 - Use the partial block API for generic Herbert Xu
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:30 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Add an internal sha256_finup helper and move the finalisation code
from __sha256_final into it.

Also add sha256_choose_blocks and CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
so that the Crypto API can use the SIMD block function unconditionally.
The Crypto API must not be used in hard IRQs and there is no reason
to have a fallback path for hardirqs.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 include/crypto/internal/sha2.h | 45 ++++++++++++++++++++++++++++++++++
 lib/crypto/Kconfig             |  8 ++++++
 lib/crypto/sha256.c            | 32 +++++++-----------------
 3 files changed, 62 insertions(+), 23 deletions(-)

diff --git a/include/crypto/internal/sha2.h b/include/crypto/internal/sha2.h
index d641c67abcbc..fff156f66edc 100644
--- a/include/crypto/internal/sha2.h
+++ b/include/crypto/internal/sha2.h
@@ -3,7 +3,12 @@
 #ifndef _CRYPTO_INTERNAL_SHA2_H
 #define _CRYPTO_INTERNAL_SHA2_H
 
+#include <crypto/internal/simd.h>
 #include <crypto/sha2.h>
+#include <linux/compiler_attributes.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/unaligned.h>
 
 void sha256_update_generic(struct sha256_state *sctx,
 			   const u8 *data, size_t len);
@@ -24,5 +29,45 @@ void sha256_blocks_generic(u32 state[SHA256_STATE_WORDS],
 			   const u8 *data, size_t nblocks);
 void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 			const u8 *data, size_t nblocks);
+void sha256_blocks_simd(u32 state[SHA256_STATE_WORDS],
+			const u8 *data, size_t nblocks);
+
+static inline void sha256_choose_blocks(
+	u32 state[SHA256_STATE_WORDS], const u8 *data, size_t nblocks,
+	bool force_generic, bool force_simd)
+{
+	if (!IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_SHA256) || force_generic)
+		sha256_blocks_generic(state, data, nblocks);
+	else if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD) &&
+		 (force_simd || crypto_simd_usable()))
+		sha256_blocks_simd(state, data, nblocks);
+	else
+		sha256_blocks_arch(state, data, nblocks);
+}
+
+static __always_inline void sha256_finup(
+	struct crypto_sha256_state *sctx, u8 buf[SHA256_BLOCK_SIZE],
+	size_t len, u8 out[SHA256_DIGEST_SIZE], size_t digest_size,
+	bool force_generic, bool force_simd)
+{
+	const size_t bit_offset = SHA256_BLOCK_SIZE - 8;
+	__be64 *bits = (__be64 *)&buf[bit_offset];
+	int i;
+
+	buf[len++] = 0x80;
+	if (len > bit_offset) {
+		memset(&buf[len], 0, SHA256_BLOCK_SIZE - len);
+		sha256_choose_blocks(sctx->state, buf, 1, force_generic,
+				     force_simd);
+		len = 0;
+	}
+
+	memset(&buf[len], 0, bit_offset - len);
+	*bits = cpu_to_be64(sctx->count << 3);
+	sha256_choose_blocks(sctx->state, buf, 1, force_generic, force_simd);
+
+	for (i = 0; i < digest_size; i += 4)
+		put_unaligned_be32(sctx->state[i / 4], out + i);
+}
 
 #endif /* _CRYPTO_INTERNAL_SHA2_H */
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index 6319358b38c2..1ec1466108cc 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -150,6 +150,14 @@ config CRYPTO_ARCH_HAVE_LIB_SHA256
 	  Declares whether the architecture provides an arch-specific
 	  accelerated implementation of the SHA-256 library interface.
 
+config CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
+	bool
+	help
+	  Declares whether the architecture provides an arch-specific
+	  accelerated implementation of the SHA-256 library interface
+	  that is SIMD-based and therefore not usable in hardirq
+	  context.
+
 config CRYPTO_LIB_SHA256_GENERIC
 	tristate
 	default CRYPTO_LIB_SHA256 if !CRYPTO_ARCH_HAVE_LIB_SHA256
diff --git a/lib/crypto/sha256.c b/lib/crypto/sha256.c
index 563f09c9f381..2ced29efa181 100644
--- a/lib/crypto/sha256.c
+++ b/lib/crypto/sha256.c
@@ -15,7 +15,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/string.h>
-#include <linux/unaligned.h>
 
 /*
  * If __DISABLE_EXPORTS is defined, then this file is being compiled for a
@@ -26,14 +25,16 @@
 #include "sha256-generic.c"
 #endif
 
+static inline bool sha256_purgatory(void)
+{
+	return __is_defined(__DISABLE_EXPORTS);
+}
+
 static inline void sha256_blocks(u32 state[SHA256_STATE_WORDS], const u8 *data,
 				 size_t nblocks, bool force_generic)
 {
-#if IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_SHA256) && !defined(__DISABLE_EXPORTS)
-	if (!force_generic)
-		return sha256_blocks_arch(state, data, nblocks);
-#endif
-	sha256_blocks_generic(state, data, nblocks);
+	sha256_choose_blocks(state, data, nblocks,
+			     force_generic || sha256_purgatory(), false);
 }
 
 static inline void __sha256_update(struct sha256_state *sctx, const u8 *data,
@@ -79,25 +80,10 @@ EXPORT_SYMBOL(sha256_update);
 static inline void __sha256_final(struct sha256_state *sctx, u8 *out,
 				  size_t digest_size, bool force_generic)
 {
-	const size_t bit_offset = SHA256_BLOCK_SIZE - sizeof(__be64);
-	__be64 *bits = (__be64 *)&sctx->buf[bit_offset];
 	size_t partial = sctx->count % SHA256_BLOCK_SIZE;
-	size_t i;
-
-	sctx->buf[partial++] = 0x80;
-	if (partial > bit_offset) {
-		memset(&sctx->buf[partial], 0, SHA256_BLOCK_SIZE - partial);
-		sha256_blocks(sctx->state, sctx->buf, 1, force_generic);
-		partial = 0;
-	}
-
-	memset(&sctx->buf[partial], 0, bit_offset - partial);
-	*bits = cpu_to_be64(sctx->count << 3);
-	sha256_blocks(sctx->state, sctx->buf, 1, force_generic);
-
-	for (i = 0; i < digest_size; i += 4)
-		put_unaligned_be32(sctx->state[i / 4], out + i);
 
+	sha256_finup(&sctx->ctx, sctx->buf, partial, out, digest_size,
+		     force_generic || sha256_purgatory(), false);
 	memzero_explicit(sctx, sizeof(*sctx));
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 2/9] crypto: sha256 - Use the partial block API for generic
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
  2025-05-02  5:30 ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash Herbert Xu
@ 2025-05-02  5:30 ` Herbert Xu
  2025-05-02  5:30 ` [v2 PATCH 3/9] crypto: arch/sha256 - Export block functions as GPL only Herbert Xu
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:30 UTC (permalink / raw)
  To: Linux Crypto Mailing List

The shash interface already handles partial blocks, use it for
sha224-generic and sha256-generic instead of going through the
lib/sha256 interface.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 crypto/sha256.c       | 83 +++++++++++++++++++++++--------------------
 include/crypto/sha2.h | 14 ++++++--
 2 files changed, 56 insertions(+), 41 deletions(-)

diff --git a/crypto/sha256.c b/crypto/sha256.c
index c2588d08ee3e..d6b90c6ea63d 100644
--- a/crypto/sha256.c
+++ b/crypto/sha256.c
@@ -30,15 +30,26 @@ EXPORT_SYMBOL_GPL(sha256_zero_message_hash);
 
 static int crypto_sha256_init(struct shash_desc *desc)
 {
-	sha256_init(shash_desc_ctx(desc));
+	sha256_block_init(shash_desc_ctx(desc));
 	return 0;
 }
 
+static inline int crypto_sha256_update(struct shash_desc *desc, const u8 *data,
+				       unsigned int len, bool force_generic)
+{
+	struct crypto_sha256_state *sctx = shash_desc_ctx(desc);
+	int remain = len % SHA256_BLOCK_SIZE;
+
+	sctx->count += len - remain;
+	sha256_choose_blocks(sctx->state, data, len / SHA256_BLOCK_SIZE,
+			     force_generic, !force_generic);
+	return remain;
+}
+
 static int crypto_sha256_update_generic(struct shash_desc *desc, const u8 *data,
 					unsigned int len)
 {
-	sha256_update_generic(shash_desc_ctx(desc), data, len);
-	return 0;
+	return crypto_sha256_update(desc, data, len, true);
 }
 
 static int crypto_sha256_update_arch(struct shash_desc *desc, const u8 *data,
@@ -48,26 +59,35 @@ static int crypto_sha256_update_arch(struct shash_desc *desc, const u8 *data,
 	return 0;
 }
 
-static int crypto_sha256_final_generic(struct shash_desc *desc, u8 *out)
-{
-	sha256_final_generic(shash_desc_ctx(desc), out);
-	return 0;
-}
-
 static int crypto_sha256_final_arch(struct shash_desc *desc, u8 *out)
 {
 	sha256_final(shash_desc_ctx(desc), out);
 	return 0;
 }
 
+static __always_inline int crypto_sha256_finup(struct shash_desc *desc,
+					       const u8 *data,
+					       unsigned int len, u8 *out,
+					       bool force_generic)
+{
+	struct crypto_sha256_state *sctx = shash_desc_ctx(desc);
+	unsigned int remain = len;
+	u8 *buf;
+
+	if (len >= SHA256_BLOCK_SIZE)
+		remain = crypto_sha256_update(desc, data, len, force_generic);
+	sctx->count += remain;
+	buf = memcpy(sctx + 1, data + len - remain, remain);
+	sha256_finup(sctx, buf, remain, out,
+		     crypto_shash_digestsize(desc->tfm), force_generic,
+		     !force_generic);
+	return 0;
+}
+
 static int crypto_sha256_finup_generic(struct shash_desc *desc, const u8 *data,
 				       unsigned int len, u8 *out)
 {
-	struct sha256_state *sctx = shash_desc_ctx(desc);
-
-	sha256_update_generic(sctx, data, len);
-	sha256_final_generic(sctx, out);
-	return 0;
+	return crypto_sha256_finup(desc, data, len, out, true);
 }
 
 static int crypto_sha256_finup_arch(struct shash_desc *desc, const u8 *data,
@@ -83,12 +103,8 @@ static int crypto_sha256_finup_arch(struct shash_desc *desc, const u8 *data,
 static int crypto_sha256_digest_generic(struct shash_desc *desc, const u8 *data,
 					unsigned int len, u8 *out)
 {
-	struct sha256_state *sctx = shash_desc_ctx(desc);
-
-	sha256_init(sctx);
-	sha256_update_generic(sctx, data, len);
-	sha256_final_generic(sctx, out);
-	return 0;
+	crypto_sha256_init(desc);
+	return crypto_sha256_finup_generic(desc, data, len, out);
 }
 
 static int crypto_sha256_digest_arch(struct shash_desc *desc, const u8 *data,
@@ -100,13 +116,7 @@ static int crypto_sha256_digest_arch(struct shash_desc *desc, const u8 *data,
 
 static int crypto_sha224_init(struct shash_desc *desc)
 {
-	sha224_init(shash_desc_ctx(desc));
-	return 0;
-}
-
-static int crypto_sha224_final_generic(struct shash_desc *desc, u8 *out)
-{
-	sha224_final_generic(shash_desc_ctx(desc), out);
+	sha224_block_init(shash_desc_ctx(desc));
 	return 0;
 }
 
@@ -147,35 +157,30 @@ static struct shash_alg algs[] = {
 		.base.cra_name		= "sha256",
 		.base.cra_driver_name	= "sha256-generic",
 		.base.cra_priority	= 100,
+		.base.cra_flags		= CRYPTO_AHASH_ALG_BLOCK_ONLY |
+					  CRYPTO_AHASH_ALG_FINUP_MAX,
 		.base.cra_blocksize	= SHA256_BLOCK_SIZE,
 		.base.cra_module	= THIS_MODULE,
 		.digestsize		= SHA256_DIGEST_SIZE,
 		.init			= crypto_sha256_init,
 		.update			= crypto_sha256_update_generic,
-		.final			= crypto_sha256_final_generic,
 		.finup			= crypto_sha256_finup_generic,
 		.digest			= crypto_sha256_digest_generic,
-		.descsize		= sizeof(struct sha256_state),
-		.statesize		= sizeof(struct crypto_sha256_state) +
-					  SHA256_BLOCK_SIZE + 1,
-		.import			= crypto_sha256_import_lib,
-		.export			= crypto_sha256_export_lib,
+		.descsize		= sizeof(struct crypto_sha256_state),
 	},
 	{
 		.base.cra_name		= "sha224",
 		.base.cra_driver_name	= "sha224-generic",
 		.base.cra_priority	= 100,
+		.base.cra_flags		= CRYPTO_AHASH_ALG_BLOCK_ONLY |
+					  CRYPTO_AHASH_ALG_FINUP_MAX,
 		.base.cra_blocksize	= SHA224_BLOCK_SIZE,
 		.base.cra_module	= THIS_MODULE,
 		.digestsize		= SHA224_DIGEST_SIZE,
 		.init			= crypto_sha224_init,
 		.update			= crypto_sha256_update_generic,
-		.final			= crypto_sha224_final_generic,
-		.descsize		= sizeof(struct sha256_state),
-		.statesize		= sizeof(struct crypto_sha256_state) +
-					  SHA256_BLOCK_SIZE + 1,
-		.import			= crypto_sha256_import_lib,
-		.export			= crypto_sha256_export_lib,
+		.finup			= crypto_sha256_finup_generic,
+		.descsize		= sizeof(struct crypto_sha256_state),
 	},
 	{
 		.base.cra_name		= "sha256",
diff --git a/include/crypto/sha2.h b/include/crypto/sha2.h
index 9853cd2d1291..4912572578dc 100644
--- a/include/crypto/sha2.h
+++ b/include/crypto/sha2.h
@@ -88,7 +88,7 @@ struct sha512_state {
 	u8 buf[SHA512_BLOCK_SIZE];
 };
 
-static inline void sha256_init(struct sha256_state *sctx)
+static inline void sha256_block_init(struct crypto_sha256_state *sctx)
 {
 	sctx->state[0] = SHA256_H0;
 	sctx->state[1] = SHA256_H1;
@@ -100,11 +100,16 @@ static inline void sha256_init(struct sha256_state *sctx)
 	sctx->state[7] = SHA256_H7;
 	sctx->count = 0;
 }
+
+static inline void sha256_init(struct sha256_state *sctx)
+{
+	sha256_block_init(&sctx->ctx);
+}
 void sha256_update(struct sha256_state *sctx, const u8 *data, size_t len);
 void sha256_final(struct sha256_state *sctx, u8 out[SHA256_DIGEST_SIZE]);
 void sha256(const u8 *data, size_t len, u8 out[SHA256_DIGEST_SIZE]);
 
-static inline void sha224_init(struct sha256_state *sctx)
+static inline void sha224_block_init(struct crypto_sha256_state *sctx)
 {
 	sctx->state[0] = SHA224_H0;
 	sctx->state[1] = SHA224_H1;
@@ -116,6 +121,11 @@ static inline void sha224_init(struct sha256_state *sctx)
 	sctx->state[7] = SHA224_H7;
 	sctx->count = 0;
 }
+
+static inline void sha224_init(struct sha256_state *sctx)
+{
+	sha224_block_init(&sctx->ctx);
+}
 /* Simply use sha256_update as it is equivalent to sha224_update. */
 void sha224_final(struct sha256_state *sctx, u8 out[SHA224_DIGEST_SIZE]);
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 3/9] crypto: arch/sha256 - Export block functions as GPL only
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
  2025-05-02  5:30 ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash Herbert Xu
  2025-05-02  5:30 ` [v2 PATCH 2/9] crypto: sha256 - Use the partial block API for generic Herbert Xu
@ 2025-05-02  5:30 ` Herbert Xu
  2025-05-02  5:31 ` [v2 PATCH 4/9] crypto: arm/sha256 - Add simd block function Herbert Xu
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:30 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Export the block functions as GPL only, there is no reason
to let arbitrary modules use these internal functions.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 arch/arm/lib/crypto/sha256.c                   | 4 ++--
 arch/arm64/lib/crypto/sha256.c                 | 4 ++--
 arch/mips/cavium-octeon/crypto/octeon-sha256.c | 4 ++--
 arch/powerpc/lib/crypto/sha256.c               | 4 ++--
 arch/riscv/lib/crypto/sha256.c                 | 4 ++--
 arch/s390/lib/crypto/sha256.c                  | 4 ++--
 arch/sparc/lib/crypto/sha256.c                 | 4 ++--
 arch/x86/lib/crypto/sha256.c                   | 4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm/lib/crypto/sha256.c b/arch/arm/lib/crypto/sha256.c
index 3a8dfc304807..e2fae3664428 100644
--- a/arch/arm/lib/crypto/sha256.c
+++ b/arch/arm/lib/crypto/sha256.c
@@ -35,14 +35,14 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 		sha256_block_data_order(state, data, nblocks);
 	}
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	/* We always can use at least the ARM scalar implementation. */
 	return true;
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 static int __init sha256_arm_mod_init(void)
 {
diff --git a/arch/arm64/lib/crypto/sha256.c b/arch/arm64/lib/crypto/sha256.c
index 2bd413c586d2..91c7ca727992 100644
--- a/arch/arm64/lib/crypto/sha256.c
+++ b/arch/arm64/lib/crypto/sha256.c
@@ -45,14 +45,14 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 		sha256_block_data_order(state, data, nblocks);
 	}
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	/* We always can use at least the ARM64 scalar implementation. */
 	return true;
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 static int __init sha256_arm64_mod_init(void)
 {
diff --git a/arch/mips/cavium-octeon/crypto/octeon-sha256.c b/arch/mips/cavium-octeon/crypto/octeon-sha256.c
index f169054852bc..f93faaf1f4af 100644
--- a/arch/mips/cavium-octeon/crypto/octeon-sha256.c
+++ b/arch/mips/cavium-octeon/crypto/octeon-sha256.c
@@ -60,13 +60,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 	state64[3] = read_octeon_64bit_hash_dword(3);
 	octeon_crypto_disable(&cop2_state, flags);
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	return octeon_has_crypto();
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SHA-256 Secure Hash Algorithm (OCTEON)");
diff --git a/arch/powerpc/lib/crypto/sha256.c b/arch/powerpc/lib/crypto/sha256.c
index c05023c5acdd..6b0f079587eb 100644
--- a/arch/powerpc/lib/crypto/sha256.c
+++ b/arch/powerpc/lib/crypto/sha256.c
@@ -58,13 +58,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 		nblocks -= unit;
 	} while (nblocks);
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	return true;
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SHA-256 Secure Hash Algorithm, SPE optimized");
diff --git a/arch/riscv/lib/crypto/sha256.c b/arch/riscv/lib/crypto/sha256.c
index 18b84030f0b3..2905a6dbb485 100644
--- a/arch/riscv/lib/crypto/sha256.c
+++ b/arch/riscv/lib/crypto/sha256.c
@@ -32,13 +32,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 		sha256_blocks_generic(state, data, nblocks);
 	}
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	return static_key_enabled(&have_extensions);
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 static int __init riscv64_sha256_mod_init(void)
 {
diff --git a/arch/s390/lib/crypto/sha256.c b/arch/s390/lib/crypto/sha256.c
index 50c592ce7a5d..fcfa2706a7f9 100644
--- a/arch/s390/lib/crypto/sha256.c
+++ b/arch/s390/lib/crypto/sha256.c
@@ -21,13 +21,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 	else
 		sha256_blocks_generic(state, data, nblocks);
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	return static_key_enabled(&have_cpacf_sha256);
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 static int __init sha256_s390_mod_init(void)
 {
diff --git a/arch/sparc/lib/crypto/sha256.c b/arch/sparc/lib/crypto/sha256.c
index 6f118a23d210..b4fc475dcc40 100644
--- a/arch/sparc/lib/crypto/sha256.c
+++ b/arch/sparc/lib/crypto/sha256.c
@@ -30,13 +30,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 	else
 		sha256_blocks_generic(state, data, nblocks);
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	return static_key_enabled(&have_sha256_opcodes);
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 static int __init sha256_sparc64_mod_init(void)
 {
diff --git a/arch/x86/lib/crypto/sha256.c b/arch/x86/lib/crypto/sha256.c
index 47865b5cd94b..8735ec871f86 100644
--- a/arch/x86/lib/crypto/sha256.c
+++ b/arch/x86/lib/crypto/sha256.c
@@ -35,13 +35,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 		sha256_blocks_generic(state, data, nblocks);
 	}
 }
-EXPORT_SYMBOL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
 {
 	return static_key_enabled(&have_sha256_x86);
 }
-EXPORT_SYMBOL(sha256_is_arch_optimized);
+EXPORT_SYMBOL_GPL(sha256_is_arch_optimized);
 
 static int __init sha256_x86_mod_init(void)
 {
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 4/9] crypto: arm/sha256 - Add simd block function
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
                   ` (2 preceding siblings ...)
  2025-05-02  5:30 ` [v2 PATCH 3/9] crypto: arch/sha256 - Export block functions as GPL only Herbert Xu
@ 2025-05-02  5:31 ` Herbert Xu
  2025-05-02  5:31 ` [v2 PATCH 5/9] crypto: arm64/sha256 " Herbert Xu
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:31 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function
so that the caller can decide whether to use SIMD.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 arch/arm/lib/crypto/Kconfig         |  1 +
 arch/arm/lib/crypto/sha256-armv4.pl | 20 ++++++++++----------
 arch/arm/lib/crypto/sha256.c        | 14 +++++++-------
 3 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/arch/arm/lib/crypto/Kconfig b/arch/arm/lib/crypto/Kconfig
index 9f3ff30f4032..d1ad664f0c67 100644
--- a/arch/arm/lib/crypto/Kconfig
+++ b/arch/arm/lib/crypto/Kconfig
@@ -28,3 +28,4 @@ config CRYPTO_SHA256_ARM
 	depends on !CPU_V7M
 	default CRYPTO_LIB_SHA256
 	select CRYPTO_ARCH_HAVE_LIB_SHA256
+	select CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
diff --git a/arch/arm/lib/crypto/sha256-armv4.pl b/arch/arm/lib/crypto/sha256-armv4.pl
index f3a2b54efd4e..8122db7fd599 100644
--- a/arch/arm/lib/crypto/sha256-armv4.pl
+++ b/arch/arm/lib/crypto/sha256-armv4.pl
@@ -204,18 +204,18 @@ K256:
 .word	0				@ terminator
 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
 .LOPENSSL_armcap:
-.word	OPENSSL_armcap_P-sha256_block_data_order
+.word	OPENSSL_armcap_P-sha256_blocks_arch
 #endif
 .align	5
 
-.global	sha256_block_data_order
-.type	sha256_block_data_order,%function
-sha256_block_data_order:
-.Lsha256_block_data_order:
+.global	sha256_blocks_arch
+.type	sha256_blocks_arch,%function
+sha256_blocks_arch:
+.Lsha256_blocks_arch:
 #if __ARM_ARCH__<7
-	sub	r3,pc,#8		@ sha256_block_data_order
+	sub	r3,pc,#8		@ sha256_blocks_arch
 #else
-	adr	r3,.Lsha256_block_data_order
+	adr	r3,.Lsha256_blocks_arch
 #endif
 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
 	ldr	r12,.LOPENSSL_armcap
@@ -282,7 +282,7 @@ $code.=<<___;
 	moveq	pc,lr			@ be binary compatible with V4, yet
 	bx	lr			@ interoperable with Thumb ISA:-)
 #endif
-.size	sha256_block_data_order,.-sha256_block_data_order
+.size	sha256_blocks_arch,.-sha256_blocks_arch
 ___
 ######################################################################
 # NEON stuff
@@ -470,8 +470,8 @@ sha256_block_data_order_neon:
 	stmdb	sp!,{r4-r12,lr}
 
 	sub	$H,sp,#16*4+16
-	adr	$Ktbl,.Lsha256_block_data_order
-	sub	$Ktbl,$Ktbl,#.Lsha256_block_data_order-K256
+	adr	$Ktbl,.Lsha256_blocks_arch
+	sub	$Ktbl,$Ktbl,#.Lsha256_blocks_arch-K256
 	bic	$H,$H,#15		@ align for 128-bit stores
 	mov	$t2,sp
 	mov	sp,$H			@ alloca
diff --git a/arch/arm/lib/crypto/sha256.c b/arch/arm/lib/crypto/sha256.c
index e2fae3664428..1dd71b8fd611 100644
--- a/arch/arm/lib/crypto/sha256.c
+++ b/arch/arm/lib/crypto/sha256.c
@@ -6,12 +6,12 @@
  */
 #include <asm/neon.h>
 #include <crypto/internal/sha2.h>
-#include <crypto/internal/simd.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 
-asmlinkage void sha256_block_data_order(u32 state[SHA256_STATE_WORDS],
-					const u8 *data, size_t nblocks);
+asmlinkage void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+				   const u8 *data, size_t nblocks);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 asmlinkage void sha256_block_data_order_neon(u32 state[SHA256_STATE_WORDS],
 					     const u8 *data, size_t nblocks);
 asmlinkage void sha256_ce_transform(u32 state[SHA256_STATE_WORDS],
@@ -20,11 +20,11 @@ asmlinkage void sha256_ce_transform(u32 state[SHA256_STATE_WORDS],
 static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_neon);
 static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_ce);
 
-void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+void sha256_blocks_simd(u32 state[SHA256_STATE_WORDS],
 			const u8 *data, size_t nblocks)
 {
 	if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON) &&
-	    static_branch_likely(&have_neon) && crypto_simd_usable()) {
+	    static_branch_likely(&have_neon)) {
 		kernel_neon_begin();
 		if (static_branch_likely(&have_ce))
 			sha256_ce_transform(state, data, nblocks);
@@ -32,10 +32,10 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 			sha256_block_data_order_neon(state, data, nblocks);
 		kernel_neon_end();
 	} else {
-		sha256_block_data_order(state, data, nblocks);
+		sha256_blocks_arch(state, data, nblocks);
 	}
 }
-EXPORT_SYMBOL_GPL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_simd);
 
 bool sha256_is_arch_optimized(void)
 {
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 5/9] crypto: arm64/sha256 - Add simd block function
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
                   ` (3 preceding siblings ...)
  2025-05-02  5:31 ` [v2 PATCH 4/9] crypto: arm/sha256 - Add simd block function Herbert Xu
@ 2025-05-02  5:31 ` Herbert Xu
  2025-05-02  5:31 ` [v2 PATCH 6/9] crypto: riscv/sha256 " Herbert Xu
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:31 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function
so that the caller can decide whether to use SIMD.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 arch/arm64/crypto/sha512-glue.c     |  6 +++---
 arch/arm64/lib/crypto/Kconfig       |  1 +
 arch/arm64/lib/crypto/sha2-armv8.pl |  2 +-
 arch/arm64/lib/crypto/sha256.c      | 14 +++++++-------
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/arm64/crypto/sha512-glue.c b/arch/arm64/crypto/sha512-glue.c
index ab2e1c13dfad..15aa9d8b7b2c 100644
--- a/arch/arm64/crypto/sha512-glue.c
+++ b/arch/arm64/crypto/sha512-glue.c
@@ -18,13 +18,13 @@ MODULE_LICENSE("GPL v2");
 MODULE_ALIAS_CRYPTO("sha384");
 MODULE_ALIAS_CRYPTO("sha512");
 
-asmlinkage void sha512_block_data_order(u64 *digest, const void *data,
-					unsigned int num_blks);
+asmlinkage void sha512_blocks_arch(u64 *digest, const void *data,
+				   unsigned int num_blks);
 
 static void sha512_arm64_transform(struct sha512_state *sst, u8 const *src,
 				   int blocks)
 {
-	sha512_block_data_order(sst->state, src, blocks);
+	sha512_blocks_arch(sst->state, src, blocks);
 }
 
 static int sha512_update(struct shash_desc *desc, const u8 *data,
diff --git a/arch/arm64/lib/crypto/Kconfig b/arch/arm64/lib/crypto/Kconfig
index 49e57bfdb5b5..129a7685cb4c 100644
--- a/arch/arm64/lib/crypto/Kconfig
+++ b/arch/arm64/lib/crypto/Kconfig
@@ -17,3 +17,4 @@ config CRYPTO_SHA256_ARM64
 	tristate
 	default CRYPTO_LIB_SHA256
 	select CRYPTO_ARCH_HAVE_LIB_SHA256
+	select CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
diff --git a/arch/arm64/lib/crypto/sha2-armv8.pl b/arch/arm64/lib/crypto/sha2-armv8.pl
index 35ec9ae99fe1..4aebd20c498b 100644
--- a/arch/arm64/lib/crypto/sha2-armv8.pl
+++ b/arch/arm64/lib/crypto/sha2-armv8.pl
@@ -95,7 +95,7 @@ if ($output =~ /512/) {
 	$reg_t="w";
 }
 
-$func="sha${BITS}_block_data_order";
+$func="sha${BITS}_blocks_arch";
 
 ($ctx,$inp,$num,$Ktbl)=map("x$_",(0..2,30));
 
diff --git a/arch/arm64/lib/crypto/sha256.c b/arch/arm64/lib/crypto/sha256.c
index 91c7ca727992..fdceb2d0899c 100644
--- a/arch/arm64/lib/crypto/sha256.c
+++ b/arch/arm64/lib/crypto/sha256.c
@@ -6,12 +6,12 @@
  */
 #include <asm/neon.h>
 #include <crypto/internal/sha2.h>
-#include <crypto/internal/simd.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 
-asmlinkage void sha256_block_data_order(u32 state[SHA256_STATE_WORDS],
-					const u8 *data, size_t nblocks);
+asmlinkage void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+				   const u8 *data, size_t nblocks);
+EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 asmlinkage void sha256_block_neon(u32 state[SHA256_STATE_WORDS],
 				  const u8 *data, size_t nblocks);
 asmlinkage size_t __sha256_ce_transform(u32 state[SHA256_STATE_WORDS],
@@ -20,11 +20,11 @@ asmlinkage size_t __sha256_ce_transform(u32 state[SHA256_STATE_WORDS],
 static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_neon);
 static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_ce);
 
-void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+void sha256_blocks_simd(u32 state[SHA256_STATE_WORDS],
 			const u8 *data, size_t nblocks)
 {
 	if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON) &&
-	    static_branch_likely(&have_neon) && crypto_simd_usable()) {
+	    static_branch_likely(&have_neon)) {
 		if (static_branch_likely(&have_ce)) {
 			do {
 				size_t rem;
@@ -42,10 +42,10 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 			kernel_neon_end();
 		}
 	} else {
-		sha256_block_data_order(state, data, nblocks);
+		sha256_blocks_arch(state, data, nblocks);
 	}
 }
-EXPORT_SYMBOL_GPL(sha256_blocks_arch);
+EXPORT_SYMBOL_GPL(sha256_blocks_simd);
 
 bool sha256_is_arch_optimized(void)
 {
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 6/9] crypto: riscv/sha256 - Add simd block function
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
                   ` (4 preceding siblings ...)
  2025-05-02  5:31 ` [v2 PATCH 5/9] crypto: arm64/sha256 " Herbert Xu
@ 2025-05-02  5:31 ` Herbert Xu
  2025-05-02  5:31 ` [v2 PATCH 7/9] crypto: x86/sha256 " Herbert Xu
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:31 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function
so that the caller can decide whether to use SIMD.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 arch/riscv/lib/crypto/Kconfig  |  1 +
 arch/riscv/lib/crypto/sha256.c | 13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/lib/crypto/Kconfig b/arch/riscv/lib/crypto/Kconfig
index c100571feb7e..47c99ea97ce2 100644
--- a/arch/riscv/lib/crypto/Kconfig
+++ b/arch/riscv/lib/crypto/Kconfig
@@ -12,4 +12,5 @@ config CRYPTO_SHA256_RISCV64
 	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
 	default CRYPTO_LIB_SHA256
 	select CRYPTO_ARCH_HAVE_LIB_SHA256
+	select CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
 	select CRYPTO_LIB_SHA256_GENERIC
diff --git a/arch/riscv/lib/crypto/sha256.c b/arch/riscv/lib/crypto/sha256.c
index 2905a6dbb485..c1358eafc2ad 100644
--- a/arch/riscv/lib/crypto/sha256.c
+++ b/arch/riscv/lib/crypto/sha256.c
@@ -9,10 +9,8 @@
  * Author: Jerry Shih <jerry.shih@sifive.com>
  */
 
-#include <asm/simd.h>
 #include <asm/vector.h>
 #include <crypto/internal/sha2.h>
-#include <crypto/internal/simd.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 
@@ -21,10 +19,10 @@ asmlinkage void sha256_transform_zvknha_or_zvknhb_zvkb(
 
 static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_extensions);
 
-void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+void sha256_blocks_simd(u32 state[SHA256_STATE_WORDS],
 			const u8 *data, size_t nblocks)
 {
-	if (static_branch_likely(&have_extensions) && crypto_simd_usable()) {
+	if (static_branch_likely(&have_extensions)) {
 		kernel_vector_begin();
 		sha256_transform_zvknha_or_zvknhb_zvkb(state, data, nblocks);
 		kernel_vector_end();
@@ -32,6 +30,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 		sha256_blocks_generic(state, data, nblocks);
 	}
 }
+EXPORT_SYMBOL_GPL(sha256_blocks_simd);
+
+void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+			const u8 *data, size_t nblocks)
+{
+	sha256_blocks_generic(state, data, nblocks);
+}
 EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 7/9] crypto: x86/sha256 - Add simd block function
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
                   ` (5 preceding siblings ...)
  2025-05-02  5:31 ` [v2 PATCH 6/9] crypto: riscv/sha256 " Herbert Xu
@ 2025-05-02  5:31 ` Herbert Xu
  2025-05-02  5:31 ` [v2 PATCH 8/9] crypto: lib/sha256 - Use generic block helper Herbert Xu
  2025-05-02  5:31 ` [v2 PATCH 9/9] crypto: sha256 - Use the partial block API Herbert Xu
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:31 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function
so that the caller can decide whether to use SIMD.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 arch/x86/lib/crypto/Kconfig  |  1 +
 arch/x86/lib/crypto/sha256.c | 12 +++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/x86/lib/crypto/Kconfig b/arch/x86/lib/crypto/Kconfig
index e344579db3d8..5e94cdee492c 100644
--- a/arch/x86/lib/crypto/Kconfig
+++ b/arch/x86/lib/crypto/Kconfig
@@ -30,4 +30,5 @@ config CRYPTO_SHA256_X86_64
 	depends on 64BIT
 	default CRYPTO_LIB_SHA256
 	select CRYPTO_ARCH_HAVE_LIB_SHA256
+	select CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
 	select CRYPTO_LIB_SHA256_GENERIC
diff --git a/arch/x86/lib/crypto/sha256.c b/arch/x86/lib/crypto/sha256.c
index 8735ec871f86..cdd88497eedf 100644
--- a/arch/x86/lib/crypto/sha256.c
+++ b/arch/x86/lib/crypto/sha256.c
@@ -6,7 +6,6 @@
  */
 #include <asm/fpu/api.h>
 #include <crypto/internal/sha2.h>
-#include <crypto/internal/simd.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/static_call.h>
@@ -24,10 +23,10 @@ static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_sha256_x86);
 
 DEFINE_STATIC_CALL(sha256_blocks_x86, sha256_transform_ssse3);
 
-void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+void sha256_blocks_simd(u32 state[SHA256_STATE_WORDS],
 			const u8 *data, size_t nblocks)
 {
-	if (static_branch_likely(&have_sha256_x86) && crypto_simd_usable()) {
+	if (static_branch_likely(&have_sha256_x86)) {
 		kernel_fpu_begin();
 		static_call(sha256_blocks_x86)(state, data, nblocks);
 		kernel_fpu_end();
@@ -35,6 +34,13 @@ void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
 		sha256_blocks_generic(state, data, nblocks);
 	}
 }
+EXPORT_SYMBOL_GPL(sha256_blocks_simd);
+
+void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
+			const u8 *data, size_t nblocks)
+{
+	sha256_blocks_generic(state, data, nblocks);
+}
 EXPORT_SYMBOL_GPL(sha256_blocks_arch);
 
 bool sha256_is_arch_optimized(void)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 8/9] crypto: lib/sha256 - Use generic block helper
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
                   ` (6 preceding siblings ...)
  2025-05-02  5:31 ` [v2 PATCH 7/9] crypto: x86/sha256 " Herbert Xu
@ 2025-05-02  5:31 ` Herbert Xu
  2025-05-02  5:31 ` [v2 PATCH 9/9] crypto: sha256 - Use the partial block API Herbert Xu
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:31 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Use the BLOCK_HASH_UPDATE_BLOCKS helper instead of duplicating
partial block handling.

Also remove the unused lib/sha256 force-generic interface.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 include/crypto/internal/sha2.h |  7 ----
 lib/crypto/sha256.c            | 75 ++++++----------------------------
 2 files changed, 12 insertions(+), 70 deletions(-)

diff --git a/include/crypto/internal/sha2.h b/include/crypto/internal/sha2.h
index fff156f66edc..b9bccd3ff57f 100644
--- a/include/crypto/internal/sha2.h
+++ b/include/crypto/internal/sha2.h
@@ -10,13 +10,6 @@
 #include <linux/types.h>
 #include <linux/unaligned.h>
 
-void sha256_update_generic(struct sha256_state *sctx,
-			   const u8 *data, size_t len);
-void sha256_final_generic(struct sha256_state *sctx,
-			  u8 out[SHA256_DIGEST_SIZE]);
-void sha224_final_generic(struct sha256_state *sctx,
-			  u8 out[SHA224_DIGEST_SIZE]);
-
 #if IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_SHA256)
 bool sha256_is_arch_optimized(void);
 #else
diff --git a/lib/crypto/sha256.c b/lib/crypto/sha256.c
index 2ced29efa181..107e5162507a 100644
--- a/lib/crypto/sha256.c
+++ b/lib/crypto/sha256.c
@@ -11,6 +11,7 @@
  * Copyright (c) 2014 Red Hat Inc.
  */
 
+#include <crypto/internal/blockhash.h>
 #include <crypto/internal/sha2.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -31,71 +32,40 @@ static inline bool sha256_purgatory(void)
 }
 
 static inline void sha256_blocks(u32 state[SHA256_STATE_WORDS], const u8 *data,
-				 size_t nblocks, bool force_generic)
+				 size_t nblocks)
 {
-	sha256_choose_blocks(state, data, nblocks,
-			     force_generic || sha256_purgatory(), false);
-}
-
-static inline void __sha256_update(struct sha256_state *sctx, const u8 *data,
-				   size_t len, bool force_generic)
-{
-	size_t partial = sctx->count % SHA256_BLOCK_SIZE;
-
-	sctx->count += len;
-
-	if (partial + len >= SHA256_BLOCK_SIZE) {
-		size_t nblocks;
-
-		if (partial) {
-			size_t l = SHA256_BLOCK_SIZE - partial;
-
-			memcpy(&sctx->buf[partial], data, l);
-			data += l;
-			len -= l;
-
-			sha256_blocks(sctx->state, sctx->buf, 1, force_generic);
-		}
-
-		nblocks = len / SHA256_BLOCK_SIZE;
-		len %= SHA256_BLOCK_SIZE;
-
-		if (nblocks) {
-			sha256_blocks(sctx->state, data, nblocks,
-				      force_generic);
-			data += nblocks * SHA256_BLOCK_SIZE;
-		}
-		partial = 0;
-	}
-	if (len)
-		memcpy(&sctx->buf[partial], data, len);
+	sha256_choose_blocks(state, data, nblocks, sha256_purgatory(), false);
 }
 
 void sha256_update(struct sha256_state *sctx, const u8 *data, size_t len)
 {
-	__sha256_update(sctx, data, len, false);
+	size_t partial = sctx->count % SHA256_BLOCK_SIZE;
+
+	sctx->count += len;
+	BLOCK_HASH_UPDATE_BLOCKS(sha256_blocks, sctx->ctx.state, data, len,
+				 SHA256_BLOCK_SIZE, sctx->buf, partial);
 }
 EXPORT_SYMBOL(sha256_update);
 
 static inline void __sha256_final(struct sha256_state *sctx, u8 *out,
-				  size_t digest_size, bool force_generic)
+				  size_t digest_size)
 {
 	size_t partial = sctx->count % SHA256_BLOCK_SIZE;
 
 	sha256_finup(&sctx->ctx, sctx->buf, partial, out, digest_size,
-		     force_generic || sha256_purgatory(), false);
+		     sha256_purgatory(), false);
 	memzero_explicit(sctx, sizeof(*sctx));
 }
 
 void sha256_final(struct sha256_state *sctx, u8 out[SHA256_DIGEST_SIZE])
 {
-	__sha256_final(sctx, out, SHA256_DIGEST_SIZE, false);
+	__sha256_final(sctx, out, SHA256_DIGEST_SIZE);
 }
 EXPORT_SYMBOL(sha256_final);
 
 void sha224_final(struct sha256_state *sctx, u8 out[SHA224_DIGEST_SIZE])
 {
-	__sha256_final(sctx, out, SHA224_DIGEST_SIZE, false);
+	__sha256_final(sctx, out, SHA224_DIGEST_SIZE);
 }
 EXPORT_SYMBOL(sha224_final);
 
@@ -109,26 +79,5 @@ void sha256(const u8 *data, size_t len, u8 out[SHA256_DIGEST_SIZE])
 }
 EXPORT_SYMBOL(sha256);
 
-#if IS_ENABLED(CONFIG_CRYPTO_SHA256) && !defined(__DISABLE_EXPORTS)
-void sha256_update_generic(struct sha256_state *sctx,
-			   const u8 *data, size_t len)
-{
-	__sha256_update(sctx, data, len, true);
-}
-EXPORT_SYMBOL(sha256_update_generic);
-
-void sha256_final_generic(struct sha256_state *sctx, u8 out[SHA256_DIGEST_SIZE])
-{
-	__sha256_final(sctx, out, SHA256_DIGEST_SIZE, true);
-}
-EXPORT_SYMBOL(sha256_final_generic);
-
-void sha224_final_generic(struct sha256_state *sctx, u8 out[SHA224_DIGEST_SIZE])
-{
-	__sha256_final(sctx, out, SHA224_DIGEST_SIZE, true);
-}
-EXPORT_SYMBOL(sha224_final_generic);
-#endif
-
 MODULE_DESCRIPTION("SHA-256 Algorithm");
 MODULE_LICENSE("GPL");
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [v2 PATCH 9/9] crypto: sha256 - Use the partial block API
  2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
                   ` (7 preceding siblings ...)
  2025-05-02  5:31 ` [v2 PATCH 8/9] crypto: lib/sha256 - Use generic block helper Herbert Xu
@ 2025-05-02  5:31 ` Herbert Xu
  8 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-05-02  5:31 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Use the shash partial block API by default.  Add a separate set
of lib shash algorithms to preserve testing coverage until lib/sha256
has its own tests.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 crypto/sha256.c | 81 +++++++++++++++++++++++++++++++++++--------------
 1 file changed, 58 insertions(+), 23 deletions(-)

diff --git a/crypto/sha256.c b/crypto/sha256.c
index d6b90c6ea63d..a20c92098176 100644
--- a/crypto/sha256.c
+++ b/crypto/sha256.c
@@ -52,14 +52,20 @@ static int crypto_sha256_update_generic(struct shash_desc *desc, const u8 *data,
 	return crypto_sha256_update(desc, data, len, true);
 }
 
-static int crypto_sha256_update_arch(struct shash_desc *desc, const u8 *data,
-				     unsigned int len)
+static int crypto_sha256_update_lib(struct shash_desc *desc, const u8 *data,
+				    unsigned int len)
 {
 	sha256_update(shash_desc_ctx(desc), data, len);
 	return 0;
 }
 
-static int crypto_sha256_final_arch(struct shash_desc *desc, u8 *out)
+static int crypto_sha256_update_arch(struct shash_desc *desc, const u8 *data,
+				     unsigned int len)
+{
+	return crypto_sha256_update(desc, data, len, false);
+}
+
+static int crypto_sha256_final_lib(struct shash_desc *desc, u8 *out)
 {
 	sha256_final(shash_desc_ctx(desc), out);
 	return 0;
@@ -93,11 +99,7 @@ static int crypto_sha256_finup_generic(struct shash_desc *desc, const u8 *data,
 static int crypto_sha256_finup_arch(struct shash_desc *desc, const u8 *data,
 				    unsigned int len, u8 *out)
 {
-	struct sha256_state *sctx = shash_desc_ctx(desc);
-
-	sha256_update(sctx, data, len);
-	sha256_final(sctx, out);
-	return 0;
+	return crypto_sha256_finup(desc, data, len, out, false);
 }
 
 static int crypto_sha256_digest_generic(struct shash_desc *desc, const u8 *data,
@@ -107,20 +109,27 @@ static int crypto_sha256_digest_generic(struct shash_desc *desc, const u8 *data,
 	return crypto_sha256_finup_generic(desc, data, len, out);
 }
 
-static int crypto_sha256_digest_arch(struct shash_desc *desc, const u8 *data,
-				     unsigned int len, u8 *out)
+static int crypto_sha256_digest_lib(struct shash_desc *desc, const u8 *data,
+				    unsigned int len, u8 *out)
 {
 	sha256(data, len, out);
 	return 0;
 }
 
+static int crypto_sha256_digest_arch(struct shash_desc *desc, const u8 *data,
+				     unsigned int len, u8 *out)
+{
+	crypto_sha256_init(desc);
+	return crypto_sha256_finup_arch(desc, data, len, out);
+}
+
 static int crypto_sha224_init(struct shash_desc *desc)
 {
 	sha224_block_init(shash_desc_ctx(desc));
 	return 0;
 }
 
-static int crypto_sha224_final_arch(struct shash_desc *desc, u8 *out)
+static int crypto_sha224_final_lib(struct shash_desc *desc, u8 *out)
 {
 	sha224_final(shash_desc_ctx(desc), out);
 	return 0;
@@ -184,16 +193,14 @@ static struct shash_alg algs[] = {
 	},
 	{
 		.base.cra_name		= "sha256",
-		.base.cra_driver_name	= "sha256-" __stringify(ARCH),
-		.base.cra_priority	= 300,
+		.base.cra_driver_name	= "sha256-lib",
 		.base.cra_blocksize	= SHA256_BLOCK_SIZE,
 		.base.cra_module	= THIS_MODULE,
 		.digestsize		= SHA256_DIGEST_SIZE,
 		.init			= crypto_sha256_init,
-		.update			= crypto_sha256_update_arch,
-		.final			= crypto_sha256_final_arch,
-		.finup			= crypto_sha256_finup_arch,
-		.digest			= crypto_sha256_digest_arch,
+		.update			= crypto_sha256_update_lib,
+		.final			= crypto_sha256_final_lib,
+		.digest			= crypto_sha256_digest_lib,
 		.descsize		= sizeof(struct sha256_state),
 		.statesize		= sizeof(struct crypto_sha256_state) +
 					  SHA256_BLOCK_SIZE + 1,
@@ -202,20 +209,48 @@ static struct shash_alg algs[] = {
 	},
 	{
 		.base.cra_name		= "sha224",
-		.base.cra_driver_name	= "sha224-" __stringify(ARCH),
-		.base.cra_priority	= 300,
+		.base.cra_driver_name	= "sha224-lib",
 		.base.cra_blocksize	= SHA224_BLOCK_SIZE,
 		.base.cra_module	= THIS_MODULE,
 		.digestsize		= SHA224_DIGEST_SIZE,
 		.init			= crypto_sha224_init,
-		.update			= crypto_sha256_update_arch,
-		.final			= crypto_sha224_final_arch,
+		.update			= crypto_sha256_update_lib,
+		.final			= crypto_sha224_final_lib,
 		.descsize		= sizeof(struct sha256_state),
 		.statesize		= sizeof(struct crypto_sha256_state) +
 					  SHA256_BLOCK_SIZE + 1,
 		.import			= crypto_sha256_import_lib,
 		.export			= crypto_sha256_export_lib,
 	},
+	{
+		.base.cra_name		= "sha256",
+		.base.cra_driver_name	= "sha256-" __stringify(ARCH),
+		.base.cra_priority	= 300,
+		.base.cra_flags		= CRYPTO_AHASH_ALG_BLOCK_ONLY |
+					  CRYPTO_AHASH_ALG_FINUP_MAX,
+		.base.cra_blocksize	= SHA256_BLOCK_SIZE,
+		.base.cra_module	= THIS_MODULE,
+		.digestsize		= SHA256_DIGEST_SIZE,
+		.init			= crypto_sha256_init,
+		.update			= crypto_sha256_update_arch,
+		.finup			= crypto_sha256_finup_arch,
+		.digest			= crypto_sha256_digest_arch,
+		.descsize		= sizeof(struct crypto_sha256_state),
+	},
+	{
+		.base.cra_name		= "sha224",
+		.base.cra_driver_name	= "sha224-" __stringify(ARCH),
+		.base.cra_priority	= 300,
+		.base.cra_flags		= CRYPTO_AHASH_ALG_BLOCK_ONLY |
+					  CRYPTO_AHASH_ALG_FINUP_MAX,
+		.base.cra_blocksize	= SHA224_BLOCK_SIZE,
+		.base.cra_module	= THIS_MODULE,
+		.digestsize		= SHA224_DIGEST_SIZE,
+		.init			= crypto_sha224_init,
+		.update			= crypto_sha256_update_arch,
+		.finup			= crypto_sha256_finup_arch,
+		.descsize		= sizeof(struct crypto_sha256_state),
+	},
 };
 
 static unsigned int num_algs;
@@ -224,9 +259,9 @@ static int __init crypto_sha256_mod_init(void)
 {
 	/* register the arch flavours only if they differ from generic */
 	num_algs = ARRAY_SIZE(algs);
-	BUILD_BUG_ON(ARRAY_SIZE(algs) % 2 != 0);
+	BUILD_BUG_ON(ARRAY_SIZE(algs) <= 2);
 	if (!sha256_is_arch_optimized())
-		num_algs /= 2;
+		num_algs -= 2;
 	return crypto_register_shashes(algs, ARRAY_SIZE(algs));
 }
 subsys_initcall(crypto_sha256_mod_init);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash (RT build failure)
  2025-05-02  5:30 ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash Herbert Xu
@ 2025-06-03  4:56   ` Guenter Roeck
  2025-06-03  4:59     ` Herbert Xu
  2025-06-03 13:49   ` Regression: hash - Add HASH_REQUEST_ON_STACK causes asynch hashes to fail Harald Freudenberger
  1 sibling, 1 reply; 17+ messages in thread
From: Guenter Roeck @ 2025-06-03  4:56 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto Mailing List, Ingo Molnar, Peter Zijlstra,
	Steven Rostedt, Sebastian Andrzej Siewior, Clark Williams,
	linux-rt-devel

Hi,

On Fri, May 02, 2025 at 01:30:53PM +0800, Herbert Xu wrote:
> Add an internal sha256_finup helper and move the finalisation code
> from __sha256_final into it.
> 
> Also add sha256_choose_blocks and CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
> so that the Crypto API can use the SIMD block function unconditionally.
> The Crypto API must not be used in hard IRQs and there is no reason
> to have a fallback path for hardirqs.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

This patch triggers the following build error. It is seen when
trying to build loongson3_defconfig + CONFIG_PREEMPT_RT.

Error log:
In file included from /opt/buildbot/slave/qemu-loongarch-rt/build/include/asm-generic/simd.h:6,
                 from ./arch/loongarch/include/generated/asm/simd.h:1,
                 from /opt/buildbot/slave/qemu-loongarch-rt/build/include/crypto/internal/simd.h:9,
                 from /opt/buildbot/slave/qemu-loongarch-rt/build/include/crypto/internal/sha2.h:6,
                 from /opt/buildbot/slave/qemu-loongarch-rt/build/lib/crypto/sha256.c:15:
/opt/buildbot/slave/qemu-loongarch-rt/build/include/asm-generic/simd.h: In function 'may_use_simd':
/opt/buildbot/slave/qemu-loongarch-rt/build/include/linux/preempt.h:111:34: error: 'current' undeclared (first use in this function)
  111 | # define softirq_count()        (current->softirq_disable_cnt & SOFTIRQ_MASK)
      |                                  ^~~~~~~

While the problem is only exposed by this patch, it does not seem to be
straightforward to fix: preempt.h does not directly include asm/current.h,
and doing so only exposes follow-up build failures.

Reverting this patch after also reverting the follow-up patch touching
sha256.c fixes the problem.

Copying scheduler and realtime subsystem maintainers for advice.

Guenter

---
bisect log:

# bad: [cd2e103d57e5615f9bb027d772f93b9efd567224] Merge tag 'hardening-v6.16-rc1-fix1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
# good: [0ff41df1cb268fc69e703a08a57ee14ae967d0ca] Linux 6.15
git bisect start 'HEAD' 'v6.15'
# bad: [b08494a8f7416e5f09907318c5460ad6f6e2a548] Merge tag 'drm-next-2025-05-28' of https://gitlab.freedesktop.org/drm/kernel
git bisect bad b08494a8f7416e5f09907318c5460ad6f6e2a548
# bad: [a9e6060bb2a6cae6d43a98ec0794844ad01273d3] Merge tag 'sound-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
git bisect bad a9e6060bb2a6cae6d43a98ec0794844ad01273d3
# bad: [3349ada3cffdbe4579872a004360daa31938f683] Merge tag 'powerpc-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect bad 3349ada3cffdbe4579872a004360daa31938f683
# good: [8fdabcd9c01d9ac585d8109a921e0734a69479fb] Merge tag 'gfs2-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
git bisect good 8fdabcd9c01d9ac585d8109a921e0734a69479fb
# bad: [2297554f01df6d3d4e98a3915c183ce3e491740a] x86/fpu: Fix irq_fpu_usable() to return false during CPU onlining
git bisect bad 2297554f01df6d3d4e98a3915c183ce3e491740a
# good: [0d474be2676d9262afd0cf6a416e96b9277139a7] crypto: sha3-generic - Use API partial block handling
git bisect good 0d474be2676d9262afd0cf6a416e96b9277139a7
# good: [7db55726450af0373b128e944f263b848eaa7dc2] crypto: qat - expose configuration functions
git bisect good 7db55726450af0373b128e944f263b848eaa7dc2
# bad: [bde393057bbc452731a521bafa7441932da5f564] crypto: null - merge CRYPTO_NULL2 into CRYPTO_NULL
git bisect bad bde393057bbc452731a521bafa7441932da5f564
# bad: [ecd71c95a60e7298acfabe81189439f350bd0e18] crypto: zynqmp-sha - Fix partial block implementation
git bisect bad ecd71c95a60e7298acfabe81189439f350bd0e18
# bad: [5b90a779bc547939421bfeb333e470658ba94fb6] crypto: lib/sha256 - Add helpers for block-based shash
git bisect bad 5b90a779bc547939421bfeb333e470658ba94fb6
# good: [165ef524bbeb71ccd470e70a4e63f813fa71e7cd] dt-bindings: rng: rockchip,rk3588-rng: add rk3576-rng compatible
git bisect good 165ef524bbeb71ccd470e70a4e63f813fa71e7cd
# good: [8fd17374be8f220c26bec2b482cabf51ebbaed80] crypto: api - Rename CRYPTO_ALG_REQ_CHAIN to CRYPTO_ALG_REQ_VIRT
git bisect good 8fd17374be8f220c26bec2b482cabf51ebbaed80
# good: [7d2461c7616743d62be0df8f9a5f4a6de29f119a] crypto: sun8i-ce-hash - use pm_runtime_resume_and_get()
git bisect good 7d2461c7616743d62be0df8f9a5f4a6de29f119a
# first bad commit: [5b90a779bc547939421bfeb333e470658ba94fb6] crypto: lib/sha256 - Add helpers for block-based shash

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash (RT build failure)
  2025-06-03  4:56   ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash (RT build failure) Guenter Roeck
@ 2025-06-03  4:59     ` Herbert Xu
  2025-06-03  5:44       ` Guenter Roeck
  0 siblings, 1 reply; 17+ messages in thread
From: Herbert Xu @ 2025-06-03  4:59 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Linux Crypto Mailing List, Ingo Molnar, Peter Zijlstra,
	Steven Rostedt, Sebastian Andrzej Siewior, Clark Williams,
	linux-rt-devel

On Mon, Jun 02, 2025 at 09:56:27PM -0700, Guenter Roeck wrote:
> 
> This patch triggers the following build error. It is seen when
> trying to build loongson3_defconfig + CONFIG_PREEMPT_RT.

This should be fixed by

https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=b9802b54d41bbe98f673e08bc148b0c563fdc02e

I'll send Linus a pull request.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash (RT build failure)
  2025-06-03  4:59     ` Herbert Xu
@ 2025-06-03  5:44       ` Guenter Roeck
  0 siblings, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2025-06-03  5:44 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto Mailing List, Ingo Molnar, Peter Zijlstra,
	Steven Rostedt, Sebastian Andrzej Siewior, Clark Williams,
	linux-rt-devel

On 6/2/25 21:59, Herbert Xu wrote:
> On Mon, Jun 02, 2025 at 09:56:27PM -0700, Guenter Roeck wrote:
>>
>> This patch triggers the following build error. It is seen when
>> trying to build loongson3_defconfig + CONFIG_PREEMPT_RT.
> 
> This should be fixed by
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=b9802b54d41bbe98f673e08bc148b0c563fdc02e
> 

Yes, it does. Thanks!

Guenter


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Regression: hash - Add HASH_REQUEST_ON_STACK causes asynch hashes to fail
  2025-05-02  5:30 ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash Herbert Xu
  2025-06-03  4:56   ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash (RT build failure) Guenter Roeck
@ 2025-06-03 13:49   ` Harald Freudenberger
  2025-06-04  9:54     ` [PATCH] crypto: ahash - Add support for drivers with no fallback Herbert Xu
  1 sibling, 1 reply; 17+ messages in thread
From: Harald Freudenberger @ 2025-06-03 13:49 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Linux Crypto Mailing List, Holger Dengler, Ingo Franzki

[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]

Hello Herbert

I am facing a weird issue with my phmac implementation since kernel 5.15 
has
been released. The algorithm registers fine but obviously it is not 
self-tested
and thus you can't access it via AF_ALG or with an in-kernel customer.

With some tricks I was able to bisec this down to commit
04bfa4c7d511 ("crypto: hash - Add HASH_REQUEST_ON_STACK").
In detail it is this code in crypto/ahash.c which is the culprit:

static int crypto_ahash_init_tfm(struct crypto_tfm *tfm)
{
	struct crypto_ahash *hash = __crypto_ahash_cast(tfm);
	struct ahash_alg *alg = crypto_ahash_alg(hash);
	struct crypto_ahash *fb = NULL;
	int err;

	crypto_ahash_set_statesize(hash, alg->halg.statesize);
	crypto_ahash_set_reqsize(hash, crypto_tfm_alg_reqsize(tfm));

	hash->fb = hash;

	if (tfm->__crt_alg->cra_type == &crypto_shash_type)
		return crypto_init_ahash_using_shash(tfm);

	if (ahash_is_async(hash)) {
		fb = crypto_alloc_ahash(crypto_ahash_alg_name(hash),
					0, CRYPTO_ALG_ASYNC);         <--- always failing
		if (IS_ERR(fb))
			return PTR_ERR(fb);

		hash->fb = fb;
	}

	ahash_set_needkey(hash, alg);

	tfm->exit = crypto_ahash_exit_tfm;

The crypto_alloc_ahash() fails always with -2 = -ENOENT and
my suggestion is this happens because this is when the selftest
is about to run and the alloc flags here may miss some kind of
larval or untested or similar flag.

Note that this may happen not only with my still not integrated phmac
but with all asynch hashes and as far as I can see there is some
similar code in acompress.c.

I tried to go into more details but on the path down there are so
many modifications done on the flags and mask parameters and I gave
up somewhere on the path down. This all comes down then to calling
__crypto_alg_lookup() but this function then - maybe because of
wrong flag/type/mask parameter - can't match the algorithm.
I've instrumented the code with some pr_debug() and the result
is attached to this email - hopefully this gives you some hints.

Thanks for your investigation



[-- Attachment #2: crypto_alg_lookup.txt --]
[-- Type: text/plain, Size: 71825 bytes --]

Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4956] s390_phmac_init: phmac_s390: phmac(sha224) registered
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: > name=phmac_s390_sha224 type=0x0000028f mask=0x0000240e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b9400: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000400 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b9a60: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316bd000: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000400 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b8e60: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: < returning alg=00000055316b8e60
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] crypto_ahash_init_tfm: xxx >
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: > name=phmac(sha224) type=0x0000040f mask=0x0000248e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b9400: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b9a60: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316bd000: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b8e60: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f690: hmac_s390_sha512,hmac(sha512)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f498: hmac_s390_sha384,hmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f2a0: hmac_s390_sha256,hmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f0a8: hmac_s390_sha224,hmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000005535682860: xts(ecb(aes-generic)),xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000005535681c48: cbc(ecb(aes-generic)),cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768173088: ghash-s390,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055404d9048: ecb(aes-generic),ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000005544ebcc60: ctr(aes-generic),ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4956] s390_phmac_init: phmac_s390: phmac(sha256) registered
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153ba0: gcm-aes-s390,gcm(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: > name=phmac_s390_sha256 type=0x0000028f mask=0x0000240e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000403 ^ type) & mask) = 0x0000000c -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b9400: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157681539d8: ctr-aes-s390,ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000400 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157681537f8: xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b9a60: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: < returning alg=00000055316b9a60
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153618: full-xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] crypto_ahash_init_tfm: xxx >
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153438: cbc-aes-s390,cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153258: ecb-aes-s390,ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153078: aes-s390,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000501 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145ce8: ctr-des3_ede-s390,ctr(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145b08: ctr-des-s390,ctr(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145928: cbc-des3_ede-s390,cbc(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145748: ecb-des3_ede-s390,ecb(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145568: des3_ede-s390,des3_ede
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157681453e0: cbc-des-s390,cbc(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145200: ecb-des-s390,ecb(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145020: des-s390,des
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576812e258: sha3-384-s390,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576812e068: sha3-512-s390,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768122068: sha3-224-s390,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768122258: sha3-256-s390,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768114258: sha384-s390,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768114068: sha512-s390,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576810a068: sha224-s390,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576810a258: sha256-s390,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157680fe068: sha1-s390,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055155e4050: pkcs1(rsa-generic,sha256),pkcs1(rsa,sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c07 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95447f8: jitterentropy_rng,jitterentropy_rng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9544ab8: ghash-generic,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958b60: drbg_nopr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea9589b8: drbg_nopr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958810: drbg_nopr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958668: drbg_pr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea9584c0: drbg_pr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958318: drbg_pr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95445b0: xxhash64-generic,xxhash64
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95443c0: lzo-rle-scomp,lzo-rle
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9544180: lzo-scomp,lzo
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543f40: crc32c-s390,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543d50: crc32c-generic,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543b60: poly1305-generic,poly1305
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543970: xchacha12-s390,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543790: xchacha20-s390,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95435b0: chacha20-s390,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95433d0: xchacha12-generic,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95431f0: xchacha20-generic,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543010: chacha20-generic,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9542e30: aes-generic,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95422a8: blake2b-512-generic,blake2b-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95420b8: blake2b-384-generic,blake2b-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541ec8: blake2b-256-generic,blake2b-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541cd8: blake2b-160-generic,blake2b-160
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541ae8: sha3-512-generic,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95418f8: sha3-384-generic,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541708: sha3-256-generic,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541518: sha3-224-generic,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541328: sha384-generic,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541138: sha512-generic,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540f48: sha224-generic,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540d58: sha256-generic,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540b68: sha1-generic,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540978: md5-generic,md5
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540788: ecb-cipher_null,ecb(cipher_null)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95405a8: digest_null-generic,digest_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95403b8: cipher_null-generic,cipher_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e953fde0: rsa-generic,rsa
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000406 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: < returning alg=0000000000000000
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: > name=phmac(sha224) type=0x0000000f mask=0x0000208e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b9400: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b9a60: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316bd000: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055316b8e60: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f690: hmac_s390_sha512,hmac(sha512)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f498: hmac_s390_sha384,hmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f2a0: hmac_s390_sha256,hmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576809f0a8: hmac_s390_sha224,hmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000005535682860: xts(ecb(aes-generic)),xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000005535681c48: cbc(ecb(aes-generic)),cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768173088: ghash-s390,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055404d9048: ecb(aes-generic),ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000005544ebcc60: ctr(aes-generic),ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153ba0: gcm-aes-s390,gcm(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000403 ^ type) & mask) = 0x0000000c -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157681539d8: ctr-aes-s390,ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157681537f8: xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153618: full-xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153438: cbc-aes-s390,cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153258: ecb-aes-s390,ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768153078: aes-s390,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000501 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145ce8: ctr-des3_ede-s390,ctr(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145b08: ctr-des-s390,ctr(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145928: cbc-des3_ede-s390,cbc(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145748: ecb-des3_ede-s390,ecb(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145568: des3_ede-s390,des3_ede
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157681453e0: cbc-des-s390,cbc(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145200: ecb-des-s390,ecb(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768145020: des-s390,des
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576812e258: sha3-384-s390,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576812e068: sha3-512-s390,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768122068: sha3-224-s390,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768122258: sha3-256-s390,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768114258: sha384-s390,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 0000015768114068: sha512-s390,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576810a068: sha224-s390,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 000001576810a258: sha256-s390,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157680fe068: sha1-s390,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000055155e4050: pkcs1(rsa-generic,sha256),pkcs1(rsa,sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000c07 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95447f8: jitterentropy_rng,jitterentropy_rng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9544ab8: ghash-generic,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958b60: drbg_nopr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea9589b8: drbg_nopr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958810: drbg_nopr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958668: drbg_pr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea9584c0: drbg_pr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157ea958318: drbg_pr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95445b0: xxhash64-generic,xxhash64
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95443c0: lzo-rle-scomp,lzo-rle
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9544180: lzo-scomp,lzo
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543f40: crc32c-s390,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543d50: crc32c-generic,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543b60: poly1305-generic,poly1305
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543970: xchacha12-s390,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543790: xchacha20-s390,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95435b0: chacha20-s390,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95433d0: xchacha12-generic,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95431f0: xchacha20-generic,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9543010: chacha20-generic,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9542e30: aes-generic,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95422a8: blake2b-512-generic,blake2b-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95420b8: blake2b-384-generic,blake2b-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541ec8: blake2b-256-generic,blake2b-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541cd8: blake2b-160-generic,blake2b-160
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541ae8: sha3-512-generic,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95418f8: sha3-384-generic,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541708: sha3-256-generic,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541518: sha3-224-generic,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541328: sha384-generic,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9541138: sha512-generic,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540f48: sha224-generic,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540d58: sha256-generic,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540b68: sha1-generic,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540978: md5-generic,md5
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e9540788: ecb-cipher_null,ecb(cipher_null)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95405a8: digest_null-generic,digest_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e95403b8: cipher_null-generic,cipher_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | check against 00000157e953fde0: rsa-generic,rsa
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: | ((cra_flags=0x00000406 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4958] __crypto_alg_lookup: < returning alg=0000000000000000
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: > name=phmac(sha256) type=0x0000040f mask=0x0000248e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b8800: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316bf460: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b9400: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b9a60: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316bd000: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b8e60: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f690: hmac_s390_sha512,hmac(sha512)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f498: hmac_s390_sha384,hmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f2a0: hmac_s390_sha256,hmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f0a8: hmac_s390_sha224,hmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000005535682860: xts(ecb(aes-generic)),xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000005535681c48: cbc(ecb(aes-generic)),cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768173088: ghash-s390,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055404d9048: ecb(aes-generic),ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000005544ebcc60: ctr(aes-generic),ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153ba0: gcm-aes-s390,gcm(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000403 ^ type) & mask) = 0x0000000c -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157681539d8: ctr-aes-s390,ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157681537f8: xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153618: full-xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153438: cbc-aes-s390,cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153258: ecb-aes-s390,ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4956] s390_phmac_init: phmac_s390: phmac(sha384) registered
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153078: aes-s390,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000501 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: > name=phmac_s390_sha384 type=0x0000028f mask=0x0000240e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316b8800: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145ce8: ctr-des3_ede-s390,ctr(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000400 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316bf460: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: < returning alg=00000055316bf460
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] crypto_ahash_init_tfm: xxx >
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145b08: ctr-des-s390,ctr(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145928: cbc-des3_ede-s390,cbc(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145748: ecb-des3_ede-s390,ecb(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145568: des3_ede-s390,des3_ede
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157681453e0: cbc-des-s390,cbc(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145200: ecb-des-s390,ecb(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145020: des-s390,des
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576812e258: sha3-384-s390,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576812e068: sha3-512-s390,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768122068: sha3-224-s390,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768122258: sha3-256-s390,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768114258: sha384-s390,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768114068: sha512-s390,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576810a068: sha224-s390,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576810a258: sha256-s390,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157680fe068: sha1-s390,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055155e4050: pkcs1(rsa-generic,sha256),pkcs1(rsa,sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c07 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95447f8: jitterentropy_rng,jitterentropy_rng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9544ab8: ghash-generic,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958b60: drbg_nopr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea9589b8: drbg_nopr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958810: drbg_nopr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958668: drbg_pr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea9584c0: drbg_pr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958318: drbg_pr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95445b0: xxhash64-generic,xxhash64
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95443c0: lzo-rle-scomp,lzo-rle
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9544180: lzo-scomp,lzo
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543f40: crc32c-s390,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543d50: crc32c-generic,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543b60: poly1305-generic,poly1305
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543970: xchacha12-s390,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543790: xchacha20-s390,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95435b0: chacha20-s390,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95433d0: xchacha12-generic,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95431f0: xchacha20-generic,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543010: chacha20-generic,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9542e30: aes-generic,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95422a8: blake2b-512-generic,blake2b-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95420b8: blake2b-384-generic,blake2b-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541ec8: blake2b-256-generic,blake2b-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541cd8: blake2b-160-generic,blake2b-160
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541ae8: sha3-512-generic,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95418f8: sha3-384-generic,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541708: sha3-256-generic,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541518: sha3-224-generic,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541328: sha384-generic,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541138: sha512-generic,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540f48: sha224-generic,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540d58: sha256-generic,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540b68: sha1-generic,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540978: md5-generic,md5
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540788: ecb-cipher_null,ecb(cipher_null)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95405a8: digest_null-generic,digest_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95403b8: cipher_null-generic,cipher_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e953fde0: rsa-generic,rsa
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000406 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: < returning alg=0000000000000000
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: > name=phmac(sha256) type=0x0000000f mask=0x0000208e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b8800: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316bf460: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b9400: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b9a60: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316bd000: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055316b8e60: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f690: hmac_s390_sha512,hmac(sha512)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f498: hmac_s390_sha384,hmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f2a0: hmac_s390_sha256,hmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576809f0a8: hmac_s390_sha224,hmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000005535682860: xts(ecb(aes-generic)),xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000005535681c48: cbc(ecb(aes-generic)),cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768173088: ghash-s390,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055404d9048: ecb(aes-generic),ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000005544ebcc60: ctr(aes-generic),ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153ba0: gcm-aes-s390,gcm(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000403 ^ type) & mask) = 0x0000000c -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157681539d8: ctr-aes-s390,ctr(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157681537f8: xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153618: full-xts-aes-s390,xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153438: cbc-aes-s390,cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153258: ecb-aes-s390,ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000505 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768153078: aes-s390,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000501 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145ce8: ctr-des3_ede-s390,ctr(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145b08: ctr-des-s390,ctr(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145928: cbc-des3_ede-s390,cbc(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145748: ecb-des3_ede-s390,ecb(des3_ede)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145568: des3_ede-s390,des3_ede
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157681453e0: cbc-des-s390,cbc(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145200: ecb-des-s390,ecb(des)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768145020: des-s390,des
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576812e258: sha3-384-s390,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576812e068: sha3-512-s390,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768122068: sha3-224-s390,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768122258: sha3-256-s390,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768114258: sha384-s390,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 0000015768114068: sha512-s390,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576810a068: sha224-s390,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 000001576810a258: sha256-s390,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157680fe068: sha1-s390,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000055155e4050: pkcs1(rsa-generic,sha256),pkcs1(rsa,sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000c07 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95447f8: jitterentropy_rng,jitterentropy_rng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9544ab8: ghash-generic,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958b60: drbg_nopr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea9589b8: drbg_nopr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958810: drbg_nopr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958668: drbg_pr_hmac_sha512,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea9584c0: drbg_pr_hmac_sha256,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157ea958318: drbg_pr_hmac_sha384,stdrng
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0000040c ^ type) & mask) = 0x00000002 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95445b0: xxhash64-generic,xxhash64
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95443c0: lzo-rle-scomp,lzo-rle
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9544180: lzo-scomp,lzo
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x0004040b ^ type) & mask) = 0x00000004 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543f40: crc32c-s390,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543d50: crc32c-generic,crc32c
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543b60: poly1305-generic,poly1305
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543970: xchacha12-s390,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543790: xchacha20-s390,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95435b0: chacha20-s390,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95433d0: xchacha12-generic,xchacha12
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95431f0: xchacha20-generic,xchacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9543010: chacha20-generic,chacha20
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9542e30: aes-generic,aes
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95422a8: blake2b-512-generic,blake2b-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95420b8: blake2b-384-generic,blake2b-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541ec8: blake2b-256-generic,blake2b-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541cd8: blake2b-160-generic,blake2b-160
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541ae8: sha3-512-generic,sha3-512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95418f8: sha3-384-generic,sha3-384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541708: sha3-256-generic,sha3-256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541518: sha3-224-generic,sha3-224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541328: sha384-generic,sha384
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9541138: sha512-generic,sha512
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540f48: sha224-generic,sha224
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540d58: sha256-generic,sha256
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540b68: sha1-generic,sha1
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540978: md5-generic,md5
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e9540788: ecb-cipher_null,ecb(cipher_null)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000405 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95405a8: digest_null-generic,digest_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e95403b8: cipher_null-generic,cipher_null
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000401 ^ type) & mask) = 0x0000000e -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | check against 00000157e953fde0: rsa-generic,rsa
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: | ((cra_flags=0x00000406 ^ type) & mask) = 0x00000008 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4959] __crypto_alg_lookup: < returning alg=0000000000000000
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: > name=phmac(sha384) type=0x0000040f mask=0x0000248e
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 000000553905a000: phmac_s390_sha512,phmac(sha512)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 000000553905e860: phmac_s390_sha512,phmac(sha512)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316b8800: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316bf460: phmac_s390_sha384,phmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316b9400: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316b9a60: phmac_s390_sha256,phmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316bd000: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000069f ^ type) & mask) = 0x00000080 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055316b8e60: phmac_s390_sha224,phmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x0000028f ^ type) & mask) = 0x00000480 -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 000001576809f690: hmac_s390_sha512,hmac(sha512)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 000001576809f498: hmac_s390_sha384,hmac(sha384)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 000001576809f2a0: hmac_s390_sha256,hmac(sha256)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 000001576809f0a8: hmac_s390_sha224,hmac(sha224)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 0000005535682860: xts(ecb(aes-generic)),xts(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x00000c05 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 0000005535681c48: cbc(ecb(aes-generic)),cbc(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 0000015768173088: ghash-s390,ghash
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | check against 00000055404d9048: ecb(aes-generic),ecb(aes)
Jun 03 15:37:57 b83lp71.lnxne.boe kernel: [4961] __crypto_alg_lookup: | ((cra_flags=0x00000c04 ^ type) & mask) = 0x0000000a -> continue

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH] crypto: ahash - Add support for drivers with no fallback
  2025-06-03 13:49   ` Regression: hash - Add HASH_REQUEST_ON_STACK causes asynch hashes to fail Harald Freudenberger
@ 2025-06-04  9:54     ` Herbert Xu
  2025-06-05 13:29       ` Harald Freudenberger
  0 siblings, 1 reply; 17+ messages in thread
From: Herbert Xu @ 2025-06-04  9:54 UTC (permalink / raw)
  To: Harald Freudenberger
  Cc: Linux Crypto Mailing List, Holger Dengler, Ingo Franzki

On Tue, Jun 03, 2025 at 03:49:16PM +0200, Harald Freudenberger wrote:
> Hello Herbert
> 
> I am facing a weird issue with my phmac implementation since kernel 5.15 has
> been released. The algorithm registers fine but obviously it is not
> self-tested
> and thus you can't access it via AF_ALG or with an in-kernel customer.

So the issue is that this algorithm cannot have a fallback, because
the key is held in hardware only.

Please try the following patch and set the bit CRYPTO_ALG_NO_FALLBACK
and see if it works.

Thanks,

---8<---
Some drivers cannot have a fallback, e.g., because the key is held
in hardwre.  Allow these to be used with ahash by adding the bit
CRYPTO_ALG_NO_FALLBACK.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/crypto/ahash.c b/crypto/ahash.c
index e10bc2659ae4..bd9e49950201 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -347,6 +347,9 @@ static int ahash_do_req_chain(struct ahash_request *req,
 	if (crypto_ahash_statesize(tfm) > HASH_MAX_STATESIZE)
 		return -ENOSYS;
 
+	if (!crypto_ahash_need_fallback(tfm))
+		return -ENOSYS;
+
 	{
 		u8 state[HASH_MAX_STATESIZE];
 
@@ -952,6 +955,10 @@ static int ahash_prepare_alg(struct ahash_alg *alg)
 	    base->cra_reqsize > MAX_SYNC_HASH_REQSIZE)
 		return -EINVAL;
 
+	if (base->cra_flags & CRYPTO_ALG_NEED_FALLBACK &&
+	    base->cra_flags & CRYPTO_ALG_NO_FALLBACK)
+		return -EINVAL;
+
 	err = hash_prepare_alg(&alg->halg);
 	if (err)
 		return err;
@@ -960,7 +967,8 @@ static int ahash_prepare_alg(struct ahash_alg *alg)
 	base->cra_flags |= CRYPTO_ALG_TYPE_AHASH;
 
 	if ((base->cra_flags ^ CRYPTO_ALG_REQ_VIRT) &
-	    (CRYPTO_ALG_ASYNC | CRYPTO_ALG_REQ_VIRT))
+	    (CRYPTO_ALG_ASYNC | CRYPTO_ALG_REQ_VIRT) &&
+	    !(base->cra_flags & CRYPTO_ALG_NO_FALLBACK))
 		base->cra_flags |= CRYPTO_ALG_NEED_FALLBACK;
 
 	if (!alg->setkey)
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index b50f1954d1bb..a2137e19be7d 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -136,6 +136,9 @@
 /* Set if the algorithm supports virtual addresses. */
 #define CRYPTO_ALG_REQ_VIRT		0x00040000
 
+/* Set if the algorithm cannot have a fallback (e.g., phmac). */
+#define CRYPTO_ALG_NO_FALLBACK		0x00080000
+
 /* The high bits 0xff000000 are reserved for type-specific flags. */
 
 /*
-- 
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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] crypto: ahash - Add support for drivers with no fallback
  2025-06-04  9:54     ` [PATCH] crypto: ahash - Add support for drivers with no fallback Herbert Xu
@ 2025-06-05 13:29       ` Harald Freudenberger
  2025-06-11  3:07         ` Herbert Xu
  0 siblings, 1 reply; 17+ messages in thread
From: Harald Freudenberger @ 2025-06-05 13:29 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Linux Crypto Mailing List, Holger Dengler, Ingo Franzki

On 2025-06-04 11:54, Herbert Xu wrote:
> On Tue, Jun 03, 2025 at 03:49:16PM +0200, Harald Freudenberger wrote:
>> Hello Herbert
>> 
>> I am facing a weird issue with my phmac implementation since kernel 
>> 5.15 has
>> been released. The algorithm registers fine but obviously it is not
>> self-tested
>> and thus you can't access it via AF_ALG or with an in-kernel customer.
> 
> So the issue is that this algorithm cannot have a fallback, because
> the key is held in hardware only.
> 
> Please try the following patch and set the bit CRYPTO_ALG_NO_FALLBACK
> and see if it works.
> 
> Thanks,
> 
> ---8<---
> Some drivers cannot have a fallback, e.g., because the key is held
> in hardwre.  Allow these to be used with ahash by adding the bit
> CRYPTO_ALG_NO_FALLBACK.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> diff --git a/crypto/ahash.c b/crypto/ahash.c
> index e10bc2659ae4..bd9e49950201 100644
> --- a/crypto/ahash.c
> +++ b/crypto/ahash.c
> @@ -347,6 +347,9 @@ static int ahash_do_req_chain(struct ahash_request 
> *req,
>  	if (crypto_ahash_statesize(tfm) > HASH_MAX_STATESIZE)
>  		return -ENOSYS;
> 
> +	if (!crypto_ahash_need_fallback(tfm))
> +		return -ENOSYS;
> +
>  	{
>  		u8 state[HASH_MAX_STATESIZE];
> 
> @@ -952,6 +955,10 @@ static int ahash_prepare_alg(struct ahash_alg 
> *alg)
>  	    base->cra_reqsize > MAX_SYNC_HASH_REQSIZE)
>  		return -EINVAL;
> 
> +	if (base->cra_flags & CRYPTO_ALG_NEED_FALLBACK &&
> +	    base->cra_flags & CRYPTO_ALG_NO_FALLBACK)
> +		return -EINVAL;
> +
>  	err = hash_prepare_alg(&alg->halg);
>  	if (err)
>  		return err;
> @@ -960,7 +967,8 @@ static int ahash_prepare_alg(struct ahash_alg *alg)
>  	base->cra_flags |= CRYPTO_ALG_TYPE_AHASH;
> 
>  	if ((base->cra_flags ^ CRYPTO_ALG_REQ_VIRT) &
> -	    (CRYPTO_ALG_ASYNC | CRYPTO_ALG_REQ_VIRT))
> +	    (CRYPTO_ALG_ASYNC | CRYPTO_ALG_REQ_VIRT) &&
> +	    !(base->cra_flags & CRYPTO_ALG_NO_FALLBACK))
>  		base->cra_flags |= CRYPTO_ALG_NEED_FALLBACK;
> 
>  	if (!alg->setkey)
> diff --git a/include/linux/crypto.h b/include/linux/crypto.h
> index b50f1954d1bb..a2137e19be7d 100644
> --- a/include/linux/crypto.h
> +++ b/include/linux/crypto.h
> @@ -136,6 +136,9 @@
>  /* Set if the algorithm supports virtual addresses. */
>  #define CRYPTO_ALG_REQ_VIRT		0x00040000
> 
> +/* Set if the algorithm cannot have a fallback (e.g., phmac). */
> +#define CRYPTO_ALG_NO_FALLBACK		0x00080000
> +
>  /* The high bits 0xff000000 are reserved for type-specific flags. */
> 
>  /*

Works perfect - tested on a fresh clone of cryptodev-2.6 with my
phmac v12 patches on top.
Add a Tested-by: Harald Freudenberger <freude@linux.ibm.com>
Please push into next, maybe fix the typo "hardwre" -> "hardware"
Thanks





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] crypto: ahash - Add support for drivers with no fallback
  2025-06-05 13:29       ` Harald Freudenberger
@ 2025-06-11  3:07         ` Herbert Xu
  0 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2025-06-11  3:07 UTC (permalink / raw)
  To: Harald Freudenberger
  Cc: Linux Crypto Mailing List, Holger Dengler, Ingo Franzki

On Thu, Jun 05, 2025 at 03:29:00PM +0200, Harald Freudenberger wrote:
>
> Works perfect - tested on a fresh clone of cryptodev-2.6 with my
> phmac v12 patches on top.
> Add a Tested-by: Harald Freudenberger <freude@linux.ibm.com>
> Please push into next, maybe fix the typo "hardwre" -> "hardware"

Thanks for testing.

I've pushed it into cryptodev.  Since it is the very first commit
for the next merge window you can just pull that into your tree
and work on top of that for phmac.

Cheers,
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-06-11  3:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-02  5:30 [v2 PATCH 0/9] crypto: sha256 - Use partial block API Herbert Xu
2025-05-02  5:30 ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash Herbert Xu
2025-06-03  4:56   ` [v2 PATCH 1/9] crypto: lib/sha256 - Add helpers for block-based shash (RT build failure) Guenter Roeck
2025-06-03  4:59     ` Herbert Xu
2025-06-03  5:44       ` Guenter Roeck
2025-06-03 13:49   ` Regression: hash - Add HASH_REQUEST_ON_STACK causes asynch hashes to fail Harald Freudenberger
2025-06-04  9:54     ` [PATCH] crypto: ahash - Add support for drivers with no fallback Herbert Xu
2025-06-05 13:29       ` Harald Freudenberger
2025-06-11  3:07         ` Herbert Xu
2025-05-02  5:30 ` [v2 PATCH 2/9] crypto: sha256 - Use the partial block API for generic Herbert Xu
2025-05-02  5:30 ` [v2 PATCH 3/9] crypto: arch/sha256 - Export block functions as GPL only Herbert Xu
2025-05-02  5:31 ` [v2 PATCH 4/9] crypto: arm/sha256 - Add simd block function Herbert Xu
2025-05-02  5:31 ` [v2 PATCH 5/9] crypto: arm64/sha256 " Herbert Xu
2025-05-02  5:31 ` [v2 PATCH 6/9] crypto: riscv/sha256 " Herbert Xu
2025-05-02  5:31 ` [v2 PATCH 7/9] crypto: x86/sha256 " Herbert Xu
2025-05-02  5:31 ` [v2 PATCH 8/9] crypto: lib/sha256 - Use generic block helper Herbert Xu
2025-05-02  5:31 ` [v2 PATCH 9/9] crypto: sha256 - Use the partial block API Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).