copy_to_user vs memcpy
问题 I have always been told(In books and tutorials) that while copying data from kernel space to user space, we should use copy_to_user() and using memcpy() would cause problems to the system. Recently by mistake i have used memcpy() and it worked perfectly fine with out any problems. Why is that we should use copy_to_user instead of memcpy() My test code(Kernel module) is something like this: static ssize_t test_read(struct file *file, char __user * buf, size_t len, loff_t * offset) { char ani