Re: [PATCH 01/13] devpts: Teach /dev/ptmx to find the associated devpts via path lookup

From: H. Peter Anvin
Date: Tue Apr 12 2016 - 15:11:46 EST


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