move_addr_to_kernel() and memory considerations!!!

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

 



Hi,
here is the code snippet to copy a socket address to kernel address space from user address space.

int move_addr_to_kernel(void __user *uaddr, int ulen, void *kaddr)
{
    if(ulen<0||ulen>MAX_SOCK_ADDR)
       return -EINVAL;
    if(ulen==0)
      return 0;
    if(copy_from_user(kaddr,uaddr,ulen))
        return -EFAULT;
        return audit_sockaddr(ulen, kaddr);
}

Ok, here is the query -
What if the user address is actually mapped on to physical memory > 1 GB.
I cannot figure out then how the socket address space will be copied without involving any temporary kernel mappings?And i also do not see any code involving creation of  the temporary mappings in this case? 

Any help?What am i missing here? 

Thank you
~psr

--
play the game

[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