On Sat, 17 Nov 2007 09:55:01 -0800 Dane Mutters <[email protected]> wrote: > 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.) > If the parent PID of the new task is exported through TASKSTATS, you can do it already in userspace. If not, that data should be exported. Then you could write a root daemon using netlink, set it to RT priority and create an inheritable counter in it to thwart binary forking. The counter would be cleared every x seconds. No need to do it in the kernel.
Attachment:
signature.asc
Description: PGP signature
- References:
- Is it possible to give the user the option to cancel forkbombs?
- From: Martin Olsson <[email protected]>
- Re: Is it possible to give the user the option to cancel forkbombs?
- From: Alan Cox <[email protected]>
- Re: Is it possible to give the user the option to cancel forkbombs?
- From: Martin Olsson <[email protected]>
- Re: Is it possible to give the user the option to cancel forkbombs?
- From: Dane Mutters <[email protected]>
- Re: Is it possible to give the user the option to cancel forkbombs?
- From: Peter Zijlstra <[email protected]>
- Re: Is it possible to give the user the option to cancel forkbombs?
- From: Martin Olsson <[email protected]>
- Re: Is it possible to give the user the option to cancel forkbombs?
- From: Diego Calleja <[email protected]>
- Re: Is it possible to give the user the option to cancel forkbombs?
- From: Dane Mutters <[email protected]>
- Is it possible to give the user the option to cancel forkbombs?
- Prev by Date: Re: 2.6.24-rc3-mm1: I/O error, system hangs
- Next by Date: Re: [PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace
- Previous by thread: Re: Is it possible to give the user the option to cancel forkbombs?
- Next by thread: Re: Is it possible to give the user the option to cancel forkbombs?
- Index(es):