On Fri, Jan 16, 2026 at 04:30:50PM +0100, Ludwig Rydberg wrote: > Add support for the clone3 system call to the SPARC architectures. > > The implementation follows the pattern of the original clone syscall. > However, instead of explicitly calling kernel_clone, the clone3 > handler calls the generic sys_clone3 handler in kernel/fork. > In case no stack is provided, the parents stack is reused. > > The return call conventions for clone on SPARC are kept for clone3: > Parent --> %o0 == child's pid, %o1 == 0 > Child --> %o0 == parent's pid, %o1 == 1
One of the benefits of having a new clone3 is that the interface can be made the same across all architectures*, unlike clone, which both passes the arguments in different orders for different architectures and, in the case of SPARC, has this weird return convention inherited from the SunOS syscall interface. Is there a good reason to deviate for clone3 too and keep this annoying oddity going, that requires special-casing SPARC when other architectures can just syscall(__NR_clone3, ...)? Jessica * Even Itanium's clone2 could have been subsumed by it, as clone3 passes the stack base and size rather than the desired stack pointer

