]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: cast6 - use unaligned accessors instead of alignmask
authorArd Biesheuvel <ardb@kernel.org>
Mon, 1 Feb 2021 18:02:35 +0000 (19:02 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 10 Feb 2021 06:55:56 +0000 (17:55 +1100)
commitd09a8655ff101af1f9053f71bd63dcc3e9344970
tree95c08fd096951b499f2c7ab1ccc3a15ac9aa002d
parent80c834088ddf70996f5ee0ff0bceca1a9a5f2fef
crypto: cast6 - use unaligned accessors instead of alignmask

Instead of using an alignmask of 0x3 to ensure 32-bit alignment of the
CAST6 input and output blocks, which propagates to mode drivers, and
results in pointless copying on architectures that don't care about
alignment, use the unaligned accessors, which will do the right thing on
each respective architecture, avoiding the need for double buffering.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/cast6_generic.c