linux-brain/arch
Christian Brauner d68dbb0c9a
arch: handle arches who do not yet define clone3
This cleanly handles arches who do not yet define clone3.

clone3() was initially placed under __ARCH_WANT_SYS_CLONE under the
assumption that this would cleanly handle all architectures. It does
not.
Architectures such as nios2 or h8300 simply take the asm-generic syscall
definitions and generate their syscall table from it. Since they don't
define __ARCH_WANT_SYS_CLONE the build would fail complaining about
sys_clone3 missing. The reason this doesn't happen for legacy clone is
that nios2 and h8300 provide assembly stubs for sys_clone. This seems to
be done for architectural reasons.

The build failures for nios2 and h8300 were caught int -next luckily.
The solution is to define __ARCH_WANT_SYS_CLONE3 that architectures can
add. Additionally, we need a cond_syscall(clone3) for architectures such
as nios2 or h8300 that generate their syscall table in the way I
explained above.

Fixes: 8f3220a806 ("arch: wire-up clone3() syscall")
Signed-off-by: Christian Brauner <christian@brauner.io>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Adrian Reber <adrian@lisas.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: x86@kernel.org
2019-06-21 01:54:53 +02:00
..
alpha alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig 2019-05-18 11:49:55 +09:00
arc asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
arm arch: handle arches who do not yet define clone3 2019-06-21 01:54:53 +02:00
arm64 arch: handle arches who do not yet define clone3 2019-06-21 01:54:53 +02:00
c6x asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
csky arch: remove dangling asm-generic wrappers 2019-05-18 11:49:52 +09:00
h8300 arch: remove dangling asm-generic wrappers 2019-05-18 11:49:52 +09:00
hexagon asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
ia64 ia64: require -Wl,--hash-style=sysv 2019-05-18 11:29:01 +09:00
m68k Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-17 09:46:31 -07:00
microblaze arch: wire-up clone3() syscall 2019-06-09 09:29:46 +02:00
mips Kbuild updates for v5.2 (2nd) 2019-05-19 11:53:58 -07:00
nds32 arch: remove dangling asm-generic wrappers 2019-05-18 11:49:52 +09:00
nios2 asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
openrisc asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
parisc Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-17 09:46:31 -07:00
powerpc Merge branch 'akpm' (patches from Andrew) 2019-05-19 12:15:32 -07:00
riscv Kbuild updates for v5.2 (2nd) 2019-05-19 11:53:58 -07:00
s390 * ARM: support for SVE and Pointer Authentication in guests, PMU improvements 2019-05-17 10:33:30 -07:00
sh treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00
sparc Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-17 09:46:31 -07:00
um Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 10:23:24 -07:00
unicore32 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 10:23:24 -07:00
x86 arch: handle arches who do not yet define clone3 2019-06-21 01:54:53 +02:00
xtensa arch: handle arches who do not yet define clone3 2019-06-21 01:54:53 +02:00
.gitignore
Kconfig Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-16 11:00:20 -07:00