clone3 fix for v6.3
Hey Linus,
/* Summary */
This contains 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.
/* Testing */
clang: Ubuntu clang version 15.0.2-1
gcc: gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0
All patches are based on v6.3-rc1 and have been sitting in linux-next. No build failures or warnings were observed. All old and new tests in fstests, selftests, and LTP pass without regressions.
/* Conflicts */
At the time of creating this PR no merge conflicts were reported from linux-next and no merge conflicts showed up doing a test-merge with current mainline.
The following changes since commit fe15c26ee26efa11741a7b632e9f23b01aca4cc6:
Linux 6.3-rc1 (2023-03-05 14:52:03 -0800)
are available in the Git repository at:
[email protected]:pub/scm/linux/kernel/git/brauner/linux tags/kernel.fork.v6.3-rc2
for you to fetch changes up to 515bddf0ec4155cbd666d72daf5bd68c8b7cd987:
selftests/clone3: test clone3 with CLONE_NEWTIME (2023-03-08 12:31:35 +0100)
Please consider pulling these changes from the signed kernel.fork.v6.3-rc2 tag.
Thanks!
Christian
----------------------------------------------------------------
kernel.fork.v6.3-rc2
----------------------------------------------------------------
Tobias Klauser (2):
fork: allow CLONE_NEWTIME in clone3 flags selftests/clone3: test clone3 with CLONE_NEWTIME
kernel/fork.c | 2 +- tools/testing/selftests/clone3/clone3.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
The pull request you sent on Sun, 12 Mar 2023 11:43:20 +0100:
The pull request you sent on Sun, 12 Mar 2023 11:43:20 +0100:
Quoted 1 line
[email protected]:pub/scm/linux/kernel/git/brauner/linux tags/kernel.fork.v6.3-rc2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f5eded1f5f117ed2151f605867ad7df1fd7d1bbe
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html