Commit f809c083 authored by Vutla, Lokesh's avatar Vutla, Lokesh Committed by popcornmix
Browse files

crypto: omap-aes - Fix support for unequal lengths



[ Upstream commit 6d7e7e02 ]

For cases where total length of an input SGs is not same as
length of the input data for encryption, omap-aes driver
crashes. This happens in the case when IPsec is trying to use
omap-aes driver.

To avoid this, we copy all the pages from the input SG list
into a contiguous buffer and prepare a single element SG list
for this buffer with length as the total bytes to crypt, which is
similar thing that is done in case of unaligned lengths.

Fixes: 6242332f ("crypto: omap-aes - Add support for cases of unaligned lengths")
Signed-off-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 6646fd01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment