linux-brain/arch/xtensa/include/asm
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
..
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asm-uaccess.h get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
asmmacro.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
atomic.h xtensa: add exclusive atomics support 2019-05-07 10:36:31 -07:00
barrier.h xtensa: add exclusive atomics support 2019-05-07 10:36:31 -07:00
bitops.h xtensa: add exclusive atomics support 2019-05-07 10:36:31 -07:00
bootparam.h xtensa: split bootparam and kernel meminfo 2014-04-02 01:35:51 +04:00
bugs.h
cache.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
cacheasm.h xtensa: increase ranges in ___invalidate_{i,d}cache_all 2018-08-13 20:08:01 -07:00
cacheflush.h docs: Fix some broken references 2018-06-15 18:10:01 -03:00
checksum.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
cmpxchg.h xtensa: add exclusive atomics support 2019-05-07 10:36:31 -07:00
coprocessor.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
core.h xtensa: implement initialize_cacheattr for MPU cores 2019-05-07 10:36:34 -07:00
current.h xtensa: consolidate kernel stack size related definitions 2017-12-10 14:48:55 -08:00
delay.h xtensa: implement ndelay 2014-01-15 00:28:11 +04:00
dma.h Fix common misspellings 2011-03-31 11:26:23 -03:00
elf.h xtensa: enable CORE_DUMP_USE_REGSET 2018-12-17 13:48:22 -08:00
fixmap.h xtensa: move fixmap and kmap just above the KSEG 2017-12-16 22:37:12 -08:00
flat.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ftrace.h ftrace: Make CALLER_ADDRx macros more generic 2014-05-21 03:10:32 -04:00
futex.h xtensa: add exclusive atomics support 2019-05-07 10:36:31 -07:00
highmem.h xtensa: move fixmap and kmap just above the KSEG 2017-12-16 22:37:12 -08:00
hw_breakpoint.h perf/hw_breakpoint: Remove default hw_breakpoint_arch_parse() 2018-06-26 09:07:58 +02:00
hw_irq.h
initialize_mmu.h xtensa: implement initialize_cacheattr for MPU cores 2019-05-07 10:36:34 -07:00
io.h xtensa: drop ifdef __KERNEL__ from kernel-only headers 2019-05-06 17:48:54 -07:00
irq.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
irqflags.h xtensa: replace CONFIG_DEBUG_KERNEL with CONFIG_DEBUG_MISC 2019-05-14 19:52:50 -07:00
jump_label.h xtensa: implement jump_label support 2018-12-20 14:44:38 -08:00
kasan.h xtensa: fix build with KASAN 2018-02-11 09:18:12 -08:00
Kbuild arch: remove dangling asm-generic wrappers 2019-05-18 11:49:52 +09:00
kmem_layout.h xtensa: platform-specific handling of coherent memory 2018-07-11 15:59:41 -07:00
linkage.h xtensa: clean up functions in assembly code 2017-12-10 14:48:54 -08:00
mmu_context.h xtensa: extract init_kio 2017-12-16 22:37:10 -08:00
mmu.h xtensa: add SMP support 2014-01-14 10:19:58 -08:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
mxregs.h xtensa: add MX irqchip 2014-01-14 10:19:58 -08:00
nommu_context.h xtensa: extract init_kio 2017-12-16 22:37:10 -08:00
page.h xtensa: rework {CONFIG,PLATFORM}_DEFAULT_MEM_START 2018-08-20 12:28:03 -07:00
pci-bridge.h xtensa: drop ifdef __KERNEL__ from kernel-only headers 2019-05-06 17:48:54 -07:00
pci.h xtensa: drop ifdef __KERNEL__ from kernel-only headers 2019-05-06 17:48:54 -07:00
perf_event.h xtensa: enable HAVE_PERF_EVENTS 2014-01-15 00:27:03 +04:00
pgalloc.h xtensa: drop ifdef __KERNEL__ from kernel-only headers 2019-05-06 17:48:54 -07:00
pgtable.h xtensa: platform-specific handling of coherent memory 2018-07-11 15:59:41 -07:00
platform.h xtensa: platform-specific handling of coherent memory 2018-07-11 15:59:41 -07:00
processor.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
ptrace.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
regs.h xtensa: clean up exception handling structure 2017-12-16 22:37:09 -08:00
serial.h
shmparam.h
signal.h consolidate kernel-side struct sigaction declarations 2013-02-03 15:09:22 -05:00
smp.h xtensa: implement CPU hotplug 2014-01-14 10:19:59 -08:00
spinlock_types.h xtensa: use generic spinlock/rwlock implementation 2019-02-07 12:24:20 -08:00
spinlock.h xtensa: use generic spinlock/rwlock implementation 2019-02-07 12:24:20 -08:00
stackprotector.h xtensa: enable stack protector 2017-12-16 22:37:07 -08:00
stacktrace.h xtensa: move oprofile stack tracing to stacktrace.c 2015-08-17 07:32:49 +03:00
string.h xtensa: shut up gcc-8 warnings 2018-01-02 03:25:41 -08:00
switch_to.h Disintegrate asm/system.h for Xtensa 2012-03-28 18:30:03 +01:00
syscall.h audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
sysmem.h xtensa: drop sysmem and switch to memblock 2016-07-24 06:34:00 +03:00
thread_info.h xtensa: drop unused definitions 2019-02-07 12:35:02 -08:00
timex.h xtensa: clean up WSR*/RSR*/get_sr/set_sr 2018-12-04 14:08:11 -08:00
tlb.h arch/tlb: Clean up simple architectures 2019-04-03 10:32:54 +02:00
tlbflush.h xtensa: optimize local_flush_tlb_kernel_range 2014-04-06 21:29:17 +04:00
traps.h xtensa: drop unused field from the struct exc_table 2018-12-03 01:39:22 -08:00
types.h UAPI: (Scripted) Disintegrate arch/xtensa/include/asm 2012-10-15 21:48:53 -07:00
uaccess.h get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
ucontext.h
unaligned.h
unistd.h arch: handle arches who do not yet define clone3 2019-06-21 01:54:53 +02:00
user.h
vectors.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00