<div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:19.5px">Hi,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:19.5px">I have kcore and I want to get userspace backtrace from kcore. I looked at some <a href="https://www.kernel.org/doc/Documentation/kdump/gdbmacros.txt" rel="nofollow" style="margin:0px;padding:0px;border:0px;text-decoration:none;color:rgb(12,101,165)">macro</a> but still this is just giving me kernel backtrace only. What I want is userspace backtrace.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:19.5px">Good news is I have pointer to task_struct.</p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,sans-serif;word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,sans-serif;white-space:inherit">task_struct-&gt;thread-&gt;sp (Kernel stack pointer)
task_struct-&gt;thread-&gt;usersp (user stack pointer) but this is junk
</code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:19.5px">My question is how to get userspace backtrace (or stack pointer) from kcore or task_struct ?</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:19.5px">- Shirish</p></div>