All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Gladkov <legion@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux.dev>
Cc: 0day robot <lkp@intel.com>,
	"Eric W . Biederman" <ebiederm@xmission.com>,
	lkp@lists.01.org
Subject: [PATCH v2 0/2] ucounts: Fix rlimit max values check
Date: Mon, 29 Nov 2021 21:37:24 +0100	[thread overview]
Message-ID: <cover.1638218242.git.legion@kernel.org> (raw)
In-Reply-To: <20211129074730.GB18483@xsang-OptiPlex-9020>

Checking the rlimit value specified in init_user_ns from the created userns does
not work properly. The issue is that the maximum value is taken by the same
rules as for ucounts. Because of this, we check the current rlimit counter value
with RLIM_INFINITY in init_user_ns.

v2:
- Fix a bug that was found by the lkp project.

--

Alexey Gladkov (2):
  ucounts: Fix rlimit max values check
  ucounts: Move rlimit max values from ucounts max

 include/linux/user_namespace.h | 17 ++++++++++++-----
 kernel/fork.c                  | 10 +++++-----
 kernel/ucount.c                | 19 +++++++++----------
 kernel/user_namespace.c        | 10 +++++-----
 4 files changed, 31 insertions(+), 25 deletions(-)

-- 
2.33.0


WARNING: multiple messages have this Message-ID (diff)
From: Alexey Gladkov <legion@kernel.org>
To: lkp@lists.01.org
Subject: [PATCH v2 0/2] ucounts: Fix rlimit max values check
Date: Mon, 29 Nov 2021 21:37:24 +0100	[thread overview]
Message-ID: <cover.1638218242.git.legion@kernel.org> (raw)
In-Reply-To: <20211129074730.GB18483@xsang-OptiPlex-9020>

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

Checking the rlimit value specified in init_user_ns from the created userns does
not work properly. The issue is that the maximum value is taken by the same
rules as for ucounts. Because of this, we check the current rlimit counter value
with RLIM_INFINITY in init_user_ns.

v2:
- Fix a bug that was found by the lkp project.

--

Alexey Gladkov (2):
  ucounts: Fix rlimit max values check
  ucounts: Move rlimit max values from ucounts max

 include/linux/user_namespace.h | 17 ++++++++++++-----
 kernel/fork.c                  | 10 +++++-----
 kernel/ucount.c                | 19 +++++++++----------
 kernel/user_namespace.c        | 10 +++++-----
 4 files changed, 31 insertions(+), 25 deletions(-)

-- 
2.33.0

  reply	other threads:[~2021-11-29 20:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 14:37 [PATCH v1 0/2] ucounts: Fix rlimit max values check Alexey Gladkov
2021-11-26 14:37 ` [PATCH v1 1/2] " Alexey Gladkov
2021-11-26 14:37 ` [PATCH v1 2/2] ucounts: Move rlimit max values from ucounts max Alexey Gladkov
2021-11-27 16:42   ` kernel test robot
2021-12-03 13:33     ` Dan Carpenter
2021-12-03 13:33     ` Dan Carpenter
2021-12-03 13:54     ` Alexey Gladkov
2021-12-03 13:54       ` Alexey Gladkov
2021-12-03 14:19       ` David Laight
2021-12-03 14:19         ` David Laight
2021-12-03 13:57     ` Alexey Gladkov
2021-12-03 13:57       ` Alexey Gladkov
2021-11-29  7:47   ` [ucounts] dc7e5f9d41: UBSAN:array-index-out-of-bounds_in_kernel/ucount.c kernel test robot
2021-11-29  7:47     ` kernel test robot
2021-11-29 20:37     ` Alexey Gladkov [this message]
2021-11-29 20:37       ` [PATCH v2 0/2] ucounts: Fix rlimit max values check Alexey Gladkov
2021-11-29 20:37       ` [PATCH v2 1/2] " Alexey Gladkov
2021-11-29 20:37         ` Alexey Gladkov
2021-11-29 20:37       ` [PATCH v2 2/2] ucounts: Move rlimit max values from ucounts max Alexey Gladkov
2021-11-29 20:37         ` Alexey Gladkov
2021-12-13 15:50         ` Eric W. Biederman
2021-12-13 15:50           ` Eric W. Biederman
2021-12-17 14:48           ` [PATCH v3] ucounts: Split rlimit and ucount values and max values Alexey Gladkov
2021-12-17 14:48             ` Alexey Gladkov
2021-12-19 19:54             ` Eric W. Biederman
2021-12-19 19:54               ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1638218242.git.legion@kernel.org \
    --to=legion@kernel.org \
    --cc=containers@lists.linux.dev \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.