2.6-test4 Traditional pty and devfs
Hi Folks
http://bugme.osdl.org/show_bug.cgi?id=1045
I found that devfs and traditional pty's don't work properly with 2.6-test4 and a lot of previous versions. Note im talking about traditional pty's not UNIX98 which need devpts mounted.
The pty slave devices do not appear in devfs. They should be /dev/pts/s* and symbolic links from /dev/pty* into /dev/pts/s*. But these are all missing. So programs like ripperx which use a pty to control cdparanoia don't work.
I've attached two possible patches to the bugzilla bug. The first one causes the slave devices to be created in devfs at start up. The second one makes it work more like 2.4 when the slave device is only created when the master device is opened.
Both patches suffer from a problem. The slave is always only RW root. 2.4 sets the owner of the slave to that of the process opening the master. I cannot see a way to make this happen with 2.6-test.
Im open for suggestions as to the correct way to fix this.
Thanks
Andrew
Quoted 4 lines · Andrew Lunn
I've attached two possible patches to the bugzilla bug. The first one causes the slave devices to be created in devfs at start up. The second one makes it work more like 2.4 when the slave device is only created when the master device is opened.
The first patch looks okay.
Quoted 3 lines
Both patches suffer from a problem. The slave is always only RW root. 2.4 sets the owner of the slave to that of the process opening the master. I cannot see a way to make this happen with 2.6-test.
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Why aren't you using the new-style ptys?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 4 lines · Andrew Lunn
I've attached two possible patches to the bugzilla bug. The first one causes the slave devices to be created in devfs at start up. The second one makes it work more like 2.4 when the slave device is only created when the master device is opened.
The first patch looks okay.
Quoted 3 lines
Both patches suffer from a problem. The slave is always only RW root. 2.4 sets the owner of the slave to that of the process opening the master. I cannot see a way to make this happen with 2.6-test.
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Why aren't you using the new-style ptys?
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Andrew Lunn
I've attached two possible patches to the bugzilla bug. The first one causes the slave devices to be created in devfs at start up. The second one makes it work more like 2.4 when the slave device is only created when the master device is opened.
The first patch looks okay.
But what about this:
Quoted 7 lines
Quoted 3 lines
Both patches suffer from a problem. The slave is always only RW root. 2.4 sets the owner of the slave to that of the process opening the master. I cannot see a way to make this happen with 2.6-test.
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Unless we made an explicit decision to kill off old-style ptys (and we did not do that), they should continue to work as in 2.4, yes?
IOW: we broke it. Have you any theory as to which change caused this?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Andrew Lunn
I've attached two possible patches to the bugzilla bug. The first one causes the slave devices to be created in devfs at start up. The second one makes it work more like 2.4 when the slave device is only created when the master device is opened.
The first patch looks okay.
But what about this:
Quoted 7 lines
Quoted 3 lines
Both patches suffer from a problem. The slave is always only RW root. 2.4 sets the owner of the slave to that of the process opening the master. I cannot see a way to make this happen with 2.6-test.
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Unless we made an explicit decision to kill off old-style ptys (and we did not do that), they should continue to work as in 2.4, yes?
IOW: we broke it. Have you any theory as to which change caused this?
Quoted 10 lines · Andrew Morton
Quoted 7 lines
Quoted 3 lines
Both patches suffer from a problem. The slave is always only RW root. 2.4 sets the owner of the slave to that of the process opening the master. I cannot see a way to make this happen with 2.6-test.
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Unless we made an explicit decision to kill off old-style ptys (and we did not do that), they should continue to work as in 2.4, yes?
They work as they do in 2.4 and 2.6 (and any previous kernel) without devfs, remember the pt_chown pain?
There's no point in emulating half of the UNIX98 pty semantics in devfs when we have UNIX98 ptys that do it right anyway.
Quoted 1 line
IOW: we broke it. Have you any theory as to which change caused this?
That's the magic use uid/gid of the process calling devfs_Register flag I killed. With a big HEADSUP and explanation on lkml..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 10 lines · Andrew Morton
Quoted 7 lines
Quoted 3 lines
Both patches suffer from a problem. The slave is always only RW root. 2.4 sets the owner of the slave to that of the process opening the master. I cannot see a way to make this happen with 2.6-test.
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Unless we made an explicit decision to kill off old-style ptys (and we did not do that), they should continue to work as in 2.4, yes?
They work as they do in 2.4 and 2.6 (and any previous kernel) without devfs, remember the pt_chown pain?
There's no point in emulating half of the UNIX98 pty semantics in devfs when we have UNIX98 ptys that do it right anyway.
Quoted 1 line
IOW: we broke it. Have you any theory as to which change caused this?
That's the magic use uid/gid of the process calling devfs_Register flag I killed. With a big HEADSUP and explanation on lkml..
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines
IOW: we broke it. Have you any theory as to which change caused this?
That's the magic use uid/gid of the process calling
devfs_Registerflag I killed. With a big HEADSUP and explanation on lkml..
So what is the impact here? That libc5 will break if the user is using devfs and old-style pty's?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines
IOW: we broke it. Have you any theory as to which change caused this?
That's the magic use uid/gid of the process calling
devfs_Registerflag I killed. With a big HEADSUP and explanation on lkml..
So what is the impact here? That libc5 will break if the user is using devfs and old-style pty's?
Quoted 5 lines · Andrew Morton
Quoted 2 lines
That's the magic use uid/gid of the process calling
devfs_Registerflag I killed. With a big HEADSUP and explanation on lkml..So what is the impact here? That libc5 will break if the user is using devfs and old-style pty's?
If he removed the pt_chown logic that is present with a stock libc5, yes. I wouldn't know why someone would do that, though.
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines · Andrew Morton
Quoted 2 lines
That's the magic use uid/gid of the process calling
devfs_Registerflag I killed. With a big HEADSUP and explanation on lkml..So what is the impact here? That libc5 will break if the user is using devfs and old-style pty's?
If he removed the pt_chown logic that is present with a stock libc5, yes. I wouldn't know why someone would do that, though.
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
Quoted 2 lines
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
I've attached to the bugzilla bug my .config (its actually for -test2) and an ls -la /dev/pt*
Is there anything else you want to know?
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 2 lines
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
I've attached to the bugzilla bug my .config (its actually for -test2) and an ls -la /dev/pt*
Is there anything else you want to know?
Andrew
Quoted 7 lines · Andrew Lunn
Quoted 2 lines
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
I've attached to the bugzilla bug my .config (its actually for -test2) and an ls -la
/dev/pt*Is there anything else you want to know?
That doesn't really help - if an application opens old-style pty's directly the permissions can't work. IF you care for them fill a bugreport to ripperx that it should use openpty() from libc which will fix the problem automatically.
Until then we should apply your patch to create the slaves on init so the behaviour is consistant with 2.4 and 2.6 without devfs.
I was just wondering whether you were using an acient / stripped down libc with the pt_chown helper removed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Andrew Lunn
Quoted 2 lines
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
I've attached to the bugzilla bug my .config (its actually for -test2) and an ls -la
/dev/pt*Is there anything else you want to know?
That doesn't really help - if an application opens old-style pty's directly the permissions can't work. IF you care for them fill a bugreport to ripperx that it should use openpty() from libc which will fix the problem automatically.
Until then we should apply your patch to create the slaves on init so the behaviour is consistant with 2.4 and 2.6 without devfs.
I was just wondering whether you were using an acient / stripped down libc with the pt_chown helper removed.
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Andrew Lunn
Quoted 2 lines
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
I've attached to the bugzilla bug my .config (its actually for -test2) and an ls -la
/dev/pt*
Quoted 6 lines
Quoted 1 line
Is there anything else you want to know?
That doesn't really help - if an application opens old-style pty's directly the permissions can't work. IF you care for them fill a bugreport to ripperx that it should use
openpty()from libc which will fix the problem automatically.
OK. Will do.
Quoted 2 lines
I was just wondering whether you were using an acient / stripped down libc with the
pt_chownhelper removed.
Nope. A pritty normal Debian Woody system.
Thanks
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Andrew Lunn
Quoted 2 lines
That's why I'm really keen on knowing how the system of the bugreporter looks - this shouldn't happen without a very strange setup.
I've attached to the bugzilla bug my .config (its actually for -test2) and an ls -la
/dev/pt*
Quoted 6 lines
Quoted 1 line
Is there anything else you want to know?
That doesn't really help - if an application opens old-style pty's directly the permissions can't work. IF you care for them fill a bugreport to ripperx that it should use
openpty()from libc which will fix the problem automatically.
OK. Will do.
Quoted 2 lines
I was just wondering whether you were using an acient / stripped down libc with the
pt_chownhelper removed.
Nope. A pritty normal Debian Woody system.
Thanks
Andrew
Quoted 5 lines
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Why aren't you using the new-style ptys?
Ripperx, the program that is failing, is not mine. I have no control over what sort of pty it uses. Im sure there are other programs with use traditional pty's as well.
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines
Well, that's why we have UNIX98 ptys. My preferred fix for this issue would be to just axe traditional ptys, although this would probably make it us incompatible with libc5.
Why aren't you using the new-style ptys?
Ripperx, the program that is failing, is not mine. I have no control over what sort of pty it uses. Im sure there are other programs with use traditional pty's as well.
Andrew