I think the requirement was to convert userland virtual addresses to physical addresses. The _pa and _va macros work for kernel addresses which have a direct mapping with the physical addresses. The only way to do the above is to walk the page tables. Depending on the arch you can write your own function. Take a look at dump_pagetable() in x86_64/mm/fault.c. Not sure if the kernel offers any function to do this. -sridhar > Aamer Jaleel (ajaleel@wam.umd.edu) wrote: > > > > I'm using a kernel version 2.4.19... > > > > Functions like copy to user, copy from user, clear user, etc, all use a > > user space virtual address... can somebody let me know how to convert a > > user space virtual address to a physical address? I wish to convert a > > user space virtual address to a physical address... any help would be > > greatly apprecaited... > > I think _pa and _va is what you search. > But perhaps it will be obselete. I don't know this. But somebosy else > can surely answer to this question. > > -- > Cordialement/Regards > Christophe Lucas -- Iomeda SA (clucas@iomeda.fr) > Developpeur/Administrateur GNU/Linux > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/