From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>, linux-crypto@vger.kernel.org
Cc: Danny Tsen <dtsen@linux.ibm.com>, Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH 2/5] crypto: cryptd - Remove unused AEAD functions
Date: Thu, 3 Dec 2026 00:03:30 -0800 [thread overview]
Message-ID: <20261203080333.145409-3-ebiggers@kernel.org> (raw)
In-Reply-To: <20261203080333.145409-1-ebiggers@kernel.org>
Remove functions that were used only by the now-removed crypto_simd
module.
This eliminates the need for <crypto/cryptd.h>, so delete that too.
(Delete the includes of it from the marvell drivers, which weren't
necessary anyway.)
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
crypto/cryptd.c | 51 -------------------
.../crypto/marvell/octeontx/otx_cptvf_algs.c | 1 -
.../marvell/octeontx2/otx2_cptvf_algs.c | 1 -
include/crypto/cryptd.h | 39 --------------
4 files changed, 92 deletions(-)
delete mode 100644 include/crypto/cryptd.h
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index d8dbf07ab4269..9c6a7c14f0e43 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -15,7 +15,6 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/aead.h>
#include <crypto/internal/skcipher.h>
-#include <crypto/cryptd.h>
#include <linux/refcount.h>
#include <linux/err.h>
#include <linux/init.h>
@@ -937,56 +936,6 @@ static struct crypto_template cryptd_tmpl = {
.module = THIS_MODULE,
};
-struct cryptd_aead *cryptd_alloc_aead(const char *alg_name,
- u32 type, u32 mask)
-{
- char cryptd_alg_name[CRYPTO_MAX_ALG_NAME];
- struct cryptd_aead_ctx *ctx;
- struct crypto_aead *tfm;
-
- if (snprintf(cryptd_alg_name, CRYPTO_MAX_ALG_NAME,
- "cryptd(%s)", alg_name) >= CRYPTO_MAX_ALG_NAME)
- return ERR_PTR(-EINVAL);
- tfm = crypto_alloc_aead(cryptd_alg_name, type, mask);
- if (IS_ERR(tfm))
- return ERR_CAST(tfm);
- if (tfm->base.__crt_alg->cra_module != THIS_MODULE) {
- crypto_free_aead(tfm);
- return ERR_PTR(-EINVAL);
- }
-
- ctx = crypto_aead_ctx(tfm);
- refcount_set(&ctx->refcnt, 1);
-
- return __cryptd_aead_cast(tfm);
-}
-EXPORT_SYMBOL_GPL(cryptd_alloc_aead);
-
-struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm)
-{
- struct cryptd_aead_ctx *ctx;
- ctx = crypto_aead_ctx(&tfm->base);
- return ctx->child;
-}
-EXPORT_SYMBOL_GPL(cryptd_aead_child);
-
-bool cryptd_aead_queued(struct cryptd_aead *tfm)
-{
- struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base);
-
- return refcount_read(&ctx->refcnt) - 1;
-}
-EXPORT_SYMBOL_GPL(cryptd_aead_queued);
-
-void cryptd_free_aead(struct cryptd_aead *tfm)
-{
- struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base);
-
- if (refcount_dec_and_test(&ctx->refcnt))
- crypto_free_aead(&tfm->base);
-}
-EXPORT_SYMBOL_GPL(cryptd_free_aead);
-
static int __init cryptd_init(void)
{
int err;
diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c b/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
index 2f088afc536df..3a8e0b5b058d0 100644
--- a/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
+++ b/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
@@ -10,7 +10,6 @@
#include <crypto/aes.h>
#include <crypto/authenc.h>
-#include <crypto/cryptd.h>
#include <crypto/des.h>
#include <crypto/internal/aead.h>
#include <crypto/sha1.h>
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
index 8d74e0274fdf8..13aebe0dbe73c 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
@@ -3,7 +3,6 @@
#include <crypto/aes.h>
#include <crypto/authenc.h>
-#include <crypto/cryptd.h>
#include <crypto/des.h>
#include <crypto/internal/aead.h>
#include <crypto/sha1.h>
diff --git a/include/crypto/cryptd.h b/include/crypto/cryptd.h
deleted file mode 100644
index 29c5878a3609c..0000000000000
--- a/include/crypto/cryptd.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Software async crypto daemon
- *
- * Added AEAD support to cryptd.
- * Authors: Tadeusz Struk (tadeusz.struk@intel.com)
- * Adrian Hoban <adrian.hoban@intel.com>
- * Gabriele Paoloni <gabriele.paoloni@intel.com>
- * Aidan O'Mahony (aidan.o.mahony@intel.com)
- * Copyright (c) 2010, Intel Corporation.
- */
-
-#ifndef _CRYPTO_CRYPT_H
-#define _CRYPTO_CRYPT_H
-
-#include <linux/types.h>
-
-#include <crypto/aead.h>
-
-struct cryptd_aead {
- struct crypto_aead base;
-};
-
-static inline struct cryptd_aead *__cryptd_aead_cast(
- struct crypto_aead *tfm)
-{
- return (struct cryptd_aead *)tfm;
-}
-
-struct cryptd_aead *cryptd_alloc_aead(const char *alg_name,
- u32 type, u32 mask);
-
-struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm);
-/* Must be called without moving CPUs. */
-bool cryptd_aead_queued(struct cryptd_aead *tfm);
-
-void cryptd_free_aead(struct cryptd_aead *tfm);
-
-#endif
--
2.56.1
next prev parent reply other threads:[~2026-12-03 8:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 8:03 [PATCH 0/5] crypto: Remove crypto_simd and clean up cryptd Eric Biggers
2026-12-03 8:03 ` [PATCH 1/5] crypto: simd - Remove unused crypto_simd module Eric Biggers
2026-12-03 8:03 ` Eric Biggers [this message]
2026-12-03 8:03 ` [PATCH 3/5] crypto: cryptd - Remove pointless reference count Eric Biggers
2026-12-03 8:03 ` [PATCH 4/5] crypto: cryptd - Remove unused CRYPTO_ALG_INTERNAL support Eric Biggers
2026-12-03 8:03 ` [PATCH 5/5] crypto: cryptd - Remove pointless per-instance queue pointer Eric Biggers
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=20261203080333.145409-3-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=dtsen@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox