Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933714AbcDSSd1 (ORCPT ); Tue, 19 Apr 2016 14:33:27 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:40017 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932186AbcDSSdX (ORCPT ); Tue, 19 Apr 2016 14:33:23 -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: <877ffyzy1j.fsf_-_@x220.int.ebiederm.org> <1460734532-20134-1-git-send-email-ebiederm@xmission.com> <1460734532-20134-14-git-send-email-ebiederm@xmission.com> Date: Tue, 19 Apr 2016 13:22:24 -0500 In-Reply-To: (Linus Torvalds's message of "Fri, 15 Apr 2016 16:02:49 -0700") Message-ID: <8737qhpifz.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: U2FsdGVkX18+RbROjbINVolBA/CzZJsMo11pGZuhApc= X-SA-Exim-Connect-IP: 97.119.105.151 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.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 * [sa01 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa01 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 1776 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 3.8 (0.2%), b_tie_ro: 2.6 (0.1%), parse: 1.25 (0.1%), extract_message_metadata: 30 (1.7%), get_uri_detail_list: 2.5 (0.1%), tests_pri_-1000: 14 (0.8%), tests_pri_-950: 1.98 (0.1%), tests_pri_-900: 1.67 (0.1%), tests_pri_-400: 36 (2.0%), check_bayes: 34 (1.9%), b_tokenize: 14 (0.8%), b_tok_get_all: 8 (0.5%), b_comp_prob: 4.4 (0.2%), b_tok_touch_all: 3.1 (0.2%), b_finish: 0.89 (0.0%), tests_pri_0: 1674 (94.3%), check_dkim_signature: 0.80 (0.0%), check_dkim_adsp: 4.4 (0.3%), tests_pri_500: 8 (0.5%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 14/16] vfs: Implement mount_super_once 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: 1710 Lines: 47 Linus Torvalds writes: > On Fri, Apr 15, 2016 at 8:35 AM, Eric W. Biederman > wrote: >> The devpts filesystem has a notion of a system or primary instance of >> devpts. To retain the notion of a primary system instance of devpts >> the code needs a way to allow userspace to mount the internally >> mounted instance of devpts when it is not currently mounted by >> userspace. The new helper mount_super_once allows that. > > This is where I stopped reading this patch series. > > No. > > We want to get *rid* of the idiotic "primary instance" crap. That is actually pretty much the opposite of what you said last time, but having looked at the cost to maintian a "primary instance" notion and what will break if we don't I am happy to remove such a notion from devpts. > The whole and only point of doing the "which pts filesystem am I > associated with" for ptmx is to stop the idiotic "one devpts is > pecial". > > I don't want to see 16 random patches. > > I want to see *one* patch that makes /dev/ptmx look up the pts > filesystem, and be done with it. Now that I know where most of the landmines are in userspace I performed some limited testing to see to see what the implications are: Causing every userspace mount of devpts to use mount_nodev means the following: - Support for reserving ptys for the system devpts instance using /proc/sys/kernel/pty/reserve needs to be removed. - On CentOS6 devpts will wind up mounted twice /dev/pts. - Open of /dev/ptmx can use devpts_mnt to find the devpts filesystem. In my cursory testing userspace still boots and works desipite those changes so I am quite happy to go down this path. Eric