Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753500AbbLNTrm (ORCPT ); Mon, 14 Dec 2015 14:47:42 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35347 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753227AbbLNTrk (ORCPT ); Mon, 14 Dec 2015 14:47:40 -0500 From: Peter Hurley Subject: Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance To: "Eric W. Biederman" References: <43AD2BA7-B594-4299-95F3-D86FD38AF21B@zytor.com> <87egexpf4o.fsf@x220.int.ebiederm.org> <1CB621EF-1647-463B-A144-D611DB150E15@zytor.com> <20151208223135.GA8352@kroah.com> <87oae0h2bo.fsf@x220.int.ebiederm.org> <56677DE3.5040705@zytor.com> <20151209012311.GA11794@kroah.com> <84B136DF-55E4-476A-9CB2-062B15677EE5@zytor.com> <20151209013859.GA12442@kroah.com> <20151209083225.GA30452@1wt.eu> <87wpskyds7.fsf_-_@x220.int.ebiederm.org> Cc: Greg KH , Jiri Slaby , "H. Peter Anvin" , Linus Torvalds , Aurelien Jarno , Andy Lutomirski , Florian Weimer , Al Viro , Serge Hallyn , Jann Horn , "security@kernel.org" , "security@ubuntu.com >> security" , security@debian.org, Willy Tarreau , linux-kernel@vger.kernel.org Message-ID: <566F1CD7.20502@hurleysoftware.com> Date: Mon, 14 Dec 2015 11:47:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <87wpskyds7.fsf_-_@x220.int.ebiederm.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 31 On 12/11/2015 11:40 AM, Eric W. Biederman wrote: > Forcing newinstance for every mount of the devpts filesystem actually > requires the association between /dev/ptmx and the currently mounted > instance of devpts at /dev/pts. Simply remembering the first mount of > the devpts filesystem and associating that with /dev/ptmx is not > enough. I am aware of at least one instance where an initramfs mounts > devpts before the main system instance of devpts is mounted. Can you point me to that usage please? I ask because there's a patch to move devpts init from module initcall up to fs initcall (neither devpts nor the pty driver is actually built as a module anyway), and I'd like to look at what the consequences might be for that userspace configuration. > In that system ptys simply did not work after boot when I tested > associating /dev/ptmx with the first mount of the devpts filesystem. Assuming userspace isn't broken by that patch, is a fixed association with first mount otherwise an acceptable solution for magic /dev/ptmx (where /dev/ptmx is not a symlink to /dev/pts/ptmx)? Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/