Re: copy_from_user user space address mapping in the kernel page table.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 02 Nov 2014 19:57:44 +0530, mind entropy said:
>   In the copy_from_user when the user passes the virtual address is
> the address mapped in the kernel page tables?

Actually, a large part of the reason for copy_from_user()'s existence is
to deal with the possibility that the page is *not* mapped at the moment
because it's been swapped out (at which point we need to schedule a read
operation for whatever backing store the page had (filesystem, swap, or
zero-page for a never-before-referenced page), wait for it to arrive,
and then nail it down so it doesn't leave out from under us before
we finish the copy from the page.

And of course, it's even *more* fun when the copy crosses a page boundary,
and one or both of the pages isn't resident....

>                                                In the function there is
> a source is a user virtual address(<3GB) and the destination is the

Only for 32-bit kernels.  x86_64 has a different memory layout.

Attachment: pgpBr21NCS4tN.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux