public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* possible regression with pty.c commit
@ 2009-07-11 19:15 Sergey Senozhatsky
  2009-07-11 22:24 ` Alan Cox
  0 siblings, 1 reply; 15+ messages in thread
From: Sergey Senozhatsky @ 2009-07-11 19:15 UTC (permalink / raw)
  To: Alan Cox; +Cc: Alan Cox, Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3406 bytes --]

Hello,
commit d945cb9cce20ac7143c2de8d88b187f62db99bdc ("pty: Rework the pty layer to use the normal buffering logic")
seems to brake kdesu.

(quote: "Because some su implementations (i.e. the one from Red HatВ®) don't want to 
read the password from stdin, KDE su creates a pty/tty pair and 
executes su with it's standard filedescriptors connected to the tty.")

Revert "pty: Rework the pty layer to use the normal buffering logic"
(commit d945cb9cce20ac7143c2de8d88b187f62db99bdc) makes kdesu work again.

strace /usr/bin/kdesu -u root -c top:
//tons of kde stuff were cut

execve("/usr/bin/kdesu", ["/usr/bin/kdesu", "-u", "root", "-c", "top"], [/* 36 vars */]) = 0
brk(0)                                  = 0x9268000
...
sigreturn()                             = ? (mask now [])
access("/bin/su", X_OK)                 = 0
open("/dev/ptmx", O_RDWR)               = 10
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(10, TIOCGPTN, [10])               = 0
stat64("/dev/pts/10", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 10), ...}) = 0
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(10, TIOCGPTN, [10])               = 0
stat64("/dev/pts/10", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 10), ...}) = 0
statfs("/dev/pts/10", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
ioctl(10, TIOCSPTLCK, [0])              = 0
open("/dev/pts/10", O_RDWR)             = 11
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb68c5718) = 4072
close(11)                               = 0
fcntl64(10, F_GETFL)                    = 0x2 (flags O_RDWR)
read(10, "Password: ", 255)             = 10
select(11, [10], NULL, NULL, {0, 100000}) = 0 (Timeout)
kill(4072, SIG_0)                       = 0
open("/dev/pts/10", O_RDWR)             = 11
kill(4072, SIG_0)                       = 0
ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 -opost isig icanon -echo ...}) = 0
close(11)                               = 0
kill(4072, SIG_0)                       = 0
write(10, "**~WRITE_PASSWORD~**", 11)	= 11
write(10, "\n", 1)                      = 1
fcntl64(10, F_GETFL)                    = 0x2 (flags O_RDWR)
read(10, "\n", 255)                     = 1
fcntl64(10, F_GETFL)                    = 0x2 (flags O_RDWR)
read(10, "kdesu_stub\n", 255)           = 11
open("/dev/pts/10", O_RDWR)             = 11
ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 -opost isig icanon echo ...}) = 0
ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 -opost isig icanon echo ...}) = 0
ioctl(11, SNDCTL_TMR_START or TCSETS, {B38400 -opost isig icanon -echo ...}) = 0
ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 -opost isig icanon -echo ...}) = 0
close(11)                               = 0
write(10, "stop", 4)                    = 4
write(10, "\n", 1)                      = 1
fcntl64(10, F_GETFL)                    = 0x2 (flags O_RDWR)
read(10, 0xbf840858, 255)               = -1 EIO (Input/output error)		<<<<<<<<<
--- SIGCHLD (Child exited) @ 0 (0) ---
write(5, "\0", 1)                       = 1
sigreturn()                             = ? (mask now [])
.....


As for "bug 13522: BUG: scheduling while atomic" - I'll test it.


	Sergey

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-07-19 23:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-11 19:15 possible regression with pty.c commit Sergey Senozhatsky
2009-07-11 22:24 ` Alan Cox
2009-07-11 23:55   ` Sergey Senozhatsky
2009-07-13 11:48     ` Alan Cox
2009-07-13 16:41       ` Sergey Senozhatsky
2009-07-14 16:28       ` Sergey Senozhatsky
2009-07-14 22:57         ` Pierre Willenbrock
2009-07-15 10:05         ` Alan Cox
2009-07-15 10:27           ` Sergey Senozhatsky
2009-07-15 10:30             ` Alan Cox
2009-07-15 17:03               ` Sergey Senozhatsky
2009-07-17  0:51                 ` Dave Young
2009-07-17  8:34                   ` Sergey Senozhatsky
2009-07-17 13:34                     ` Dave Young
2009-07-19 23:07       ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox