2 * sysctl.c: General linux system control interface
4 * Begun 24 March 1995, Stephen Tweedie
5 * Added /proc support, Dec 1995
6 * Added bdflush entry and intvec min/max checking, 2/23/96, Tom Dyas.
7 * Added hooks for /proc/sys/net (minor, minor patch), 96/4/1, Mike Shaver.
8 * Added kernel/java-{interpreter,appletviewer}, 96/5/10, Mike Shaver.
9 * Dynamic registration fixes, Stephen Tweedie.
10 * Added kswapd-interval, ctrl-alt-del, printk stuff, 1/8/97, Chris Horn.
11 * Made sysctl support optional via CONFIG_SYSCTL, 1/10/97, Chris
13 * Added proc_doulongvec_ms_jiffies_minmax, 09/08/99, Carlos H. Bauer.
14 * Added proc_doulongvec_minmax, 09/08/99, Carlos H. Bauer.
15 * Changed linked lists to use list.h instead of lists.h, 02/24/00, Bill
17 * The list_for_each() macro wasn't appropriate for the sysctl loop.
18 * Removed it and replaced it with older style, 03/23/00, Bill Wendling
21 #include <linux/module.h>
22 #include <linux/aio.h>
24 #include <linux/swap.h>
25 #include <linux/slab.h>
26 #include <linux/sysctl.h>
27 #include <linux/bitmap.h>
28 #include <linux/signal.h>
29 #include <linux/printk.h>
30 #include <linux/proc_fs.h>
31 #include <linux/security.h>
32 #include <linux/ctype.h>
33 #include <linux/kmemcheck.h>
34 #include <linux/kmemleak.h>
36 #include <linux/init.h>
37 #include <linux/kernel.h>
38 #include <linux/kobject.h>
39 #include <linux/net.h>
40 #include <linux/sysrq.h>
41 #include <linux/highuid.h>
42 #include <linux/writeback.h>
43 #include <linux/ratelimit.h>
44 #include <linux/compaction.h>
45 #include <linux/hugetlb.h>
46 #include <linux/initrd.h>
47 #include <linux/key.h>
48 #include <linux/times.h>
49 #include <linux/limits.h>
50 #include <linux/dcache.h>
51 #include <linux/dnotify.h>
52 #include <linux/syscalls.h>
53 #include <linux/vmstat.h>
54 #include <linux/nfs_fs.h>
55 #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>
64 #include <linux/binfmts.h>
65 #include <linux/sched/sysctl.h>
66 #include <linux/kexec.h>
67 #include <linux/bpf.h>
69 #include <asm/uaccess.h>
70 #include <asm/processor.h>
74 #include <asm/stacktrace.h>
78 #include <asm/setup.h>
80 #ifdef CONFIG_BSD_PROCESS_ACCT
81 #include <linux/acct.h>
83 #ifdef CONFIG_RT_MUTEXES
84 #include <linux/rtmutex.h>
86 #if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT)
87 #include <linux/lockdep.h>
89 #ifdef CONFIG_CHR_DEV_SG
93 #ifdef CONFIG_LOCKUP_DETECTOR
94 #include <linux/nmi.h>
97 #if defined(CONFIG_SYSCTL)
99 /* External variables not in a header file. */
100 extern int suid_dumpable
;
101 #ifdef CONFIG_COREDUMP
102 extern int core_uses_pid
;
103 extern char core_pattern
[];
104 extern unsigned int core_pipe_limit
;
107 extern int pid_max_min
, pid_max_max
;
108 extern int percpu_pagelist_fraction
;
109 extern int compat_log
;
110 extern int latencytop_enabled
;
111 extern int sysctl_nr_open_min
, sysctl_nr_open_max
;
113 extern int sysctl_nr_trim_pages
;
116 /* Constants used for minimum and maximum */
117 #ifdef CONFIG_LOCKUP_DETECTOR
118 static int sixty
= 60;
121 static int __maybe_unused neg_one
= -1;
124 static int __maybe_unused one
= 1;
125 static int __maybe_unused two
= 2;
126 static int __maybe_unused four
= 4;
127 static unsigned long one_ul
= 1;
128 static int one_hundred
= 100;
130 static int ten_thousand
= 10000;
133 /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
134 static unsigned long dirty_bytes_min
= 2 * PAGE_SIZE
;
136 /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
137 static int maxolduid
= 65535;
138 static int minolduid
;
140 static int ngroups_max
= NGROUPS_MAX
;
141 static const int cap_last_cap
= CAP_LAST_CAP
;
143 /*this is needed for proc_doulongvec_minmax of sysctl_hung_task_timeout_secs */
144 #ifdef CONFIG_DETECT_HUNG_TASK
145 static unsigned long hung_task_timeout_max
= (LONG_MAX
/HZ
);
148 #ifdef CONFIG_INOTIFY_USER
149 #include <linux/inotify.h>
155 extern int pwrsw_enabled
;
158 #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
159 extern int unaligned_enabled
;
163 extern int unaligned_dump_stack
;
166 #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
167 extern int no_unaligned_warning
;
170 #ifdef CONFIG_PROC_SYSCTL
172 #define SYSCTL_WRITES_LEGACY -1
173 #define SYSCTL_WRITES_WARN 0
174 #define SYSCTL_WRITES_STRICT 1
176 static int sysctl_writes_strict
= SYSCTL_WRITES_WARN
;
178 static int proc_do_cad_pid(struct ctl_table
*table
, int write
,
179 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
);
180 static int proc_taint(struct ctl_table
*table
, int write
,
181 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
);
185 static int proc_dointvec_minmax_sysadmin(struct ctl_table
*table
, int write
,
186 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
);
189 static int proc_dointvec_minmax_coredump(struct ctl_table
*table
, int write
,
190 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
);
191 #ifdef CONFIG_COREDUMP
192 static int proc_dostring_coredump(struct ctl_table
*table
, int write
,
193 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
);
196 #ifdef CONFIG_MAGIC_SYSRQ
197 /* Note: sysrq code uses it's own private copy */
198 static int __sysrq_enabled
= CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE
;
200 static int sysrq_sysctl_handler(struct ctl_table
*table
, int write
,
201 void __user
*buffer
, size_t *lenp
,
206 error
= proc_dointvec(table
, write
, buffer
, lenp
, ppos
);
211 sysrq_toggle_support(__sysrq_enabled
);
218 static struct ctl_table kern_table
[];
219 static struct ctl_table vm_table
[];
220 static struct ctl_table fs_table
[];
221 static struct ctl_table debug_table
[];
222 static struct ctl_table dev_table
[];
223 extern struct ctl_table random_table
[];
225 extern struct ctl_table epoll_table
[];
228 #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
229 int sysctl_legacy_va_layout
;
232 /* The default sysctl tables: */
234 static struct ctl_table sysctl_base_table
[] = {
236 .procname
= "kernel",
253 .child
= debug_table
,
263 #ifdef CONFIG_SCHED_DEBUG
264 static int min_sched_granularity_ns
= 100000; /* 100 usecs */
265 static int max_sched_granularity_ns
= NSEC_PER_SEC
; /* 1 second */
266 static int min_wakeup_granularity_ns
; /* 0 usecs */
267 static int max_wakeup_granularity_ns
= NSEC_PER_SEC
; /* 1 second */
269 static int min_sched_tunable_scaling
= SCHED_TUNABLESCALING_NONE
;
270 static int max_sched_tunable_scaling
= SCHED_TUNABLESCALING_END
-1;
271 #endif /* CONFIG_SMP */
272 #endif /* CONFIG_SCHED_DEBUG */
274 #ifdef CONFIG_COMPACTION
275 static int min_extfrag_threshold
;
276 static int max_extfrag_threshold
= 1000;
279 static struct ctl_table kern_table
[] = {
281 .procname
= "sched_child_runs_first",
282 .data
= &sysctl_sched_child_runs_first
,
283 .maxlen
= sizeof(unsigned int),
285 .proc_handler
= proc_dointvec
,
287 #ifdef CONFIG_SCHED_DEBUG
289 .procname
= "sched_min_granularity_ns",
290 .data
= &sysctl_sched_min_granularity
,
291 .maxlen
= sizeof(unsigned int),
293 .proc_handler
= sched_proc_update_handler
,
294 .extra1
= &min_sched_granularity_ns
,
295 .extra2
= &max_sched_granularity_ns
,
298 .procname
= "sched_latency_ns",
299 .data
= &sysctl_sched_latency
,
300 .maxlen
= sizeof(unsigned int),
302 .proc_handler
= sched_proc_update_handler
,
303 .extra1
= &min_sched_granularity_ns
,
304 .extra2
= &max_sched_granularity_ns
,
307 .procname
= "sched_wakeup_granularity_ns",
308 .data
= &sysctl_sched_wakeup_granularity
,
309 .maxlen
= sizeof(unsigned int),
311 .proc_handler
= sched_proc_update_handler
,
312 .extra1
= &min_wakeup_granularity_ns
,
313 .extra2
= &max_wakeup_granularity_ns
,
317 .procname
= "sched_tunable_scaling",
318 .data
= &sysctl_sched_tunable_scaling
,
319 .maxlen
= sizeof(enum sched_tunable_scaling
),
321 .proc_handler
= sched_proc_update_handler
,
322 .extra1
= &min_sched_tunable_scaling
,
323 .extra2
= &max_sched_tunable_scaling
,
326 .procname
= "sched_migration_cost_ns",
327 .data
= &sysctl_sched_migration_cost
,
328 .maxlen
= sizeof(unsigned int),
330 .proc_handler
= proc_dointvec
,
333 .procname
= "sched_nr_migrate",
334 .data
= &sysctl_sched_nr_migrate
,
335 .maxlen
= sizeof(unsigned int),
337 .proc_handler
= proc_dointvec
,
340 .procname
= "sched_time_avg_ms",
341 .data
= &sysctl_sched_time_avg
,
342 .maxlen
= sizeof(unsigned int),
344 .proc_handler
= proc_dointvec
,
347 .procname
= "sched_shares_window_ns",
348 .data
= &sysctl_sched_shares_window
,
349 .maxlen
= sizeof(unsigned int),
351 .proc_handler
= proc_dointvec
,
353 #endif /* CONFIG_SMP */
354 #ifdef CONFIG_NUMA_BALANCING
356 .procname
= "numa_balancing_scan_delay_ms",
357 .data
= &sysctl_numa_balancing_scan_delay
,
358 .maxlen
= sizeof(unsigned int),
360 .proc_handler
= proc_dointvec
,
363 .procname
= "numa_balancing_scan_period_min_ms",
364 .data
= &sysctl_numa_balancing_scan_period_min
,
365 .maxlen
= sizeof(unsigned int),
367 .proc_handler
= proc_dointvec
,
370 .procname
= "numa_balancing_scan_period_max_ms",
371 .data
= &sysctl_numa_balancing_scan_period_max
,
372 .maxlen
= sizeof(unsigned int),
374 .proc_handler
= proc_dointvec
,
377 .procname
= "numa_balancing_scan_size_mb",
378 .data
= &sysctl_numa_balancing_scan_size
,
379 .maxlen
= sizeof(unsigned int),
381 .proc_handler
= proc_dointvec_minmax
,
385 .procname
= "numa_balancing",
386 .data
= NULL
, /* filled in by handler */
387 .maxlen
= sizeof(unsigned int),
389 .proc_handler
= sysctl_numa_balancing
,
393 #endif /* CONFIG_NUMA_BALANCING */
394 #endif /* CONFIG_SCHED_DEBUG */
396 .procname
= "sched_rt_period_us",
397 .data
= &sysctl_sched_rt_period
,
398 .maxlen
= sizeof(unsigned int),
400 .proc_handler
= sched_rt_handler
,
403 .procname
= "sched_rt_runtime_us",
404 .data
= &sysctl_sched_rt_runtime
,
405 .maxlen
= sizeof(int),
407 .proc_handler
= sched_rt_handler
,
410 .procname
= "sched_rr_timeslice_ms",
411 .data
= &sched_rr_timeslice
,
412 .maxlen
= sizeof(int),
414 .proc_handler
= sched_rr_handler
,
416 #ifdef CONFIG_SCHED_AUTOGROUP
418 .procname
= "sched_autogroup_enabled",
419 .data
= &sysctl_sched_autogroup_enabled
,
420 .maxlen
= sizeof(unsigned int),
422 .proc_handler
= proc_dointvec_minmax
,
427 #ifdef CONFIG_CFS_BANDWIDTH
429 .procname
= "sched_cfs_bandwidth_slice_us",
430 .data
= &sysctl_sched_cfs_bandwidth_slice
,
431 .maxlen
= sizeof(unsigned int),
433 .proc_handler
= proc_dointvec_minmax
,
437 #ifdef CONFIG_PROVE_LOCKING
439 .procname
= "prove_locking",
440 .data
= &prove_locking
,
441 .maxlen
= sizeof(int),
443 .proc_handler
= proc_dointvec
,
446 #ifdef CONFIG_LOCK_STAT
448 .procname
= "lock_stat",
450 .maxlen
= sizeof(int),
452 .proc_handler
= proc_dointvec
,
457 .data
= &panic_timeout
,
458 .maxlen
= sizeof(int),
460 .proc_handler
= proc_dointvec
,
462 #ifdef CONFIG_COREDUMP
464 .procname
= "core_uses_pid",
465 .data
= &core_uses_pid
,
466 .maxlen
= sizeof(int),
468 .proc_handler
= proc_dointvec
,
471 .procname
= "core_pattern",
472 .data
= core_pattern
,
473 .maxlen
= CORENAME_MAX_SIZE
,
475 .proc_handler
= proc_dostring_coredump
,
478 .procname
= "core_pipe_limit",
479 .data
= &core_pipe_limit
,
480 .maxlen
= sizeof(unsigned int),
482 .proc_handler
= proc_dointvec
,
485 #ifdef CONFIG_PROC_SYSCTL
487 .procname
= "tainted",
488 .maxlen
= sizeof(long),
490 .proc_handler
= proc_taint
,
493 .procname
= "sysctl_writes_strict",
494 .data
= &sysctl_writes_strict
,
495 .maxlen
= sizeof(int),
497 .proc_handler
= proc_dointvec_minmax
,
502 #ifdef CONFIG_LATENCYTOP
504 .procname
= "latencytop",
505 .data
= &latencytop_enabled
,
506 .maxlen
= sizeof(int),
508 .proc_handler
= proc_dointvec
,
511 #ifdef CONFIG_BLK_DEV_INITRD
513 .procname
= "real-root-dev",
514 .data
= &real_root_dev
,
515 .maxlen
= sizeof(int),
517 .proc_handler
= proc_dointvec
,
521 .procname
= "print-fatal-signals",
522 .data
= &print_fatal_signals
,
523 .maxlen
= sizeof(int),
525 .proc_handler
= proc_dointvec
,
529 .procname
= "reboot-cmd",
530 .data
= reboot_command
,
533 .proc_handler
= proc_dostring
,
536 .procname
= "stop-a",
537 .data
= &stop_a_enabled
,
538 .maxlen
= sizeof (int),
540 .proc_handler
= proc_dointvec
,
543 .procname
= "scons-poweroff",
544 .data
= &scons_pwroff
,
545 .maxlen
= sizeof (int),
547 .proc_handler
= proc_dointvec
,
550 #ifdef CONFIG_SPARC64
552 .procname
= "tsb-ratio",
553 .data
= &sysctl_tsb_ratio
,
554 .maxlen
= sizeof (int),
556 .proc_handler
= proc_dointvec
,
561 .procname
= "soft-power",
562 .data
= &pwrsw_enabled
,
563 .maxlen
= sizeof (int),
565 .proc_handler
= proc_dointvec
,
568 #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
570 .procname
= "unaligned-trap",
571 .data
= &unaligned_enabled
,
572 .maxlen
= sizeof (int),
574 .proc_handler
= proc_dointvec
,
578 .procname
= "ctrl-alt-del",
580 .maxlen
= sizeof(int),
582 .proc_handler
= proc_dointvec
,
584 #ifdef CONFIG_FUNCTION_TRACER
586 .procname
= "ftrace_enabled",
587 .data
= &ftrace_enabled
,
588 .maxlen
= sizeof(int),
590 .proc_handler
= ftrace_enable_sysctl
,
593 #ifdef CONFIG_STACK_TRACER
595 .procname
= "stack_tracer_enabled",
596 .data
= &stack_tracer_enabled
,
597 .maxlen
= sizeof(int),
599 .proc_handler
= stack_trace_sysctl
,
602 #ifdef CONFIG_TRACING
604 .procname
= "ftrace_dump_on_oops",
605 .data
= &ftrace_dump_on_oops
,
606 .maxlen
= sizeof(int),
608 .proc_handler
= proc_dointvec
,
611 .procname
= "traceoff_on_warning",
612 .data
= &__disable_trace_on_warning
,
613 .maxlen
= sizeof(__disable_trace_on_warning
),
615 .proc_handler
= proc_dointvec
,
618 .procname
= "tracepoint_printk",
619 .data
= &tracepoint_printk
,
620 .maxlen
= sizeof(tracepoint_printk
),
622 .proc_handler
= proc_dointvec
,
625 #ifdef CONFIG_KEXEC_CORE
627 .procname
= "kexec_load_disabled",
628 .data
= &kexec_load_disabled
,
629 .maxlen
= sizeof(int),
631 /* only handle a transition from default "0" to "1" */
632 .proc_handler
= proc_dointvec_minmax
,
637 #ifdef CONFIG_MODULES
639 .procname
= "modprobe",
640 .data
= &modprobe_path
,
641 .maxlen
= KMOD_PATH_LEN
,
643 .proc_handler
= proc_dostring
,
646 .procname
= "modules_disabled",
647 .data
= &modules_disabled
,
648 .maxlen
= sizeof(int),
650 /* only handle a transition from default "0" to "1" */
651 .proc_handler
= proc_dointvec_minmax
,
656 #ifdef CONFIG_UEVENT_HELPER
658 .procname
= "hotplug",
659 .data
= &uevent_helper
,
660 .maxlen
= UEVENT_HELPER_PATH_LEN
,
662 .proc_handler
= proc_dostring
,
665 #ifdef CONFIG_CHR_DEV_SG
667 .procname
= "sg-big-buff",
668 .data
= &sg_big_buff
,
669 .maxlen
= sizeof (int),
671 .proc_handler
= proc_dointvec
,
674 #ifdef CONFIG_BSD_PROCESS_ACCT
678 .maxlen
= 3*sizeof(int),
680 .proc_handler
= proc_dointvec
,
683 #ifdef CONFIG_MAGIC_SYSRQ
686 .data
= &__sysrq_enabled
,
687 .maxlen
= sizeof (int),
689 .proc_handler
= sysrq_sysctl_handler
,
692 #ifdef CONFIG_PROC_SYSCTL
694 .procname
= "cad_pid",
696 .maxlen
= sizeof (int),
698 .proc_handler
= proc_do_cad_pid
,
702 .procname
= "threads-max",
704 .maxlen
= sizeof(int),
706 .proc_handler
= sysctl_max_threads
,
709 .procname
= "random",
711 .child
= random_table
,
714 .procname
= "usermodehelper",
716 .child
= usermodehelper_table
,
719 .procname
= "overflowuid",
720 .data
= &overflowuid
,
721 .maxlen
= sizeof(int),
723 .proc_handler
= proc_dointvec_minmax
,
724 .extra1
= &minolduid
,
725 .extra2
= &maxolduid
,
728 .procname
= "overflowgid",
729 .data
= &overflowgid
,
730 .maxlen
= sizeof(int),
732 .proc_handler
= proc_dointvec_minmax
,
733 .extra1
= &minolduid
,
734 .extra2
= &maxolduid
,
737 #ifdef CONFIG_MATHEMU
739 .procname
= "ieee_emulation_warnings",
740 .data
= &sysctl_ieee_emulation_warnings
,
741 .maxlen
= sizeof(int),
743 .proc_handler
= proc_dointvec
,
747 .procname
= "userprocess_debug",
748 .data
= &show_unhandled_signals
,
749 .maxlen
= sizeof(int),
751 .proc_handler
= proc_dointvec
,
755 .procname
= "pid_max",
757 .maxlen
= sizeof (int),
759 .proc_handler
= proc_dointvec_minmax
,
760 .extra1
= &pid_max_min
,
761 .extra2
= &pid_max_max
,
764 .procname
= "panic_on_oops",
765 .data
= &panic_on_oops
,
766 .maxlen
= sizeof(int),
768 .proc_handler
= proc_dointvec
,
770 #if defined CONFIG_PRINTK
772 .procname
= "printk",
773 .data
= &console_loglevel
,
774 .maxlen
= 4*sizeof(int),
776 .proc_handler
= proc_dointvec
,
779 .procname
= "printk_ratelimit",
780 .data
= &printk_ratelimit_state
.interval
,
781 .maxlen
= sizeof(int),
783 .proc_handler
= proc_dointvec_jiffies
,
786 .procname
= "printk_ratelimit_burst",
787 .data
= &printk_ratelimit_state
.burst
,
788 .maxlen
= sizeof(int),
790 .proc_handler
= proc_dointvec
,
793 .procname
= "printk_delay",
794 .data
= &printk_delay_msec
,
795 .maxlen
= sizeof(int),
797 .proc_handler
= proc_dointvec_minmax
,
799 .extra2
= &ten_thousand
,
802 .procname
= "dmesg_restrict",
803 .data
= &dmesg_restrict
,
804 .maxlen
= sizeof(int),
806 .proc_handler
= proc_dointvec_minmax_sysadmin
,
811 .procname
= "kptr_restrict",
812 .data
= &kptr_restrict
,
813 .maxlen
= sizeof(int),
815 .proc_handler
= proc_dointvec_minmax_sysadmin
,
821 .procname
= "ngroups_max",
822 .data
= &ngroups_max
,
823 .maxlen
= sizeof (int),
825 .proc_handler
= proc_dointvec
,
828 .procname
= "cap_last_cap",
829 .data
= (void *)&cap_last_cap
,
830 .maxlen
= sizeof(int),
832 .proc_handler
= proc_dointvec
,
834 #if defined(CONFIG_LOCKUP_DETECTOR)
836 .procname
= "watchdog",
837 .data
= &watchdog_user_enabled
,
838 .maxlen
= sizeof (int),
840 .proc_handler
= proc_watchdog
,
845 .procname
= "watchdog_thresh",
846 .data
= &watchdog_thresh
,
847 .maxlen
= sizeof(int),
849 .proc_handler
= proc_watchdog_thresh
,
854 .procname
= "nmi_watchdog",
855 .data
= &nmi_watchdog_enabled
,
856 .maxlen
= sizeof (int),
858 .proc_handler
= proc_nmi_watchdog
,
860 #if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
867 .procname
= "soft_watchdog",
868 .data
= &soft_watchdog_enabled
,
869 .maxlen
= sizeof (int),
871 .proc_handler
= proc_soft_watchdog
,
876 .procname
= "watchdog_cpumask",
877 .data
= &watchdog_cpumask_bits
,
880 .proc_handler
= proc_watchdog_cpumask
,
883 .procname
= "softlockup_panic",
884 .data
= &softlockup_panic
,
885 .maxlen
= sizeof(int),
887 .proc_handler
= proc_dointvec_minmax
,
893 .procname
= "softlockup_all_cpu_backtrace",
894 .data
= &sysctl_softlockup_all_cpu_backtrace
,
895 .maxlen
= sizeof(int),
897 .proc_handler
= proc_dointvec_minmax
,
902 .procname
= "hardlockup_all_cpu_backtrace",
903 .data
= &sysctl_hardlockup_all_cpu_backtrace
,
904 .maxlen
= sizeof(int),
906 .proc_handler
= proc_dointvec_minmax
,
910 #endif /* CONFIG_SMP */
912 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
914 .procname
= "unknown_nmi_panic",
915 .data
= &unknown_nmi_panic
,
916 .maxlen
= sizeof (int),
918 .proc_handler
= proc_dointvec
,
921 #if defined(CONFIG_X86)
923 .procname
= "panic_on_unrecovered_nmi",
924 .data
= &panic_on_unrecovered_nmi
,
925 .maxlen
= sizeof(int),
927 .proc_handler
= proc_dointvec
,
930 .procname
= "panic_on_io_nmi",
931 .data
= &panic_on_io_nmi
,
932 .maxlen
= sizeof(int),
934 .proc_handler
= proc_dointvec
,
936 #ifdef CONFIG_DEBUG_STACKOVERFLOW
938 .procname
= "panic_on_stackoverflow",
939 .data
= &sysctl_panic_on_stackoverflow
,
940 .maxlen
= sizeof(int),
942 .proc_handler
= proc_dointvec
,
946 .procname
= "bootloader_type",
947 .data
= &bootloader_type
,
948 .maxlen
= sizeof (int),
950 .proc_handler
= proc_dointvec
,
953 .procname
= "bootloader_version",
954 .data
= &bootloader_version
,
955 .maxlen
= sizeof (int),
957 .proc_handler
= proc_dointvec
,
960 .procname
= "kstack_depth_to_print",
961 .data
= &kstack_depth_to_print
,
962 .maxlen
= sizeof(int),
964 .proc_handler
= proc_dointvec
,
967 .procname
= "io_delay_type",
968 .data
= &io_delay_type
,
969 .maxlen
= sizeof(int),
971 .proc_handler
= proc_dointvec
,
974 #if defined(CONFIG_MMU)
976 .procname
= "randomize_va_space",
977 .data
= &randomize_va_space
,
978 .maxlen
= sizeof(int),
980 .proc_handler
= proc_dointvec
,
983 #if defined(CONFIG_S390) && defined(CONFIG_SMP)
985 .procname
= "spin_retry",
987 .maxlen
= sizeof (int),
989 .proc_handler
= proc_dointvec
,
992 #if defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86)
994 .procname
= "acpi_video_flags",
995 .data
= &acpi_realmode_flags
,
996 .maxlen
= sizeof (unsigned long),
998 .proc_handler
= proc_doulongvec_minmax
,
1001 #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
1003 .procname
= "ignore-unaligned-usertrap",
1004 .data
= &no_unaligned_warning
,
1005 .maxlen
= sizeof (int),
1007 .proc_handler
= proc_dointvec
,
1012 .procname
= "unaligned-dump-stack",
1013 .data
= &unaligned_dump_stack
,
1014 .maxlen
= sizeof (int),
1016 .proc_handler
= proc_dointvec
,
1019 #ifdef CONFIG_DETECT_HUNG_TASK
1021 .procname
= "hung_task_panic",
1022 .data
= &sysctl_hung_task_panic
,
1023 .maxlen
= sizeof(int),
1025 .proc_handler
= proc_dointvec_minmax
,
1030 .procname
= "hung_task_check_count",
1031 .data
= &sysctl_hung_task_check_count
,
1032 .maxlen
= sizeof(int),
1034 .proc_handler
= proc_dointvec_minmax
,
1038 .procname
= "hung_task_timeout_secs",
1039 .data
= &sysctl_hung_task_timeout_secs
,
1040 .maxlen
= sizeof(unsigned long),
1042 .proc_handler
= proc_dohung_task_timeout_secs
,
1043 .extra2
= &hung_task_timeout_max
,
1046 .procname
= "hung_task_warnings",
1047 .data
= &sysctl_hung_task_warnings
,
1048 .maxlen
= sizeof(int),
1050 .proc_handler
= proc_dointvec_minmax
,
1054 #ifdef CONFIG_COMPAT
1056 .procname
= "compat-log",
1057 .data
= &compat_log
,
1058 .maxlen
= sizeof (int),
1060 .proc_handler
= proc_dointvec
,
1063 #ifdef CONFIG_RT_MUTEXES
1065 .procname
= "max_lock_depth",
1066 .data
= &max_lock_depth
,
1067 .maxlen
= sizeof(int),
1069 .proc_handler
= proc_dointvec
,
1073 .procname
= "poweroff_cmd",
1074 .data
= &poweroff_cmd
,
1075 .maxlen
= POWEROFF_CMD_PATH_LEN
,
1077 .proc_handler
= proc_dostring
,
1083 .child
= key_sysctls
,
1086 #ifdef CONFIG_PERF_EVENTS
1088 * User-space scripts rely on the existence of this file
1089 * as a feature check for perf_events being enabled.
1091 * So it's an ABI, do not remove!
1094 .procname
= "perf_event_paranoid",
1095 .data
= &sysctl_perf_event_paranoid
,
1096 .maxlen
= sizeof(sysctl_perf_event_paranoid
),
1098 .proc_handler
= proc_dointvec
,
1101 .procname
= "perf_event_mlock_kb",
1102 .data
= &sysctl_perf_event_mlock
,
1103 .maxlen
= sizeof(sysctl_perf_event_mlock
),
1105 .proc_handler
= proc_dointvec
,
1108 .procname
= "perf_event_max_sample_rate",
1109 .data
= &sysctl_perf_event_sample_rate
,
1110 .maxlen
= sizeof(sysctl_perf_event_sample_rate
),
1112 .proc_handler
= perf_proc_update_handler
,
1116 .procname
= "perf_cpu_time_max_percent",
1117 .data
= &sysctl_perf_cpu_time_max_percent
,
1118 .maxlen
= sizeof(sysctl_perf_cpu_time_max_percent
),
1120 .proc_handler
= perf_cpu_time_max_percent_handler
,
1122 .extra2
= &one_hundred
,
1125 #ifdef CONFIG_KMEMCHECK
1127 .procname
= "kmemcheck",
1128 .data
= &kmemcheck_enabled
,
1129 .maxlen
= sizeof(int),
1131 .proc_handler
= proc_dointvec
,
1135 .procname
= "panic_on_warn",
1136 .data
= &panic_on_warn
,
1137 .maxlen
= sizeof(int),
1139 .proc_handler
= proc_dointvec_minmax
,
1143 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
1145 .procname
= "timer_migration",
1146 .data
= &sysctl_timer_migration
,
1147 .maxlen
= sizeof(unsigned int),
1149 .proc_handler
= timer_migration_handler
,
1152 #ifdef CONFIG_BPF_SYSCALL
1154 .procname
= "unprivileged_bpf_disabled",
1155 .data
= &sysctl_unprivileged_bpf_disabled
,
1156 .maxlen
= sizeof(sysctl_unprivileged_bpf_disabled
),
1158 /* only handle a transition from default "0" to "1" */
1159 .proc_handler
= proc_dointvec_minmax
,
1167 static struct ctl_table vm_table
[] = {
1169 .procname
= "overcommit_memory",
1170 .data
= &sysctl_overcommit_memory
,
1171 .maxlen
= sizeof(sysctl_overcommit_memory
),
1173 .proc_handler
= proc_dointvec_minmax
,
1178 .procname
= "panic_on_oom",
1179 .data
= &sysctl_panic_on_oom
,
1180 .maxlen
= sizeof(sysctl_panic_on_oom
),
1182 .proc_handler
= proc_dointvec_minmax
,
1187 .procname
= "oom_kill_allocating_task",
1188 .data
= &sysctl_oom_kill_allocating_task
,
1189 .maxlen
= sizeof(sysctl_oom_kill_allocating_task
),
1191 .proc_handler
= proc_dointvec
,
1194 .procname
= "oom_dump_tasks",
1195 .data
= &sysctl_oom_dump_tasks
,
1196 .maxlen
= sizeof(sysctl_oom_dump_tasks
),
1198 .proc_handler
= proc_dointvec
,
1201 .procname
= "overcommit_ratio",
1202 .data
= &sysctl_overcommit_ratio
,
1203 .maxlen
= sizeof(sysctl_overcommit_ratio
),
1205 .proc_handler
= overcommit_ratio_handler
,
1208 .procname
= "overcommit_kbytes",
1209 .data
= &sysctl_overcommit_kbytes
,
1210 .maxlen
= sizeof(sysctl_overcommit_kbytes
),
1212 .proc_handler
= overcommit_kbytes_handler
,
1215 .procname
= "page-cluster",
1216 .data
= &page_cluster
,
1217 .maxlen
= sizeof(int),
1219 .proc_handler
= proc_dointvec_minmax
,
1223 .procname
= "dirty_background_ratio",
1224 .data
= &dirty_background_ratio
,
1225 .maxlen
= sizeof(dirty_background_ratio
),
1227 .proc_handler
= dirty_background_ratio_handler
,
1229 .extra2
= &one_hundred
,
1232 .procname
= "dirty_background_bytes",
1233 .data
= &dirty_background_bytes
,
1234 .maxlen
= sizeof(dirty_background_bytes
),
1236 .proc_handler
= dirty_background_bytes_handler
,
1240 .procname
= "dirty_ratio",
1241 .data
= &vm_dirty_ratio
,
1242 .maxlen
= sizeof(vm_dirty_ratio
),
1244 .proc_handler
= dirty_ratio_handler
,
1246 .extra2
= &one_hundred
,
1249 .procname
= "dirty_bytes",
1250 .data
= &vm_dirty_bytes
,
1251 .maxlen
= sizeof(vm_dirty_bytes
),
1253 .proc_handler
= dirty_bytes_handler
,
1254 .extra1
= &dirty_bytes_min
,
1257 .procname
= "dirty_writeback_centisecs",
1258 .data
= &dirty_writeback_interval
,
1259 .maxlen
= sizeof(dirty_writeback_interval
),
1261 .proc_handler
= dirty_writeback_centisecs_handler
,
1264 .procname
= "dirty_expire_centisecs",
1265 .data
= &dirty_expire_interval
,
1266 .maxlen
= sizeof(dirty_expire_interval
),
1268 .proc_handler
= proc_dointvec_minmax
,
1272 .procname
= "dirtytime_expire_seconds",
1273 .data
= &dirtytime_expire_interval
,
1274 .maxlen
= sizeof(dirty_expire_interval
),
1276 .proc_handler
= dirtytime_interval_handler
,
1280 .procname
= "nr_pdflush_threads",
1281 .mode
= 0444 /* read-only */,
1282 .proc_handler
= pdflush_proc_obsolete
,
1285 .procname
= "swappiness",
1286 .data
= &vm_swappiness
,
1287 .maxlen
= sizeof(vm_swappiness
),
1289 .proc_handler
= proc_dointvec_minmax
,
1291 .extra2
= &one_hundred
,
1293 #ifdef CONFIG_HUGETLB_PAGE
1295 .procname
= "nr_hugepages",
1297 .maxlen
= sizeof(unsigned long),
1299 .proc_handler
= hugetlb_sysctl_handler
,
1303 .procname
= "nr_hugepages_mempolicy",
1305 .maxlen
= sizeof(unsigned long),
1307 .proc_handler
= &hugetlb_mempolicy_sysctl_handler
,
1311 .procname
= "hugetlb_shm_group",
1312 .data
= &sysctl_hugetlb_shm_group
,
1313 .maxlen
= sizeof(gid_t
),
1315 .proc_handler
= proc_dointvec
,
1318 .procname
= "hugepages_treat_as_movable",
1319 .data
= &hugepages_treat_as_movable
,
1320 .maxlen
= sizeof(int),
1322 .proc_handler
= proc_dointvec
,
1325 .procname
= "nr_overcommit_hugepages",
1327 .maxlen
= sizeof(unsigned long),
1329 .proc_handler
= hugetlb_overcommit_handler
,
1333 .procname
= "lowmem_reserve_ratio",
1334 .data
= &sysctl_lowmem_reserve_ratio
,
1335 .maxlen
= sizeof(sysctl_lowmem_reserve_ratio
),
1337 .proc_handler
= lowmem_reserve_ratio_sysctl_handler
,
1340 .procname
= "drop_caches",
1341 .data
= &sysctl_drop_caches
,
1342 .maxlen
= sizeof(int),
1344 .proc_handler
= drop_caches_sysctl_handler
,
1348 #ifdef CONFIG_COMPACTION
1350 .procname
= "compact_memory",
1351 .data
= &sysctl_compact_memory
,
1352 .maxlen
= sizeof(int),
1354 .proc_handler
= sysctl_compaction_handler
,
1357 .procname
= "extfrag_threshold",
1358 .data
= &sysctl_extfrag_threshold
,
1359 .maxlen
= sizeof(int),
1361 .proc_handler
= sysctl_extfrag_handler
,
1362 .extra1
= &min_extfrag_threshold
,
1363 .extra2
= &max_extfrag_threshold
,
1366 .procname
= "compact_unevictable_allowed",
1367 .data
= &sysctl_compact_unevictable_allowed
,
1368 .maxlen
= sizeof(int),
1370 .proc_handler
= proc_dointvec
,
1375 #endif /* CONFIG_COMPACTION */
1377 .procname
= "min_free_kbytes",
1378 .data
= &min_free_kbytes
,
1379 .maxlen
= sizeof(min_free_kbytes
),
1381 .proc_handler
= min_free_kbytes_sysctl_handler
,
1385 .procname
= "percpu_pagelist_fraction",
1386 .data
= &percpu_pagelist_fraction
,
1387 .maxlen
= sizeof(percpu_pagelist_fraction
),
1389 .proc_handler
= percpu_pagelist_fraction_sysctl_handler
,
1394 .procname
= "max_map_count",
1395 .data
= &sysctl_max_map_count
,
1396 .maxlen
= sizeof(sysctl_max_map_count
),
1398 .proc_handler
= proc_dointvec_minmax
,
1403 .procname
= "nr_trim_pages",
1404 .data
= &sysctl_nr_trim_pages
,
1405 .maxlen
= sizeof(sysctl_nr_trim_pages
),
1407 .proc_handler
= proc_dointvec_minmax
,
1412 .procname
= "laptop_mode",
1413 .data
= &laptop_mode
,
1414 .maxlen
= sizeof(laptop_mode
),
1416 .proc_handler
= proc_dointvec_jiffies
,
1419 .procname
= "block_dump",
1420 .data
= &block_dump
,
1421 .maxlen
= sizeof(block_dump
),
1423 .proc_handler
= proc_dointvec
,
1427 .procname
= "vfs_cache_pressure",
1428 .data
= &sysctl_vfs_cache_pressure
,
1429 .maxlen
= sizeof(sysctl_vfs_cache_pressure
),
1431 .proc_handler
= proc_dointvec
,
1434 #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
1436 .procname
= "legacy_va_layout",
1437 .data
= &sysctl_legacy_va_layout
,
1438 .maxlen
= sizeof(sysctl_legacy_va_layout
),
1440 .proc_handler
= proc_dointvec
,
1446 .procname
= "zone_reclaim_mode",
1447 .data
= &zone_reclaim_mode
,
1448 .maxlen
= sizeof(zone_reclaim_mode
),
1450 .proc_handler
= proc_dointvec
,
1454 .procname
= "min_unmapped_ratio",
1455 .data
= &sysctl_min_unmapped_ratio
,
1456 .maxlen
= sizeof(sysctl_min_unmapped_ratio
),
1458 .proc_handler
= sysctl_min_unmapped_ratio_sysctl_handler
,
1460 .extra2
= &one_hundred
,
1463 .procname
= "min_slab_ratio",
1464 .data
= &sysctl_min_slab_ratio
,
1465 .maxlen
= sizeof(sysctl_min_slab_ratio
),
1467 .proc_handler
= sysctl_min_slab_ratio_sysctl_handler
,
1469 .extra2
= &one_hundred
,
1474 .procname
= "stat_interval",
1475 .data
= &sysctl_stat_interval
,
1476 .maxlen
= sizeof(sysctl_stat_interval
),
1478 .proc_handler
= proc_dointvec_jiffies
,
1483 .procname
= "mmap_min_addr",
1484 .data
= &dac_mmap_min_addr
,
1485 .maxlen
= sizeof(unsigned long),
1487 .proc_handler
= mmap_min_addr_handler
,
1492 .procname
= "numa_zonelist_order",
1493 .data
= &numa_zonelist_order
,
1494 .maxlen
= NUMA_ZONELIST_ORDER_LEN
,
1496 .proc_handler
= numa_zonelist_order_handler
,
1499 #if (defined(CONFIG_X86_32) && !defined(CONFIG_UML))|| \
1500 (defined(CONFIG_SUPERH) && defined(CONFIG_VSYSCALL))
1502 .procname
= "vdso_enabled",
1503 #ifdef CONFIG_X86_32
1504 .data
= &vdso32_enabled
,
1505 .maxlen
= sizeof(vdso32_enabled
),
1507 .data
= &vdso_enabled
,
1508 .maxlen
= sizeof(vdso_enabled
),
1511 .proc_handler
= proc_dointvec
,
1515 #ifdef CONFIG_HIGHMEM
1517 .procname
= "highmem_is_dirtyable",
1518 .data
= &vm_highmem_is_dirtyable
,
1519 .maxlen
= sizeof(vm_highmem_is_dirtyable
),
1521 .proc_handler
= proc_dointvec_minmax
,
1526 #ifdef CONFIG_MEMORY_FAILURE
1528 .procname
= "memory_failure_early_kill",
1529 .data
= &sysctl_memory_failure_early_kill
,
1530 .maxlen
= sizeof(sysctl_memory_failure_early_kill
),
1532 .proc_handler
= proc_dointvec_minmax
,
1537 .procname
= "memory_failure_recovery",
1538 .data
= &sysctl_memory_failure_recovery
,
1539 .maxlen
= sizeof(sysctl_memory_failure_recovery
),
1541 .proc_handler
= proc_dointvec_minmax
,
1547 .procname
= "user_reserve_kbytes",
1548 .data
= &sysctl_user_reserve_kbytes
,
1549 .maxlen
= sizeof(sysctl_user_reserve_kbytes
),
1551 .proc_handler
= proc_doulongvec_minmax
,
1554 .procname
= "admin_reserve_kbytes",
1555 .data
= &sysctl_admin_reserve_kbytes
,
1556 .maxlen
= sizeof(sysctl_admin_reserve_kbytes
),
1558 .proc_handler
= proc_doulongvec_minmax
,
1563 static struct ctl_table fs_table
[] = {
1565 .procname
= "inode-nr",
1566 .data
= &inodes_stat
,
1567 .maxlen
= 2*sizeof(long),
1569 .proc_handler
= proc_nr_inodes
,
1572 .procname
= "inode-state",
1573 .data
= &inodes_stat
,
1574 .maxlen
= 7*sizeof(long),
1576 .proc_handler
= proc_nr_inodes
,
1579 .procname
= "file-nr",
1580 .data
= &files_stat
,
1581 .maxlen
= sizeof(files_stat
),
1583 .proc_handler
= proc_nr_files
,
1586 .procname
= "file-max",
1587 .data
= &files_stat
.max_files
,
1588 .maxlen
= sizeof(files_stat
.max_files
),
1590 .proc_handler
= proc_doulongvec_minmax
,
1593 .procname
= "nr_open",
1594 .data
= &sysctl_nr_open
,
1595 .maxlen
= sizeof(int),
1597 .proc_handler
= proc_dointvec_minmax
,
1598 .extra1
= &sysctl_nr_open_min
,
1599 .extra2
= &sysctl_nr_open_max
,
1602 .procname
= "dentry-state",
1603 .data
= &dentry_stat
,
1604 .maxlen
= 6*sizeof(long),
1606 .proc_handler
= proc_nr_dentry
,
1609 .procname
= "overflowuid",
1610 .data
= &fs_overflowuid
,
1611 .maxlen
= sizeof(int),
1613 .proc_handler
= proc_dointvec_minmax
,
1614 .extra1
= &minolduid
,
1615 .extra2
= &maxolduid
,
1618 .procname
= "overflowgid",
1619 .data
= &fs_overflowgid
,
1620 .maxlen
= sizeof(int),
1622 .proc_handler
= proc_dointvec_minmax
,
1623 .extra1
= &minolduid
,
1624 .extra2
= &maxolduid
,
1626 #ifdef CONFIG_FILE_LOCKING
1628 .procname
= "leases-enable",
1629 .data
= &leases_enable
,
1630 .maxlen
= sizeof(int),
1632 .proc_handler
= proc_dointvec
,
1635 #ifdef CONFIG_DNOTIFY
1637 .procname
= "dir-notify-enable",
1638 .data
= &dir_notify_enable
,
1639 .maxlen
= sizeof(int),
1641 .proc_handler
= proc_dointvec
,
1645 #ifdef CONFIG_FILE_LOCKING
1647 .procname
= "lease-break-time",
1648 .data
= &lease_break_time
,
1649 .maxlen
= sizeof(int),
1651 .proc_handler
= proc_dointvec
,
1656 .procname
= "aio-nr",
1658 .maxlen
= sizeof(aio_nr
),
1660 .proc_handler
= proc_doulongvec_minmax
,
1663 .procname
= "aio-max-nr",
1664 .data
= &aio_max_nr
,
1665 .maxlen
= sizeof(aio_max_nr
),
1667 .proc_handler
= proc_doulongvec_minmax
,
1669 #endif /* CONFIG_AIO */
1670 #ifdef CONFIG_INOTIFY_USER
1672 .procname
= "inotify",
1674 .child
= inotify_table
,
1679 .procname
= "epoll",
1681 .child
= epoll_table
,
1686 .procname
= "protected_symlinks",
1687 .data
= &sysctl_protected_symlinks
,
1688 .maxlen
= sizeof(int),
1690 .proc_handler
= proc_dointvec_minmax
,
1695 .procname
= "protected_hardlinks",
1696 .data
= &sysctl_protected_hardlinks
,
1697 .maxlen
= sizeof(int),
1699 .proc_handler
= proc_dointvec_minmax
,
1704 .procname
= "suid_dumpable",
1705 .data
= &suid_dumpable
,
1706 .maxlen
= sizeof(int),
1708 .proc_handler
= proc_dointvec_minmax_coredump
,
1712 #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
1714 .procname
= "binfmt_misc",
1716 .child
= sysctl_mount_point
,
1720 .procname
= "pipe-max-size",
1721 .data
= &pipe_max_size
,
1722 .maxlen
= sizeof(int),
1724 .proc_handler
= &pipe_proc_fn
,
1725 .extra1
= &pipe_min_size
,
1730 static struct ctl_table debug_table
[] = {
1731 #ifdef CONFIG_SYSCTL_EXCEPTION_TRACE
1733 .procname
= "exception-trace",
1734 .data
= &show_unhandled_signals
,
1735 .maxlen
= sizeof(int),
1737 .proc_handler
= proc_dointvec
1740 #if defined(CONFIG_OPTPROBES)
1742 .procname
= "kprobes-optimization",
1743 .data
= &sysctl_kprobes_optimization
,
1744 .maxlen
= sizeof(int),
1746 .proc_handler
= proc_kprobes_optimization_handler
,
1754 static struct ctl_table dev_table
[] = {
1758 int __init
sysctl_init(void)
1760 struct ctl_table_header
*hdr
;
1762 hdr
= register_sysctl_table(sysctl_base_table
);
1763 kmemleak_not_leak(hdr
);
1767 #endif /* CONFIG_SYSCTL */
1773 #ifdef CONFIG_PROC_SYSCTL
1775 static int _proc_do_string(char *data
, int maxlen
, int write
,
1776 char __user
*buffer
,
1777 size_t *lenp
, loff_t
*ppos
)
1783 if (!data
|| !maxlen
|| !*lenp
) {
1789 if (sysctl_writes_strict
== SYSCTL_WRITES_STRICT
) {
1790 /* Only continue writes not past the end of buffer. */
1792 if (len
> maxlen
- 1)
1799 /* Start writing from beginning of buffer. */
1805 while ((p
- buffer
) < *lenp
&& len
< maxlen
- 1) {
1806 if (get_user(c
, p
++))
1808 if (c
== 0 || c
== '\n')
1829 if (copy_to_user(buffer
, data
, len
))
1832 if (put_user('\n', buffer
+ len
))
1842 static void warn_sysctl_write(struct ctl_table
*table
)
1844 pr_warn_once("%s wrote to %s when file position was not 0!\n"
1845 "This will not be supported in the future. To silence this\n"
1846 "warning, set kernel.sysctl_writes_strict = -1\n",
1847 current
->comm
, table
->procname
);
1851 * proc_dostring - read a string sysctl
1852 * @table: the sysctl table
1853 * @write: %TRUE if this is a write to the sysctl file
1854 * @buffer: the user buffer
1855 * @lenp: the size of the user buffer
1856 * @ppos: file position
1858 * Reads/writes a string from/to the user buffer. If the kernel
1859 * buffer provided is not large enough to hold the string, the
1860 * string is truncated. The copied string is %NULL-terminated.
1861 * If the string is being read by the user process, it is copied
1862 * and a newline '\n' is added. It is truncated if the buffer is
1865 * Returns 0 on success.
1867 int proc_dostring(struct ctl_table
*table
, int write
,
1868 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
1870 if (write
&& *ppos
&& sysctl_writes_strict
== SYSCTL_WRITES_WARN
)
1871 warn_sysctl_write(table
);
1873 return _proc_do_string((char *)(table
->data
), table
->maxlen
, write
,
1874 (char __user
*)buffer
, lenp
, ppos
);
1877 static size_t proc_skip_spaces(char **buf
)
1880 char *tmp
= skip_spaces(*buf
);
1886 static void proc_skip_char(char **buf
, size_t *size
, const char v
)
1896 #define TMPBUFLEN 22
1898 * proc_get_long - reads an ASCII formatted integer from a user buffer
1900 * @buf: a kernel buffer
1901 * @size: size of the kernel buffer
1902 * @val: this is where the number will be stored
1903 * @neg: set to %TRUE if number is negative
1904 * @perm_tr: a vector which contains the allowed trailers
1905 * @perm_tr_len: size of the perm_tr vector
1906 * @tr: pointer to store the trailer character
1908 * In case of success %0 is returned and @buf and @size are updated with
1909 * the amount of bytes read. If @tr is non-NULL and a trailing
1910 * character exists (size is non-zero after returning from this
1911 * function), @tr is updated with the trailing character.
1913 static int proc_get_long(char **buf
, size_t *size
,
1914 unsigned long *val
, bool *neg
,
1915 const char *perm_tr
, unsigned perm_tr_len
, char *tr
)
1918 char *p
, tmp
[TMPBUFLEN
];
1924 if (len
> TMPBUFLEN
- 1)
1925 len
= TMPBUFLEN
- 1;
1927 memcpy(tmp
, *buf
, len
);
1931 if (*p
== '-' && *size
> 1) {
1939 *val
= simple_strtoul(p
, &p
, 0);
1943 /* We don't know if the next char is whitespace thus we may accept
1944 * invalid integers (e.g. 1234...a) or two integers instead of one
1945 * (e.g. 123...1). So lets not allow such large numbers. */
1946 if (len
== TMPBUFLEN
- 1)
1949 if (len
< *size
&& perm_tr_len
&& !memchr(perm_tr
, *p
, perm_tr_len
))
1952 if (tr
&& (len
< *size
))
1962 * proc_put_long - converts an integer to a decimal ASCII formatted string
1964 * @buf: the user buffer
1965 * @size: the size of the user buffer
1966 * @val: the integer to be converted
1967 * @neg: sign of the number, %TRUE for negative
1969 * In case of success %0 is returned and @buf and @size are updated with
1970 * the amount of bytes written.
1972 static int proc_put_long(void __user
**buf
, size_t *size
, unsigned long val
,
1976 char tmp
[TMPBUFLEN
], *p
= tmp
;
1978 sprintf(p
, "%s%lu", neg
? "-" : "", val
);
1982 if (copy_to_user(*buf
, tmp
, len
))
1990 static int proc_put_char(void __user
**buf
, size_t *size
, char c
)
1993 char __user
**buffer
= (char __user
**)buf
;
1994 if (put_user(c
, *buffer
))
1996 (*size
)--, (*buffer
)++;
2002 static int do_proc_dointvec_conv(bool *negp
, unsigned long *lvalp
,
2004 int write
, void *data
)
2008 if (*lvalp
> (unsigned long) INT_MAX
+ 1)
2012 if (*lvalp
> (unsigned long) INT_MAX
)
2020 *lvalp
= -(unsigned long)val
;
2023 *lvalp
= (unsigned long)val
;
2029 static const char proc_wspace_sep
[] = { ' ', '\t', '\n' };
2031 static int __do_proc_dointvec(void *tbl_data
, struct ctl_table
*table
,
2032 int write
, void __user
*buffer
,
2033 size_t *lenp
, loff_t
*ppos
,
2034 int (*conv
)(bool *negp
, unsigned long *lvalp
, int *valp
,
2035 int write
, void *data
),
2038 int *i
, vleft
, first
= 1, err
= 0;
2039 unsigned long page
= 0;
2043 if (!tbl_data
|| !table
->maxlen
|| !*lenp
|| (*ppos
&& !write
)) {
2048 i
= (int *) tbl_data
;
2049 vleft
= table
->maxlen
/ sizeof(*i
);
2053 conv
= do_proc_dointvec_conv
;
2057 switch (sysctl_writes_strict
) {
2058 case SYSCTL_WRITES_STRICT
:
2060 case SYSCTL_WRITES_WARN
:
2061 warn_sysctl_write(table
);
2068 if (left
> PAGE_SIZE
- 1)
2069 left
= PAGE_SIZE
- 1;
2070 page
= __get_free_page(GFP_TEMPORARY
);
2071 kbuf
= (char *) page
;
2074 if (copy_from_user(kbuf
, buffer
, left
)) {
2081 for (; left
&& vleft
--; i
++, first
=0) {
2086 left
-= proc_skip_spaces(&kbuf
);
2090 err
= proc_get_long(&kbuf
, &left
, &lval
, &neg
,
2092 sizeof(proc_wspace_sep
), NULL
);
2095 if (conv(&neg
, &lval
, i
, 1, data
)) {
2100 if (conv(&neg
, &lval
, i
, 0, data
)) {
2105 err
= proc_put_char(&buffer
, &left
, '\t');
2108 err
= proc_put_long(&buffer
, &left
, lval
, neg
);
2114 if (!write
&& !first
&& left
&& !err
)
2115 err
= proc_put_char(&buffer
, &left
, '\n');
2116 if (write
&& !err
&& left
)
2117 left
-= proc_skip_spaces(&kbuf
);
2122 return err
? : -EINVAL
;
2130 static int do_proc_dointvec(struct ctl_table
*table
, int write
,
2131 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
,
2132 int (*conv
)(bool *negp
, unsigned long *lvalp
, int *valp
,
2133 int write
, void *data
),
2136 return __do_proc_dointvec(table
->data
, table
, write
,
2137 buffer
, lenp
, ppos
, conv
, data
);
2141 * proc_dointvec - read a vector of integers
2142 * @table: the sysctl table
2143 * @write: %TRUE if this is a write to the sysctl file
2144 * @buffer: the user buffer
2145 * @lenp: the size of the user buffer
2146 * @ppos: file position
2148 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2149 * values from/to the user buffer, treated as an ASCII string.
2151 * Returns 0 on success.
2153 int proc_dointvec(struct ctl_table
*table
, int write
,
2154 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2156 return do_proc_dointvec(table
,write
,buffer
,lenp
,ppos
,
2161 * Taint values can only be increased
2162 * This means we can safely use a temporary.
2164 static int proc_taint(struct ctl_table
*table
, int write
,
2165 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2168 unsigned long tmptaint
= get_taint();
2171 if (write
&& !capable(CAP_SYS_ADMIN
))
2176 err
= proc_doulongvec_minmax(&t
, write
, buffer
, lenp
, ppos
);
2182 * Poor man's atomic or. Not worth adding a primitive
2183 * to everyone's atomic.h for this
2186 for (i
= 0; i
< BITS_PER_LONG
&& tmptaint
>> i
; i
++) {
2187 if ((tmptaint
>> i
) & 1)
2188 add_taint(i
, LOCKDEP_STILL_OK
);
2195 #ifdef CONFIG_PRINTK
2196 static int proc_dointvec_minmax_sysadmin(struct ctl_table
*table
, int write
,
2197 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2199 if (write
&& !capable(CAP_SYS_ADMIN
))
2202 return proc_dointvec_minmax(table
, write
, buffer
, lenp
, ppos
);
2206 struct do_proc_dointvec_minmax_conv_param
{
2211 static int do_proc_dointvec_minmax_conv(bool *negp
, unsigned long *lvalp
,
2213 int write
, void *data
)
2215 struct do_proc_dointvec_minmax_conv_param
*param
= data
;
2217 int val
= *negp
? -*lvalp
: *lvalp
;
2218 if ((param
->min
&& *param
->min
> val
) ||
2219 (param
->max
&& *param
->max
< val
))
2226 *lvalp
= -(unsigned long)val
;
2229 *lvalp
= (unsigned long)val
;
2236 * proc_dointvec_minmax - read a vector of integers with min/max values
2237 * @table: the sysctl table
2238 * @write: %TRUE if this is a write to the sysctl file
2239 * @buffer: the user buffer
2240 * @lenp: the size of the user buffer
2241 * @ppos: file position
2243 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2244 * values from/to the user buffer, treated as an ASCII string.
2246 * This routine will ensure the values are within the range specified by
2247 * table->extra1 (min) and table->extra2 (max).
2249 * Returns 0 on success.
2251 int proc_dointvec_minmax(struct ctl_table
*table
, int write
,
2252 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2254 struct do_proc_dointvec_minmax_conv_param param
= {
2255 .min
= (int *) table
->extra1
,
2256 .max
= (int *) table
->extra2
,
2258 return do_proc_dointvec(table
, write
, buffer
, lenp
, ppos
,
2259 do_proc_dointvec_minmax_conv
, ¶m
);
2262 static void validate_coredump_safety(void)
2264 #ifdef CONFIG_COREDUMP
2265 if (suid_dumpable
== SUID_DUMP_ROOT
&&
2266 core_pattern
[0] != '/' && core_pattern
[0] != '|') {
2267 printk(KERN_WARNING
"Unsafe core_pattern used with "\
2268 "suid_dumpable=2. Pipe handler or fully qualified "\
2269 "core dump path required.\n");
2274 static int proc_dointvec_minmax_coredump(struct ctl_table
*table
, int write
,
2275 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2277 int error
= proc_dointvec_minmax(table
, write
, buffer
, lenp
, ppos
);
2279 validate_coredump_safety();
2283 #ifdef CONFIG_COREDUMP
2284 static int proc_dostring_coredump(struct ctl_table
*table
, int write
,
2285 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2287 int error
= proc_dostring(table
, write
, buffer
, lenp
, ppos
);
2289 validate_coredump_safety();
2294 static int __do_proc_doulongvec_minmax(void *data
, struct ctl_table
*table
, int write
,
2295 void __user
*buffer
,
2296 size_t *lenp
, loff_t
*ppos
,
2297 unsigned long convmul
,
2298 unsigned long convdiv
)
2300 unsigned long *i
, *min
, *max
;
2301 int vleft
, first
= 1, err
= 0;
2302 unsigned long page
= 0;
2306 if (!data
|| !table
->maxlen
|| !*lenp
|| (*ppos
&& !write
)) {
2311 i
= (unsigned long *) data
;
2312 min
= (unsigned long *) table
->extra1
;
2313 max
= (unsigned long *) table
->extra2
;
2314 vleft
= table
->maxlen
/ sizeof(unsigned long);
2319 switch (sysctl_writes_strict
) {
2320 case SYSCTL_WRITES_STRICT
:
2322 case SYSCTL_WRITES_WARN
:
2323 warn_sysctl_write(table
);
2330 if (left
> PAGE_SIZE
- 1)
2331 left
= PAGE_SIZE
- 1;
2332 page
= __get_free_page(GFP_TEMPORARY
);
2333 kbuf
= (char *) page
;
2336 if (copy_from_user(kbuf
, buffer
, left
)) {
2343 for (; left
&& vleft
--; i
++, first
= 0) {
2349 left
-= proc_skip_spaces(&kbuf
);
2351 err
= proc_get_long(&kbuf
, &left
, &val
, &neg
,
2353 sizeof(proc_wspace_sep
), NULL
);
2358 if ((min
&& val
< *min
) || (max
&& val
> *max
))
2362 val
= convdiv
* (*i
) / convmul
;
2364 err
= proc_put_char(&buffer
, &left
, '\t');
2368 err
= proc_put_long(&buffer
, &left
, val
, false);
2374 if (!write
&& !first
&& left
&& !err
)
2375 err
= proc_put_char(&buffer
, &left
, '\n');
2377 left
-= proc_skip_spaces(&kbuf
);
2382 return err
? : -EINVAL
;
2390 static int do_proc_doulongvec_minmax(struct ctl_table
*table
, int write
,
2391 void __user
*buffer
,
2392 size_t *lenp
, loff_t
*ppos
,
2393 unsigned long convmul
,
2394 unsigned long convdiv
)
2396 return __do_proc_doulongvec_minmax(table
->data
, table
, write
,
2397 buffer
, lenp
, ppos
, convmul
, convdiv
);
2401 * proc_doulongvec_minmax - read a vector of long integers with min/max values
2402 * @table: the sysctl table
2403 * @write: %TRUE if this is a write to the sysctl file
2404 * @buffer: the user buffer
2405 * @lenp: the size of the user buffer
2406 * @ppos: file position
2408 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
2409 * values from/to the user buffer, treated as an ASCII string.
2411 * This routine will ensure the values are within the range specified by
2412 * table->extra1 (min) and table->extra2 (max).
2414 * Returns 0 on success.
2416 int proc_doulongvec_minmax(struct ctl_table
*table
, int write
,
2417 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2419 return do_proc_doulongvec_minmax(table
, write
, buffer
, lenp
, ppos
, 1l, 1l);
2423 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values
2424 * @table: the sysctl table
2425 * @write: %TRUE if this is a write to the sysctl file
2426 * @buffer: the user buffer
2427 * @lenp: the size of the user buffer
2428 * @ppos: file position
2430 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
2431 * values from/to the user buffer, treated as an ASCII string. The values
2432 * are treated as milliseconds, and converted to jiffies when they are stored.
2434 * This routine will ensure the values are within the range specified by
2435 * table->extra1 (min) and table->extra2 (max).
2437 * Returns 0 on success.
2439 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table
*table
, int write
,
2440 void __user
*buffer
,
2441 size_t *lenp
, loff_t
*ppos
)
2443 return do_proc_doulongvec_minmax(table
, write
, buffer
,
2444 lenp
, ppos
, HZ
, 1000l);
2448 static int do_proc_dointvec_jiffies_conv(bool *negp
, unsigned long *lvalp
,
2450 int write
, void *data
)
2453 if (*lvalp
> LONG_MAX
/ HZ
)
2455 *valp
= *negp
? -(*lvalp
*HZ
) : (*lvalp
*HZ
);
2461 lval
= -(unsigned long)val
;
2464 lval
= (unsigned long)val
;
2471 static int do_proc_dointvec_userhz_jiffies_conv(bool *negp
, unsigned long *lvalp
,
2473 int write
, void *data
)
2476 if (USER_HZ
< HZ
&& *lvalp
> (LONG_MAX
/ HZ
) * USER_HZ
)
2478 *valp
= clock_t_to_jiffies(*negp
? -*lvalp
: *lvalp
);
2484 lval
= -(unsigned long)val
;
2487 lval
= (unsigned long)val
;
2489 *lvalp
= jiffies_to_clock_t(lval
);
2494 static int do_proc_dointvec_ms_jiffies_conv(bool *negp
, unsigned long *lvalp
,
2496 int write
, void *data
)
2499 unsigned long jif
= msecs_to_jiffies(*negp
? -*lvalp
: *lvalp
);
2509 lval
= -(unsigned long)val
;
2512 lval
= (unsigned long)val
;
2514 *lvalp
= jiffies_to_msecs(lval
);
2520 * proc_dointvec_jiffies - read a vector of integers as seconds
2521 * @table: the sysctl table
2522 * @write: %TRUE if this is a write to the sysctl file
2523 * @buffer: the user buffer
2524 * @lenp: the size of the user buffer
2525 * @ppos: file position
2527 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2528 * values from/to the user buffer, treated as an ASCII string.
2529 * The values read are assumed to be in seconds, and are converted into
2532 * Returns 0 on success.
2534 int proc_dointvec_jiffies(struct ctl_table
*table
, int write
,
2535 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2537 return do_proc_dointvec(table
,write
,buffer
,lenp
,ppos
,
2538 do_proc_dointvec_jiffies_conv
,NULL
);
2542 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds
2543 * @table: the sysctl table
2544 * @write: %TRUE if this is a write to the sysctl file
2545 * @buffer: the user buffer
2546 * @lenp: the size of the user buffer
2547 * @ppos: pointer to the file position
2549 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2550 * values from/to the user buffer, treated as an ASCII string.
2551 * The values read are assumed to be in 1/USER_HZ seconds, and
2552 * are converted into jiffies.
2554 * Returns 0 on success.
2556 int proc_dointvec_userhz_jiffies(struct ctl_table
*table
, int write
,
2557 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2559 return do_proc_dointvec(table
,write
,buffer
,lenp
,ppos
,
2560 do_proc_dointvec_userhz_jiffies_conv
,NULL
);
2564 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds
2565 * @table: the sysctl table
2566 * @write: %TRUE if this is a write to the sysctl file
2567 * @buffer: the user buffer
2568 * @lenp: the size of the user buffer
2569 * @ppos: file position
2570 * @ppos: the current position in the file
2572 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2573 * values from/to the user buffer, treated as an ASCII string.
2574 * The values read are assumed to be in 1/1000 seconds, and
2575 * are converted into jiffies.
2577 * Returns 0 on success.
2579 int proc_dointvec_ms_jiffies(struct ctl_table
*table
, int write
,
2580 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2582 return do_proc_dointvec(table
, write
, buffer
, lenp
, ppos
,
2583 do_proc_dointvec_ms_jiffies_conv
, NULL
);
2586 static int proc_do_cad_pid(struct ctl_table
*table
, int write
,
2587 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2589 struct pid
*new_pid
;
2593 tmp
= pid_vnr(cad_pid
);
2595 r
= __do_proc_dointvec(&tmp
, table
, write
, buffer
,
2596 lenp
, ppos
, NULL
, NULL
);
2600 new_pid
= find_get_pid(tmp
);
2604 put_pid(xchg(&cad_pid
, new_pid
));
2609 * proc_do_large_bitmap - read/write from/to a large bitmap
2610 * @table: the sysctl table
2611 * @write: %TRUE if this is a write to the sysctl file
2612 * @buffer: the user buffer
2613 * @lenp: the size of the user buffer
2614 * @ppos: file position
2616 * The bitmap is stored at table->data and the bitmap length (in bits)
2619 * We use a range comma separated format (e.g. 1,3-4,10-10) so that
2620 * large bitmaps may be represented in a compact manner. Writing into
2621 * the file will clear the bitmap then update it with the given input.
2623 * Returns 0 on success.
2625 int proc_do_large_bitmap(struct ctl_table
*table
, int write
,
2626 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2630 size_t left
= *lenp
;
2631 unsigned long bitmap_len
= table
->maxlen
;
2632 unsigned long *bitmap
= *(unsigned long **) table
->data
;
2633 unsigned long *tmp_bitmap
= NULL
;
2634 char tr_a
[] = { '-', ',', '\n' }, tr_b
[] = { ',', '\n', 0 }, c
;
2636 if (!bitmap
|| !bitmap_len
|| !left
|| (*ppos
&& !write
)) {
2642 unsigned long page
= 0;
2645 if (left
> PAGE_SIZE
- 1)
2646 left
= PAGE_SIZE
- 1;
2648 page
= __get_free_page(GFP_TEMPORARY
);
2649 kbuf
= (char *) page
;
2652 if (copy_from_user(kbuf
, buffer
, left
)) {
2658 tmp_bitmap
= kzalloc(BITS_TO_LONGS(bitmap_len
) * sizeof(unsigned long),
2664 proc_skip_char(&kbuf
, &left
, '\n');
2665 while (!err
&& left
) {
2666 unsigned long val_a
, val_b
;
2669 err
= proc_get_long(&kbuf
, &left
, &val_a
, &neg
, tr_a
,
2673 if (val_a
>= bitmap_len
|| neg
) {
2685 err
= proc_get_long(&kbuf
, &left
, &val_b
,
2686 &neg
, tr_b
, sizeof(tr_b
),
2690 if (val_b
>= bitmap_len
|| neg
||
2701 bitmap_set(tmp_bitmap
, val_a
, val_b
- val_a
+ 1);
2703 proc_skip_char(&kbuf
, &left
, '\n');
2707 unsigned long bit_a
, bit_b
= 0;
2710 bit_a
= find_next_bit(bitmap
, bitmap_len
, bit_b
);
2711 if (bit_a
>= bitmap_len
)
2713 bit_b
= find_next_zero_bit(bitmap
, bitmap_len
,
2717 err
= proc_put_char(&buffer
, &left
, ',');
2721 err
= proc_put_long(&buffer
, &left
, bit_a
, false);
2724 if (bit_a
!= bit_b
) {
2725 err
= proc_put_char(&buffer
, &left
, '-');
2728 err
= proc_put_long(&buffer
, &left
, bit_b
, false);
2736 err
= proc_put_char(&buffer
, &left
, '\n');
2742 bitmap_or(bitmap
, bitmap
, tmp_bitmap
, bitmap_len
);
2744 bitmap_copy(bitmap
, tmp_bitmap
, bitmap_len
);
2756 #else /* CONFIG_PROC_SYSCTL */
2758 int proc_dostring(struct ctl_table
*table
, int write
,
2759 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2764 int proc_dointvec(struct ctl_table
*table
, int write
,
2765 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2770 int proc_dointvec_minmax(struct ctl_table
*table
, int write
,
2771 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2776 int proc_dointvec_jiffies(struct ctl_table
*table
, int write
,
2777 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2782 int proc_dointvec_userhz_jiffies(struct ctl_table
*table
, int write
,
2783 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2788 int proc_dointvec_ms_jiffies(struct ctl_table
*table
, int write
,
2789 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2794 int proc_doulongvec_minmax(struct ctl_table
*table
, int write
,
2795 void __user
*buffer
, size_t *lenp
, loff_t
*ppos
)
2800 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table
*table
, int write
,
2801 void __user
*buffer
,
2802 size_t *lenp
, loff_t
*ppos
)
2808 #endif /* CONFIG_PROC_SYSCTL */
2811 * No sense putting this after each symbol definition, twice,
2812 * exception granted :-)
2814 EXPORT_SYMBOL(proc_dointvec
);
2815 EXPORT_SYMBOL(proc_dointvec_jiffies
);
2816 EXPORT_SYMBOL(proc_dointvec_minmax
);
2817 EXPORT_SYMBOL(proc_dointvec_userhz_jiffies
);
2818 EXPORT_SYMBOL(proc_dointvec_ms_jiffies
);
2819 EXPORT_SYMBOL(proc_dostring
);
2820 EXPORT_SYMBOL(proc_doulongvec_minmax
);
2821 EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax
);