[panda-users] OSI plugin issues

Igor R boost.lists at gmail.com
Wed Aug 12 15:30:04 EDT 2015


> A (slow) workaround that could be implemented relatively easily would be:
>
> In on_get_current_process(), check if guest is in kernel mode.
>
> If it is, use the existing code (faster).
> If not, then start traversing the task list, starting from the init task
> (its address is extracted by the kernelinfo module). In each iteration:
>
> Get the asid of the task using get_pgd(env, current_task_addr).
> This asid will be a virtual address. Translate it to physical using
> panda_virt_to_phys(env, asid).
> If the physical address equals the current PGD, then break - you found the
> running task. You can fill the process details in the struct and return.


Coming back to this issue...
I would like implement a similar algorithm on MIPS (Linux).
It seems however that it's quite not trivial to get the "current pgd"
(i.e. the pointer to the translation table of the current process) on
MIPS. But maybe there are other, MIPS-specific, ways to get the
current pid/task_struct in user-mode?
(Actually, I'm doing that on the upstream QEMU, so it's not quite
PANDA question, but perhaps the experts reading this list could shed
some light on this problem.)

Thanks!


More information about the panda-users mailing list