On 2015-11-29 at 18:01 "'Davide Libenzi' via Akaros"
<[email protected]> wrote:
> Is there an API like that (data coming from write(), which needs to be
> copy_from_user-ed to kernel side buffer)?
> I would assume something like that to be already in place, but my
> search failed to find it.

I think user_memdup() does what you want.

Though if you're in the 9ns or a device (or somewhere that can catch an
error()), if you don't need to verify the data, you can just memcpy
it.  For example, in k/d/d/root.c, in rootread we just do a memcpy.

Part of the reason for this is that sometimes the kernel is a client of
the file system.  There's actually dirty hacks throughout the kernel to
accommodate this.  grep for TODO.*KFOP (kernel file operation).

Barret

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to