]> git.baikalelectronics.ru Git - kernel.git/commit
LoongArch: Add system call support
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 31 May 2022 10:04:11 +0000 (18:04 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 3 Jun 2022 12:09:28 +0000 (20:09 +0800)
commita1cbc7c3e7d06927d13fecedc37c1ff3f29c45cf
tree131a75f1b296d21c324143ae6502294c1c346135
parent554c3192154a8b9c6e27c23aa3ae7f8393550665
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>
arch/loongarch/include/asm/seccomp.h [new file with mode: 0644]
arch/loongarch/include/asm/syscall.h [new file with mode: 0644]
arch/loongarch/include/asm/uaccess.h [new file with mode: 0644]
arch/loongarch/include/asm/unistd.h [new file with mode: 0644]
arch/loongarch/include/uapi/asm/unistd.h [new file with mode: 0644]
arch/loongarch/kernel/entry.S [new file with mode: 0644]
arch/loongarch/kernel/syscall.c [new file with mode: 0644]