crypto: aesni - refactor scatterlist processing
authorArd Biesheuvel <ardb@kernel.org>
Mon, 4 Jan 2021 15:55:49 +0000 (16:55 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 14 Jan 2021 06:10:25 +0000 (17:10 +1100)
commit83c83e658863e4e57f4defe6cc1bc05f3d968e2a
treee6dfa43f6b0dd4d4e434f14bcce02fd3d9a2cbf9
parent2694e23ffd210cbbc05cd45bec77dc1c11bb72a2
crypto: aesni - refactor scatterlist processing

Currently, the gcm(aes-ni) driver open codes the scatterlist handling
that is encapsulated by the skcipher walk API. So let's switch to that
instead.

Also, move the handling at the end of gcmaes_crypt_by_sg() that is
dependent on whether we are encrypting or decrypting into the callers,
which always do one or the other.

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