How to get object virtual address from a kernel core dump

Manoj Nayak manojnayak2005 at gmail.com
Tue Mar 22 07:03:57 EDT 2016


task_struct contains mm_struct.

If we have pid of the process then task_struct can be obtained from pid
using following two methods.

1.
Please check find_task_by_pid() function in kernel. We can write a similar
macro to convert pid to task_struct.

2. We can write a macro that traverses all task starting from init_task and
check the required pid.

#define for_each_task(p) \
        for (p = &init_task ; (p = p->next_task) != &init_task ; )


If process is the current one then current_thread_info()->task provides
task_struct for current task.
We can write a macro similar to current_thread_info().

pid-> task_struct->mm_struct.

Regards
Manoj Nayak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160322/09d53114/attachment-0001.html 


More information about the Kernelnewbies mailing list