Re: Why system call need to copy the date from the userspace before using it

Catalin Marinas
2005-04-13T11:11:16Z

Tomko <tomko@haha.com> wrote:
> Inside the system call , the kernel often copy the data by calling
> copy_from_user() rather than just using strcpy(), is it because the
> memory mapping in kenel space is different from user space?

No, it is because this function checks whether the access to the user
space address is OK. There are situations when it can also sleep (page
not present).

--
Catalin