Re: Avoiding copy_from_user

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

 



Angelo Dell'Aera (buffer@antifork.org) wrote:
> On 10 Jun 2003 04:17:23 -0000
> "Biswaranjan  " <biswaranjan_p@rediffmail.com> wrote:
> 
> >Hi,
> > is it by anyway possible  to find out the struct page* corresponding
> >to the address of the user space buffer.
> >
> > if thats possible  i'm thinking of using kmap() to  map that page to
> >the kernel  space.  then  i should be  able to manipulate  the buffer
> >from kernel space. is it  right..?  
> >
> >i found a function  in mm/memory.c struct page * vmalloc_to_page(void
> >* vmalloc_addr)  thats able to return the  struct page* corresponding
> >to a  virtual address.  but i  think this function is  valid only for
> >kernel address..?
> 
> If you want to  map a user space buffer in kernel  space I suggest you
> to  look  at  the  use  of  kiobufs. You  can  find  a  very  detailed
> description of its use on "Linux Device Drivers 2nd edition" which you
> find freely  avaliable online  (sorry I don't  have handy the  URL but
> Google will help you).

http://www.xml.com/ldd/chapter/book/
 

-- 
Cordialement/Regards
Christophe Lucas -- Iomeda SA (clucas@iomeda.fr)
Developpeur/Administrateur GNU/Linux
--
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