From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753548AbcHPWyA (ORCPT ); Tue, 16 Aug 2016 18:54:00 -0400 Received: from h2.hallyn.com ([78.46.35.8]:36504 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753252AbcHPWx7 (ORCPT ); Tue, 16 Aug 2016 18:53:59 -0400 Date: Tue, 16 Aug 2016 17:53:57 -0500 From: "Serge E. Hallyn" To: Andrei Vagin Cc: "Eric W. Biederman" , Serge Hallyn , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Kees Cook Subject: Re: [PATCH 0/2 v2] userns: show current values of user namespace counters Message-ID: <20160816225357.GA4140@mail.hallyn.com> References: <1471291822-539-1-git-send-email-avagin@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471291822-539-1-git-send-email-avagin@openvz.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Andrei Vagin (avagin@openvz.org): > 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//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//userns_counts > > Cc: Serge Hallyn Acked-by: Serge Hallyn > Cc: Kees Cook > Cc: "Eric W. Biederman" > Signed-off-by: Andrei Vagin > > Andrei Vagin (1): > kernel: show current values of user namespace counters > > Kirill Kolyshkin (1): > Documentation: describe /proc//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 > _______________________________________________ > Containers mailing list > Containers@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/containers