From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [RFC][v8][PATCH 3/10]: Make pid_max a pid_ns property Date: Tue, 13 Oct 2009 10:24:53 -0500 Message-ID: <20091013152453.GA9994@us.ibm.com> References: <20091013044925.GA28181@us.ibm.com> <20091013045041.GC28435@us.ibm.com> <4AD47C1F.7040703@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4AD47C1F.7040703-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Pavel Emelyanov Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, Containers , Nathan Lynch , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Louis.Rilling-aw0BnHfMbSpBDgjK7y7TUQ@public.gmane.org, "Eric W. Biederman" , kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org, hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org, mingo-X9Un+BFzKDI@public.gmane.org, Sukadev Bhattiprolu , torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, Alexey Dobriyan , roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: containers.vger.kernel.org Quoting Pavel Emelyanov (xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org): > Sukadev Bhattiprolu wrote: > > > > From: Serge Hallyn > > Subject: [RFC][v8][PATCH 3/10]: Make pid_max a pid_ns property > > > > Remove the pid_max global, and make it a property of the > > pid_namespace. When a pid_ns is created, it inherits > > the parent's pid_ns. > > > > Fixing up sysctl (trivial akin to ipc version, but > > potentially tedious to get right for all CONFIG* > > combinations) is left for later. > > > > Changelog[v2]: > > - Port to newer kernel > > - Make pid_max a local variable in alloc_pidmap() to simplify code/patch > > > > Signed-off-by: Serge Hallyn > > Signed-off-by: Sukadev Bhattiprolu > > Not that I'm about to slow down or block the process, but... This patch isn't a core part of the clone_with_pid functionality, just something Eric has asked for. So I don't object to dropping it. But I disagree with Alexey's claim that this isn't a namespace property. It should be. > frankly I don't see the reason for doing so. Why should we? > Especially taking into account, that we essentially cannot > change thin in the namespace level 3 and deeper? What do you mean by that? With this patchset we're not, it's true, but we trivially can - even now, userspace can simply not give the container CAP_SYS_ADMIN or write access to the sysctl so they can't do any more CLONE_NEWPIDS or change the sysctl. -serge From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933894AbZJMQJO (ORCPT ); Tue, 13 Oct 2009 12:09:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759741AbZJMQJO (ORCPT ); Tue, 13 Oct 2009 12:09:14 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:47260 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753401AbZJMQJN (ORCPT ); Tue, 13 Oct 2009 12:09:13 -0400 Date: Tue, 13 Oct 2009 10:24:53 -0500 From: "Serge E. Hallyn" To: Pavel Emelyanov Cc: Sukadev Bhattiprolu , linux-kernel@vger.kernel.org, Oren Laadan , "Eric W. Biederman" , Alexey Dobriyan , Andrew Morton , torvalds@linux-foundation.org, mikew@google.com, mingo@elte.hu, hpa@zytor.com, Nathan Lynch , arnd@arndb.de, peterz@infradead.org, Louis.Rilling@kerlabs.com, roland@redhat.com, kosaki.motohiro@jp.fujitsu.com, randy.dunlap@oracle.com, linux-api@vger.kernel.org, Containers , sukadev@us.ibm.com Subject: Re: [RFC][v8][PATCH 3/10]: Make pid_max a pid_ns property Message-ID: <20091013152453.GA9994@us.ibm.com> References: <20091013044925.GA28181@us.ibm.com> <20091013045041.GC28435@us.ibm.com> <4AD47C1F.7040703@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AD47C1F.7040703@openvz.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Pavel Emelyanov (xemul@openvz.org): > Sukadev Bhattiprolu wrote: > > > > From: Serge Hallyn > > Subject: [RFC][v8][PATCH 3/10]: Make pid_max a pid_ns property > > > > Remove the pid_max global, and make it a property of the > > pid_namespace. When a pid_ns is created, it inherits > > the parent's pid_ns. > > > > Fixing up sysctl (trivial akin to ipc version, but > > potentially tedious to get right for all CONFIG* > > combinations) is left for later. > > > > Changelog[v2]: > > - Port to newer kernel > > - Make pid_max a local variable in alloc_pidmap() to simplify code/patch > > > > Signed-off-by: Serge Hallyn > > Signed-off-by: Sukadev Bhattiprolu > > Not that I'm about to slow down or block the process, but... This patch isn't a core part of the clone_with_pid functionality, just something Eric has asked for. So I don't object to dropping it. But I disagree with Alexey's claim that this isn't a namespace property. It should be. > frankly I don't see the reason for doing so. Why should we? > Especially taking into account, that we essentially cannot > change thin in the namespace level 3 and deeper? What do you mean by that? With this patchset we're not, it's true, but we trivially can - even now, userspace can simply not give the container CAP_SYS_ADMIN or write access to the sysctl so they can't do any more CLONE_NEWPIDS or change the sysctl. -serge