Thread (28 messages) flat view 28 messages, 2 authors, 2016-09-15

[PATCHv3 06/11] crypto: omap-des: Fix support for unequal lengths

From: herbert@gondor.apana.org.au (Herbert Xu)
Date: 2016-09-13 09:37:06
Also in: linux-crypto, linux-omap

On Thu, Aug 04, 2016 at 01:28:41PM +0300, Tero Kristo wrote:
From: Lokesh Vutla <redacted>

For cases where total length of an input SGs is not same as
length of the input data for encryption, omap-des driver
crashes. This happens in the case when IPsec is trying to use
omap-des 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.
Ugh, that means copying every single packet, right?

So if it's just the SG list that's the problem, why don't you
copy that instead? That is, allocate a new SG list and set it
up so that there is no excess data.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help