]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crypto: ccm - drop unnecessary minimum 32-bit alignment
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 11 Feb 2017 19:25:22 +0000 (19:25 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 15 Feb 2017 05:23:46 +0000 (13:23 +0800)
The CCM driver forces 32-bit alignment even if the underlying ciphers
don't care about alignment. This is because crypto_xor() used to require
this, but since this is no longer the case, drop the hardcoded minimum
of 32 bits.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ccm.c

index 24c26ab052cacbf2c8b698769999a04a3778ed83..442848807a52b17c3296f776890ecea469592364 100644 (file)
@@ -525,8 +525,7 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl,
                                       ctr->base.cra_priority) / 2;
        inst->alg.base.cra_blocksize = 1;
        inst->alg.base.cra_alignmask = mac->base.cra_alignmask |
-                                      ctr->base.cra_alignmask |
-                                      (__alignof__(u32) - 1);
+                                      ctr->base.cra_alignmask;
        inst->alg.ivsize = 16;
        inst->alg.chunksize = crypto_skcipher_alg_chunksize(ctr);
        inst->alg.maxauthsize = 16;