sysctl.c 63.3 KB
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * sysctl.c: General linux system control interface
 *
 * Begun 24 March 1995, Stephen Tweedie
 * Added /proc support, Dec 1995
 * Added bdflush entry and intvec min/max checking, 2/23/96, Tom Dyas.
 * Added hooks for /proc/sys/net (minor, minor patch), 96/4/1, Mike Shaver.
 * Added kernel/java-{interpreter,appletviewer}, 96/5/10, Mike Shaver.
 * Dynamic registration fixes, Stephen Tweedie.
 * Added kswapd-interval, ctrl-alt-del, printk stuff, 1/8/97, Chris Horn.
 * Made sysctl support optional via CONFIG_SYSCTL, 1/10/97, Chris
 *  Horn.
 * Added proc_doulongvec_ms_jiffies_minmax, 09/08/99, Carlos H. Bauer.
 * Added proc_doulongvec_minmax, 09/08/99, Carlos H. Bauer.
 * Changed linked lists to use list.h instead of lists.h, 02/24/00, Bill
 *  Wendling.
 * The list_for_each() macro wasn't appropriate for the sysctl loop.
 *  Removed it and replaced it with older style, 03/23/00, Bill Wendling
 */

#include <linux/module.h>
22
#include <linux/aio.h>
Linus Torvalds's avatar
Linus Torvalds committed
23 24 25 26
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
27
#include <linux/bitmap.h>
Dave Young's avatar
Dave Young committed
28
#include <linux/signal.h>
29
#include <linux/printk.h>
Linus Torvalds's avatar
Linus Torvalds committed
30
#include <linux/proc_fs.h>
31
#include <linux/security.h>
Linus Torvalds's avatar
Linus Torvalds committed
32
#include <linux/ctype.h>
33
#include <linux/kmemcheck.h>
34
#include <linux/kmemleak.h>
35
#include <linux/fs.h>
Linus Torvalds's avatar
Linus Torvalds committed
36 37
#include <linux/init.h>
#include <linux/kernel.h>
38
#include <linux/kobject.h>
39
#include <linux/net.h>
Linus Torvalds's avatar
Linus Torvalds committed
40 41 42
#include <linux/sysrq.h>
#include <linux/highuid.h>
#include <linux/writeback.h>
43
#include <linux/ratelimit.h>
44
#include <linux/compaction.h>
Linus Torvalds's avatar
Linus Torvalds committed
45 46
#include <linux/hugetlb.h>
#include <linux/initrd.h>
47
#include <linux/key.h>
Linus Torvalds's avatar
Linus Torvalds committed
48 49 50
#include <linux/times.h>
#include <linux/limits.h>
#include <linux/dcache.h>
51
#include <linux/dnotify.h>
Linus Torvalds's avatar
Linus Torvalds committed
52
#include <linux/syscalls.h>
Adrian Bunk's avatar
Adrian Bunk committed
53
#include <linux/vmstat.h>
54 55
#include <linux/nfs_fs.h>
#include <linux/acpi.h>
56
#include <linux/reboot.h>
57
#include <linux/ftrace.h>
58
#include <linux/perf_event.h>
59
#include <linux/kprobes.h>
60
#include <linux/pipe_fs_i.h>
61
#include <linux/oom.h>
62
#include <linux/kmod.h>
63
#include <linux/capability.h>
Al Viro's avatar
Al Viro committed
64
#include <linux/binfmts.h>
65
#include <linux/sched/sysctl.h>
66
#include <linux/kexec.h>
Linus Torvalds's avatar
Linus Torvalds committed
67 68 69 70

#include <asm/uaccess.h>
#include <asm/processor.h>

71 72
#ifdef CONFIG_X86
#include <asm/nmi.h>
73
#include <asm/stacktrace.h>
74
#include <asm/io.h>
75
#endif
76 77 78
#ifdef CONFIG_SPARC
#include <asm/setup.h>
#endif
Dave Young's avatar
Dave Young committed
79 80 81
#ifdef CONFIG_BSD_PROCESS_ACCT
#include <linux/acct.h>
#endif
Dave Young's avatar
Dave Young committed
82 83 84
#ifdef CONFIG_RT_MUTEXES
#include <linux/rtmutex.h>
#endif
Dave Young's avatar
Dave Young committed
85 86 87
#if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT)
#include <linux/lockdep.h>
#endif
Dave Young's avatar
Dave Young committed
88 89 90
#ifdef CONFIG_CHR_DEV_SG
#include <scsi/sg.h>
#endif
91

92
#ifdef CONFIG_LOCKUP_DETECTOR
93 94 95
#include <linux/nmi.h>
#endif

96

Linus Torvalds's avatar
Linus Torvalds committed
97 98 99 100
#if defined(CONFIG_SYSCTL)

/* External variables not in a header file. */
extern int max_threads;
Alan Cox's avatar
Alan Cox committed
101
extern int suid_dumpable;
102 103
#ifdef CONFIG_COREDUMP
extern int core_uses_pid;
Linus Torvalds's avatar
Linus Torvalds committed
104
extern char core_pattern[];
105
extern unsigned int core_pipe_limit;
106
#endif
Linus Torvalds's avatar
Linus Torvalds committed
107 108
extern int pid_max;
extern int pid_max_min, pid_max_max;
109
extern int percpu_pagelist_fraction;
110
extern int compat_log;
Arjan van de Ven's avatar
Arjan van de Ven committed
111
extern int latencytop_enabled;
112
extern int sysctl_nr_open_min, sysctl_nr_open_max;
113 114 115
#ifndef CONFIG_MMU
extern int sysctl_nr_trim_pages;
#endif
Linus Torvalds's avatar
Linus Torvalds committed
116

117
/* Constants used for minimum and  maximum */
118
#ifdef CONFIG_LOCKUP_DETECTOR
119 120 121
static int sixty = 60;
#endif

122 123
static int __maybe_unused neg_one = -1;

124
static int zero;
125 126
static int __maybe_unused one = 1;
static int __maybe_unused two = 2;
127
static int __maybe_unused four = 4;
128
static unsigned long one_ul = 1;
129
static int one_hundred = 100;
130 131 132
#ifdef CONFIG_PRINTK
static int ten_thousand = 10000;
#endif
133

134 135 136
/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
static unsigned long dirty_bytes_min = 2 * PAGE_SIZE;

Linus Torvalds's avatar
Linus Torvalds committed
137 138 139 140 141
/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
static int maxolduid = 65535;
static int minolduid;

static int ngroups_max = NGROUPS_MAX;
142
static const int cap_last_cap = CAP_LAST_CAP;
Linus Torvalds's avatar
Linus Torvalds committed
143

144 145 146 147 148
/*this is needed for proc_doulongvec_minmax of sysctl_hung_task_timeout_secs */
#ifdef CONFIG_DETECT_HUNG_TASK
static unsigned long hung_task_timeout_max = (LONG_MAX/HZ);
#endif

Dave Young's avatar
Dave Young committed
149 150 151
#ifdef CONFIG_INOTIFY_USER
#include <linux/inotify.h>
#endif
152
#ifdef CONFIG_SPARC
Linus Torvalds's avatar
Linus Torvalds committed
153 154 155 156
#endif

#ifdef __hppa__
extern int pwrsw_enabled;
157 158 159
#endif

#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
Linus Torvalds's avatar
Linus Torvalds committed
160 161 162
extern int unaligned_enabled;
#endif

163
#ifdef CONFIG_IA64
164
extern int unaligned_dump_stack;
165 166
#endif

167 168 169 170
#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
extern int no_unaligned_warning;
#endif

171
#ifdef CONFIG_PROC_SYSCTL
172 173 174 175 176 177 178

#define SYSCTL_WRITES_LEGACY	-1
#define SYSCTL_WRITES_WARN	 0
#define SYSCTL_WRITES_STRICT	 1

static int sysctl_writes_strict = SYSCTL_WRITES_WARN;

179
static int proc_do_cad_pid(struct ctl_table *table, int write,
180
		  void __user *buffer, size_t *lenp, loff_t *ppos);
181
static int proc_taint(struct ctl_table *table, int write,
182
			       void __user *buffer, size_t *lenp, loff_t *ppos);
183
#endif
184

185
#ifdef CONFIG_PRINTK
186
static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
187 188 189
				void __user *buffer, size_t *lenp, loff_t *ppos);
#endif

190 191
static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write,
		void __user *buffer, size_t *lenp, loff_t *ppos);
192
#ifdef CONFIG_COREDUMP
193 194
static int proc_dostring_coredump(struct ctl_table *table, int write,
		void __user *buffer, size_t *lenp, loff_t *ppos);
195
#endif
196

197
#ifdef CONFIG_MAGIC_SYSRQ
198
/* Note: sysrq code uses it's own private copy */
199
static int __sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE;
200

201
static int sysrq_sysctl_handler(struct ctl_table *table, int write,
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
				void __user *buffer, size_t *lenp,
				loff_t *ppos)
{
	int error;

	error = proc_dointvec(table, write, buffer, lenp, ppos);
	if (error)
		return error;

	if (write)
		sysrq_toggle_support(__sysrq_enabled);

	return 0;
}

#endif

219 220 221 222 223 224
static struct ctl_table kern_table[];
static struct ctl_table vm_table[];
static struct ctl_table fs_table[];
static struct ctl_table debug_table[];
static struct ctl_table dev_table[];
extern struct ctl_table random_table[];
225 226 227
#ifdef CONFIG_EPOLL
extern struct ctl_table epoll_table[];
#endif
Linus Torvalds's avatar
Linus Torvalds committed
228 229 230 231 232 233 234

#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
int sysctl_legacy_va_layout;
#endif

/* The default sysctl tables: */

235
static struct ctl_table sysctl_base_table[] = {
Linus Torvalds's avatar
Linus Torvalds committed
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
	{
		.procname	= "kernel",
		.mode		= 0555,
		.child		= kern_table,
	},
	{
		.procname	= "vm",
		.mode		= 0555,
		.child		= vm_table,
	},
	{
		.procname	= "fs",
		.mode		= 0555,
		.child		= fs_table,
	},
	{
		.procname	= "debug",
		.mode		= 0555,
		.child		= debug_table,
	},
	{
		.procname	= "dev",
		.mode		= 0555,
		.child		= dev_table,
	},
261
	{ }
Linus Torvalds's avatar
Linus Torvalds committed
262 263
};

Ingo Molnar's avatar
Ingo Molnar committed
264
#ifdef CONFIG_SCHED_DEBUG
265 266 267 268
static int min_sched_granularity_ns = 100000;		/* 100 usecs */
static int max_sched_granularity_ns = NSEC_PER_SEC;	/* 1 second */
static int min_wakeup_granularity_ns;			/* 0 usecs */
static int max_wakeup_granularity_ns = NSEC_PER_SEC;	/* 1 second */
269
#ifdef CONFIG_SMP
270 271
static int min_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE;
static int max_sched_tunable_scaling = SCHED_TUNABLESCALING_END-1;
272 273
#endif /* CONFIG_SMP */
#endif /* CONFIG_SCHED_DEBUG */
Ingo Molnar's avatar
Ingo Molnar committed
274

275 276 277 278 279
#ifdef CONFIG_COMPACTION
static int min_extfrag_threshold;
static int max_extfrag_threshold = 1000;
#endif

280
static struct ctl_table kern_table[] = {
281 282 283 284 285
	{
		.procname	= "sched_child_runs_first",
		.data		= &sysctl_sched_child_runs_first,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
286
		.proc_handler	= proc_dointvec,
287
	},
Ingo Molnar's avatar
Ingo Molnar committed
288 289
#ifdef CONFIG_SCHED_DEBUG
	{
290 291
		.procname	= "sched_min_granularity_ns",
		.data		= &sysctl_sched_min_granularity,
Ingo Molnar's avatar
Ingo Molnar committed
292 293
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
294
		.proc_handler	= sched_proc_update_handler,
295 296
		.extra1		= &min_sched_granularity_ns,
		.extra2		= &max_sched_granularity_ns,
Ingo Molnar's avatar
Ingo Molnar committed
297
	},
298 299 300 301 302
	{
		.procname	= "sched_latency_ns",
		.data		= &sysctl_sched_latency,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
303
		.proc_handler	= sched_proc_update_handler,
304 305 306
		.extra1		= &min_sched_granularity_ns,
		.extra2		= &max_sched_granularity_ns,
	},
Ingo Molnar's avatar
Ingo Molnar committed
307 308 309 310 311
	{
		.procname	= "sched_wakeup_granularity_ns",
		.data		= &sysctl_sched_wakeup_granularity,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
312
		.proc_handler	= sched_proc_update_handler,
Ingo Molnar's avatar
Ingo Molnar committed
313 314 315
		.extra1		= &min_wakeup_granularity_ns,
		.extra2		= &max_wakeup_granularity_ns,
	},
316
#ifdef CONFIG_SMP
317 318 319 320 321
	{
		.procname	= "sched_tunable_scaling",
		.data		= &sysctl_sched_tunable_scaling,
		.maxlen		= sizeof(enum sched_tunable_scaling),
		.mode		= 0644,
322
		.proc_handler	= sched_proc_update_handler,
323 324
		.extra1		= &min_sched_tunable_scaling,
		.extra2		= &max_sched_tunable_scaling,
325
	},
326
	{
327
		.procname	= "sched_migration_cost_ns",
328 329 330
		.data		= &sysctl_sched_migration_cost,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
331
		.proc_handler	= proc_dointvec,
332
	},
333 334 335 336
	{
		.procname	= "sched_nr_migrate",
		.data		= &sysctl_sched_nr_migrate,
		.maxlen		= sizeof(unsigned int),
Peter Zijlstra's avatar
Peter Zijlstra committed
337
		.mode		= 0644,
338
		.proc_handler	= proc_dointvec,
Peter Zijlstra's avatar
Peter Zijlstra committed
339
	},
340
	{
341
		.procname	= "sched_time_avg_ms",
342 343 344
		.data		= &sysctl_sched_time_avg,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
345
		.proc_handler	= proc_dointvec,
346
	},
347
	{
348
		.procname	= "sched_shares_window_ns",
349 350 351 352 353
		.data		= &sysctl_sched_shares_window,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
354 355 356 357 358
	{
		.procname	= "timer_migration",
		.data		= &sysctl_timer_migration,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
359
		.proc_handler	= proc_dointvec_minmax,
360 361
		.extra1		= &zero,
		.extra2		= &one,
Peter Zijlstra's avatar
Peter Zijlstra committed
362
	},
363 364
#endif /* CONFIG_SMP */
#ifdef CONFIG_NUMA_BALANCING
365 366 367 368 369 370 371
	{
		.procname	= "numa_balancing_scan_delay_ms",
		.data		= &sysctl_numa_balancing_scan_delay,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
372 373 374 375 376 377 378 379 380 381 382 383 384 385
	{
		.procname	= "numa_balancing_scan_period_min_ms",
		.data		= &sysctl_numa_balancing_scan_period_min,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
	{
		.procname	= "numa_balancing_scan_period_max_ms",
		.data		= &sysctl_numa_balancing_scan_period_max,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
386 387 388 389 390
	{
		.procname	= "numa_balancing_scan_size_mb",
		.data		= &sysctl_numa_balancing_scan_size,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
391 392
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &one,
393
	},
394 395 396 397 398 399 400 401 402
	{
		.procname	= "numa_balancing",
		.data		= NULL, /* filled in by handler */
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= sysctl_numa_balancing,
		.extra1		= &zero,
		.extra2		= &one,
	},
403 404
#endif /* CONFIG_NUMA_BALANCING */
#endif /* CONFIG_SCHED_DEBUG */
Peter Zijlstra's avatar
Peter Zijlstra committed
405 406 407 408 409
	{
		.procname	= "sched_rt_period_us",
		.data		= &sysctl_sched_rt_period,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
410
		.proc_handler	= sched_rt_handler,
Peter Zijlstra's avatar
Peter Zijlstra committed
411 412 413 414 415 416
	},
	{
		.procname	= "sched_rt_runtime_us",
		.data		= &sysctl_sched_rt_runtime,
		.maxlen		= sizeof(int),
		.mode		= 0644,
417
		.proc_handler	= sched_rt_handler,
Peter Zijlstra's avatar
Peter Zijlstra committed
418
	},
419 420 421 422 423 424 425
	{
		.procname	= "sched_rr_timeslice_ms",
		.data		= &sched_rr_timeslice,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= sched_rr_handler,
	},
426 427 428 429 430 431
#ifdef CONFIG_SCHED_AUTOGROUP
	{
		.procname	= "sched_autogroup_enabled",
		.data		= &sysctl_sched_autogroup_enabled,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
432
		.proc_handler	= proc_dointvec_minmax,
433 434 435 436
		.extra1		= &zero,
		.extra2		= &one,
	},
#endif
437 438 439 440 441 442 443 444 445 446
#ifdef CONFIG_CFS_BANDWIDTH
	{
		.procname	= "sched_cfs_bandwidth_slice_us",
		.data		= &sysctl_sched_cfs_bandwidth_slice,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &one,
	},
#endif
447 448 449 450 451 452
#ifdef CONFIG_PROVE_LOCKING
	{
		.procname	= "prove_locking",
		.data		= &prove_locking,
		.maxlen		= sizeof(int),
		.mode		= 0644,
453
		.proc_handler	= proc_dointvec,
454 455 456 457 458 459 460 461
	},
#endif
#ifdef CONFIG_LOCK_STAT
	{
		.procname	= "lock_stat",
		.data		= &lock_stat,
		.maxlen		= sizeof(int),
		.mode		= 0644,
462
		.proc_handler	= proc_dointvec,
463
	},
Ingo Molnar's avatar
Ingo Molnar committed
464
#endif
Linus Torvalds's avatar
Linus Torvalds committed
465 466 467 468 469
	{
		.procname	= "panic",
		.data		= &panic_timeout,
		.maxlen		= sizeof(int),
		.mode		= 0644,
470
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
471
	},
472
#ifdef CONFIG_COREDUMP
Linus Torvalds's avatar
Linus Torvalds committed
473 474 475 476 477
	{
		.procname	= "core_uses_pid",
		.data		= &core_uses_pid,
		.maxlen		= sizeof(int),
		.mode		= 0644,
478
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
479 480 481 482
	},
	{
		.procname	= "core_pattern",
		.data		= core_pattern,
483
		.maxlen		= CORENAME_MAX_SIZE,
Linus Torvalds's avatar
Linus Torvalds committed
484
		.mode		= 0644,
485
		.proc_handler	= proc_dostring_coredump,
Linus Torvalds's avatar
Linus Torvalds committed
486
	},
487 488 489 490 491
	{
		.procname	= "core_pipe_limit",
		.data		= &core_pipe_limit,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
492
		.proc_handler	= proc_dointvec,
493
	},
494
#endif
495
#ifdef CONFIG_PROC_SYSCTL
Linus Torvalds's avatar
Linus Torvalds committed
496 497
	{
		.procname	= "tainted",
Andi Kleen's avatar
Andi Kleen committed
498
		.maxlen 	= sizeof(long),
499
		.mode		= 0644,
500
		.proc_handler	= proc_taint,
Linus Torvalds's avatar
Linus Torvalds committed
501
	},
502 503 504 505 506 507 508 509 510
	{
		.procname	= "sysctl_writes_strict",
		.data		= &sysctl_writes_strict,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &neg_one,
		.extra2		= &one,
	},
511
#endif
Arjan van de Ven's avatar
Arjan van de Ven committed
512 513 514 515 516 517
#ifdef CONFIG_LATENCYTOP
	{
		.procname	= "latencytop",
		.data		= &latencytop_enabled,
		.maxlen		= sizeof(int),
		.mode		= 0644,
518
		.proc_handler	= proc_dointvec,
Arjan van de Ven's avatar
Arjan van de Ven committed
519 520
	},
#endif
Linus Torvalds's avatar
Linus Torvalds committed
521 522 523 524 525 526
#ifdef CONFIG_BLK_DEV_INITRD
	{
		.procname	= "real-root-dev",
		.data		= &real_root_dev,
		.maxlen		= sizeof(int),
		.mode		= 0644,
527
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
528 529
	},
#endif
Ingo Molnar's avatar
Ingo Molnar committed
530 531 532 533 534
	{
		.procname	= "print-fatal-signals",
		.data		= &print_fatal_signals,
		.maxlen		= sizeof(int),
		.mode		= 0644,
535
		.proc_handler	= proc_dointvec,
Ingo Molnar's avatar
Ingo Molnar committed
536
	},
537
#ifdef CONFIG_SPARC
Linus Torvalds's avatar
Linus Torvalds committed
538 539 540 541 542
	{
		.procname	= "reboot-cmd",
		.data		= reboot_command,
		.maxlen		= 256,
		.mode		= 0644,
543
		.proc_handler	= proc_dostring,
Linus Torvalds's avatar
Linus Torvalds committed
544 545 546 547 548 549
	},
	{
		.procname	= "stop-a",
		.data		= &stop_a_enabled,
		.maxlen		= sizeof (int),
		.mode		= 0644,
550
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
551 552 553 554 555 556
	},
	{
		.procname	= "scons-poweroff",
		.data		= &scons_pwroff,
		.maxlen		= sizeof (int),
		.mode		= 0644,
557
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
558 559
	},
#endif
560 561 562 563 564 565
#ifdef CONFIG_SPARC64
	{
		.procname	= "tsb-ratio",
		.data		= &sysctl_tsb_ratio,
		.maxlen		= sizeof (int),
		.mode		= 0644,
566
		.proc_handler	= proc_dointvec,
567 568
	},
#endif
Linus Torvalds's avatar
Linus Torvalds committed
569 570 571 572 573 574
#ifdef __hppa__
	{
		.procname	= "soft-power",
		.data		= &pwrsw_enabled,
		.maxlen		= sizeof (int),
	 	.mode		= 0644,
575
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
576
	},
577 578
#endif
#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
Linus Torvalds's avatar
Linus Torvalds committed
579 580 581 582 583
	{
		.procname	= "unaligned-trap",
		.data		= &unaligned_enabled,
		.maxlen		= sizeof (int),
		.mode		= 0644,
584
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
585 586 587 588 589 590 591
	},
#endif
	{
		.procname	= "ctrl-alt-del",
		.data		= &C_A_D,
		.maxlen		= sizeof(int),
		.mode		= 0644,
592
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
593
	},
594
#ifdef CONFIG_FUNCTION_TRACER
595 596 597 598 599
	{
		.procname	= "ftrace_enabled",
		.data		= &ftrace_enabled,
		.maxlen		= sizeof(int),
		.mode		= 0644,
600
		.proc_handler	= ftrace_enable_sysctl,
601 602
	},
#endif
603 604 605 606 607 608
#ifdef CONFIG_STACK_TRACER
	{
		.procname	= "stack_tracer_enabled",
		.data		= &stack_tracer_enabled,
		.maxlen		= sizeof(int),
		.mode		= 0644,
609
		.proc_handler	= stack_trace_sysctl,
610 611
	},
#endif
612 613
#ifdef CONFIG_TRACING
	{
Peter Zijlstra's avatar
Peter Zijlstra committed
614
		.procname	= "ftrace_dump_on_oops",
615 616 617
		.data		= &ftrace_dump_on_oops,
		.maxlen		= sizeof(int),
		.mode		= 0644,
618
		.proc_handler	= proc_dointvec,
619
	},
620 621 622 623 624 625 626
	{
		.procname	= "traceoff_on_warning",
		.data		= &__disable_trace_on_warning,
		.maxlen		= sizeof(__disable_trace_on_warning),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
627 628 629 630 631 632 633
	{
		.procname	= "tracepoint_printk",
		.data		= &tracepoint_printk,
		.maxlen		= sizeof(tracepoint_printk),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
634
#endif
635 636 637 638 639 640 641 642 643 644 645 646
#ifdef CONFIG_KEXEC
	{
		.procname	= "kexec_load_disabled",
		.data		= &kexec_load_disabled,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		/* only handle a transition from default "0" to "1" */
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &one,
		.extra2		= &one,
	},
#endif
647
#ifdef CONFIG_MODULES
Linus Torvalds's avatar
Linus Torvalds committed
648 649 650 651 652
	{
		.procname	= "modprobe",
		.data		= &modprobe_path,
		.maxlen		= KMOD_PATH_LEN,
		.mode		= 0644,
653
		.proc_handler	= proc_dostring,
Linus Torvalds's avatar
Linus Torvalds committed
654
	},
655 656 657 658 659 660
	{
		.procname	= "modules_disabled",
		.data		= &modules_disabled,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		/* only handle a transition from default "0" to "1" */
661
		.proc_handler	= proc_dointvec_minmax,
662 663 664
		.extra1		= &one,
		.extra2		= &one,
	},
Linus Torvalds's avatar
Linus Torvalds committed
665
#endif
666
#ifdef CONFIG_UEVENT_HELPER
Linus Torvalds's avatar
Linus Torvalds committed
667 668
	{
		.procname	= "hotplug",
669 670
		.data		= &uevent_helper,
		.maxlen		= UEVENT_HELPER_PATH_LEN,
Linus Torvalds's avatar
Linus Torvalds committed
671
		.mode		= 0644,
672
		.proc_handler	= proc_dostring,
Linus Torvalds's avatar
Linus Torvalds committed
673
	},
674
#endif
Linus Torvalds's avatar
Linus Torvalds committed
675 676 677 678 679 680
#ifdef CONFIG_CHR_DEV_SG
	{
		.procname	= "sg-big-buff",
		.data		= &sg_big_buff,
		.maxlen		= sizeof (int),
		.mode		= 0444,
681
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
682 683 684 685 686 687 688 689
	},
#endif
#ifdef CONFIG_BSD_PROCESS_ACCT
	{
		.procname	= "acct",
		.data		= &acct_parm,
		.maxlen		= 3*sizeof(int),
		.mode		= 0644,
690
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
691 692 693 694 695
	},
#endif
#ifdef CONFIG_MAGIC_SYSRQ
	{
		.procname	= "sysrq",
696
		.data		= &__sysrq_enabled,
Linus Torvalds's avatar
Linus Torvalds committed
697 698
		.maxlen		= sizeof (int),
		.mode		= 0644,
699
		.proc_handler	= sysrq_sysctl_handler,
Linus Torvalds's avatar
Linus Torvalds committed
700 701
	},
#endif
702
#ifdef CONFIG_PROC_SYSCTL
Linus Torvalds's avatar
Linus Torvalds committed
703 704
	{
		.procname	= "cad_pid",
705
		.data		= NULL,
Linus Torvalds's avatar
Linus Torvalds committed
706 707
		.maxlen		= sizeof (int),
		.mode		= 0600,
708
		.proc_handler	= proc_do_cad_pid,
Linus Torvalds's avatar
Linus Torvalds committed
709
	},
710
#endif
Linus Torvalds's avatar
Linus Torvalds committed
711 712 713 714 715
	{
		.procname	= "threads-max",
		.data		= &max_threads,
		.maxlen		= sizeof(int),
		.mode		= 0644,
716
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
717 718 719 720 721 722
	},
	{
		.procname	= "random",
		.mode		= 0555,
		.child		= random_table,
	},
723 724 725 726 727
	{
		.procname	= "usermodehelper",
		.mode		= 0555,
		.child		= usermodehelper_table,
	},
Linus Torvalds's avatar
Linus Torvalds committed
728 729 730 731 732
	{
		.procname	= "overflowuid",
		.data		= &overflowuid,
		.maxlen		= sizeof(int),
		.mode		= 0644,
733
		.proc_handler	= proc_dointvec_minmax,
Linus Torvalds's avatar
Linus Torvalds committed
734 735 736 737 738 739 740 741
		.extra1		= &minolduid,
		.extra2		= &maxolduid,
	},
	{
		.procname	= "overflowgid",
		.data		= &overflowgid,
		.maxlen		= sizeof(int),
		.mode		= 0644,
742
		.proc_handler	= proc_dointvec_minmax,
Linus Torvalds's avatar
Linus Torvalds committed
743 744 745
		.extra1		= &minolduid,
		.extra2		= &maxolduid,
	},
746
#ifdef CONFIG_S390
Linus Torvalds's avatar
Linus Torvalds committed
747 748 749 750 751 752
#ifdef CONFIG_MATHEMU
	{
		.procname	= "ieee_emulation_warnings",
		.data		= &sysctl_ieee_emulation_warnings,
		.maxlen		= sizeof(int),
		.mode		= 0644,
753
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
754 755 756 757
	},
#endif
	{
		.procname	= "userprocess_debug",
758
		.data		= &show_unhandled_signals,
Linus Torvalds's avatar
Linus Torvalds committed
759 760
		.maxlen		= sizeof(int),
		.mode		= 0644,
761
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
762 763 764 765 766 767 768
	},
#endif
	{
		.procname	= "pid_max",
		.data		= &pid_max,
		.maxlen		= sizeof (int),
		.mode		= 0644,
769
		.proc_handler	= proc_dointvec_minmax,
Linus Torvalds's avatar
Linus Torvalds committed
770 771 772 773 774 775 776 777
		.extra1		= &pid_max_min,
		.extra2		= &pid_max_max,
	},
	{
		.procname	= "panic_on_oops",
		.data		= &panic_on_oops,
		.maxlen		= sizeof(int),
		.mode		= 0644,
778
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
779
	},
780 781 782 783 784 785
#if defined CONFIG_PRINTK
	{
		.procname	= "printk",
		.data		= &console_loglevel,
		.maxlen		= 4*sizeof(int),
		.mode		= 0644,
786
		.proc_handler	= proc_dointvec,
787
	},
Linus Torvalds's avatar
Linus Torvalds committed
788 789
	{
		.procname	= "printk_ratelimit",
Dave Young's avatar
Dave Young committed
790
		.data		= &printk_ratelimit_state.interval,
Linus Torvalds's avatar
Linus Torvalds committed
791 792
		.maxlen		= sizeof(int),
		.mode		= 0644,
793
		.proc_handler	= proc_dointvec_jiffies,
Linus Torvalds's avatar
Linus Torvalds committed
794 795 796
	},
	{
		.procname	= "printk_ratelimit_burst",
Dave Young's avatar
Dave Young committed
797
		.data		= &printk_ratelimit_state.burst,
Linus Torvalds's avatar
Linus Torvalds committed
798 799
		.maxlen		= sizeof(int),
		.mode		= 0644,
800
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
801
	},
802 803 804 805 806
	{
		.procname	= "printk_delay",
		.data		= &printk_delay_msec,
		.maxlen		= sizeof(int),
		.mode		= 0644,
807
		.proc_handler	= proc_dointvec_minmax,
808 809 810
		.extra1		= &zero,
		.extra2		= &ten_thousand,
	},
811 812 813 814 815
	{
		.procname	= "dmesg_restrict",
		.data		= &dmesg_restrict,
		.maxlen		= sizeof(int),
		.mode		= 0644,
816
		.proc_handler	= proc_dointvec_minmax_sysadmin,
817 818 819
		.extra1		= &zero,
		.extra2		= &one,
	},
820 821 822 823 824
	{
		.procname	= "kptr_restrict",
		.data		= &kptr_restrict,
		.maxlen		= sizeof(int),
		.mode		= 0644,
825
		.proc_handler	= proc_dointvec_minmax_sysadmin,
826 827 828
		.extra1		= &zero,
		.extra2		= &two,
	},
829
#endif
Linus Torvalds's avatar
Linus Torvalds committed
830 831 832 833 834
	{
		.procname	= "ngroups_max",
		.data		= &ngroups_max,
		.maxlen		= sizeof (int),
		.mode		= 0444,
835
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
836
	},
837 838 839 840 841 842 843
	{
		.procname	= "cap_last_cap",
		.data		= (void *)&cap_last_cap,
		.maxlen		= sizeof(int),
		.mode		= 0444,
		.proc_handler	= proc_dointvec,
	},
844
#if defined(CONFIG_LOCKUP_DETECTOR)
845
	{
846
		.procname       = "watchdog",
847
		.data           = &watchdog_user_enabled,
848 849
		.maxlen         = sizeof (int),
		.mode           = 0644,
850
		.proc_handler   = proc_watchdog,
851 852
		.extra1		= &zero,
		.extra2		= &one,
853 854 855
	},
	{
		.procname	= "watchdog_thresh",
856
		.data		= &watchdog_thresh,
857 858
		.maxlen		= sizeof(int),
		.mode		= 0644,
859
		.proc_handler	= proc_watchdog_thresh,
860
		.extra1		= &zero,
861
		.extra2		= &sixty,
862
	},
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884
	{
		.procname       = "nmi_watchdog",
		.data           = &nmi_watchdog_enabled,
		.maxlen         = sizeof (int),
		.mode           = 0644,
		.proc_handler   = proc_nmi_watchdog,
		.extra1		= &zero,
#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
		.extra2		= &one,
#else
		.extra2		= &zero,
#endif
	},
	{
		.procname       = "soft_watchdog",
		.data           = &soft_watchdog_enabled,
		.maxlen         = sizeof (int),
		.mode           = 0644,
		.proc_handler   = proc_soft_watchdog,
		.extra1		= &zero,
		.extra2		= &one,
	},
885 886 887 888 889 890 891 892 893
	{
		.procname	= "softlockup_panic",
		.data		= &softlockup_panic,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &one,
	},
894 895 896 897 898 899 900 901 902 903 904
#ifdef CONFIG_SMP
	{
		.procname	= "softlockup_all_cpu_backtrace",
		.data		= &sysctl_softlockup_all_cpu_backtrace,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &one,
	},
#endif /* CONFIG_SMP */
905 906 907 908 909 910 911 912 913
#endif
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
	{
		.procname       = "unknown_nmi_panic",
		.data           = &unknown_nmi_panic,
		.maxlen         = sizeof (int),
		.mode           = 0644,
		.proc_handler   = proc_dointvec,
	},
914
#endif
Linus Torvalds's avatar
Linus Torvalds committed
915
#if defined(CONFIG_X86)
916 917 918 919 920
	{
		.procname	= "panic_on_unrecovered_nmi",
		.data		= &panic_on_unrecovered_nmi,
		.maxlen		= sizeof(int),
		.mode		= 0644,
921
		.proc_handler	= proc_dointvec,
922
	},
923 924 925 926 927
	{
		.procname	= "panic_on_io_nmi",
		.data		= &panic_on_io_nmi,
		.maxlen		= sizeof(int),
		.mode		= 0644,
928
		.proc_handler	= proc_dointvec,
929
	},
930 931 932 933 934 935 936 937 938
#ifdef CONFIG_DEBUG_STACKOVERFLOW
	{
		.procname	= "panic_on_stackoverflow",
		.data		= &sysctl_panic_on_stackoverflow,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
#endif
Linus Torvalds's avatar
Linus Torvalds committed
939 940 941 942 943
	{
		.procname	= "bootloader_type",
		.data		= &bootloader_type,
		.maxlen		= sizeof (int),
		.mode		= 0444,
944
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
945
	},
946 947 948 949 950
	{
		.procname	= "bootloader_version",
		.data		= &bootloader_version,
		.maxlen		= sizeof (int),
		.mode		= 0444,
951
		.proc_handler	= proc_dointvec,
952
	},
953 954 955 956 957
	{
		.procname	= "kstack_depth_to_print",
		.data		= &kstack_depth_to_print,
		.maxlen		= sizeof(int),
		.mode		= 0644,
958
		.proc_handler	= proc_dointvec,
959
	},
960 961 962 963 964
	{
		.procname	= "io_delay_type",
		.data		= &io_delay_type,
		.maxlen		= sizeof(int),
		.mode		= 0644,
965
		.proc_handler	= proc_dointvec,
966
	},
Linus Torvalds's avatar
Linus Torvalds committed
967
#endif
968
#if defined(CONFIG_MMU)
Linus Torvalds's avatar
Linus Torvalds committed
969 970 971 972 973
	{
		.procname	= "randomize_va_space",
		.data		= &randomize_va_space,
		.maxlen		= sizeof(int),
		.mode		= 0644,
974
		.proc_handler	= proc_dointvec,
Linus Torvalds's avatar
Linus Torvalds committed
975
	},
976
#endif
977
#if defined(CONFIG_S390) && defined(CONFIG_SMP)
978 979 980 981 982
	{
		.procname	= "spin_retry",
		.data		= &spin_retry,
		.maxlen		= sizeof (int),
		.mode		= 0644,
983
		.proc_handler	= proc_dointvec,
984
	},
985
#endif
Len Brown's avatar
Len Brown committed
986
#if	defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86)
987 988
	{
		.procname	= "acpi_video_flags",
989
		.data		= &acpi_realmode_flags,
990 991
		.maxlen		= sizeof (unsigned long),
		.mode		= 0644,
992
		.proc_handler	= proc_doulongvec_minmax,
993
	},
994
#endif
995
#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
996 997 998 999 1000
	{
		.procname	= "ignore-unaligned-usertrap",
		.data		= &no_unaligned_warning,
		.maxlen		= sizeof (int),
	 	.mode		= 0644,
1001
		.proc_handler	= proc_dointvec,
1002
	},
1003 1004
#endif
#ifdef CONFIG_IA64
1005 1006 1007 1008 1009
	{
		.procname	= "unaligned-dump-stack",
		.data		= &unaligned_dump_stack,
		.maxlen		= sizeof (int),
		.mode		= 0644,
1010
		.proc_handler	= proc_dointvec,
1011
	},
1012
#endif
1013 1014 1015 1016 1017 1018
#ifdef CONFIG_DETECT_HUNG_TASK
	{
		.procname	= "hung_task_panic",
		.data		= &sysctl_hung_task_panic,
		.maxlen		= sizeof(int),
		.mode		= 0644,
1019
		.proc_handler	= proc_dointvec_minmax,
1020 1021 1022
		.extra1		= &zero,
		.extra2		= &one,
	},
1023 1024 1025
	{
		.procname	= "hung_task_check_count",
		.data		= &sysctl_hung_task_check_count,
1026
		.maxlen		= sizeof(int),
1027
		.mode		= 0644,
1028 1029
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
1030 1031 1032 1033
	},
	{
		.procname	= "hung_task_timeout_secs",
		.data		= &sysctl_hung_task_timeout_secs,
Ingo Molnar's avatar
Ingo Molnar committed
1034
		.maxlen		= sizeof(unsigned long),
1035
		.mode		= 0644,
1036
		.proc_handler	= proc_dohung_task_timeout_secs,
1037
		.extra2		= &hung_task_timeout_max,
1038 1039 1040 1041
	},
	{
		.procname	= "hung_task_warnings",
		.data		= &sysctl_hung_task_warnings,
1042
		.maxlen		= sizeof(int),
1043
		.mode		= 0644,
1044 1045
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &neg_one,
1046
	},
1047
#endif
1048 1049 1050 1051 1052 1053
#ifdef CONFIG_COMPAT
	{
		.procname	= "compat-log",
		.data		= &compat_log,
		.maxlen		= sizeof (int),
	 	.mode		= 0644,
1054
		.proc_handler	= proc_dointvec,
1055
	},
1056
#endif
1057 1058 1059 1060 1061 1062
#ifdef CONFIG_RT_MUTEXES
	{
		.procname	= "max_lock_depth",
		.data		= &max_lock_depth,
		.maxlen		= sizeof(int),
		.mode		= 0644,
1063
		.proc_handler	= proc_dointvec,
1064
	},
Kees Cook's avatar
Kees Cook committed
1065
#endif
1066 1067 1068 1069 1070
	{
		.procname	= "poweroff_cmd",
		.data		= &poweroff_cmd,
		.maxlen		= POWEROFF_CMD_PATH_LEN,
		.mode		= 0644,
1071
		.proc_handler	= proc_dostring,
1072
	},
1073 1074 1075 1076 1077 1078 1079
#ifdef CONFIG_KEYS
	{
		.procname	= "keys",
		.mode		= 0555,
		.child		= key_sysctls,
	},
#endif
1080
#ifdef CONFIG_PERF_EVENTS
1081 1082 1083 1084 1085 1086
	/*
	 * User-space scripts rely on the existence of this file
	 * as a feature check for perf_events being enabled.
	 *
	 * So it's an ABI, do not remove!
	 */
1087
	{
1088 1089 1090
		.procname	= "perf_event_paranoid",
		.data		= &sysctl_perf_event_paranoid,
		.maxlen		= sizeof(sysctl_perf_event_paranoid),
1091
		.mode		= 0644,
1092
		.proc_handler	= proc_dointvec,
1093
	},
1094
	{
1095 1096 1097
		.procname	= "perf_event_mlock_kb",
		.data		= &sysctl_perf_event_mlock,
		.maxlen		= sizeof(sysctl_perf_event_mlock),
1098
		.mode		= 0644,
1099
		.proc_handler	= proc_dointvec,
1100
	},
1101
	{
1102 1103 1104
		.procname	= "perf_event_max_sample_rate",
		.data		= &sysctl_perf_event_sample_rate,
		.maxlen		= sizeof(sysctl_perf_event_sample_rate),
1105
		.mode		= 0644,
1106
		.proc_handler	= perf_proc_update_handler,
1107
		.extra1		= &one,
1108
	},
1109 1110 1111 1112 1113 1114 1115 1116 1117
	{
		.procname	= "perf_cpu_time_max_percent",
		.data		= &sysctl_perf_cpu_time_max_percent,
		.maxlen		= sizeof(sysctl_perf_cpu_time_max_percent),
		.mode		= 0644,
		.proc_handler	= perf_cpu_time_max_percent_handler,
		.extra1		= &zero,
		.extra2		= &one_hundred,
	},
1118
#endif
1119 1120 1121 1122 1123 1124
#ifdef CONFIG_KMEMCHECK
	{
		.procname	= "kmemcheck",
		.data		= &kmemcheck_enabled,
		.maxlen		= sizeof(int),
		.mode		= 0644,
1125
		.proc_handler	= proc_dointvec,
1126
	},
1127
#endif
Prarit Bhargava's avatar
Prarit Bhargava committed
1128 1129 1130 1131 1132 1133 1134 1135 1136
	{
		.procname	= "panic_on_warn",
		.data		= &panic_on_warn,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &one,
	},
1137
	{ }
Linus Torvalds's avatar
Linus Torvalds committed
1138 1139
};

1140
static struct ctl_table vm_table[] = {
Linus Torvalds's avatar
Linus Torvalds committed
1141 1142 1143 1144 1145
	{
		.procname	= "overcommit_memory",
		.data		= &sysctl_overcommit_memory,
		.maxlen		= sizeof(sysctl_overcommit_memory),
		.mode		= 0644,
1146 1147 1148
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &two,
Linus Torvalds's avatar
Linus Torvalds committed
1149
	},
1150 1151 1152 1153 1154
	{
		.procname	= "panic_on_oom",
		.data		= &sysctl_panic_on_oom,
		.maxlen		= sizeof(sysctl_panic_on_oom),
		.mode		= 0644,
1155 1156 1157
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &two,
1158
	},
1159 1160 1161 1162 1163
	{
		.procname	= "oom_kill_allocating_task",
		.data		= &sysctl_oom_kill_allocating_task,
		.maxlen		= sizeof(sysctl_oom_kill_allocating_task),
		.mode		= 0644,
1164
		.proc_handler	= proc_dointvec,
1165
	},
1166 1167 1168 1169 1170
	{
		.procname	= "oom_dump_tasks",
		.data		= &sysctl_oom_dump_tasks,
		.maxlen		= sizeof(sysctl_oom_dump_tasks),
		.mode		= 0644,
1171
		.proc_handler	= proc_dointvec,
1172
	},
Linus Torvalds's avatar
Linus Torvalds committed
1173 1174