Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755575AbcDLBLL (ORCPT ); Mon, 11 Apr 2016 21:11:11 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51530 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752987AbcDLBLJ (ORCPT ); Mon, 11 Apr 2016 21:11:09 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <87oa9fbsag.fsf@x220.int.ebiederm.org> References: <878u0s3orx.fsf_-_@x220.int.ebiederm.org> <1459819769-30387-1-git-send-email-ebiederm@xmission.com> <87twjcorwg.fsf@x220.int.ebiederm.org> <20160409140909.42315e6d@lxorguk.ukuu.org.uk> <83FE8CD2-C0A2-4ADB-AEBD-8DD89AD4F88A@zytor.com> <87bn5ij0x1.fsf@x220.int.ebiederm.org> <78205895-E11D-417F-91DC-4BCA0B61A122@zytor.com> <877fg3emy7.fsf@x220.int.ebiederm.org> <87oa9fbsag.fsf@x220.int.ebiederm.o! rg> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH 01/13] devpts: Teach /dev/ptmx to find the associated devpts via path lookup From: "H. Peter Anvin" Date: Mon, 11 Apr 2016 18:06:48 -0700 To: ebiederm@xmission.com, Linus Torvalds CC: Andy Lutomirski , security@debian.org, "security@kernel.org" , Al Viro , "security@ubuntu.com >> security" , Peter Hurley , Serge Hallyn , Willy Tarreau , Aurelien Jarno , One Thousand Gnomes , Jann Horn , Greg KH , Linux Kernel Mailing List , Jiri Slaby , Florian Weimer Message-ID: <61F170A6-5A56-4BF5-BFB5-FC62AB6F3612@zytor.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1605 Lines: 39 On April 11, 2016 5:10:47 PM PDT, ebiederm@xmission.com wrote: >Linus Torvalds writes: > >> On Mon, Apr 11, 2016 at 4:37 PM, Eric W. Biederman >> wrote: >>> >>> My practical concern if we worked through the implementation details >>> would be how would it interact with people who bind mount >/dev/pts/ptmx >>> on top of /dev/ptmx. We might get some strange new errors. >> >> Yes, please don't let's play "clever" games. The semantics should be >> fairly straightforward. > >Actually for me this is about keeping the semantics simpler, and coming >up with a higher performance implementation. > >A dentry that does an automount is already well defined. > >Making the rule that accessing /dev/ptmx causes an automount of >/dev/pts/ptmx on top of the device node at /dev/ptmx is really simple, >with no special games. It also makes it more obvious to userspace what >is going on. AKA allows userspace to know which superblock does an >open >ptmx master tty belongs to (and it happens in a backwards and forwards >compatible way). > >My only concern is with this very minor change in semantics will >anything care. I need to implement and test to find out. > >I think I see an implementation that Al won't grumble too loudly about. > >Anyway I am going to try this and see what I can see. > >Eric Why bother with an automount? You can look up ../ptmx from the devpts get_super method and just do the bind mount once. No fuss, no muss. What's wrong with that? -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.