lkml.org 
[lkml]   [2007]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectCopy large memory regions from & to userspace
Date
Hi!
Just a short question: What is the correct method of copying large areas of
memory from userspace into userspace when running in kernel-mode?

According to just about any type of documentation out there something like

unsigned long *from = 0x08000000;
unsigned long *to = 0x09000000;
memcpy(to, from, 0x1000);

should be avoided as copy_from_user, put_user, etc. should be used instead...

Is there a third set of functions for direct from-userspace-to-userspace
copying or is it legitimate to assure that the first bytes in the from & to
memory areas are available and then just do the plain memcpy?

Maybe there is a simple "just use the xxx function-set" answer to that, that i
just have not ran into yet :-)

Thanks!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-31 00:31    [W:0.036 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site