Re: memcpy_tofs... wheres it at?

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

 



--- Sharath <sharath_75@yahoo.com> wrote:
> yes that is true.. even in 2.4.28 but where is
> memcpy_tofs(...) first defined.. 
> 
> I do not want to include 'other' headers just cause I
> have to.. or has anyone writeen a module that copies
> from kernel space to user space.. and how to do it..
> 
> TIA
> Sharath
> 

See Rubini & Corbet on-line at
http://www.xml.com/ldd/chapter/book/ch03.html#t8

The above link is into the middle of a discussion on their "scull"
char driver (the code for which is also available online, poke around
the link).

Following is an excerpt from the above link:

"The code for read and writein scull needs to copy a whole segment of
data to or from the user address space. This capability is offered by
the following kernel functions, which copy an arbitrary array of
bytes and sit at the heart of every read and write implementation: 

 unsigned long copy_to_user(void *to, const void *from, 
        unsigned long count);
 unsigned long copy_from_user(void *to, const void *from, 
        unsigned long count);"

Harmony,

--Christine


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux