From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966028AbcDLTLn (ORCPT ); Tue, 12 Apr 2016 15:11:43 -0400 Received: from terminus.zytor.com ([198.137.202.10]:40398 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965494AbcDLTLd (ORCPT ); Tue, 12 Apr 2016 15:11:33 -0400 From: "H. Peter Anvin" Subject: Re: [PATCH 01/13] devpts: Teach /dev/ptmx to find the associated devpts via path lookup To: Linus Torvalds , Andy Lutomirski 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> Cc: security@debian.org, "security@kernel.org" , Al Viro , "security@ubuntu.com >> security" , Peter Hurley , "Eric W. Biederman" , Serge Hallyn , Willy Tarreau , Aurelien Jarno , One Thousand Gnomes , Jann Horn , Greg KH , Linux Kernel Mailing List , Jiri Slaby , Florian Weimer Message-ID: <570D4781.3070600@zytor.com> Date: Tue, 12 Apr 2016 12:07:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/16 11:12, Linus Torvalds wrote: > > So what I want to happen is to "just make /dev/ptmx work". Get rid of > the broken "single instance" crap. The only reason it exists is > exactly because /dev/ptmx does not work. > > I think the current situation is completely and utterly broken. We > should never have done what we did. I want to *fix* the kernel, not > add random new magic crap. > Agreed. As far as I'm concerned, there seem to be two realistic variants, talking semantically as opposed to implementation-wise: 1. Change the default mode of /dev/pts/ptmx to default to 0666, and make /dev/ptmx have the effective semantics of the symlink which userspace and userdev/devramfs should have provided all along. 2. Make /dev/ptmx simply look up the pts superblock from its path and then act like /dev/pts/ptmx. In that case we can probably remove the ptmx device node unless the ptmxmode mount option is given (in which case user space probably enabled the symlink.) -hpa