From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755599AbcDLBdh (ORCPT ); Mon, 11 Apr 2016 21:33:37 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:54370 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755528AbcDLBdg (ORCPT ); Mon, 11 Apr 2016 21:33:36 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: "H. Peter Anvin" Cc: Linus Torvalds , 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 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> <61F170A6-5A56-4BF5-BFB5-FC62AB6F3612@zytor.com> Date: Mon, 11 Apr 2016 20:23:00 -0500 In-Reply-To: <61F170A6-5A56-4BF5-BFB5-FC62AB6F3612@zytor.com> (H. Peter Anvin's message of "Mon, 11 Apr 2016 18:06:48 -0700") Message-ID: <87k2k3aadn.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1+YyNeRwidgNlufzCQ9Cu81VZMjql/zRoY= X-SA-Exim-Connect-IP: 67.3.249.252 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] * 1.0 T_XMDrugObfuBody_04 obfuscated drug references X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;"H. Peter Anvin" X-Spam-Relay-Country: X-Spam-Timing: total 1895 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 4.1 (0.2%), b_tie_ro: 3.0 (0.2%), parse: 0.74 (0.0%), extract_message_metadata: 18 (1.0%), get_uri_detail_list: 2.1 (0.1%), tests_pri_-1000: 9 (0.5%), tests_pri_-950: 1.17 (0.1%), tests_pri_-900: 0.96 (0.1%), tests_pri_-400: 24 (1.3%), check_bayes: 23 (1.2%), b_tokenize: 7 (0.4%), b_tok_get_all: 8 (0.4%), b_comp_prob: 2.1 (0.1%), b_tok_touch_all: 3.2 (0.2%), b_finish: 0.68 (0.0%), tests_pri_0: 203 (10.7%), check_dkim_signature: 0.49 (0.0%), check_dkim_adsp: 2.9 (0.2%), tests_pri_500: 1631 (86.1%), poll_dns_idle: 1622 (85.6%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 01/13] devpts: Teach /dev/ptmx to find the associated devpts via path lookup X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "H. Peter Anvin" writes: > 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? Perhaps I am reading the code wrong but as I read it that information is simply not available in get_super. Eric