From: Peter Hurley <peter@hurleysoftware.com>
To: Albert Cahalan <acahalan@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: 18-year-old bug
Date: Thu, 7 Jan 2016 13:37:13 -0800 [thread overview]
Message-ID: <568EDA89.8050401@hurleysoftware.com> (raw)
In-Reply-To: <CABfYdSrbbm_iYmBpDD-Kef8KvSmR7wfDNxQt0L1o0aegONQB2g@mail.gmail.com>
On 01/06/2016 06:37 AM, Albert Cahalan wrote:
> This bug was introduced with SE Linux, 18 years ago. People have been
> adding hacks to work around it as the bug bites them, but really the
> bug ought to be fixed. Signals related to a tty are supposed to come
> from the kernel. This got broken for pty devices. We now act as if
> the signal is sent from the process on the master side of the pty.
> That isn't right; the signal is supposed to come from the tty itself
> and thus have a kernel identity.
What problem do you observe and on what kernel version?
> How to reproduce:
>
> Copy /bin/sleep to /tmp/work and /tmp/fail. Start up xterm, run
> /tmp/work in the window, close the window, and see the process gone.
> Now repeat that for /tmp/fail, but run "su -" in the window first.
> Meanwhile, to view the problem, run this in another window:
>
> ps -Cwork -Cfail -o tty,pid,ppid,tpgid,pgid,sid,ruid,euid,comm
>
> (so like "/tmp/fail 100" or however much time you need)
>
> I first saw the problem when I was maintaining top. People would
> run top as root, close the window, and then find that top got stuck
> spinning on select. Eventually top was hacked up to work around the
> kernel bug, but really we shouldn't have userspace trying to work
> around kernel bugs. I tried to fix it back then, but got a bit lost
> in the then-new code. Sorry. Since then, I've become insanely busy
> with ten kids. I'd really appreciate if somebody could take a shot
> at fixing this bug. It seems to have hit a coworker a few months back,
> and he is just living with it. (ouch)
prev parent reply other threads:[~2016-01-07 21:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 14:37 18-year-old bug Albert Cahalan
2016-01-06 16:24 ` Jeff Merkey
2016-01-07 21:37 ` Peter Hurley [this message]
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=568EDA89.8050401@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=acahalan@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.