summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/include/uapi
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2022-05-31 18:04:11 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2022-06-03 20:09:28 +0800
commitbe769645a2aef577f07afdcb4de8fad20b6d57c0 (patch)
tree131a75f1b296d21c324143ae6502294c1c346135 /arch/loongarch/include/uapi
parent09cfefb7fa70c3af011b0db0a513fd80b2f18abc (diff)
downloadlinux-be769645a2aef577f07afdcb4de8fad20b6d57c0.tar.gz
linux-be769645a2aef577f07afdcb4de8fad20b6d57c0.tar.bz2
linux-be769645a2aef577f07afdcb4de8fad20b6d57c0.zip
LoongArch: Add system call support
Add system call support and related uaccess.h for LoongArch. Q: Why keep _ARCH_WANT_SYS_CLONE definition while there is clone3: A: The latest glibc release has some basic support for clone3 but it is not complete. E.g., pthread_create() and spawni() have converted to use clone3 but fork() will still use clone. Moreover, some seccomp related applications can still not work perfectly with clone3. E.g., Chromium sandbox cannot work at all and there is no solution for it, which is more terrible than the fork() story [1]. [1] https://chromium-review.googlesource.com/c/chromium/src/+/2936184 Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/uapi')
-rw-r--r--arch/loongarch/include/uapi/asm/unistd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/loongarch/include/uapi/asm/unistd.h b/arch/loongarch/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..fcb668984f03
--- /dev/null
+++ b/arch/loongarch/include/uapi/asm/unistd.h
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#define __ARCH_WANT_SYS_CLONE
+#define __ARCH_WANT_SYS_CLONE3
+
+#include <asm-generic/unistd.h>