Re: [PATCH v5 4/4] crypto: Add Allwinner Security System crypto accelerator

From: Maxime Ripard
Date: Sun Nov 16 2014 - 12:15:15 EST

On Thu, Nov 06, 2014 at 10:32:18PM +0800, Herbert Xu wrote:
> On Thu, Nov 06, 2014 at 03:26:33PM +0100, Maxime Ripard wrote:
> >
> > But you still haven't explain why the driver, while it doesn't handle
> > the user space buffer at any time, should be worried that the data the
> > framework has given him are actually mapped.
> Encryption is used by IPsec and SKBs can be allocated in highmem.
> algif also exposes all ciphers to user-space memory which can also
> be in highmem.

Ok. We keep going in circles here.

I know that algif handles userspace memory that can be in
highmem. What I don't get, is that just like a *driver* doesn't have
to call copy_from_user, why would it need to call kmap...

That's something that should be in the framework itself, not the
driver. And the argument that most drivers use DMA seems like a broken

But hey, you're the one that will maintain this mess, so I guess you
have the final word.


Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering

Attachment: signature.asc
Description: Digital signature