Get user stackpointer from task_struct

Shirish Gajera gshirishfree at gmail.com
Tue Nov 3 16:24:30 EST 2015


Hi,

I have kcore and I want to get userspace backtrace from kcore. I looked at
some macro <https://www.kernel.org/doc/Documentation/kdump/gdbmacros.txt> but
still this is just giving me kernel backtrace only. What I want is
userspace backtrace.

Good news is I have pointer to task_struct.

task_struct->thread->sp (Kernel stack pointer)
task_struct->thread->usersp (user stack pointer) but this is junk

My question is how to get userspace backtrace (or stack pointer) from kcore
or task_struct ?

- Shirish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151103/0801501e/attachment.html 


More information about the Kernelnewbies mailing list