Re: Avoiding copy_from_user

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

 



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

On 9 Jun 2003 13:52:39 -0000
"Biswaranjan  " <biswaranjan_p@rediffmail.com> wrote:

>Hi,
>
>i'm trying to write a device  driver for a particular device.  i need
>to  manipulate  the buffer  provided  to  the  kernel during  write()
>directly  from  the  kernel  without using  copy_from_user()  due  to
>efficiency reasons..

If you are searching for efficiency maybe the best thing you can do is
to call access_ok()  on the user space buffer just  the first time you
use  it   and  then  use  __copy_form_user()  which   is  faster  than
copy_from_user() since it  doesn't perform this kind of  test. This is
surely the best you can do AFAIK.

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+5RmXpONIzxnBXKIRAlrsAKDDM5Ye8q3A7ndOBDkyv4EQlBb+kgCbB33Z
XesmqvZ0PeuaxWEyz+buetk=
=RPWU
-----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