Re: copy_from_user, copy_to_user in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 12, 2005 at 11:16:23AM -0700, KrnlUsr wrote:
> Hi
> 
> Why does copy_from/to_user routines fail if both
> source and destination are in kernel space. I have a
> kernel module that:

I had this problem when writing a kernel module that was using a UDP
socket to send and receive stuff. It would work fine in UML but fail in
the real kernel. I never worked it out but someone later patched it by
using the [gs]et_[df]s() functions. If you grep the kernel source you
can see a lot of places use it. The problem is I still have no idea why
it works...

Hope this helps,
-- 
Martijn van Oosterhout   <[email protected]>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgpAyUgpMnquA.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux