drivers/crypto/Kconfig | 38 +-
drivers/crypto/Makefile | 2 +-
drivers/crypto/talitos.c | 3640 -----------------------------
drivers/crypto/talitos/Kconfig | 36 +
drivers/crypto/talitos/Makefile | 3 +
drivers/crypto/talitos/talitos-aead.c | 657 ++++++
drivers/crypto/talitos/talitos-hash.c | 695 ++++++
drivers/crypto/talitos/talitos-rng.c | 93 +
drivers/crypto/talitos/talitos-skcipher.c | 356 +++
drivers/crypto/talitos/talitos.c | 1337 +++++++++++
drivers/crypto/{ => talitos}/talitos.h | 316 ++-
11 files changed, 3467 insertions(+), 3706 deletions(-)
The Freescale Integrated Security Engine (SEC) aka "Talitos" driver
implementation is a monolithic ~3800-line file that mixes SEC1 and SEC2
hardware variants with hash, skcipher, aead and hwrng algorithm.
This series reorganises the driver to improve readability and
maintainability:
- Split the driver into a dedicated directory with separate files for
hash, skcipher, aead, and hwrng implementations.
- Modernise the crypto API usage: adopt {init,exit}_tfm (deprecated
cra_init/cra_exit), use CRYPTO_AHASH_ALG_BLOCK_ONLY to eliminate
manual partial-block buffering, and use macros to deduplicate
algorithm definitions.
- Introduce a is_sec1() helper to get rid of is_sec1 variables /
parameters.
- Define descriptor/pointer structures for each hardware version,
instead of using a single structure and anonymous union.
No functional changes are intended except for patch 1.
This series depends on the "crypto: talitos - bug fixes" series :
https://patch.msgid.link/20260507-bootlin_test-7-1-rc1_sec_bugfix-v3-0-c98d7589b942@bootlin.com
Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
---
Changes in v3:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v2: https://patch.msgid.link/20260611-7-1-rc1_talitos_cleanup-v2-0-aa4a813ce69b@bootlin.com
Changes in v2:
- Fixed compilation warnings and errors.
- Instead of using ops to dispatch SEC1/SEC2 variants, keep the small
helpers, and introduce is_sec1() inline function that can use static
key branching in case both hardware version are compiled.
- Dropped the SEC1/SEC2 function variants inside the core driver file.
- Reworded the cover letter for clarity.
- Link to v1: https://patch.msgid.link/20260528-7-1-rc1_talitos_cleanup-v1-0-cb1ad6cdea49@bootlin.com
To: Herbert Xu <herbert@gondor.apana.org.au>
To: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Paul Louvel (19):
crypto: talitos/hash - Use CRYPTO_AHASH_BLOCK_ONLY API
crypto: talitos - Move driver into dedicated directory
crypto: talitos - Add missing includes to driver header file
crypto: talitos/hwrng - Move into separate file
crypto: talitos - Prepare crypto implementation file splitting
crypto: talitos/hash - Move into separate file
crypto: talitos/skcipher - Move into separate file
crypto: talitos/aead - Move into separate file
crypto: talitos/hash - Convert to {init,exit}_tfm type-specific API
crypto: talitos/skcipher - Convert to {init,exit}_tfm type-specific API
crypto: talitos/aead - Convert to {init,exit}_tfm type-specific API
crypto: talitos/hash - Use macro for algorithm definitions
crypto: talitos/skcipher - Use macro for algorithm definitions
crypto: talitos/aead - Use macro for algorithm definitions
crypto: talitos - Remove alg settings in talitos_register_common()
crypto: talitos - Introduce is_sec1() helper with static key support
crypto: talitos - Replace has_ftr_sec1() with is_sec1() static key helper
crypto: talitos - Introduce per-SEC-version descriptor and pointer structures
crypto: talitos - Remove TALITOS_DESC_SIZE macro
drivers/crypto/Kconfig | 38 +-
drivers/crypto/Makefile | 2 +-
drivers/crypto/talitos.c | 3640 -----------------------------
drivers/crypto/talitos/Kconfig | 36 +
drivers/crypto/talitos/Makefile | 3 +
drivers/crypto/talitos/talitos-aead.c | 657 ++++++
drivers/crypto/talitos/talitos-hash.c | 695 ++++++
drivers/crypto/talitos/talitos-rng.c | 93 +
drivers/crypto/talitos/talitos-skcipher.c | 356 +++
drivers/crypto/talitos/talitos.c | 1337 +++++++++++
drivers/crypto/{ => talitos}/talitos.h | 316 ++-
11 files changed, 3467 insertions(+), 3706 deletions(-)
---
base-commit: db8b9f227833e729faf44a512aa1e88a625b5ad8
change-id: 20260518-7-1-rc1_talitos_cleanup-9231a64e29fa
prerequisite-change-id: 20260504-bootlin_test-7-1-rc1_sec_bugfix-13169ed07ddc:v3
prerequisite-patch-id: 7b364911e4b8d1c1033eb14e67ed24dac6a4bc13
prerequisite-patch-id: 2c1cd7fdd003d9a116a697efa25d1716d548389f
prerequisite-patch-id: b12bdbf565747609e0cfe0609a42cf69b5d816a1
prerequisite-patch-id: 72cb2bc0fc2a48a5a029b049c199f4c86085cf04
prerequisite-patch-id: 5f1f5ad6add760161bd48875df48c0893aa12613
prerequisite-patch-id: 934931086968229434d15a2f2358aeb7e6975a1d
prerequisite-patch-id: 8a0b4828fc0690e0c841bc9adcc6568bb522e0e8
prerequisite-patch-id: 1d870f32e7dbf9a8bd3b8979558544107693e0f4
prerequisite-patch-id: 758c18d7c9fabb14bd90df62e5e8a62a6f880db4
prerequisite-patch-id: ce6e9e585f8edc1861ae6bb8fbdd836c20cbd290
prerequisite-patch-id: 9446dc03e442ea81c5f5b39e802e01b37da29971
Best regards,
--
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Hi,
Sorry, I forgot to write and close by cover letter before sending it --'
On 7/21/26 3:40 PM, Paul Louvel wrote:
> The Freescale Integrated Security Engine (SEC) aka "Talitos" driver
> implementation is a monolithic ~3800-line file that mixes SEC1 and SEC2
> hardware variants with hash, skcipher, aead and hwrng algorithm.
>
> This series reorganises the driver to improve readability and
> maintainability:
>
> - Split the driver into a dedicated directory with separate files for
> hash, skcipher, aead, and hwrng implementations.
>
> - Modernise the crypto API usage: adopt {init,exit}_tfm (deprecated
> cra_init/cra_exit), use CRYPTO_AHASH_ALG_BLOCK_ONLY to eliminate
> manual partial-block buffering, and use macros to deduplicate
> algorithm definitions.
>
> - Introduce a is_sec1() helper to get rid of is_sec1 variables /
> parameters.
>
> - Define descriptor/pointer structures for each hardware version,
> instead of using a single structure and anonymous union.
>
> No functional changes are intended except for patch 1.
>
> This series depends on the "crypto: talitos - bug fixes" series :
> https://patch.msgid.link/20260507-bootlin_test-7-1-rc1_sec_bugfix-v3-0-c98d7589b942@bootlin.com
>
> Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
> ---
> Changes in v3:
> - EDITME: describe what is new in this series revision.
> - EDITME: use bulletpoints and terse descriptions.
> - Link to v2: https://patch.msgid.link/20260611-7-1-rc1_talitos_cleanup-v2-0-aa4a813ce69b@bootlin.com
>
> Changes in v2:
> - Fixed compilation warnings and errors.
> - Instead of using ops to dispatch SEC1/SEC2 variants, keep the small
> helpers, and introduce is_sec1() inline function that can use static
> key branching in case both hardware version are compiled.
> - Dropped the SEC1/SEC2 function variants inside the core driver file.
> - Reworded the cover letter for clarity.
> - Link to v1: https://patch.msgid.link/20260528-7-1-rc1_talitos_cleanup-v1-0-cb1ad6cdea49@bootlin.com
>
> To: Herbert Xu <herbert@gondor.apana.org.au>
> To: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
>
> ---
> Paul Louvel (19):
> crypto: talitos/hash - Use CRYPTO_AHASH_BLOCK_ONLY API
> crypto: talitos - Move driver into dedicated directory
> crypto: talitos - Add missing includes to driver header file
> crypto: talitos/hwrng - Move into separate file
> crypto: talitos - Prepare crypto implementation file splitting
> crypto: talitos/hash - Move into separate file
> crypto: talitos/skcipher - Move into separate file
> crypto: talitos/aead - Move into separate file
> crypto: talitos/hash - Convert to {init,exit}_tfm type-specific API
> crypto: talitos/skcipher - Convert to {init,exit}_tfm type-specific API
> crypto: talitos/aead - Convert to {init,exit}_tfm type-specific API
> crypto: talitos/hash - Use macro for algorithm definitions
> crypto: talitos/skcipher - Use macro for algorithm definitions
> crypto: talitos/aead - Use macro for algorithm definitions
> crypto: talitos - Remove alg settings in talitos_register_common()
> crypto: talitos - Introduce is_sec1() helper with static key support
> crypto: talitos - Replace has_ftr_sec1() with is_sec1() static key helper
> crypto: talitos - Introduce per-SEC-version descriptor and pointer structures
> crypto: talitos - Remove TALITOS_DESC_SIZE macro
>
> drivers/crypto/Kconfig | 38 +-
> drivers/crypto/Makefile | 2 +-
> drivers/crypto/talitos.c | 3640 -----------------------------
> drivers/crypto/talitos/Kconfig | 36 +
> drivers/crypto/talitos/Makefile | 3 +
> drivers/crypto/talitos/talitos-aead.c | 657 ++++++
> drivers/crypto/talitos/talitos-hash.c | 695 ++++++
> drivers/crypto/talitos/talitos-rng.c | 93 +
> drivers/crypto/talitos/talitos-skcipher.c | 356 +++
> drivers/crypto/talitos/talitos.c | 1337 +++++++++++
> drivers/crypto/{ => talitos}/talitos.h | 316 ++-
> 11 files changed, 3467 insertions(+), 3706 deletions(-)
> ---
> base-commit: db8b9f227833e729faf44a512aa1e88a625b5ad8
> change-id: 20260518-7-1-rc1_talitos_cleanup-9231a64e29fa
> prerequisite-change-id: 20260504-bootlin_test-7-1-rc1_sec_bugfix-13169ed07ddc:v3
> prerequisite-patch-id: 7b364911e4b8d1c1033eb14e67ed24dac6a4bc13
> prerequisite-patch-id: 2c1cd7fdd003d9a116a697efa25d1716d548389f
> prerequisite-patch-id: b12bdbf565747609e0cfe0609a42cf69b5d816a1
> prerequisite-patch-id: 72cb2bc0fc2a48a5a029b049c199f4c86085cf04
> prerequisite-patch-id: 5f1f5ad6add760161bd48875df48c0893aa12613
> prerequisite-patch-id: 934931086968229434d15a2f2358aeb7e6975a1d
> prerequisite-patch-id: 8a0b4828fc0690e0c841bc9adcc6568bb522e0e8
> prerequisite-patch-id: 1d870f32e7dbf9a8bd3b8979558544107693e0f4
> prerequisite-patch-id: 758c18d7c9fabb14bd90df62e5e8a62a6f880db4
> prerequisite-patch-id: ce6e9e585f8edc1861ae6bb8fbdd836c20cbd290
> prerequisite-patch-id: 9446dc03e442ea81c5f5b39e802e01b37da29971
>
> Best regards,
> --
> Paul Louvel, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
--
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
© 2016 - 2026 Red Hat, Inc.