[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Getting current PGD on address@hidden
From: |
Igor R |
Subject: |
Re: [Qemu-devel] Getting current PGD on address@hidden |
Date: |
Tue, 11 Aug 2015 15:53:39 +0300 |
> > When debugging (via gdbstub), I would like to get the current process
> > id by a virtual address. When the virtual address is in the
> > user-space, the only way to find the current task_struct I can think
> > of is to iterate over all the task_struct's (assuming we know
> > task_init and the offsets of the relevant fields), and compare
> > task->mm->pgd against the current PGD.
Coming back to this problem...
Reading ttbr0 worked for me on ARM, reading cr3 worked on x86.
Now I'm looking for a similar thing on MIPS. I.e. I need a pointer to the process' translation table - something that can be compared to task->mm->pgd (after virt2phys conversion).
I'd appreciate any idea!
- Re: [Qemu-devel] Getting current PGD on address@hidden,
Igor R <=