crypto: skcipher - remove unnecessary page alignment of bounce buffer
authorEric Biggers <ebiggers@google.com>
Sun, 5 Jan 2025 19:34:10 +0000 (11:34 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Jan 2025 03:38:32 +0000 (11:38 +0800)
commit807c8018f5c90b10e172caf3858999cf3754fe7f
treee640f990b2a392f1b585839fd1972c42e1a235fc
parente71778c95a804ba641e1407b3a5e49bcae791f3a
crypto: skcipher - remove unnecessary page alignment of bounce buffer

In the slow path of skcipher_walk where it uses a slab bounce buffer for
the data and/or IV, do not bother to avoid crossing a page boundary in
the part(s) of this buffer that are used, and do not bother to allocate
extra space in the buffer for that purpose.  The buffer is accessed only
by virtual address, so pages are irrelevant for it.

This logic may have been present due to the physical address support in
skcipher_walk, but that has now been removed.  Or it may have been
present to be consistent with the fast path that currently does not hand
back addresses that span pages, but that behavior is a side effect of
the pages being "mapped" one by one and is not actually a requirement.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/skcipher.c