Skip to content

Commit 505d66d

Browse files
committed
clone3: drop __ARCH_WANT_SYS_CLONE3 macro
When clone3() was introduced, it was not obvious how each architecture deals with setting up the stack and keeping the register contents in a fork()-like system call, so this was left for the architecture maintainers to implement, with __ARCH_WANT_SYS_CLONE3 defined by those that already implement it. Five years later, we still have a few architectures left that are missing clone3(), and the macro keeps getting in the way as it's fundamentally different from all the other __ARCH_WANT_SYS_* macros that are meant to provide backwards-compatibility with applications using older syscalls that are no longer provided by default. Address this by reversing the polarity of the macro, adding an __ARCH_BROKEN_SYS_CLONE3 macro to all architectures that don't already provide the syscall, and remove __ARCH_WANT_SYS_CLONE3 from all the other ones. Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent fbb5c06 commit 505d66d

File tree

24 files changed

+13
-29
lines changed

24 files changed

+13
-29
lines changed

arch/arc/include/uapi/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#define __ARCH_WANT_SET_GET_RLIMIT
2222
#define __ARCH_WANT_SYS_EXECVE
2323
#define __ARCH_WANT_SYS_CLONE
24-
#define __ARCH_WANT_SYS_CLONE3
2524
#define __ARCH_WANT_SYS_VFORK
2625
#define __ARCH_WANT_SYS_FORK
2726
#define __ARCH_WANT_TIME32_SYSCALLS

arch/arm/include/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#define __ARCH_WANT_SYS_FORK
3838
#define __ARCH_WANT_SYS_VFORK
3939
#define __ARCH_WANT_SYS_CLONE
40-
#define __ARCH_WANT_SYS_CLONE3
4140

4241
/*
4342
* Unimplemented (or alternatively implemented) syscalls

arch/arm64/include/uapi/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#define __ARCH_WANT_NEW_STAT
2020
#define __ARCH_WANT_SET_GET_RLIMIT
2121
#define __ARCH_WANT_TIME32_SYSCALLS
22-
#define __ARCH_WANT_SYS_CLONE3
2322
#define __ARCH_WANT_MEMFD_SECRET
2423

2524
#include <asm-generic/unistd.h>

arch/csky/include/uapi/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#define __ARCH_WANT_STAT64
44
#define __ARCH_WANT_NEW_STAT
55
#define __ARCH_WANT_SYS_CLONE
6-
#define __ARCH_WANT_SYS_CLONE3
76
#define __ARCH_WANT_SET_GET_RLIMIT
87
#define __ARCH_WANT_TIME32_SYSCALLS
98
#define __ARCH_WANT_SYNC_FILE_RANGE2

arch/hexagon/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@
3838
#define __ARCH_WANT_TIME32_SYSCALLS
3939
#define __ARCH_WANT_SYNC_FILE_RANGE2
4040

41+
#define __ARCH_BROKEN_SYS_CLONE3
42+
4143
#include <asm-generic/unistd.h>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22
#define __ARCH_WANT_SYS_CLONE
3-
#define __ARCH_WANT_SYS_CLONE3
43

54
#include <asm-generic/unistd.h>

arch/m68k/include/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@
3030
#define __ARCH_WANT_SYS_SIGPROCMASK
3131
#define __ARCH_WANT_SYS_FORK
3232
#define __ARCH_WANT_SYS_VFORK
33-
#define __ARCH_WANT_SYS_CLONE3
3433

3534
#endif /* _ASM_M68K_UNISTD_H_ */

arch/mips/include/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
# endif
5959
#define __ARCH_WANT_SYS_FORK
6060
#define __ARCH_WANT_SYS_CLONE
61-
#define __ARCH_WANT_SYS_CLONE3
6261

6362
/* whitelists for checksyscalls */
6463
#define __IGNORE_fadvise64_64

arch/nios2/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#define __ARCH_WANT_SET_GET_RLIMIT
2424
#define __ARCH_WANT_TIME32_SYSCALLS
2525

26+
#define __ARCH_BROKEN_SYS_CLONE3
27+
2628
/* Use the standard ABI for syscalls */
2729
#include <asm-generic/unistd.h>
2830

arch/openrisc/include/uapi/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#define __ARCH_WANT_SET_GET_RLIMIT
2525
#define __ARCH_WANT_SYS_FORK
2626
#define __ARCH_WANT_SYS_CLONE
27-
#define __ARCH_WANT_SYS_CLONE3
2827
#define __ARCH_WANT_TIME32_SYSCALLS
2928

3029
#include <asm-generic/unistd.h>

0 commit comments

Comments
 (0)