On Fri, Feb 28, 2025 at 01:11:38PM +0100, Ard Biesheuvel wrote: > From: Ard Biesheuvel <ardb@xxxxxxxxxx> > > The ChaCha20-Poly1305 library code uses the sg_miter API to process > input presented via scatterlists, except for the special case where the > digest buffer is not covered entirely by the same scatterlist entry as > the last byte of input. In that case, it uses scatterwalk_map_and_copy() > to access the memory in the input scatterlist where the digest is stored. > > This results in a dependency on crypto/scatterwalk.c and therefore on > CONFIG_CRYPTO_ALGAPI, which is unnecessary, as the sg_miter API already > provides this functionality via sg_copy_to_buffer(). So use that > instead, and drop the dependencies on CONFIG_CRYPTO_ALGAPI and > CONFIG_CRYPTO. > > Reported-by: Arnd Bergmann <arnd@xxxxxxxx> > Acked-by: Eric Biggers <ebiggers@xxxxxxxxxx> > Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx> > --- > v2: - replace include of crypto/algapi.h with crypto/utils.h > - drop dependency on CONFIG_CRYPTO > > lib/crypto/Kconfig | 2 -- > lib/crypto/chacha20poly1305.c | 7 +++---- > 2 files changed, 3 insertions(+), 6 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt