Re: [RFC] fix devpts mount behavior

From: Kay Sievers
Date: Sat Jan 28 2012 - 16:32:26 EST


On Sat, Jan 28, 2012 at 21:52, Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
> Serge Hallyn <serge.hallyn@xxxxxxxxxxxxx> writes:
>
>> Quoting Kay Sievers (kay.sievers@xxxxxxxx):
>>> We might also thing about changing /sys/class/tty/ptmx/, and have the
>>> kernel create the symlink? The loops through userspace to setup
>>> default kernel stuff are kind of crazy ...

>> sorry, there is something I'm missing here. ÂWithout a target kobj
>> to link to, how would we go about telling the kernel that /dev/ptmx
>> should be a symlink to /dev/pts/ptmx? ÂIs there a way to do that?

There is no support for symlinks in the core at the moment. But I
guess we could just add support for it to the driver core and devtmpfs
to create a symlink in /dev instead of a device node.

The ptmx device would need to pass that information along to the
driver core call when creating the ptmx device.

> There is precedent in the /dev/fd symlinks, so I expect you want
> to look and see where the configuration for that comes from.

That's a static list of stuff created at startup. But it's easier to
do in usersace, because /proc is not configurable or optional for
usual use cases, so we can just do it unconditionally in userspace.
They also can not conflict with device nodes.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/