<div dir="ltr">Hi all,<div><br></div><div>I&#39;m facing a strange issue with execve. It fails with -EFAULT intermittently. I found that whenever it failed the stack allocated to the process is in the last page of the CONFIG_TASK_SIZE.</div><div><br></div><div>For example, if CONFIG_TASK_SIZE is set to 0x4000_0000, the process would fail in execve if the stack happens to be in the page:</div><div><p class="MsoNormal">3ffdf000-40000000 rw-p 00000000 00:00 0          [stack]</p></div><div><br></div><div>I tried changing CONFIG_TASK_SIZE=0x30000000 and the process this time fails at the end 0x30000000 address.</div><div><br></div><div>I also found that the execve seem to use the largest stack address (STACK_TOP_MAX, function __bprm_mm_init(), fs/exec.c) while copying argv/envp to the new process space.</div><div><br></div><div>I don&#39;t know how to debug further. I feel that the user process stack should never be allocated at the CONFIG_TASK_SIZE? Any idea or suggestion on how to debug further, please tell me.</div><div><br></div><div>thanks,</div><div>rohit</div></div>