Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kernel.fork.v6.3-rc2' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux

Pull clone3 fix from Christian Brauner:
"A simple fix for the clone3() system call.

The CLONE_NEWTIME allows the creation of time namespaces. The flag
reuses a bit from the CSIGNAL bits that are used in the legacy clone()
system call to set the signal that gets sent to the parent after the
child exits.

The clone3() system call doesn't rely on CSIGNAL anymore as it uses a
dedicated .exit_signal field in struct clone_args. So we blocked all
CSIGNAL bits in clone3_args_valid(). When CLONE_NEWTIME was introduced
and reused a CSIGNAL bit we forgot to adapt clone3_args_valid()
causing CLONE_NEWTIME with clone3() to be rejected. Fix this"

* tag 'kernel.fork.v6.3-rc2' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux:
selftests/clone3: test clone3 with CLONE_NEWTIME
fork: allow CLONE_NEWTIME in clone3 flags

+4 -1
+1 -1
kernel/fork.c
··· 2936 2936 * - make the CLONE_DETACHED bit reusable for clone3 2937 2937 * - make the CSIGNAL bits reusable for clone3 2938 2938 */ 2939 - if (kargs->flags & (CLONE_DETACHED | CSIGNAL)) 2939 + if (kargs->flags & (CLONE_DETACHED | (CSIGNAL & (~CLONE_NEWTIME)))) 2940 2940 return false; 2941 2941 2942 2942 if ((kargs->flags & (CLONE_SIGHAND | CLONE_CLEAR_SIGHAND)) ==
+3
tools/testing/selftests/clone3/clone3.c
··· 195 195 test_clone3(CLONE_NEWPID, getpagesize() + 8, -E2BIG, 196 196 CLONE3_ARGS_NO_TEST); 197 197 198 + /* Do a clone3() in a new time namespace */ 199 + test_clone3(CLONE_NEWTIME, 0, 0, CLONE3_ARGS_NO_TEST); 200 + 198 201 return !ksft_get_fail_cnt() ? ksft_exit_pass() : ksft_exit_fail(); 199 202 }