From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [REVIEW][PATCH 3/5] pidns: Don't have unshare(CLONE_NEWPID) imply CLONE_THREAD Date: Sun, 8 Sep 2013 19:00:01 +0200 Message-ID: <20130908170001.GA1835@redhat.com> References: <87ob8gys0d.fsf@xmission.com> <87a9k0yrvu.fsf@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <87a9k0yrvu.fsf-aS9lmoZGLiVWk0Htik3J/w@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: "Eric W. Biederman" Cc: Linux Containers , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: containers.vger.kernel.org Sorry for delay, vacation. On 08/29, Eric W. Biederman wrote: > > I goofed when I made unshare(CLONE_NEWPID) only work in a > single-threaded process. There is no need for that requirement and in > fact I analyzied things right for setns. The hard requirement > is for tasks that share a VM to all be in the pid namespace and > we properly prevent that in do_fork. Yes, agreed, with the current meaning of ->pid_ns unshare(NEWPID) looks safe even if the caller is multi-threaded... and this matches pidns_install() which doesn't require single-threaded. Oleg. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758524Ab3IHRGM (ORCPT ); Sun, 8 Sep 2013 13:06:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28014 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753093Ab3IHRGK (ORCPT ); Sun, 8 Sep 2013 13:06:10 -0400 Date: Sun, 8 Sep 2013 19:00:01 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Linux Containers , "Serge E. Hallyn" , linux-kernel@vger.kernel.org Subject: Re: [REVIEW][PATCH 3/5] pidns: Don't have unshare(CLONE_NEWPID) imply CLONE_THREAD Message-ID: <20130908170001.GA1835@redhat.com> References: <87ob8gys0d.fsf@xmission.com> <87a9k0yrvu.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a9k0yrvu.fsf@xmission.com> 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 Sorry for delay, vacation. On 08/29, Eric W. Biederman wrote: > > I goofed when I made unshare(CLONE_NEWPID) only work in a > single-threaded process. There is no need for that requirement and in > fact I analyzied things right for setns. The hard requirement > is for tasks that share a VM to all be in the pid namespace and > we properly prevent that in do_fork. Yes, agreed, with the current meaning of ->pid_ns unshare(NEWPID) looks safe even if the caller is multi-threaded... and this matches pidns_install() which doesn't require single-threaded. Oleg.