diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2009-09-23 18:56:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-24 10:21:00 -0400 |
commit | a293980c2e261bd5b0d2a77340dd04f684caff58 (patch) | |
tree | 69f2b2747548deafb146c18953ebce21ae1f02d4 /Documentation/sysctl/kernel.txt | |
parent | 725eae32df7754044809973034429a47e6035158 (diff) |
exec: let do_coredump() limit the number of concurrent dumps to pipes
Introduce core pipe limiting sysctl.
Since we can dump cores to pipe, rather than directly to the filesystem,
we create a condition in which a user can create a very high load on the
system simply by running bad applications.
If the pipe reader specified in core_pattern is poorly written, we can
have lots of ourstandig resources and processes in the system.
This sysctl introduces an ability to limit that resource consumption.
core_pipe_limit defines how many in-flight dumps may be run in parallel,
dumps beyond this value are skipped and a note is made in the kernel log.
A special value of 0 in core_pipe_limit denotes unlimited core dumps may
be handled (this is the default value).
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Earl Chew <earl_chew@agilent.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/sysctl/kernel.txt')
-rw-r--r-- | Documentation/sysctl/kernel.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index b3d8b4922740..a028b92001ed 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -22,6 +22,7 @@ show up in /proc/sys/kernel: | |||
22 | - callhome [ S390 only ] | 22 | - callhome [ S390 only ] |
23 | - auto_msgmni | 23 | - auto_msgmni |
24 | - core_pattern | 24 | - core_pattern |
25 | - core_pipe_limit | ||
25 | - core_uses_pid | 26 | - core_uses_pid |
26 | - ctrl-alt-del | 27 | - ctrl-alt-del |
27 | - dentry-state | 28 | - dentry-state |
@@ -135,6 +136,27 @@ core_pattern is used to specify a core dumpfile pattern name. | |||
135 | 136 | ||
136 | ============================================================== | 137 | ============================================================== |
137 | 138 | ||
139 | core_pipe_limit: | ||
140 | |||
141 | This sysctl is only applicable when core_pattern is configured to pipe core | ||
142 | files to user space helper a (when the first character of core_pattern is a '|', | ||
143 | see above). When collecting cores via a pipe to an application, it is | ||
144 | occasionally usefull for the collecting application to gather data about the | ||
145 | crashing process from its /proc/pid directory. In order to do this safely, the | ||
146 | kernel must wait for the collecting process to exit, so as not to remove the | ||
147 | crashing processes proc files prematurely. This in turn creates the possibility | ||
148 | that a misbehaving userspace collecting process can block the reaping of a | ||
149 | crashed process simply by never exiting. This sysctl defends against that. It | ||
150 | defines how many concurrent crashing processes may be piped to user space | ||
151 | applications in parallel. If this value is exceeded, then those crashing | ||
152 | processes above that value are noted via the kernel log and their cores are | ||
153 | skipped. 0 is a special value, indicating that unlimited processes may be | ||
154 | captured in parallel, but that no waiting will take place (i.e. the collecting | ||
155 | process is not guaranteed access to /proc/<crahing pid>/). This value defaults | ||
156 | to 0. | ||
157 | |||
158 | ============================================================== | ||
159 | |||
138 | core_uses_pid: | 160 | core_uses_pid: |
139 | 161 | ||
140 | The default coredump filename is "core". By setting | 162 | The default coredump filename is "core". By setting |