[PATCH] setuid core dump
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / Documentation / sysctl / kernel.txt
CommitLineData
1da177e4
LT
1Documentation for /proc/sys/kernel/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3
4For general info and legal blurb, please look in README.
5
6==============================================================
7
8This file contains documentation for the sysctl files in
9/proc/sys/kernel/ and is valid for Linux kernel version 2.2.
10
11The files in this directory can be used to tune and monitor
12miscellaneous and general things in the operation of the Linux
13kernel. Since some of the files _can_ be used to screw up your
14system, it is advisable to read both documentation and source
15before actually making adjustments.
16
17Currently, these files might (depending on your configuration)
18show up in /proc/sys/kernel:
19- acct
20- core_pattern
21- core_uses_pid
22- ctrl-alt-del
23- dentry-state
24- domainname
25- hostname
26- hotplug
27- java-appletviewer [ binfmt_java, obsolete ]
28- java-interpreter [ binfmt_java, obsolete ]
29- l2cr [ PPC only ]
30- modprobe ==> Documentation/kmod.txt
31- msgmax
32- msgmnb
33- msgmni
34- osrelease
35- ostype
36- overflowgid
37- overflowuid
38- panic
39- pid_max
40- powersave-nap [ PPC only ]
41- printk
42- real-root-dev ==> Documentation/initrd.txt
43- reboot-cmd [ SPARC only ]
44- rtsig-max
45- rtsig-nr
46- sem
47- sg-big-buff [ generic SCSI device (sg) ]
48- shmall
49- shmmax [ sysv ipc ]
50- shmmni
51- stop-a [ SPARC only ]
d6e71144 52- suid_dumpable
1da177e4
LT
53- sysrq ==> Documentation/sysrq.txt
54- tainted
55- threads-max
56- version
57
58==============================================================
59
60acct:
61
62highwater lowwater frequency
63
64If BSD-style process accounting is enabled these values control
65its behaviour. If free space on filesystem where the log lives
66goes below <lowwater>% accounting suspends. If free space gets
67above <highwater>% accounting resumes. <Frequency> determines
68how often do we check the amount of free space (value is in
69seconds). Default:
704 2 30
71That is, suspend accounting if there left <= 2% free; resume it
72if we got >=4%; consider information about amount of free space
73valid for 30 seconds.
74
75==============================================================
76
77core_pattern:
78
79core_pattern is used to specify a core dumpfile pattern name.
80. max length 64 characters; default value is "core"
81. core_pattern is used as a pattern template for the output filename;
82 certain string patterns (beginning with '%') are substituted with
83 their actual values.
84. backward compatibility with core_uses_pid:
85 If core_pattern does not include "%p" (default does not)
86 and core_uses_pid is set, then .PID will be appended to
87 the filename.
88. corename format specifiers:
89 %<NUL> '%' is dropped
90 %% output one '%'
91 %p pid
92 %u uid
93 %g gid
94 %s signal number
95 %t UNIX time of dump
96 %h hostname
97 %e executable filename
98 %<OTHER> both are dropped
99
100==============================================================
101
102core_uses_pid:
103
104The default coredump filename is "core". By setting
105core_uses_pid to 1, the coredump filename becomes core.PID.
106If core_pattern does not include "%p" (default does not)
107and core_uses_pid is set, then .PID will be appended to
108the filename.
109
110==============================================================
111
112ctrl-alt-del:
113
114When the value in this file is 0, ctrl-alt-del is trapped and
115sent to the init(1) program to handle a graceful restart.
116When, however, the value is > 0, Linux's reaction to a Vulcan
117Nerve Pinch (tm) will be an immediate reboot, without even
118syncing its dirty buffers.
119
120Note: when a program (like dosemu) has the keyboard in 'raw'
121mode, the ctrl-alt-del is intercepted by the program before it
122ever reaches the kernel tty layer, and it's up to the program
123to decide what to do with it.
124
125==============================================================
126
127domainname & hostname:
128
129These files can be used to set the NIS/YP domainname and the
130hostname of your box in exactly the same way as the commands
131domainname and hostname, i.e.:
132# echo "darkstar" > /proc/sys/kernel/hostname
133# echo "mydomain" > /proc/sys/kernel/domainname
134has the same effect as
135# hostname "darkstar"
136# domainname "mydomain"
137
138Note, however, that the classic darkstar.frop.org has the
139hostname "darkstar" and DNS (Internet Domain Name Server)
140domainname "frop.org", not to be confused with the NIS (Network
141Information Service) or YP (Yellow Pages) domainname. These two
142domain names are in general different. For a detailed discussion
143see the hostname(1) man page.
144
145==============================================================
146
147hotplug:
148
149Path for the hotplug policy agent.
150Default value is "/sbin/hotplug".
151
152==============================================================
153
154l2cr: (PPC only)
155
156This flag controls the L2 cache of G3 processor boards. If
1570, the cache is disabled. Enabled if nonzero.
158
159==============================================================
160
161osrelease, ostype & version:
162
163# cat osrelease
1642.1.88
165# cat ostype
166Linux
167# cat version
168#5 Wed Feb 25 21:49:24 MET 1998
169
170The files osrelease and ostype should be clear enough. Version
171needs a little more clarification however. The '#5' means that
172this is the fifth kernel built from this source base and the
173date behind it indicates the time the kernel was built.
174The only way to tune these values is to rebuild the kernel :-)
175
176==============================================================
177
178overflowgid & overflowuid:
179
180if your architecture did not always support 32-bit UIDs (i.e. arm, i386,
181m68k, sh, and sparc32), a fixed UID and GID will be returned to
182applications that use the old 16-bit UID/GID system calls, if the actual
183UID or GID would exceed 65535.
184
185These sysctls allow you to change the value of the fixed UID and GID.
186The default is 65534.
187
188==============================================================
189
190panic:
191
192The value in this file represents the number of seconds the
193kernel waits before rebooting on a panic. When you use the
194software watchdog, the recommended setting is 60.
195
196==============================================================
197
198panic_on_oops:
199
200Controls the kernel's behaviour when an oops or BUG is encountered.
201
2020: try to continue operation
203
2041: delay a few seconds (to give klogd time to record the oops output) and
205 then panic. If the `panic' sysctl is also non-zero then the machine will
206 be rebooted.
207
208==============================================================
209
210pid_max:
211
212PID allocation wrap value. When the kenrel's next PID value
213reaches this value, it wraps back to a minimum PID value.
214PIDs of value pid_max or larger are not allocated.
215
216==============================================================
217
218powersave-nap: (PPC only)
219
220If set, Linux-PPC will use the 'nap' mode of powersaving,
221otherwise the 'doze' mode will be used.
222
223==============================================================
224
225printk:
226
227The four values in printk denote: console_loglevel,
228default_message_loglevel, minimum_console_loglevel and
229default_console_loglevel respectively.
230
231These values influence printk() behavior when printing or
232logging error messages. See 'man 2 syslog' for more info on
233the different loglevels.
234
235- console_loglevel: messages with a higher priority than
236 this will be printed to the console
237- default_message_level: messages without an explicit priority
238 will be printed with this priority
239- minimum_console_loglevel: minimum (highest) value to which
240 console_loglevel can be set
241- default_console_loglevel: default value for console_loglevel
242
243==============================================================
244
245printk_ratelimit:
246
247Some warning messages are rate limited. printk_ratelimit specifies
248the minimum length of time between these messages (in jiffies), by
249default we allow one every 5 seconds.
250
251A value of 0 will disable rate limiting.
252
253==============================================================
254
255printk_ratelimit_burst:
256
257While long term we enforce one message per printk_ratelimit
258seconds, we do allow a burst of messages to pass through.
259printk_ratelimit_burst specifies the number of messages we can
260send before ratelimiting kicks in.
261
262==============================================================
263
264reboot-cmd: (Sparc only)
265
266??? This seems to be a way to give an argument to the Sparc
267ROM/Flash boot loader. Maybe to tell it what to do after
268rebooting. ???
269
270==============================================================
271
272rtsig-max & rtsig-nr:
273
274The file rtsig-max can be used to tune the maximum number
275of POSIX realtime (queued) signals that can be outstanding
276in the system.
277
278rtsig-nr shows the number of RT signals currently queued.
279
280==============================================================
281
282sg-big-buff:
283
284This file shows the size of the generic SCSI (sg) buffer.
285You can't tune it just yet, but you could change it on
286compile time by editing include/scsi/sg.h and changing
287the value of SG_BIG_BUFF.
288
289There shouldn't be any reason to change this value. If
290you can come up with one, you probably know what you
291are doing anyway :)
292
293==============================================================
294
295shmmax:
296
297This value can be used to query and set the run time limit
298on the maximum shared memory segment size that can be created.
299Shared memory segments up to 1Gb are now supported in the
300kernel. This value defaults to SHMMAX.
301
302==============================================================
303
d6e71144
AC
304suid_dumpable:
305
306This value can be used to query and set the core dump mode for setuid
307or otherwise protected/tainted binaries. The modes are
308
3090 - (default) - traditional behaviour. Any process which has changed
310 privilege levels or is execute only will not be dumped
3111 - (debug) - all processes dump core when possible. The core dump is
312 owned by the current user and no security is applied. This is
313 intended for system debugging situations only. Ptrace is unchecked.
3142 - (suidsafe) - any binary which normally would not be dumped is dumped
315 readable by root only. This allows the end user to remove
316 such a dump but not access it directly. For security reasons
317 core dumps in this mode will not overwrite one another or
318 other files. This mode is appropriate when adminstrators are
319 attempting to debug problems in a normal environment.
320
321==============================================================
322
1da177e4
LT
323tainted:
324
325Non-zero if the kernel has been tainted. Numeric values, which
326can be ORed together:
327
328 1 - A module with a non-GPL license has been loaded, this
329 includes modules with no license.
330 Set by modutils >= 2.4.9 and module-init-tools.
331 2 - A module was force loaded by insmod -f.
332 Set by modutils >= 2.4.9 and module-init-tools.
333 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
334