I'm reading LDD3. In chapter 8, I could not understand this paragraph:
An example of a function in the kernel that uses
vmalloc
is thecreate_module
system call, which usesvmalloc
to get space for the module being created. Code and data of the module are later copied to the allocated space usingcopy_from_user
. In this way, the module appears to be loaded into contiguous memory.
Why is copy_from_user
used? Aren't we in kernel space only?