History

unistd: protect clone3 via __ARCH_WANT_SYS_CLONE3

This lets us catch new architectures that implicitly make use of clone3 without setting __ARCH_WANT_SYS_CLONE3. Failing on missing __ARCH_WANT_SYS_CLONE3 is a good indicator that they either did not really want this syscall or haven't really thought about whether it needs special treatment and just accidently included it in their entrypoints by e.g. generating their syscall table automatically via asm-generic/unistd.h This patch has been compile-tested for the h8300 architecture which is one of the architectures that does not yet implement clone3 and generates its syscall table via asm-generic/unistd.h.

Christian Brauner committed 7 years ago

Commit 05a70a81 parent 1a271a61 file · +2 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/asm-generic/unistd.h+2−0
@@ -846,8 +846,10 @@ __SYSCALL(__NR_fsmount, sys_fsmount) · 845 unmodified lines
846__SYSCALL(__NR_fspick, sys_fspick)846__SYSCALL(__NR_fspick, sys_fspick)
847#define __NR_pidfd_open 434847#define __NR_pidfd_open 434
848__SYSCALL(__NR_pidfd_open, sys_pidfd_open)848__SYSCALL(__NR_pidfd_open, sys_pidfd_open)
849#ifdef __ARCH_WANT_SYS_CLONE3
849#define __NR_clone3 435850#define __NR_clone3 435
850__SYSCALL(__NR_clone3, sys_clone3)851__SYSCALL(__NR_clone3, sys_clone3)
852#endif
851 853
852#undef __NR_syscalls854#undef __NR_syscalls
853#define __NR_syscalls 436855#define __NR_syscalls 436