Does copy_from_user modify the user pointer?
- by Michael
Does the copy_from_user function, declared in uaccess.h, modify the (void __user *)from pointer?
The pointer isn't declared as const in the function declaration, only the contents it points to.
The reason I ask is that I want to use copy_from_user twice, with the second copy_from_user copying from the place where the first one finished.
I was planning on doing something like this, is it guaranteed to work?
//buf is a user pointer that is already defined
copy_from_user(my_first_alloced_region, buf, some_size);
//do stuff
copy_from_user(my_second_alloced_region, buf + some_size, some_other_size);
Thanks in advance.