pussuw opened a new pull request, #12812:
URL: https://github.com/apache/nuttx/pull/12812

   ## Summary
   When executing fork() via a system call, the parent's stack gets corrupted
   by the child, as during exception return the child loads the parent's
   stack pointer from the context save area.
   
   This happens because the full parent stack (including what has been pushed
   during the system call) is copied to the child. What should be copied, is
   only the user stack of the parent (the kernel stack is not interesting).
   
   Fix this by only copying the parent's user stack to the child; and make
   the child return directly to userspace (not via dispatch_syscall).
   ## Impact
   Fixes fork() when LIB_SYSCALL=y
   ## Testing
   rv-virt:pnsh64
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to