Commit 24baca5
committed
clone: add CLONE_NNP
Add a new clone3() flag CLONE_NNP that sets no_new_privs on the child
process at clone time. This is analogous to prctl(PR_SET_NO_NEW_PRIVS)
but applied at process creation rather than requiring a separate step
after the child starts running.
CLONE_NNP is rejected with CLONE_THREAD. It's conceptually a lot simpler
if the whole thread-group is forced into NNP and not have single threads
running around with NNP.
Link: https://patch.msgid.link/20260226-work-pidfs-autoreap-v5-2-d148b984a989@kernel.org
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>1 parent 12ae2c8 commit 24baca5
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2040 | 2040 | | |
2041 | 2041 | | |
2042 | 2042 | | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
2043 | 2048 | | |
2044 | 2049 | | |
2045 | 2050 | | |
| |||
2424 | 2429 | | |
2425 | 2430 | | |
2426 | 2431 | | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
2427 | 2435 | | |
2428 | 2436 | | |
2429 | 2437 | | |
| |||
2912 | 2920 | | |
2913 | 2921 | | |
2914 | 2922 | | |
2915 | | - | |
| 2923 | + | |
2916 | 2924 | | |
2917 | 2925 | | |
2918 | 2926 | | |
| |||
0 commit comments