mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrei Vagin <avagin@openvz.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, Andrei Vagin <avagin@openvz.org>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	Kees Cook <keescook@chromium.org>,
	Kirill Kolyshkin <kir@openvz.org>
Subject: [PATCH 2/2] Documentation: describe /proc/<pid>/userns_counts
Date: Mon, 15 Aug 2016 13:10:22 -0700	[thread overview]
Message-ID: <1471291822-539-3-git-send-email-avagin@openvz.org> (raw)
In-Reply-To: <1471291822-539-1-git-send-email-avagin@openvz.org>

From: Kirill Kolyshkin <kir@openvz.org>

This file provides current usage of user namespace counters.

Signed-off-by: Kirill Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@openvz.org>
---
 Documentation/filesystems/proc.txt | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 68080ad..7300d9c 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -44,6 +44,7 @@ Table of Contents
   3.8   /proc/<pid>/fdinfo/<fd> - Information about opened file
   3.9   /proc/<pid>/map_files - Information about memory mapped files
   3.10  /proc/<pid>/timerslack_ns - Task timerslack value
+  3.11  /proc/<pid>/userns_counts - User namespace counters
 
   4	Configuring procfs
   4.1	Mount options
@@ -1889,6 +1890,35 @@ Valid values are from 0 - ULLONG_MAX
 An application setting the value must have PTRACE_MODE_ATTACH_FSCREDS level
 permissions on the task specified to change its timerslack_ns value.
 
+3.11 /proc/<pid>/userns_counts - User namespace counters
+---------------------------------------------------------
+
+This file provides current usage of user namespace counters.
+
+User namespace counters is a feature that allows to limit the number of various
+kernel objects a user can create. These limits are set via /proc/sys/user/
+sysctls on a per user namespace basis and are applicable to all users in that
+namespace. Therefore, the limits are the same for every user in a user
+namespace.
+
+Each user has their own set of user namespace counters. Once a user creates a
+new user namespace, every new object created inside that namespace is also
+charged to the user. That means that a user is limited by their user namespace
+limits, as well as the limits in their parent user namespaces.
+
+  > cat /proc/813/userns_counts
+  user_namespaces          101000	         1
+  pid_namespaces           101000	         1
+  ipc_namespaces           101000	         4
+  net_namespaces           101000	         2
+  mnt_namespaces           101000	         5
+  mnt_namespaces           100000	         1
+
+The meanings of the columns are as follows, from left to right:
+
+  Name		Object name
+  UID		User ID
+  Usage		Current usage
 
 ------------------------------------------------------------------------------
 Configuring procfs
-- 
2.5.5

  parent reply	other threads:[~2016-08-15 20:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 20:10 [PATCH 0/2 v2] userns: show current values of user namespace counters Andrei Vagin
2016-08-15 20:10 ` [PATCH 1/2] kernel: " Andrei Vagin
2016-08-16 20:00   ` Kees Cook
2016-08-16 20:05     ` Serge E. Hallyn
2016-08-16 22:44       ` Andrei Vagin
2016-08-15 20:10 ` Andrei Vagin [this message]
2016-08-16 22:53 ` [PATCH 0/2 v2] userns: " Serge E. Hallyn
2016-10-06 17:51 ` Andrei Vagin
2016-10-06 19:33   ` Eric W. Biederman
2016-10-10 16:22     ` Andrei Vagin
2016-10-10 20:44       ` 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=1471291822-539-3-git-send-email-avagin@openvz.org \
    --to=avagin@openvz.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=kir@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge.hallyn@canonical.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®