crypto: atmel-aes - Detecting in-place operations two sg lists
authorRyan Wanner <Ryan.Wanner@microchip.com>
Tue, 28 Mar 2023 19:56:28 +0000 (12:56 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Apr 2023 08:41:28 +0000 (16:41 +0800)
commit2fbe4829f758e0b588470fb53f6cd087fe92b8d3
tree78dc599e2c5e1ea90461dbfbc12d42d964226bf7
parentc13357fd4a8a56b345db25b875239a740deea18c
crypto: atmel-aes - Detecting in-place operations 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.

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-aes.c