title: can we use virt_to_phys for user space memory in kernel module?
body: <p>I will allocate memory in user application using <code>malloc</code> and send the <code>malloc</code> returned address to a kernel module through character driver interface.</p>
  
  <p>I will pin the pages for this memory using <code>get_user_pages_fast</code> in kernel module.</p>
  
  <p>Can I use <code>virt_to_phys</code> to get the address returned by <code>malloc</code>.
  Is it valid? If not then how can I get proper physical address? </p>
  
  <p>My aim is to get physical address of user space allocated memory.
  I m limiting my transfer size to pagesize (4KB).</p>