Results 1 to 3 of 3
Hi,everyone
I am newbie to linux kernel, I'm write ioctl function, the input argument is integer, kernel space need to use this integer argument within user space, should I to ...
- 01-19-2009 #1Just Joined!
- Join Date
- Jan 2009
- Posts
- 8
a question about copy_from_user/copy_to_user
Hi,everyone
I am newbie to linux kernel, I'm write ioctl function, the input argument is integer, kernel space need to use this integer argument within user space, should I to use copy_from_user() function or directly to use it
?
When I can directly to use user space data in kernel space?
Thanks!
Ian
- 01-19-2009 #2
You should use copy_from_user() because it performs some rudimentary checks on the address location of the data plus it guarantees a level compatibility but if thats not a concern you could pass a pointer to the data...Hope this helps Gerard4143
Welcome to the forums
- 01-20-2009 #3Just Joined!
- Join Date
- Jan 2009
- Posts
- 8
Thank your help!


Reply With Quote
