RE: Why wrapping PIDs is evil [was 32bit]

From: David Schwartz (davids@webmaster.com)
Date: Sun Jan 16 2000 - 17:22:59 EST


> > You want to kill this emacs:
> >
> > pavel 209 1.6 5.2 5468 3212 3 S 22:03 0:00
> emacs /tmp/mutt-bug-
> > 2
> >
> > How do you do it?
> >
> >
> > kill -9 209?
> >
> > But that's wrong. Pavel may have seen you are going to kill his emacs
> > and may have wrapped pids, killed his emacs himself, and you are now
> > killing _your_ netscape you've just ran.
>
> So what? Pavel can shoot himself in the foot, big deal. root can do
> incredibly stupid things like doing a ps(1), run a few random programs and
> then kill(1) what ps(1) told half an hour ago. Right, there is a race
> there, and root might end up killing the wrong program. So root has to be
> careful, and not go on a killing spree, no change there.

        The point here is not that it's possible to do unsafe things but that it's
impossible to do safe things. A person or program that wants to kill a
particular process has, in principle, no way to do it without fear of
killing innocent processes.

        DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:14 EST