Subject: Re: Fork bomb protection patch
To: Roland Dowdeswell <firstname.lastname@example.org>
From: Jaromir Dolecek <email@example.com>
Date: 12/05/2002 10:05:31
Roland Dowdeswell wrote:
> But, you have the same problem if you have 2000 programs doing:
> for (;;)
> or any other system call. Why should fork(2) be special? Just
> because there is an old local DOS attack that used it?
> If a process or a number of processes can kill the machine just by
> spinning on forks that always fail, then I believe that this
> underlines a more serious issue that should be addressed and not
> papered over.
Note: these things do not 'kill' the machine, i.e. do not completely
lock it up tight or panic. Merely consume available (CPU in this
case) resources, so it takes longer for admins to fix things up.
> If consensus is to penalise the offending process, I'd like to put
> forward the notion of just adding a large number to p_estcpu rather
> than tsleeping. At least then the solution would work within the
> current scheduler to some degree.
Good idea. Yes, this might work just as well as the tsleep().
I'll experiment with this.
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow. Do not let this distract you.'' -=-