[PATCH v2 1/3] staging: ccree: copy IV to DMAable memory

Herbert Xu herbert at gondor.apana.org.au
Wed Nov 8 12:07:29 UTC 2017


On Wed, Nov 08, 2017 at 01:54:03PM +0200, Gilad Ben-Yossef wrote:
>
> As a HW based crypto driver maintainer I sympathize, but let's play
> devil's advocate for a second here:
> 
> In the current state, HW based crypto drivers need to allocate a buffer
> and copy the IV, because they don't know if they got a DMAable buffer
> or not. SW based crypto drivers don't need to do anything.

When I suggested an API change, I was thinking of an option of
supplying an SG list instead of the current kernel pointer.

IOW the existing users do not have to change but where we know
that the pointer can be DMAed you can opt in to the new interface.

The crypto API can then provide a helper to do the copying where
necessary.

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 devel mailing list