Re: [PATCH v6 3/7] Reimplement RLIMIT_NPROC on top of ucounts

2021-02-22 Thread Jens Axboe
On 2/22/21 3:11 AM, Alexey Gladkov wrote: > On Sun, Feb 21, 2021 at 04:38:10PM -0700, Jens Axboe wrote: >> On 2/15/21 5:41 AM, Alexey Gladkov wrote: >>> diff --git a/fs/io-wq.c b/fs/io-wq.c >>> index a564f36e260c..5b6940c90c61 100644 >>> --- a/fs/io-wq.c >>> +++ b/fs/io-wq.c >>> @@ -1090,10 +1091,7

Re: [PATCH v6 3/7] Reimplement RLIMIT_NPROC on top of ucounts

2021-02-22 Thread Alexey Gladkov
On Sun, Feb 21, 2021 at 04:38:10PM -0700, Jens Axboe wrote: > On 2/15/21 5:41 AM, Alexey Gladkov wrote: > > diff --git a/fs/io-wq.c b/fs/io-wq.c > > index a564f36e260c..5b6940c90c61 100644 > > --- a/fs/io-wq.c > > +++ b/fs/io-wq.c > > @@ -1090,10 +1091,7 @@ struct io_wq *io_wq_create(unsigned bound

Re: [PATCH v6 3/7] Reimplement RLIMIT_NPROC on top of ucounts

2021-02-21 Thread Jens Axboe
On 2/15/21 5:41 AM, Alexey Gladkov wrote: > diff --git a/fs/io-wq.c b/fs/io-wq.c > index a564f36e260c..5b6940c90c61 100644 > --- a/fs/io-wq.c > +++ b/fs/io-wq.c > @@ -1090,10 +1091,7 @@ struct io_wq *io_wq_create(unsigned bounded, struct > io_wq_data *data) > wqe->node = alloc_node;

[PATCH v6 3/7] Reimplement RLIMIT_NPROC on top of ucounts

2021-02-15 Thread Alexey Gladkov
The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. To illustrate the impact of rlimits, let's say there is a prog