]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sparc: Add architecture support for clone3
authorLudwig Rydberg <ludwig.rydberg@gaisler.com>
Mon, 19 Jan 2026 14:47:53 +0000 (15:47 +0100)
committerAndreas Larsson <andreas@gaisler.com>
Fri, 6 Feb 2026 14:03:43 +0000 (15:03 +0100)
commit2153b2e8917b73e9e7fae8963f03b8e60bd8f5ff
tree1295c50e1135aff9140c7293dad6f622e61ed9a0
parente38eba3b77878ada327a572a41596a3b0b44e522
sparc: Add architecture support for clone3

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 value convention for clone3 follows the regular kernel return
value convention (in contrast to the original clone/fork on SPARC).

Closes: https://github.com/sparclinux/issues/issues/10
Signed-off-by: Ludwig Rydberg <ludwig.rydberg@gaisler.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/20260119144753.27945-3-ludwig.rydberg@gaisler.com
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/include/asm/syscalls.h
arch/sparc/include/asm/unistd.h
arch/sparc/kernel/entry.S
arch/sparc/kernel/kernel.h
arch/sparc/kernel/process.c
arch/sparc/kernel/process_32.c
arch/sparc/kernel/process_64.c
arch/sparc/kernel/syscalls.S
arch/sparc/kernel/syscalls/syscall.tbl