Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755046AbcDLAV5 (ORCPT ); Mon, 11 Apr 2016 20:21:57 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:41513 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686AbcDLAVz (ORCPT ); Mon, 11 Apr 2016 20:21:55 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: "H. Peter Anvin" , 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> Date: Mon, 11 Apr 2016 19:10:47 -0500 In-Reply-To: (Linus Torvalds's message of "Mon, 11 Apr 2016 17:01:47 -0700") Message-ID: <87oa9fbsag.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+1phfY+Lxm4v8xoufzTzA7aGpFc8LcC6o= 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 * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * 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 * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 1.0 T_XMDrugObfuBody_04 obfuscated drug references X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 13884 ms - load_scoreonly_sql: 0.18 (0.0%), signal_user_changed: 3.3 (0.0%), b_tie_ro: 2.1 (0.0%), parse: 1.27 (0.0%), extract_message_metadata: 22 (0.2%), get_uri_detail_list: 1.86 (0.0%), tests_pri_-1000: 8 (0.1%), tests_pri_-950: 1.23 (0.0%), tests_pri_-900: 1.03 (0.0%), tests_pri_-400: 29 (0.2%), check_bayes: 28 (0.2%), b_tokenize: 11 (0.1%), b_tok_get_all: 8 (0.1%), b_comp_prob: 3.3 (0.0%), b_tok_touch_all: 2.8 (0.0%), b_finish: 0.71 (0.0%), tests_pri_0: 249 (1.8%), check_dkim_signature: 0.71 (0.0%), check_dkim_adsp: 3.2 (0.0%), tests_pri_500: 13565 (97.7%), poll_dns_idle: 13548 (97.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 Content-Length: 1257 Lines: 32 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