Translating physical/linear address to virtual address

martin iomartin at iomartin.net
Fri Oct 2 15:58:53 EDT 2015


Hello,

I'm working with a kernel module that, through hardware events, gets a  
list of physical and linear memory addresses accessed by a program. I  
would like to convert these to the virtual addresses, as seen from the  
user space.

I saw there's phys_to_virt(), but as I understood it's only valid for  
kernel addresses.

What would be the correct approach? Pointers to the correct structs  
and functions are greatly appreciated.

Thank you.

Martin




More information about the Kernelnewbies mailing list