| Date | Tue, 15 Feb 2022 12:37:48 +0100 | From | Michal Koutný <> | Subject | Re: [PATCH 0/8] ucounts: RLIMIT_NPROC fixes |
| |
On Fri, Feb 11, 2022 at 11:22:13AM -0700, Shuah Khan <skhan@linuxfoundation.org> wrote: > Do we need updates to selftests - Michal's patch series included changes to > selftests/exec
In my understanding the original rlimits-per-userns.c covers an invalid use case -- clone(0);setuid();unshare(CLONE_NEWUSER) -- where the created user_ns is owned by unprivileged user and the global RLIMIT_NPROC cannot be breached.
My patched variant retains this use-case (should fail) and adds clone(CLONE_NEWUSER);setuid() [1] variant which should be the valid use-case for per-user per-user-ns RLIMIT_NPROC.
Michal
[1] In this situation theoretically equivalent to clone(0);unshare(CLONE_NEWUSER);setuid().
|