From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 3/4] devpts: Make the newinstance option historical Date: Sun, 23 Sep 2012 07:34:45 +0100 Message-ID: <20120923063445.GA26640@ZenIV.linux.org.uk> References: <20120124220247.GA26353@hallyn.com> <20120124231601.GA4470@sergelap> <20120128195103.GA11299@sergelap> <87txup763i.fsf_-_@xmission.com> <87d31d75yj.fsf_-_@xmission.com> <20120923041906.GM13973@ZenIV.linux.org.uk> <87bogx5lg7.fsf@xmission.com> <20120923063038.GO13973@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120923063038.GO13973-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@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: Greg Kroah-Hartman , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Kay Sievers , Dave Hansen , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andy Whitcroft , sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, Linus Torvalds , Alan Cox List-Id: containers.vger.kernel.org On Sun, Sep 23, 2012 at 07:30:38AM +0100, Al Viro wrote: > On Sat, Sep 22, 2012 at 10:59:04PM -0700, Eric W. Biederman wrote: > > > The test: > > >> + if (filp->f_vfsmnt->mnt_root == filp->f_dentry) > > kicks in and no redirection is performed. > > Umm... OK, after the first round of recursion. Unless you bind /something/pts > on /something. Other way round, of course... E.g. mount --bind /dev /dev/pts mount --bind /dev /dev/pts/pts etc. enough times to overflow the kernel stack on recursion. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143Ab2IWGex (ORCPT ); Sun, 23 Sep 2012 02:34:53 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47519 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751261Ab2IWGew (ORCPT ); Sun, 23 Sep 2012 02:34:52 -0400 Date: Sun, 23 Sep 2012 07:34:45 +0100 From: Al Viro To: "Eric W. Biederman" Cc: Greg Kroah-Hartman , Kay Sievers , "Serge E. Hallyn" , containers@lists.linux-foundation.org, Dave Hansen , linux-kernel@vger.kernel.org, Andy Whitcroft , sukadev@linux.vnet.ibm.com, Linus Torvalds , Alan Cox , Serge Hallyn Subject: Re: [PATCH 3/4] devpts: Make the newinstance option historical Message-ID: <20120923063445.GA26640@ZenIV.linux.org.uk> References: <20120124220247.GA26353@hallyn.com> <20120124231601.GA4470@sergelap> <20120128195103.GA11299@sergelap> <87txup763i.fsf_-_@xmission.com> <87d31d75yj.fsf_-_@xmission.com> <20120923041906.GM13973@ZenIV.linux.org.uk> <87bogx5lg7.fsf@xmission.com> <20120923063038.GO13973@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120923063038.GO13973@ZenIV.linux.org.uk> 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 On Sun, Sep 23, 2012 at 07:30:38AM +0100, Al Viro wrote: > On Sat, Sep 22, 2012 at 10:59:04PM -0700, Eric W. Biederman wrote: > > > The test: > > >> + if (filp->f_vfsmnt->mnt_root == filp->f_dentry) > > kicks in and no redirection is performed. > > Umm... OK, after the first round of recursion. Unless you bind /something/pts > on /something. Other way round, of course... E.g. mount --bind /dev /dev/pts mount --bind /dev /dev/pts/pts etc. enough times to overflow the kernel stack on recursion.