lkml.org 
[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] fix devpts mount behavior
On Mon, Jan 23, 2012 at 04:41:25PM -0800, Linus Torvalds wrote:

> Right. I think the opportunity for problems should be pretty small.
>
> And it's not like the pty itself wouldn't continue to work - it's just
> that programs like /usr/bin/tty wouldn't be able to *find* it.
>
> Although who knows - maybe there is some other subtle interaction.

FWIW, the subtle and nasty part in all that is that you can mknod /dev/ptmx
and it *will* work, refering to the "initial" instance. That's what
concerns me about the chroot scenarios -
mknod /jail/dev/ptmx c 5 2
mkdir /jail/dev/pts
mount -t devpts /jail/dev/pts
chroot /jail
works fine right now, but with that change behaviour will be all wrong -
opening /dev/ptmx inside of jail will grab you a pts, all right, but
it will *not* show up in (jail) /dev/pts/* as it does with the current
kernel.

Note that if you replace that mknod with symlink pts/ptmx /jail/dev/ptmx
the things will keep working. However, that will _only_ work for kernels
with DEVPTS_MULTIPLE_INSTANCES - without it you won't get ptmx inside
devpts (which is arguably wrong, BTW)


\
 
 \ /
  Last update: 2012-01-24 02:11    [W:0.196 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site