public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dane Mutters <dmutters@gmail.com>
To: Diego Calleja <diegocg@gmail.com>
Cc: Martin Olsson <mnemo@minimum.se>,
	Peter Zijlstra <peterz@infradead.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: Is it possible to give the user the option to cancel forkbombs?
Date: Sat, 17 Nov 2007 09:55:01 -0800	[thread overview]
Message-ID: <1195322101.15120.3.camel@Orchestrator> (raw)
In-Reply-To: <20071117165325.3e5f571a.diegocg@gmail.com>


On Sat, 2007-11-17 at 16:53 +0100, Diego Calleja wrote:
> El Sat, 17 Nov 2007 09:42:51 -0800, Martin Olsson <mnemo@minimum.se> escribió:
> 
> > I don't think that setting a max process count by default is a 
> > good/viable solution. 
> 
> 
> I don't see why...OS X had a default limit of 100 processes per uid (increased
> to 266 in 10.5) and "it works" (many people notices it, but it's not surprising
> since the limit is too restrictive).
> 
> If you don't have limits, you can't avoid starvation easily. From my experience,
> since I use CFS, fork/compile bombs (forgetting to put a number after make -j...)
> are very sluggish mainly because the whole graphic subsystem is paged out.

I don't know if this is at all feasible, but is it possible to have a
mechanism that would detect a fork bomb in progress and either stop the
fork, or allow the user to cancel the operation?  For example, are there
any legitimate processes (i.e. ones that really need to fork like crazy)
that would need to generate 200+ processes in less than 1 second?

(Note: I'm not a programmer; I'm just throwing out the idea.)

-Dane


  reply	other threads:[~2007-11-17 17:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-17  5:51 Is it possible to give the user the option to cancel forkbombs? Martin Olsson
2007-11-16 21:31 ` Alan Cox
2007-11-17  7:04   ` Martin Olsson
2007-11-16 23:46     ` Alan Cox
2007-11-17  6:45     ` Dane Mutters
2007-11-17  7:44       ` Peter Zijlstra
2007-11-17 10:39         ` Alan Cox
2007-11-17 13:36           ` Andi Kleen
2007-11-17 15:28             ` Herbert Xu
2007-11-17 17:42         ` Martin Olsson
2007-11-17 10:03           ` Peter Zijlstra
2007-11-17 15:53           ` Diego Calleja
2007-11-17 17:55             ` Dane Mutters [this message]
2007-11-23  7:34               ` Radoslaw Szkodzinski
2007-11-22  0:05     ` (``-_-´´) -- Fernando
2007-11-22 12:03       ` David Newall
2007-11-16 21:38 ` Diego Calleja

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=1195322101.15120.3.camel@Orchestrator \
    --to=dmutters@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=diegocg@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mnemo@minimum.se \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox