<div dir="ltr">Thanks for the reply but the link doesn't quite answer the question. I am wondering how the pointer is handled so that there is one per thread by the compiler. I perhaps was under the perhaps mistaken impression that the stack pointer frame pointer management inside the compiler makes certain assumptions in user space- but i am unsure how this applies to kernel space.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 12, 2018 at 1:55 AM Augusto Mecking Caringi <<a href="mailto:augustocaringi@gmail.com">augustocaringi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Nov 11, 2018 at 6:04 PM Carter Cheng <<a href="mailto:cartercheng@gmail.com" target="_blank">cartercheng@gmail.com</a>> wrote:<br>
> I am wondering how the compiler divines which stack to use for function calls and placement of locals and arguments when a function call is made inside the kernel since the kernel has multiple call stacks. Are function calls handled manually inside kernel code or is there something special inside the compiler for handling this?<br>
<br>
I think this link can answer your question...<br>
<br>
<a href="https://stackoverflow.com/questions/12911841/kernel-stack-and-user-space-stack" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/12911841/kernel-stack-and-user-space-stack</a><br>
<br>
-- <br>
Augusto Mecking Caringi<br>
</blockquote></div>