From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Subject: [PATCH 0/6] crypto: remove old way of allocating and freeing instances
Date: Sun, 29 Dec 2019 15:48:24 -0600 [thread overview]
Message-ID: <20191229214830.260965-1-ebiggers@kernel.org> (raw)
This series makes all crypto templates use the new way of freeing
instances where a ->free() method is installed to the instance struct
itself. This replaces the weakly-typed method crypto_template::free().
skcipher and akcipher were already using the new way, while aead was
mostly but not always using the new way. shash and ahash were using the
old way. This series eliminates this inconsistency (and the redundant
code associated with it) by making everyone use the new way.
The last patch adds registration-time checks which verify that all
instances really have a ->free() method.
This series is an internal cleanup only; there are no changes for users
of the crypto API.
This series is based on top of my other series
"[PATCH 00/28] crypto: template instantiation cleanup".
Eric Biggers (6):
crypto: hash - add support for new way of freeing instances
crypto: geniv - convert to new way of freeing instances
crypto: cryptd - convert to new way of freeing instances
crypto: shash - convert shash_free_instance() to new style
crypto: algapi - remove crypto_template::{alloc,free}()
crypto: algapi - enforce that all instances have a ->free() method
crypto/aead.c | 8 +++----
crypto/ahash.c | 11 +++++++++
crypto/akcipher.c | 2 ++
crypto/algapi.c | 5 ----
crypto/algboss.c | 12 +---------
crypto/ccm.c | 5 ++--
crypto/cmac.c | 5 ++--
crypto/cryptd.c | 42 ++++++++++++++++-----------------
crypto/echainiv.c | 20 ++++------------
crypto/geniv.c | 15 ++++++------
crypto/hmac.c | 5 ++--
crypto/seqiv.c | 20 ++++------------
crypto/shash.c | 19 +++++++++++----
crypto/skcipher.c | 3 +++
crypto/vmac.c | 5 ++--
crypto/xcbc.c | 5 ++--
include/crypto/algapi.h | 2 --
include/crypto/internal/geniv.h | 1 -
include/crypto/internal/hash.h | 4 +++-
19 files changed, 89 insertions(+), 100 deletions(-)
--
2.24.1
next reply other threads:[~2019-12-29 21:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-29 21:48 Eric Biggers [this message]
2019-12-29 21:48 ` [PATCH 1/6] crypto: hash - add support for new way of freeing instances Eric Biggers
2019-12-29 21:48 ` [PATCH 2/6] crypto: geniv - convert to " Eric Biggers
2019-12-29 21:48 ` [PATCH 3/6] crypto: cryptd " Eric Biggers
2019-12-29 21:48 ` [PATCH 4/6] crypto: shash - convert shash_free_instance() to new style Eric Biggers
2019-12-29 21:48 ` [PATCH 5/6] crypto: algapi - remove crypto_template::{alloc,free}() Eric Biggers
2019-12-29 21:48 ` [PATCH 6/6] crypto: algapi - enforce that all instances have a ->free() method 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=20191229214830.260965-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.