Accessing one process's memory contents from another module
Posted
by Fangkai Yang
on Stack Overflow
See other posts from Stack Overflow
or by Fangkai Yang
Published on 2010-04-29T00:25:05Z
Indexed on
2010/04/29
0:27 UTC
Read the original article
Hit count: 647
modules
I am developing a virtual device driver such that the user can write to the driver a process' pid and a virtual address, and the module will use these two values to get the memory contents of the target process. I am wondering if there is any easy functions that can fetch user page's data at this virtual address.
I have tried get_user but this is not possible because the modules executing get_user at another process's context. I also tried to use ptrace_readdata, however, it seems that the file at /kernel/ptrace.c leaves a function access_process_vm undefined and also I don't know how to compile the source code of my module with this file (the linker seaches file in /linux/include by default). I am wondering if there are any other solutions...
© Stack Overflow or respective owner