incubator-nuttx/arch/risc-v
Ville Juven 622e5b26b3 riscv/syscall: Fix fork() system call
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).
2024-08-07 02:41:14 +08:00
..
include arch/risc-v: introduce AIA support 2024-07-31 12:43:04 -03:00
src riscv/syscall: Fix fork() system call 2024-08-07 02:41:14 +08:00
CMakeLists.txt cmake:init RISC-V cmake qemu-rv build 2023-10-26 21:01:46 +08:00
Kconfig riscv/syscall: Add dependency to RISCV_PERCPU_SCRATCH when LIB_SYSCALL=y 2024-08-07 02:41:14 +08:00