]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: aead - un-inline encrypt and decrypt functions
authorEric Biggers <ebiggers@google.com>
Mon, 3 Jun 2019 05:45:16 +0000 (22:45 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Jun 2019 06:31:40 +0000 (14:31 +0800)
commita85aaf9831abc7e242a32403a1e1cc22c3f996b2
tree6d6e6fe0d9e32d62712bc1d1e7725bfbaa50d7c4
parentf0f3d7a9d2f3ecdbcf48bccdfb182e5fe52d56be
crypto: aead - un-inline encrypt and decrypt functions

crypto_aead_encrypt() and crypto_aead_decrypt() have grown to be more
than a single indirect function call.  They now also check whether a key
has been set, the decryption side checks whether the input is at least
as long as the authentication tag length, and with CONFIG_CRYPTO_STATS=y
they also update the crypto statistics.  That can add up to a lot of
bloat at every call site.  Moreover, these always involve a function
call anyway, which greatly limits the benefits of inlining.

So change them to be non-inline.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/aead.c
include/crypto/aead.h