]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: aes-generic - drop alignment requirement
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 2 Feb 2017 15:58:57 +0000 (15:58 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 11 Feb 2017 09:50:43 +0000 (17:50 +0800)
commitbe56b729fccdc29d4ca01854d026dcd150b6256c
tree9a30cfcd8e0cf51b1605f68cc33243f8769cd3c1
parentb3c523e1b6f852fb002f3bf34411ca316d3d4849
crypto: aes-generic - drop alignment requirement

The generic AES code exposes a 32-bit align mask, which forces all
users of the code to use temporary buffers or take other measures to
ensure the alignment requirement is adhered to, even on architectures
that don't care about alignment for software algorithms such as this
one.

So drop the align mask, and fix the code to use get_unaligned_le32()
where appropriate, which will resolve to whatever is optimal for the
architecture.

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