On 7/6/07, hari krishna angadi <[EMAIL PROTECTED]> wrote:
hi all,
         In driver module i am using copy_to_user.i
have a user module,ths user module i pushed to hernel
and mafe as a driver module however copy_to_user works
but if i use memcpy() will be better ? whether memcpy
is efficient ?

copy_to_user is used in lieu of memcpy, only if the destination
address/location is provided by the user. This is necessary to
overcome attempts by malicious users to overwrite parts of the kernel
or other places where they typically do not have access to. Another
advantage is that the user space buffer might have been paged out, and
so must be retrieved back into the RAM.

But if you are copying to a location which is in the kernel itself
(and legal...) then use memcpy.

Send instant messages to your online friends http://uk.messenger.yahoo.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ




--
The box said "Requires Windows Vista or better." So I installed LINUX

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to