I have a user mode process and a kernel module. Now I want to read some areas of the usermode process from the kernel, but there is one possibility: do not copy usermode memory and simple VA access. So, we have: task_struct for the target process, other related structures (for example, mm_struct, vma_struct) and a virtual address, such as 0x0070abcd, which I want to read or, rather, somehow map to my kernel module.
I can get a list of pages using get_user_pages for the desired memory areas, but what next? Should I somehow map pages to the kernel and then try to read them as a continuous memory area, or are there better solutions?
source share