Re: [PATCH] ptrace: it is fun to strace /sbin/init

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Roland McGrath
Date: Tuesday, March 25, 2008 - 3:00 pm

> It would be fine to allow this unconditionally if there was some mechanism

I don't see why this particular issue is any special case.  The zombie leak
is just one of many ways that the system might become unusable if root does
the wrong thing to an essential system daemon.  Caveat superusor.  Diddling
with init on a system you expect ever to do anything again is dangerous and
requires great care.  The question of allowing an administrator to engage
in dangerous activities is orthogonal to the details of a particular danger.

With today's kernel, init can avoid any reparented zombies collecting if it
doesn't care about its own children either.  That is, it can ignore SIGCHLD
or set SA_NOCLDWAIT to make all its children clean themselves up.  That
doesn't help for a normal init, which does care (for respawn and logging).
(Also it's never been tried, and I'm almost sure it has a bug.  But that's
supposed to be the semantics.)

That said, the orthogonal question of orphan zombies may well be worth
addressing too.  Just let's not conflate it with the ptrace question.
(AFAIK there is no good reason not to make orphans just self-reap, it's
just hysterical raisins inherited from the dawn of Unix.  I'm sure that
Oleg and I can work out the cleanups, but in a separate thread please.)


Thanks,
Roland
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Sun Mar 23, 6:51 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Pavel Machek, (Mon Mar 24, 9:01 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Mon Mar 24, 9:40 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andrew Morton, (Mon Mar 24, 3:29 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Pavel Machek, (Mon Mar 24, 3:39 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Mon Mar 24, 3:56 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Mon Mar 24, 4:04 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andrew Morton, (Mon Mar 24, 4:08 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Pavel Machek, (Mon Mar 24, 4:09 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Mon Mar 24, 4:18 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andrew Morton, (Mon Mar 24, 4:26 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Mon Mar 24, 4:29 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Mon Mar 24, 4:38 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andi Kleen, (Tue Mar 25, 3:00 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Stephen Smalley, (Tue Mar 25, 5:03 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Serge E. Hallyn, (Tue Mar 25, 6:40 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Krzysztof Halasa, (Tue Mar 25, 7:16 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andi Kleen, (Tue Mar 25, 7:22 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Krzysztof Halasa, (Tue Mar 25, 7:30 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andi Kleen, (Tue Mar 25, 7:35 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Stephen Smalley, (Tue Mar 25, 7:37 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Pavel Machek, (Tue Mar 25, 7:47 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andi Kleen, (Tue Mar 25, 7:56 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Krzysztof Halasa, (Tue Mar 25, 7:58 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Oleg Nesterov, (Tue Mar 25, 10:42 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Serge E. Hallyn, (Tue Mar 25, 11:06 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Herbert Poetzl, (Tue Mar 25, 12:07 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Pavel Machek, (Tue Mar 25, 2:55 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Roland McGrath, (Tue Mar 25, 3:00 pm)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Andrew Morgan, (Wed Mar 26, 8:31 am)
Re: [PATCH] ptrace: it is fun to strace /sbin/init, Pavel Emelyanov, (Wed Mar 26, 8:47 am)