so the stack  always starts at 0xc0000000 on x86 32bit and stack-start is pointing to the smaller address of stack ie growing downwards<div>xin<br>On Sunday, July 27, 2014, anupam kapoor &lt;<a href="mailto:anupam.kapoor@gmail.com">anupam.kapoor@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt;&gt;&gt;&gt;&gt; [Sun, 27 Jul 2014 22:35:22 -0500]: &quot;Xin Tong&quot; (xin-tong):<br>
<br>
,----[ xin-tong ]<br>
| where is user:stack-segment-size defined ?<br>
`----<br>
that is computable once again :) (assuming x86, and 1+3 split)<br>
  user:stack-segment-size = ((unsigned long)(0xc0000000 - user:start-stack)) &gt;&gt; PAGE_SHIFT<br>
<br>
kind regards<br>
anupam<br>
<br>
<br>
,----[ anupam ]<br>
| ,----[ xin-tong ]<br>
| | I am trying to find the start and end address of the userspace<br>
| stack.<br>
| | I see in the task_struct there is start_stack. But I could not<br>
| find<br>
| | end_start anywhere in the kernel code ?<br>
| |<br>
| | Can someone please tell me how to find the end of the stack ?<br>
|<br>
| `----<br>
| but that should be computable right e.g.<br>
| user:stack-end = user:stack-start + user:stack-segment-size *<br>
| number-of-pages<br>
`----<br>
<br>
<br>
</blockquote></div>