Reading another process memory?

From: Mohamed El Dawy
Date: Sat Nov 26 2005 - 19:55:20 EST


Hi,
How are you? I hope you are fine.

I am trying to write a function that involves reading other processes
memory.
Here is what I can do

1. traverse the linked list of running processes searching for the
required pid
2. Follow the "mm" pointer to get the mm_struct
3. Traverse the "mmap" linked list in that mm_struct to get a list of
all ranges of addresses
3b. And read the "pgd" field too in the mm_sturct which contains the
page directory

Now, I have the page directory, and some logical addresses. Now comes
the tricky part, how can I actually read the memory? I am not really
sure how to read an address given a page directory and a logical
address. Do I need to translate it myself? Are there any functions to
do the job for me?

Thanks a lot in advacne
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/