summaryrefslogtreecommitdiff
path: root/arch/sparc/include
diff options
context:
space:
mode:
authorLudwig Rydberg <ludwig.rydberg@gaisler.com>2026-01-19 15:47:53 +0100
committerAndreas Larsson <andreas@gaisler.com>2026-02-06 15:03:43 +0100
commit2153b2e8917b73e9e7fae8963f03b8e60bd8f5ff (patch)
tree1295c50e1135aff9140c7293dad6f622e61ed9a0 /arch/sparc/include
parente38eba3b77878ada327a572a41596a3b0b44e522 (diff)
downloadlwn-2153b2e8917b73e9e7fae8963f03b8e60bd8f5ff.tar.gz
lwn-2153b2e8917b73e9e7fae8963f03b8e60bd8f5ff.zip
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>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r--arch/sparc/include/asm/syscalls.h1
-rw-r--r--arch/sparc/include/asm/unistd.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/syscalls.h b/arch/sparc/include/asm/syscalls.h
index 35575fbfb9dc..282e62b66518 100644
--- a/arch/sparc/include/asm/syscalls.h
+++ b/arch/sparc/include/asm/syscalls.h
@@ -7,5 +7,6 @@ struct pt_regs;
asmlinkage long sparc_fork(struct pt_regs *regs);
asmlinkage long sparc_vfork(struct pt_regs *regs);
asmlinkage long sparc_clone(struct pt_regs *regs);
+asmlinkage long sparc_clone3(struct pt_regs *regs);
#endif /* _SPARC64_SYSCALLS_H */
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h
index 3380411a4537..d6bc76706a7a 100644
--- a/arch/sparc/include/asm/unistd.h
+++ b/arch/sparc/include/asm/unistd.h
@@ -49,8 +49,6 @@
#define __ARCH_WANT_COMPAT_STAT
#endif
-#define __ARCH_BROKEN_SYS_CLONE3
-
#ifdef __32bit_syscall_numbers__
/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
* it never had the plain ones and there is no value to adding those