From mboxrd@z Thu Jan 1 00:00:00 1970 From: t-kristo@ti.com (Tero Kristo) Date: Mon, 4 Jul 2016 12:27:00 +0300 Subject: [PATCHv2 06/27] crypto: ahash: increase the maximum allowed statesize In-Reply-To: <20160704091925.GA31964@gondor.apana.org.au> References: <1466601840-18486-1-git-send-email-t-kristo@ti.com> <1466601840-18486-7-git-send-email-t-kristo@ti.com> <20160624103209.GA19607@gondor.apana.org.au> <5770B283.8000902@ti.com> <20160627050031.GA5673@gondor.apana.org.au> <577A298E.4040803@ti.com> <20160704091925.GA31964@gondor.apana.org.au> Message-ID: <577A2BE4.1090202@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 04/07/16 12:19, Herbert Xu wrote: > On Mon, Jul 04, 2016 at 12:17:02PM +0300, Tero Kristo wrote: >> >> I need some clarification on this, afaik request_alloc related >> functionality only works per-request basis. The export / import >> functionality however is supposed to work across multiple requests. >> The test code for example does this: > > Why are you trying to allocate memory in export/import at all? > The preferred approach is to unconditionally allocate the memory > in ahash_request_alloc. 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. -Tero