Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1463150
| From | Andrei Vagin <avagin@openvz.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 0/2 v2] userns: show current values of user namespace counters |
| Date | 2016-08-15 22:20 +0200 |
| Message-ID | <s6wwx-1Mu-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Recently Eric added 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.
User namespace counters are not in the upstream tree yet,
you can find them in Eric's tree:
https://git.kernel.org/cgit/linux/kernel/git/ebiederm/user-namespace.git/log/?h=for-testing
This patch adds /proc/<pid>/userns_counts files to provide current usage
of user namespace counters.
> 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
The full documentation is in the second patch.
v2: - describe this file in Documentation/filesystems/proc.txt
- move and rename into /proc/<pid>/userns_counts
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Andrei Vagin (1):
kernel: show current values of user namespace counters
Kirill Kolyshkin (1):
Documentation: describe /proc/<pid>/userns_counts
Documentation/filesystems/proc.txt | 30 +++++++++++
fs/proc/array.c | 55 ++++++++++++++++++++
fs/proc/base.c | 1 +
fs/proc/internal.h | 1 +
include/linux/user_namespace.h | 8 +++
kernel/ucount.c | 102 +++++++++++++++++++++++++++++++++++++
6 files changed, 197 insertions(+)
--
2.5.5
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 0/2 v2] userns: show current values of user namespace counters Andrei Vagin <avagin@openvz.org> - 2016-08-15 22:20 +0200
[PATCH 1/2] kernel: show current values of user namespace counters Andrei Vagin <avagin@openvz.org> - 2016-08-15 22:20 +0200
Re: [PATCH 1/2] kernel: show current values of user namespace counters "Serge E. Hallyn" <serge@hallyn.com> - 2016-08-16 22:10 +0200
Re: [PATCH 1/2] kernel: show current values of user namespace counters Kees Cook <keescook@chromium.org> - 2016-08-16 22:10 +0200
Re: [PATCH 0/2 v2] userns: show current values of user namespace counters "Serge E. Hallyn" <serge@hallyn.com> - 2016-08-17 01:00 +0200
csiph-web