+147
−69
Loading
Since commit c662b043 ("crypto: af_alg/hash: Support MSG_SPLICE_PAGES"), the crypto core may pass large scatterlists spanning multiple pages to drivers supporting ahash operations. As a result, a driver can now receive large ahash requests. The SEC1 engine has a limitation where a single descriptor cannot process more than 32k of data. The current implementation attempts to handle the entire request within a single descriptor, which leads to failures raised by the driver: "length exceeds h/w max limit" Address this limitation by splitting large ahash requests into multiple descriptors, each respecting the 32k hardware limit. This allows processing arbitrarily large requests. Cc: stable@vger.kernel.org Fixes: c662b043 ("crypto: af_alg/hash: Support MSG_SPLICE_PAGES") Signed-off-by:Paul Louvel <paul.louvel@bootlin.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>