[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get a physical address from a linear one using a different pgd



On Feb 5, 2008 11:42 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi...

On 2/6/08, Martin Candurra <martincad@xxxxxxxxx> wrote:
> I had to get some data from a user process within a kernel module. That
> process wasn't the "current" so the process pgd was not the same as the
> current pgd (for this reason I couldn't use copy_from_user function).
>
> I had been looking for some straight method (or function) to do it, but I
> could not find any. I finally did it translating the address  throw  the
> corresponding page directories and page tables, using the following code:

I remember...it's a function that is called by ptrace
(PEEK/POKE_DATA)...ehm...access_process_vm or something... Try to
check ptrace related kernel headers.

regards,

Mulyadi.


This is exactly what I was looking for... thank you Mulyadi.

Best Regards.