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
- Follow-Ups:
- Re: copy_from_user, copy_to_user in kernel
- From: Steven Rostedt <[email protected]>
- Re: copy_from_user, copy_to_user in kernel
- References:
- copy_from_user, copy_to_user in kernel
- From: KrnlUsr <[email protected]>
- copy_from_user, copy_to_user in kernel
- Prev by Date: [PATCH] dynamic-tick patch modified for SMP
- Next by Date: Re: w1: more debug level decrease.
- Previous by thread: Re: copy_from_user, copy_to_user in kernel
- Next by thread: Re: copy_from_user, copy_to_user in kernel
- Index(es):