From: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
To: Alan Cox <alan@linux.intel.com>
Cc: Alan Cox <alan@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: possible regression with pty.c commit
Date: Sat, 11 Jul 2009 22:15:56 +0300 [thread overview]
Message-ID: <20090711191556.GA3845@localdomain.by> (raw)
[-- 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 --]
next reply other threads:[~2009-07-11 19:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 19:15 Sergey Senozhatsky [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090711191556.GA3845@localdomain.by \
--to=sergey.senozhatsky@mail.by \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®