Get user stackpointer from task_struct

Pranay Srivastava pranjas at gmail.com
Fri Nov 6 00:18:12 EST 2015


On Wed, Nov 4, 2015 at 2:54 AM, Shirish Gajera <gshirishfree at gmail.com> wrote:
> Hi,
>
> I have kcore and I want to get userspace backtrace from kcore. I looked at
> some macro 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
>

you tried task_thread_info and task_stack_page?

> My question is how to get userspace backtrace (or stack pointer) from kcore
> or task_struct ?
>
> - Shirish
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
        ---P.K.S



More information about the Kernelnewbies mailing list