[PATCHv2 06/27] crypto: ahash: increase the maximum allowed statesize

Herbert Xu herbert at gondor.apana.org.au
Mon Jul 4 02:42:14 PDT 2016


On Mon, Jul 04, 2016 at 12:27:00PM +0300, Tero Kristo wrote:
>
> The driver allocates a largish buffer for copying the input data
> from the sgs into a sequential space. If I don't save the contents
> of this buffer anywhere, the export/import doesn't work as expected
> it seems.
> 
> Actually I am now wondering why the driver allocates this sequential
> buffer at all, DMA should be possible to use over the sgs just fine,
> at least some other crypto drivers are doing this.

Indeed this is totally broken.  No hash driver should be holding
data without actually hashing it, unless of course if there is less
than a block of data.

So either fix the driver to hash the data as they come in, or
make it use a software fallback for update.

Cheers,
-- 
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



More information about the linux-arm-kernel mailing list