From: Daniel Jacobowitz <dan@debian.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
Roland McGrath <roland@redhat.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: More waitpid issues with CLONE_DETACHED/CLONE_THREAD
Date: Sun, 1 Feb 2004 00:14:35 -0500 [thread overview]
Message-ID: <20040201051435.GA19421@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0401312107440.2033@home.osdl.org>
On Sat, Jan 31, 2004 at 09:12:33PM -0800, Linus Torvalds wrote:
>
>
> On Sat, 31 Jan 2004, Daniel Jacobowitz wrote:
> > >
> > > Can you verify that that process doesn't have any sub-threads? (Again,
> > > that should be easily visible in /proc/<pid>/task/).
> >
> > It is quite easily visible - in fact, it's hilarious.
> >
> > 8454 pts/8 Z 0:00 [linux-dp] <defunct>
> >
> > drow@nevyn:~% ls /proc/8454
> > auxv cmdline cwd@ environ exe@ fd/ maps mem mounts root@ stat
> >
> > drow@nevyn:~% ls /proc/8454/task
> > ls: /proc/8454/task: No such file or directory
>
> Oh damn. Yeah, we don't allow you to even see the threads in this case (it
> checks "pid_alive(task)". We don't want you to try to confuse things by
> opening files of processes that we think are dead.
>
> For the case of trying to figure out sub-threads of a dead thread group
> leader, that may actually be a bug.
>
> Just for testing this, you might remove the check for
>
> if (!pid_alive(task))
> goto out;
>
> in proc_pident_lookup() in fs/proc/base.c.
>
> Ingo - comments? We really want the sysadmin to be able to find threads
> that have a dead group leader, and right now that seems to be impossible.
I thought that a new group leader would be swapped in to that TID? But
I was always confused by the mechanics of that.
Note that processes going invisible this way is, um, a bit of a
security problem.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-02-01 5:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-01 3:25 More waitpid issues with CLONE_DETACHED/CLONE_THREAD Daniel Jacobowitz
2004-02-01 4:38 ` Linus Torvalds
2004-02-01 4:43 ` Daniel Jacobowitz
2004-02-01 5:12 ` Daniel Jacobowitz
2004-02-01 21:41 ` Linus Torvalds
2004-02-01 22:25 ` Roland McGrath
2004-02-02 0:55 ` Linus Torvalds
2004-02-02 2:20 ` Andries Brouwer
2004-02-02 2:30 ` Linus Torvalds
2004-02-02 0:52 ` Daniel Jacobowitz
2004-02-02 2:41 ` Davide Libenzi
2004-02-02 2:55 ` Davide Libenzi
2004-02-04 14:22 ` fs/eventpoll : reduce sizeof(struct epitem) dada1
2004-02-05 4:23 ` Davide Libenzi
2004-02-01 5:12 ` More waitpid issues with CLONE_DETACHED/CLONE_THREAD Linus Torvalds
2004-02-01 5:14 ` Daniel Jacobowitz [this message]
2004-02-01 5:42 ` Roland McGrath
2004-02-01 5:46 ` Daniel Jacobowitz
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=20040201051435.GA19421@nevyn.them.org \
--to=dan@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=torvalds@osdl.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.