copy_to_user() / copy_from_user() (is it really stupid?)

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

 



	

	Howdy,

I was reading Rusty's Unreliable Guide To Hacking The Linux Kernel
and Rusty claims that copy_from_user() and copy_to_user() have a 

<snip>
moronic interface due to the fact that they return the amount of uncopied data 
(ie. 0 still means success).
</snip>

now uhh... if they return the amout of uncopied data, and it returns 0, 
then that means 0 bytes went uncopied... Which is exactly what we want, 
since we dont want a few bytes to go uncopyed.

Is this a typo? Or am I an idiot?

Thanks
-Dan Erickson-
-ColdOneKnight@rogers.com-

P.S Dont answer that last question, :)

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