crypto: skcipher - Use scatterwalk (un)map interface for dst and src buffers
authorArd Biesheuvel <ardb@kernel.org>
Mon, 2 Jan 2023 10:18:46 +0000 (11:18 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Jan 2023 04:11:18 +0000 (12:11 +0800)
commitd07bd950b91efb4d6a960347c603f8424a1125d1
tree4c76a8ffe571b136e2519e5f64b1b6a3a24e42d9
parent0781bbd7eaca70611bc2314001f82e1903aeff48
crypto: skcipher - Use scatterwalk (un)map interface for dst and src buffers

The skcipher walk API implementation avoids scatterwalk_map() for
mapping the source and destination buffers, and invokes kmap_atomic()
directly if the buffer in question is not in low memory (which can only
happen on 32-bit architectures). This avoids some overhead on 64-bit
architectures, and most notably, permits the skcipher code to run with
preemption enabled.

Now that scatterwalk_map() has been updated to use kmap_local(), none of
this is needed, so we can simply use scatterwalk_map/unmap instead.

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