From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev,
linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
sparclinux@vger.kernel.org, x86@kernel.org,
"Jason A . Donenfeld " <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH 07/15] crypto: powerpc - remove CRYPTO dependency of library functions
Date: Thu, 17 Apr 2025 11:26:15 -0700 [thread overview]
Message-ID: <20250417182623.67808-8-ebiggers@kernel.org> (raw)
In-Reply-To: <20250417182623.67808-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
Continue disentangling the crypto library functions from the generic
crypto infrastructure by removing the unnecessary CRYPTO dependency of
CRYPTO_CHACHA20_P10 and CRYPTO_POLY1305_P10. To do this, make
arch/powerpc/crypto/Kconfig be sourced regardless of CRYPTO, and
explicitly list the CRYPTO dependency in the symbols that do need it.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
arch/powerpc/Kconfig | 2 ++
arch/powerpc/crypto/Kconfig | 16 +++++++++-------
crypto/Kconfig | 3 ---
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 6722625a406a..9ffd80880675 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1346,8 +1346,10 @@ config PHYSICAL_START
endif
config PPC_LIB_RHEAP
bool
+source "arch/powerpc/crypto/Kconfig"
+
source "arch/powerpc/kvm/Kconfig"
source "kernel/livepatch/Kconfig"
diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig
index 8bcc69013464..0f14bdf104d5 100644
--- a/arch/powerpc/crypto/Kconfig
+++ b/arch/powerpc/crypto/Kconfig
@@ -2,11 +2,11 @@
menu "Accelerated Cryptographic Algorithms for CPU (powerpc)"
config CRYPTO_CURVE25519_PPC64
tristate
- depends on PPC64 && CPU_LITTLE_ENDIAN
+ depends on CRYPTO && PPC64 && CPU_LITTLE_ENDIAN
select CRYPTO_KPP
select CRYPTO_LIB_CURVE25519_GENERIC
select CRYPTO_ARCH_HAVE_LIB_CURVE25519
default CRYPTO_LIB_CURVE25519_INTERNAL
help
@@ -15,46 +15,48 @@ config CRYPTO_CURVE25519_PPC64
Architecture: PowerPC64
- Little-endian
config CRYPTO_MD5_PPC
tristate "Digests: MD5"
+ depends on CRYPTO
select CRYPTO_HASH
help
MD5 message digest algorithm (RFC1321)
Architecture: powerpc
config CRYPTO_SHA1_PPC
tristate "Hash functions: SHA-1"
+ depends on CRYPTO
help
SHA-1 secure hash algorithm (FIPS 180)
Architecture: powerpc
config CRYPTO_SHA1_PPC_SPE
tristate "Hash functions: SHA-1 (SPE)"
- depends on SPE
+ depends on CRYPTO && SPE
help
SHA-1 secure hash algorithm (FIPS 180)
Architecture: powerpc using
- SPE (Signal Processing Engine) extensions
config CRYPTO_SHA256_PPC_SPE
tristate "Hash functions: SHA-224 and SHA-256 (SPE)"
- depends on SPE
+ depends on CRYPTO && SPE
select CRYPTO_SHA256
select CRYPTO_HASH
help
SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
Architecture: powerpc using
- SPE (Signal Processing Engine) extensions
config CRYPTO_AES_PPC_SPE
tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (SPE)"
- depends on SPE
+ depends on CRYPTO && SPE
select CRYPTO_SKCIPHER
help
Block ciphers: AES cipher algorithms (FIPS-197)
Length-preserving ciphers: AES with ECB, CBC, CTR, and XTS modes
@@ -72,11 +74,11 @@ config CRYPTO_AES_PPC_SPE
architecture specific assembler implementations that work on 1KB
tables or 256 bytes S-boxes.
config CRYPTO_AES_GCM_P10
tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
- depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
+ depends on CRYPTO && PPC64 && CPU_LITTLE_ENDIAN && VSX
select CRYPTO_LIB_AES
select CRYPTO_ALGAPI
select CRYPTO_AEAD
select CRYPTO_SKCIPHER
select CRYPTO_SIMD
@@ -104,17 +106,17 @@ config CRYPTO_POLY1305_P10
select CRYPTO_LIB_POLY1305_GENERIC
default CRYPTO_LIB_POLY1305_INTERNAL
config CRYPTO_DEV_VMX
bool "Support for VMX cryptographic acceleration instructions"
- depends on PPC64 && VSX
+ depends on CRYPTO && PPC64 && VSX
help
Support for VMX cryptographic acceleration instructions.
config CRYPTO_DEV_VMX_ENCRYPT
tristate "Encryption acceleration support on P8 CPU"
- depends on CRYPTO_DEV_VMX
+ depends on CRYPTO && CRYPTO_DEV_VMX
select CRYPTO_AES
select CRYPTO_CBC
select CRYPTO_CTR
select CRYPTO_GHASH
select CRYPTO_XTS
diff --git a/crypto/Kconfig b/crypto/Kconfig
index cfa426bea0c6..2467dba73372 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1424,13 +1424,10 @@ endmenu
config CRYPTO_HASH_INFO
bool
if !KMSAN # avoid false positives from assembly
-if PPC
-source "arch/powerpc/crypto/Kconfig"
-endif
if RISCV
source "arch/riscv/crypto/Kconfig"
endif
if S390
source "arch/s390/crypto/Kconfig"
--
2.49.0
next prev parent reply other threads:[~2025-04-17 18:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 18:26 [PATCH 00/15] Finish disentangling ChaCha, Poly1305, and BLAKE2s from CRYPTO Eric Biggers
2025-04-17 18:26 ` [PATCH 01/15] crypto: arm - remove CRYPTO dependency of library functions Eric Biggers
2025-04-18 3:08 ` Herbert Xu
2025-04-18 3:28 ` Eric Biggers
2025-04-18 3:39 ` Herbert Xu
2025-04-18 3:12 ` Herbert Xu
2025-04-18 3:32 ` Eric Biggers
2025-04-18 3:38 ` Herbert Xu
2025-04-18 4:09 ` Eric Biggers
2025-04-18 8:25 ` Herbert Xu
2025-04-18 15:01 ` Eric Biggers
2025-04-19 2:40 ` Herbert Xu
2025-04-17 18:26 ` [PATCH 02/15] crypto: arm64 - drop redundant dependencies on ARM64 Eric Biggers
2025-04-17 18:26 ` [PATCH 03/15] crypto: arm64 - remove CRYPTO dependency of library functions Eric Biggers
2025-04-17 18:26 ` [PATCH 04/15] crypto: loongarch - source arch/loongarch/crypto/Kconfig without CRYPTO Eric Biggers
2025-04-17 18:26 ` [PATCH 05/15] crypto: mips - remove CRYPTO dependency of library functions Eric Biggers
2025-04-17 18:26 ` [PATCH 06/15] crypto: powerpc - drop redundant dependencies on PPC Eric Biggers
2025-04-17 18:26 ` Eric Biggers [this message]
2025-04-17 18:26 ` [PATCH 08/15] crypto: riscv - remove CRYPTO dependency of library functions Eric Biggers
2025-04-18 17:50 ` Palmer Dabbelt
2025-04-17 18:26 ` [PATCH 09/15] crypto: s390 - drop redundant dependencies on S390 Eric Biggers
2025-04-17 18:26 ` [PATCH 10/15] crypto: s390 - remove CRYPTO dependency of library functions Eric Biggers
2025-04-17 18:26 ` [PATCH 11/15] crypto: sparc - source arch/sparc/crypto/Kconfig without CRYPTO Eric Biggers
2025-04-17 18:26 ` [PATCH 12/15] crypto: x86 - drop redundant dependencies on X86 Eric Biggers
2025-04-17 18:26 ` [PATCH 13/15] crypto: x86 - remove CRYPTO dependency of library functions Eric Biggers
2025-04-17 18:26 ` [PATCH 14/15] crypto: lib/chacha - remove INTERNAL symbol and selection of CRYPTO Eric Biggers
2025-04-17 18:26 ` [PATCH 15/15] crypto: lib/poly1305 " Eric Biggers
2025-04-18 14:19 ` [PATCH 00/15] Finish disentangling ChaCha, Poly1305, and BLAKE2s from CRYPTO Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250417182623.67808-8-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=sparclinux@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).