parisc: Wire up clone3 syscall
Helge Deller
maintainerPATCH 1/1 parisc: Wire up clone3 syscall
Untested patch to wire up the clone3 syscall.
Signed-off-by Helge Deller <[email protected]>
arch/parisc/include/asm/unistd.h +1 -0
@@ -166,6 +166,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \#define __ARCH_WANT_SYS_FORK#define __ARCH_WANT_SYS_VFORK#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SYS_CLONE3#define __ARCH_WANT_COMPAT_SYS_SENDFILE#ifdef CONFIG_64BIT
arch/parisc/kernel/entry.S +1 -0
@@ -1732,6 +1732,7 @@ ENDPROC_CFI(sys_\name\()_wrapper) .endm fork_like clone +fork_like clone3 fork_like fork fork_like vfork
arch/parisc/kernel/syscalls/syscall.tbl +1 -0
@@ -431,3 +431,4 @@ 432 common fsmount sys_fsmount 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open +435 common clone3 sys_clone3_wrapper
Quoted 1 line · Helge Deller
Untested patch to wire up the clone3 syscall.
From what I can see from your entry points the treatment for fork and clone the relevant bit is:
.macro fork_like name
ENTRY_CFI(sys_\name\()_wrapper)
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1 ldo TASK_REGS(%r1),%r1 reg_save %r1 mfctl %cr27, %r28 ldil L%sys_\name, %r31 be R%sys_\name(%sr4,%r31) STREG %r28, PT_CR27(%r1)
ENDPROC_CFI(sys_\name\()_wrapper)
.endm
Which seems to be identical for fork(), vfork(), and clone(). So parisc doesn't seem to have to muck with any clone-specific args. If that's the case things should be fine for clone3 on parisc. I only expect issues for arches that need to shove around specific arguments for clone.
Quoted 36 lines
Signed-off-by Helge Deller <[email protected]>arch/parisc/include/asm/unistd.h +1
-0@@ -166,6 +166,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \#define __ARCH_WANT_SYS_FORK#define __ARCH_WANT_SYS_VFORK#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SYS_CLONE3#define __ARCH_WANT_COMPAT_SYS_SENDFILE#ifdef CONFIG_64BIT arch/parisc/kernel/entry.S +1
-0@@ -1732,6 +1732,7 @@ ENDPROC_CFI(sys_\name\()_wrapper) .endm fork_like clone +fork_like clone3 fork_like fork fork_like vforkarch/parisc/kernel/syscalls/syscall.tbl +1
-0@@ -431,3 +431,4 @@ 432 common fsmount sys_fsmount 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open +435 common clone3 sys_clone3_wrapper