linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] crypto: remove old way of allocating and freeing instances
@ 2019-12-29 21:48 Eric Biggers
  2019-12-29 21:48 ` [PATCH 1/6] crypto: hash - add support for new way of " Eric Biggers
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Eric Biggers @ 2019-12-29 21:48 UTC (permalink / raw)
  To: linux-crypto

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


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

end of thread, other threads:[~2019-12-29 21:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-29 21:48 [PATCH 0/6] crypto: remove old way of allocating and freeing instances Eric Biggers
2019-12-29 21:48 ` [PATCH 1/6] crypto: hash - add support for new way of " 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

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).