crypto: atmel-tdes - Detecting in-place operations with two sg lists
authorRyan Wanner <Ryan.Wanner@microchip.com>
Tue, 28 Mar 2023 19:56:27 +0000 (12:56 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Apr 2023 08:41:28 +0000 (16:41 +0800)
commitc13357fd4a8a56b345db25b875239a740deea18c
tree45ec7a0d24389098882ecfef8e6aef510cc65fcf
parent232c1e8e19ff8e60237012fadead02557aafca5a
crypto: atmel-tdes - Detecting in-place operations with two sg lists

Avoiding detecting finely in-place operations with different
scatter lists. Copying the source data for decryption into rctx->lastc
regardless if the operation is in-place or not. This allows in-place
operations with different scatter lists without affecting other
operations.

This approach takes less resources than parsing both scatter lists to
check if they are equal.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-tdes.c