Re: Avoiding copy_from_user

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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).

Regards.

- --

Angelo Dell'Aera 'buffer' 
Antifork Research, Inc.	  	http://buffer.antifork.org

PGP information in e-mail header


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+5aVipONIzxnBXKIRAqFTAKDEklp80X/QZFeBIQXjbFK8IFTlCQCfey8K
pmS7htinMOVWm1f6MJ7f0/g=
=bVDG
-----END PGP SIGNATURE-----
--
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