lkml.org 
[lkml]   [2019]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: crypto: aes - rename local routines to prevent future clashes
Hi Ard,

On Wed, Sep 18, 2019 at 9:59 PM Linux Kernel Mailing List
<linux-kernel@vger.kernel.org> wrote:
> Commit: 724ecd3c0eb7040d423b22332a60d097e2666820
> Parent: 20bb4ef038a97b8bb5c07d2a1125019a93f618b3
> Refname: refs/heads/master
> Web: https://git.kernel.org/torvalds/c/724ecd3c0eb7040d423b22332a60d097e2666820
> Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> AuthorDate: Tue Jul 2 21:41:20 2019 +0200
> Committer: Herbert Xu <herbert@gondor.apana.org.au>
> CommitDate: Fri Jul 26 14:52:03 2019 +1000
>
> crypto: aes - rename local routines to prevent future clashes
>
> Rename some local AES encrypt/decrypt routines so they don't clash with
> the names we are about to introduce for the routines exposed by the
> generic AES library.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

> --- a/crypto/aes_generic.c
> +++ b/crypto/aes_generic.c
> @@ -1332,7 +1332,7 @@ EXPORT_SYMBOL_GPL(crypto_aes_set_key);
> f_rl(bo, bi, 3, k); \
> } while (0)
>
> -static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
> +static void crypto_aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
> {
> const struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);

Looking ay the bloat-o-meter output:

crypto_aes_encrypt - 3158 +3158
crypto_aes_decrypt - 3154 +3154
aes_decrypt 3154 1276 -1878
aes_encrypt 3158 1270 -1888

Can't this just call aes_encrypt() now?
CONFIG_CRYPTO_AES already selects CRYPTO_LIB_AES?
Or does the latter has less features (it's smaller, too)?

> u32 b0[4], b1[4];
> @@ -1402,7 +1402,7 @@ static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
> i_rl(bo, bi, 3, k); \
> } while (0)
>
> -static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
> +static void crypto_aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
> {
> const struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);

aes_decrypt()?

> u32 b0[4], b1[4];

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2019-09-19 11:44    [W:0.094 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site