1 // SPDX-License-Identifier: GPL-2.0-only
3 * sysctl.c: General linux system control interface
5 * Begun 24 March 1995, Stephen Tweedie
6 * Added /proc support, Dec 1995
7 * Added bdflush entry and intvec min/max checking, 2/23/96, Tom Dyas.
8 * Added hooks for /proc/sys/net (minor, minor patch), 96/4/1, Mike Shaver.
9 * Added kernel/java-{interpreter,appletviewer}, 96/5/10, Mike Shaver.
10 * Dynamic registration fixes, Stephen Tweedie.
11 * Added kswapd-interval, ctrl-alt-del, printk stuff, 1/8/97, Chris Horn.
12 * Made sysctl support optional via CONFIG_SYSCTL, 1/10/97, Chris
14 * Added proc_doulongvec_ms_jiffies_minmax, 09/08/99, Carlos H. Bauer.
15 * Added proc_doulongvec_minmax, 09/08/99, Carlos H. Bauer.
16 * Changed linked lists to use list.h instead of lists.h, 02/24/00, Bill
18 * The list_for_each() macro wasn't appropriate for the sysctl loop.
19 * Removed it and replaced it with older style, 03/23/00, Bill Wendling
22 #include <linux/module.h>
23 #include <linux/aio.h>
25 #include <linux/swap.h>
26 #include <linux/slab.h>
27 #include <linux/sysctl.h>
28 #include <linux/bitmap.h>
29 #include <linux/signal.h>
30 #include <linux/panic.h>
31 #include <linux/printk.h>
32 #include <linux/proc_fs.h>
33 #include <linux/security.h>
34 #include <linux/ctype.h>
35 #include <linux/kmemleak.h>
37 #include <linux/init.h>
38 #include <linux/kernel.h>
39 #include <linux/kobject.h>
40 #include <linux/net.h>
41 #include <linux/sysrq.h>
42 #include <linux/highuid.h>
43 #include <linux/writeback.h>
44 #include <linux/ratelimit.h>
45 #include <linux/compaction.h>
46 #include <linux/hugetlb.h>
47 #include <linux/initrd.h>
48 #include <linux/key.h>
49 #include <linux/times.h>
50 #include <linux/limits.h>
51 #include <linux/dcache.h>
52 #include <linux/dnotify.h>
53 #include <linux/syscalls.h>
54 #include <linux/vmstat.h>
55 #include <linux/nfs_fs.h>
56 #include <linux/acpi.h>
57 #include <linux/reboot.h>
58 #include <linux/ftrace.h>
59 #include <linux/perf_event.h>
60 #include <linux/kprobes.h>
61 #include <linux/pipe_fs_i.h>
62 #include <linux/oom.h>
63 #include <linux/kmod.h>
64 #include <linux/capability.h>
65 #include <linux/binfmts.h>
66 #include <linux/sched/sysctl.h>
67 #include <linux/sched/coredump.h>
68 #include <linux/kexec.h>
69 #include <linux/bpf.h>
70 #include <linux/mount.h>
71 #include <linux/userfaultfd_k.h>
72 #include <linux/coredump.h>
73 #include <linux/latencytop.h>
74 #include <linux/pid.h>
75 #include <linux/delayacct.h>
76 #include <linux/user_namespace.h>
78 #include "../lib/kstrtox.h"
80 #include <linux/uaccess.h>
81 #include <asm/processor.h>
85 #include <asm/stacktrace.h>
89 #include <asm/setup.h>
91 #ifdef CONFIG_BSD_PROCESS_ACCT
92 #include <linux/acct.h>
94 #ifdef CONFIG_RT_MUTEXES
95 #include <linux/rtmutex.h>
97 #if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT)
98 #include <linux/lockdep.h>
100 #ifdef CONFIG_CHR_DEV_SG
103 #ifdef CONFIG_STACKLEAK_RUNTIME_DISABLE
104 #include <linux/stackleak.h>
106 #ifdef CONFIG_LOCKUP_DETECTOR
107 #include <linux/nmi.h>
110 #if defined(CONFIG_SYSCTL)
112 /* Constants used for minimum and maximum */
113 #ifdef CONFIG_LOCKUP_DETECTOR
114 static int sixty
= 60;
117 static int __maybe_unused neg_one
= -1;
118 static int __maybe_unused two
= 2;
119 static int __maybe_unused four
= 4;
120 static unsigned long zero_ul
;
121 static unsigned long one_ul
= 1;
122 static unsigned long long_max
= LONG_MAX
;
123 static int one_hundred
= 100;
124 static int two_hundred
= 200;
125 static int one_thousand
= 1000;
127 static int ten_thousand
= 10000;
129 #ifdef CONFIG_PERF_EVENTS
130 static int six_hundred_forty_kb
= 640 * 1024;
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
;
144 * This is needed for proc_doulongvec_minmax of sysctl_hung_task_timeout_secs
145 * and hung_task_check_interval_secs
147 #ifdef CONFIG_DETECT_HUNG_TASK
148 static unsigned long hung_task_timeout_max
= (LONG_MAX
/HZ
);
151 #ifdef CONFIG_INOTIFY_USER
152 #include <linux/inotify.h>
154 #ifdef CONFIG_FANOTIFY
155 #include <linux/fanotify.h>
158 #ifdef CONFIG_PROC_SYSCTL
161 * enum sysctl_writes_mode - supported sysctl write modes
163 * @SYSCTL_WRITES_LEGACY: each write syscall must fully contain the sysctl value
164 * to be written, and multiple writes on the same sysctl file descriptor
165 * will rewrite the sysctl value, regardless of file position. No warning
166 * is issued when the initial position is not 0.
167 * @SYSCTL_WRITES_WARN: same as above but warn when the initial file position is
169 * @SYSCTL_WRITES_STRICT: writes to numeric sysctl entries must always be at
170 * file position 0 and the value must be fully contained in the buffer
171 * sent to the write syscall. If dealing with strings respect the file
172 * position, but restrict this to the max length of the buffer, anything
173 * passed the max length will be ignored. Multiple writes will append
176 * These write modes control how current file position affects the behavior of
177 * updating sysctl values through the proc interface on each write.
179 enum sysctl_writes_mode
{
180 SYSCTL_WRITES_LEGACY
= -1,
181 SYSCTL_WRITES_WARN
= 0,
182 SYSCTL_WRITES_STRICT
= 1,
185 static enum sysctl_writes_mode sysctl_writes_strict
= SYSCTL_WRITES_STRICT
;
186 #endif /* CONFIG_PROC_SYSCTL */
188 #if defined(HAVE_ARCH_PICK_MMAP_LAYOUT) || \
189 defined(CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT)
190 int sysctl_legacy_va_layout
;
193 #ifdef CONFIG_COMPACTION
194 static int min_extfrag_threshold
;
195 static int max_extfrag_threshold
= 1000;
198 #endif /* CONFIG_SYSCTL */
200 #if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL)
201 static int bpf_stats_handler(struct ctl_table
*table
, int write
,
202 void *buffer
, size_t *lenp
, loff_t
*ppos
)
204 struct static_key
*key
= (struct static_key
*)table
->data
;
205 static int saved_val
;
207 struct ctl_table tmp
= {
209 .maxlen
= sizeof(val
),
211 .extra1
= SYSCTL_ZERO
,
212 .extra2
= SYSCTL_ONE
,
215 if (write
&& !capable(CAP_SYS_ADMIN
))
218 mutex_lock(&bpf_stats_enabled_mutex
);
220 ret
= proc_dointvec_minmax(&tmp
, write
, buffer
, lenp
, ppos
);
221 if (write
&& !ret
&& val
!= saved_val
) {
223 static_key_slow_inc(key
);
225 static_key_slow_dec(key
);
228 mutex_unlock(&bpf_stats_enabled_mutex
);
232 static int bpf_unpriv_handler(struct ctl_table
*table
, int write
,
233 void *buffer
, size_t *lenp
, loff_t
*ppos
)
235 int ret
, unpriv_enable
= *(int *)table
->data
;
236 bool locked_state
= unpriv_enable
== 1;
237 struct ctl_table tmp
= *table
;
239 if (write
&& !capable(CAP_SYS_ADMIN
))
242 tmp
.data
= &unpriv_enable
;
243 ret
= proc_dointvec_minmax(&tmp
, write
, buffer
, lenp
, ppos
);
245 if (locked_state
&& unpriv_enable
!= 1)
247 *(int *)table
->data
= unpriv_enable
;
251 #endif /* CONFIG_BPF_SYSCALL && CONFIG_SYSCTL */
257 #ifdef CONFIG_PROC_SYSCTL
259 static int _proc_do_string(char *data
, int maxlen
, int write
,
260 char *buffer
, size_t *lenp
, loff_t
*ppos
)
265 if (!data
|| !maxlen
|| !*lenp
) {
271 if (sysctl_writes_strict
== SYSCTL_WRITES_STRICT
) {
272 /* Only continue writes not past the end of buffer. */
274 if (len
> maxlen
- 1)
281 /* Start writing from beginning of buffer. */
287 while ((p
- buffer
) < *lenp
&& len
< maxlen
- 1) {
289 if (c
== 0 || c
== '\n')
310 memcpy(buffer
, data
, len
);
321 static void warn_sysctl_write(struct ctl_table
*table
)
323 pr_warn_once("%s wrote to %s when file position was not 0!\n"
324 "This will not be supported in the future. To silence this\n"
325 "warning, set kernel.sysctl_writes_strict = -1\n",
326 current
->comm
, table
->procname
);
330 * proc_first_pos_non_zero_ignore - check if first position is allowed
331 * @ppos: file position
332 * @table: the sysctl table
334 * Returns true if the first position is non-zero and the sysctl_writes_strict
335 * mode indicates this is not allowed for numeric input types. String proc
336 * handlers can ignore the return value.
338 static bool proc_first_pos_non_zero_ignore(loff_t
*ppos
,
339 struct ctl_table
*table
)
344 switch (sysctl_writes_strict
) {
345 case SYSCTL_WRITES_STRICT
:
347 case SYSCTL_WRITES_WARN
:
348 warn_sysctl_write(table
);
356 * proc_dostring - read a string sysctl
357 * @table: the sysctl table
358 * @write: %TRUE if this is a write to the sysctl file
359 * @buffer: the user buffer
360 * @lenp: the size of the user buffer
361 * @ppos: file position
363 * Reads/writes a string from/to the user buffer. If the kernel
364 * buffer provided is not large enough to hold the string, the
365 * string is truncated. The copied string is %NULL-terminated.
366 * If the string is being read by the user process, it is copied
367 * and a newline '\n' is added. It is truncated if the buffer is
370 * Returns 0 on success.
372 int proc_dostring(struct ctl_table
*table
, int write
,
373 void *buffer
, size_t *lenp
, loff_t
*ppos
)
376 proc_first_pos_non_zero_ignore(ppos
, table
);
378 return _proc_do_string(table
->data
, table
->maxlen
, write
, buffer
, lenp
,
382 static size_t proc_skip_spaces(char **buf
)
385 char *tmp
= skip_spaces(*buf
);
391 static void proc_skip_char(char **buf
, size_t *size
, const char v
)
402 * strtoul_lenient - parse an ASCII formatted integer from a buffer and only
405 * @cp: kernel buffer containing the string to parse
406 * @endp: pointer to store the trailing characters
407 * @base: the base to use
408 * @res: where the parsed integer will be stored
410 * In case of success 0 is returned and @res will contain the parsed integer,
411 * @endp will hold any trailing characters.
412 * This function will fail the parse on overflow. If there wasn't an overflow
413 * the function will defer the decision what characters count as invalid to the
416 static int strtoul_lenient(const char *cp
, char **endp
, unsigned int base
,
419 unsigned long long result
;
422 cp
= _parse_integer_fixup_radix(cp
, &base
);
423 rv
= _parse_integer(cp
, base
, &result
);
424 if ((rv
& KSTRTOX_OVERFLOW
) || (result
!= (unsigned long)result
))
432 *res
= (unsigned long)result
;
438 * proc_get_long - reads an ASCII formatted integer from a user buffer
440 * @buf: a kernel buffer
441 * @size: size of the kernel buffer
442 * @val: this is where the number will be stored
443 * @neg: set to %TRUE if number is negative
444 * @perm_tr: a vector which contains the allowed trailers
445 * @perm_tr_len: size of the perm_tr vector
446 * @tr: pointer to store the trailer character
448 * In case of success %0 is returned and @buf and @size are updated with
449 * the amount of bytes read. If @tr is non-NULL and a trailing
450 * character exists (size is non-zero after returning from this
451 * function), @tr is updated with the trailing character.
453 static int proc_get_long(char **buf
, size_t *size
,
454 unsigned long *val
, bool *neg
,
455 const char *perm_tr
, unsigned perm_tr_len
, char *tr
)
458 char *p
, tmp
[TMPBUFLEN
];
464 if (len
> TMPBUFLEN
- 1)
467 memcpy(tmp
, *buf
, len
);
471 if (*p
== '-' && *size
> 1) {
479 if (strtoul_lenient(p
, &p
, 0, val
))
484 /* We don't know if the next char is whitespace thus we may accept
485 * invalid integers (e.g. 1234...a) or two integers instead of one
486 * (e.g. 123...1). So lets not allow such large numbers. */
487 if (len
== TMPBUFLEN
- 1)
490 if (len
< *size
&& perm_tr_len
&& !memchr(perm_tr
, *p
, perm_tr_len
))
493 if (tr
&& (len
< *size
))
503 * proc_put_long - converts an integer to a decimal ASCII formatted string
505 * @buf: the user buffer
506 * @size: the size of the user buffer
507 * @val: the integer to be converted
508 * @neg: sign of the number, %TRUE for negative
510 * In case of success @buf and @size are updated with the amount of bytes
513 static void proc_put_long(void **buf
, size_t *size
, unsigned long val
, bool neg
)
516 char tmp
[TMPBUFLEN
], *p
= tmp
;
518 sprintf(p
, "%s%lu", neg
? "-" : "", val
);
522 memcpy(*buf
, tmp
, len
);
528 static void proc_put_char(void **buf
, size_t *size
, char c
)
531 char **buffer
= (char **)buf
;
540 static int do_proc_dobool_conv(bool *negp
, unsigned long *lvalp
,
542 int write
, void *data
)
545 *(bool *)valp
= *lvalp
;
547 int val
= *(bool *)valp
;
549 *lvalp
= (unsigned long)val
;
555 static int do_proc_dointvec_conv(bool *negp
, unsigned long *lvalp
,
557 int write
, void *data
)
561 if (*lvalp
> (unsigned long) INT_MAX
+ 1)
565 if (*lvalp
> (unsigned long) INT_MAX
)
573 *lvalp
= -(unsigned long)val
;
576 *lvalp
= (unsigned long)val
;
582 static int do_proc_douintvec_conv(unsigned long *lvalp
,
584 int write
, void *data
)
587 if (*lvalp
> UINT_MAX
)
591 unsigned int val
= *valp
;
592 *lvalp
= (unsigned long)val
;
597 static const char proc_wspace_sep
[] = { ' ', '\t', '\n' };
599 static int __do_proc_dointvec(void *tbl_data
, struct ctl_table
*table
,
600 int write
, void *buffer
,
601 size_t *lenp
, loff_t
*ppos
,
602 int (*conv
)(bool *negp
, unsigned long *lvalp
, int *valp
,
603 int write
, void *data
),
606 int *i
, vleft
, first
= 1, err
= 0;
610 if (!tbl_data
|| !table
->maxlen
|| !*lenp
|| (*ppos
&& !write
)) {
615 i
= (int *) tbl_data
;
616 vleft
= table
->maxlen
/ sizeof(*i
);
620 conv
= do_proc_dointvec_conv
;
623 if (proc_first_pos_non_zero_ignore(ppos
, table
))
626 if (left
> PAGE_SIZE
- 1)
627 left
= PAGE_SIZE
- 1;
631 for (; left
&& vleft
--; i
++, first
=0) {
636 left
-= proc_skip_spaces(&p
);
640 err
= proc_get_long(&p
, &left
, &lval
, &neg
,
642 sizeof(proc_wspace_sep
), NULL
);
645 if (conv(&neg
, &lval
, i
, 1, data
)) {
650 if (conv(&neg
, &lval
, i
, 0, data
)) {
655 proc_put_char(&buffer
, &left
, '\t');
656 proc_put_long(&buffer
, &left
, lval
, neg
);
660 if (!write
&& !first
&& left
&& !err
)
661 proc_put_char(&buffer
, &left
, '\n');
662 if (write
&& !err
&& left
)
663 left
-= proc_skip_spaces(&p
);
665 return err
? : -EINVAL
;
672 static int do_proc_dointvec(struct ctl_table
*table
, int write
,
673 void *buffer
, size_t *lenp
, loff_t
*ppos
,
674 int (*conv
)(bool *negp
, unsigned long *lvalp
, int *valp
,
675 int write
, void *data
),
678 return __do_proc_dointvec(table
->data
, table
, write
,
679 buffer
, lenp
, ppos
, conv
, data
);
682 static int do_proc_douintvec_w(unsigned int *tbl_data
,
683 struct ctl_table
*table
,
685 size_t *lenp
, loff_t
*ppos
,
686 int (*conv
)(unsigned long *lvalp
,
688 int write
, void *data
),
699 if (proc_first_pos_non_zero_ignore(ppos
, table
))
702 if (left
> PAGE_SIZE
- 1)
703 left
= PAGE_SIZE
- 1;
705 left
-= proc_skip_spaces(&p
);
711 err
= proc_get_long(&p
, &left
, &lval
, &neg
,
713 sizeof(proc_wspace_sep
), NULL
);
719 if (conv(&lval
, tbl_data
, 1, data
)) {
725 left
-= proc_skip_spaces(&p
);
733 /* This is in keeping with old __do_proc_dointvec() */
739 static int do_proc_douintvec_r(unsigned int *tbl_data
, void *buffer
,
740 size_t *lenp
, loff_t
*ppos
,
741 int (*conv
)(unsigned long *lvalp
,
743 int write
, void *data
),
752 if (conv(&lval
, tbl_data
, 0, data
)) {
757 proc_put_long(&buffer
, &left
, lval
, false);
761 proc_put_char(&buffer
, &left
, '\n');
770 static int __do_proc_douintvec(void *tbl_data
, struct ctl_table
*table
,
771 int write
, void *buffer
,
772 size_t *lenp
, loff_t
*ppos
,
773 int (*conv
)(unsigned long *lvalp
,
775 int write
, void *data
),
778 unsigned int *i
, vleft
;
780 if (!tbl_data
|| !table
->maxlen
|| !*lenp
|| (*ppos
&& !write
)) {
785 i
= (unsigned int *) tbl_data
;
786 vleft
= table
->maxlen
/ sizeof(*i
);
789 * Arrays are not supported, keep this simple. *Do not* add
798 conv
= do_proc_douintvec_conv
;
801 return do_proc_douintvec_w(i
, table
, buffer
, lenp
, ppos
,
803 return do_proc_douintvec_r(i
, buffer
, lenp
, ppos
, conv
, data
);
806 static int do_proc_douintvec(struct ctl_table
*table
, int write
,
807 void *buffer
, size_t *lenp
, loff_t
*ppos
,
808 int (*conv
)(unsigned long *lvalp
,
810 int write
, void *data
),
813 return __do_proc_douintvec(table
->data
, table
, write
,
814 buffer
, lenp
, ppos
, conv
, data
);
818 * proc_dobool - read/write a bool
819 * @table: the sysctl table
820 * @write: %TRUE if this is a write to the sysctl file
821 * @buffer: the user buffer
822 * @lenp: the size of the user buffer
823 * @ppos: file position
825 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
826 * values from/to the user buffer, treated as an ASCII string.
828 * Returns 0 on success.
830 int proc_dobool(struct ctl_table
*table
, int write
, void *buffer
,
831 size_t *lenp
, loff_t
*ppos
)
833 return do_proc_dointvec(table
, write
, buffer
, lenp
, ppos
,
834 do_proc_dobool_conv
, NULL
);
838 * proc_dointvec - read a vector of integers
839 * @table: the sysctl table
840 * @write: %TRUE if this is a write to the sysctl file
841 * @buffer: the user buffer
842 * @lenp: the size of the user buffer
843 * @ppos: file position
845 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
846 * values from/to the user buffer, treated as an ASCII string.
848 * Returns 0 on success.
850 int proc_dointvec(struct ctl_table
*table
, int write
, void *buffer
,
851 size_t *lenp
, loff_t
*ppos
)
853 return do_proc_dointvec(table
, write
, buffer
, lenp
, ppos
, NULL
, NULL
);
856 #ifdef CONFIG_COMPACTION
857 static int proc_dointvec_minmax_warn_RT_change(struct ctl_table
*table
,
858 int write
, void *buffer
, size_t *lenp
, loff_t
*ppos
)
862 if (!IS_ENABLED(CONFIG_PREEMPT_RT
) || !write
)
863 return proc_dointvec_minmax(table
, write
, buffer
, lenp
, ppos
);
865 old
= *(int *)table
->data
;
866 ret
= proc_dointvec_minmax(table
, write
, buffer
, lenp
, ppos
);
869 if (old
!= *(int *)table
->data
)
870 pr_warn_once("sysctl attribute %s changed by %s[%d]\n",
871 table
->procname
, current
->comm
,
872 task_pid_nr(current
));
878 * proc_douintvec - read a vector of unsigned integers
879 * @table: the sysctl table
880 * @write: %TRUE if this is a write to the sysctl file
881 * @buffer: the user buffer
882 * @lenp: the size of the user buffer
883 * @ppos: file position
885 * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
886 * values from/to the user buffer, treated as an ASCII string.
888 * Returns 0 on success.
890 int proc_douintvec(struct ctl_table
*table
, int write
, void *buffer
,
891 size_t *lenp
, loff_t
*ppos
)
893 return do_proc_douintvec(table
, write
, buffer
, lenp
, ppos
,
894 do_proc_douintvec_conv
, NULL
);
898 * Taint values can only be increased
899 * This means we can safely use a temporary.
901 static int proc_taint(struct ctl_table
*table
, int write
,
902 void *buffer
, size_t *lenp
, loff_t
*ppos
)
905 unsigned long tmptaint
= get_taint();
908 if (write
&& !capable(CAP_SYS_ADMIN
))
913 err
= proc_doulongvec_minmax(&t
, write
, buffer
, lenp
, ppos
);
921 * If we are relying on panic_on_taint not producing
922 * false positives due to userspace input, bail out
923 * before setting the requested taint flags.
925 if (panic_on_taint_nousertaint
&& (tmptaint
& panic_on_taint
))
929 * Poor man's atomic or. Not worth adding a primitive
930 * to everyone's atomic.h for this
932 for (i
= 0; i
< TAINT_FLAGS_COUNT
; i
++)
933 if ((1UL << i
) & tmptaint
)
934 add_taint(i
, LOCKDEP_STILL_OK
);
941 static int proc_dointvec_minmax_sysadmin(struct ctl_table
*table
, int write
,
942 void *buffer
, size_t *lenp
, loff_t
*ppos
)
944 if (write
&& !capable(CAP_SYS_ADMIN
))
947 return proc_dointvec_minmax(table
, write
, buffer
, lenp
, ppos
);
952 * struct do_proc_dointvec_minmax_conv_param - proc_dointvec_minmax() range checking structure
953 * @min: pointer to minimum allowable value
954 * @max: pointer to maximum allowable value
956 * The do_proc_dointvec_minmax_conv_param structure provides the
957 * minimum and maximum values for doing range checking for those sysctl
958 * parameters that use the proc_dointvec_minmax() handler.
960 struct do_proc_dointvec_minmax_conv_param
{
965 static int do_proc_dointvec_minmax_conv(bool *negp
, unsigned long *lvalp
,
967 int write
, void *data
)
970 struct do_proc_dointvec_minmax_conv_param
*param
= data
;
972 * If writing, first do so via a temporary local int so we can
973 * bounds-check it before touching *valp.
975 int *ip
= write
? &tmp
: valp
;
977 ret
= do_proc_dointvec_conv(negp
, lvalp
, ip
, write
, data
);
982 if ((param
->min
&& *param
->min
> tmp
) ||
983 (param
->max
&& *param
->max
< tmp
))
992 * proc_dointvec_minmax - read a vector of integers with min/max values
993 * @table: the sysctl table
994 * @write: %TRUE if this is a write to the sysctl file
995 * @buffer: the user buffer
996 * @lenp: the size of the user buffer
997 * @ppos: file position
999 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1000 * values from/to the user buffer, treated as an ASCII string.
1002 * This routine will ensure the values are within the range specified by
1003 * table->extra1 (min) and table->extra2 (max).
1005 * Returns 0 on success or -EINVAL on write when the range check fails.
1007 int proc_dointvec_minmax(struct ctl_table
*table
, int write
,
1008 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1010 struct do_proc_dointvec_minmax_conv_param param
= {
1011 .min
= (int *) table
->extra1
,
1012 .max
= (int *) table
->extra2
,
1014 return do_proc_dointvec(table
, write
, buffer
, lenp
, ppos
,
1015 do_proc_dointvec_minmax_conv
, ¶m
);
1019 * struct do_proc_douintvec_minmax_conv_param - proc_douintvec_minmax() range checking structure
1020 * @min: pointer to minimum allowable value
1021 * @max: pointer to maximum allowable value
1023 * The do_proc_douintvec_minmax_conv_param structure provides the
1024 * minimum and maximum values for doing range checking for those sysctl
1025 * parameters that use the proc_douintvec_minmax() handler.
1027 struct do_proc_douintvec_minmax_conv_param
{
1032 static int do_proc_douintvec_minmax_conv(unsigned long *lvalp
,
1034 int write
, void *data
)
1038 struct do_proc_douintvec_minmax_conv_param
*param
= data
;
1039 /* write via temporary local uint for bounds-checking */
1040 unsigned int *up
= write
? &tmp
: valp
;
1042 ret
= do_proc_douintvec_conv(lvalp
, up
, write
, data
);
1047 if ((param
->min
&& *param
->min
> tmp
) ||
1048 (param
->max
&& *param
->max
< tmp
))
1058 * proc_douintvec_minmax - read a vector of unsigned ints with min/max values
1059 * @table: the sysctl table
1060 * @write: %TRUE if this is a write to the sysctl file
1061 * @buffer: the user buffer
1062 * @lenp: the size of the user buffer
1063 * @ppos: file position
1065 * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
1066 * values from/to the user buffer, treated as an ASCII string. Negative
1067 * strings are not allowed.
1069 * This routine will ensure the values are within the range specified by
1070 * table->extra1 (min) and table->extra2 (max). There is a final sanity
1071 * check for UINT_MAX to avoid having to support wrap around uses from
1074 * Returns 0 on success or -ERANGE on write when the range check fails.
1076 int proc_douintvec_minmax(struct ctl_table
*table
, int write
,
1077 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1079 struct do_proc_douintvec_minmax_conv_param param
= {
1080 .min
= (unsigned int *) table
->extra1
,
1081 .max
= (unsigned int *) table
->extra2
,
1083 return do_proc_douintvec(table
, write
, buffer
, lenp
, ppos
,
1084 do_proc_douintvec_minmax_conv
, ¶m
);
1088 * proc_dou8vec_minmax - read a vector of unsigned chars with min/max values
1089 * @table: the sysctl table
1090 * @write: %TRUE if this is a write to the sysctl file
1091 * @buffer: the user buffer
1092 * @lenp: the size of the user buffer
1093 * @ppos: file position
1095 * Reads/writes up to table->maxlen/sizeof(u8) unsigned chars
1096 * values from/to the user buffer, treated as an ASCII string. Negative
1097 * strings are not allowed.
1099 * This routine will ensure the values are within the range specified by
1100 * table->extra1 (min) and table->extra2 (max).
1102 * Returns 0 on success or an error on write when the range check fails.
1104 int proc_dou8vec_minmax(struct ctl_table
*table
, int write
,
1105 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1107 struct ctl_table tmp
;
1108 unsigned int min
= 0, max
= 255U, val
;
1109 u8
*data
= table
->data
;
1110 struct do_proc_douintvec_minmax_conv_param param
= {
1116 /* Do not support arrays yet. */
1117 if (table
->maxlen
!= sizeof(u8
))
1120 if (table
->extra1
) {
1121 min
= *(unsigned int *) table
->extra1
;
1125 if (table
->extra2
) {
1126 max
= *(unsigned int *) table
->extra2
;
1133 tmp
.maxlen
= sizeof(val
);
1136 res
= do_proc_douintvec(&tmp
, write
, buffer
, lenp
, ppos
,
1137 do_proc_douintvec_minmax_conv
, ¶m
);
1144 EXPORT_SYMBOL_GPL(proc_dou8vec_minmax
);
1146 static int do_proc_dopipe_max_size_conv(unsigned long *lvalp
,
1148 int write
, void *data
)
1153 val
= round_pipe_size(*lvalp
);
1159 unsigned int val
= *valp
;
1160 *lvalp
= (unsigned long) val
;
1166 static int proc_dopipe_max_size(struct ctl_table
*table
, int write
,
1167 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1169 return do_proc_douintvec(table
, write
, buffer
, lenp
, ppos
,
1170 do_proc_dopipe_max_size_conv
, NULL
);
1173 static void validate_coredump_safety(void)
1175 #ifdef CONFIG_COREDUMP
1176 if (suid_dumpable
== SUID_DUMP_ROOT
&&
1177 core_pattern
[0] != '/' && core_pattern
[0] != '|') {
1179 "Unsafe core_pattern used with fs.suid_dumpable=2.\n"
1180 "Pipe handler or fully qualified core dump path required.\n"
1181 "Set kernel.core_pattern before fs.suid_dumpable.\n"
1187 static int proc_dointvec_minmax_coredump(struct ctl_table
*table
, int write
,
1188 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1190 int error
= proc_dointvec_minmax(table
, write
, buffer
, lenp
, ppos
);
1192 validate_coredump_safety();
1196 #ifdef CONFIG_COREDUMP
1197 static int proc_dostring_coredump(struct ctl_table
*table
, int write
,
1198 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1200 int error
= proc_dostring(table
, write
, buffer
, lenp
, ppos
);
1202 validate_coredump_safety();
1207 #ifdef CONFIG_MAGIC_SYSRQ
1208 static int sysrq_sysctl_handler(struct ctl_table
*table
, int write
,
1209 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1215 ret
= __do_proc_dointvec(&tmp
, table
, write
, buffer
,
1216 lenp
, ppos
, NULL
, NULL
);
1221 sysrq_toggle_support(tmp
);
1227 static int __do_proc_doulongvec_minmax(void *data
, struct ctl_table
*table
,
1228 int write
, void *buffer
, size_t *lenp
, loff_t
*ppos
,
1229 unsigned long convmul
, unsigned long convdiv
)
1231 unsigned long *i
, *min
, *max
;
1232 int vleft
, first
= 1, err
= 0;
1236 if (!data
|| !table
->maxlen
|| !*lenp
|| (*ppos
&& !write
)) {
1241 i
= (unsigned long *) data
;
1242 min
= (unsigned long *) table
->extra1
;
1243 max
= (unsigned long *) table
->extra2
;
1244 vleft
= table
->maxlen
/ sizeof(unsigned long);
1248 if (proc_first_pos_non_zero_ignore(ppos
, table
))
1251 if (left
> PAGE_SIZE
- 1)
1252 left
= PAGE_SIZE
- 1;
1256 for (; left
&& vleft
--; i
++, first
= 0) {
1262 left
-= proc_skip_spaces(&p
);
1266 err
= proc_get_long(&p
, &left
, &val
, &neg
,
1268 sizeof(proc_wspace_sep
), NULL
);
1273 val
= convmul
* val
/ convdiv
;
1274 if ((min
&& val
< *min
) || (max
&& val
> *max
)) {
1280 val
= convdiv
* (*i
) / convmul
;
1282 proc_put_char(&buffer
, &left
, '\t');
1283 proc_put_long(&buffer
, &left
, val
, false);
1287 if (!write
&& !first
&& left
&& !err
)
1288 proc_put_char(&buffer
, &left
, '\n');
1290 left
-= proc_skip_spaces(&p
);
1292 return err
? : -EINVAL
;
1299 static int do_proc_doulongvec_minmax(struct ctl_table
*table
, int write
,
1300 void *buffer
, size_t *lenp
, loff_t
*ppos
, unsigned long convmul
,
1301 unsigned long convdiv
)
1303 return __do_proc_doulongvec_minmax(table
->data
, table
, write
,
1304 buffer
, lenp
, ppos
, convmul
, convdiv
);
1308 * proc_doulongvec_minmax - read a vector of long integers with min/max values
1309 * @table: the sysctl table
1310 * @write: %TRUE if this is a write to the sysctl file
1311 * @buffer: the user buffer
1312 * @lenp: the size of the user buffer
1313 * @ppos: file position
1315 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
1316 * values from/to the user buffer, treated as an ASCII string.
1318 * This routine will ensure the values are within the range specified by
1319 * table->extra1 (min) and table->extra2 (max).
1321 * Returns 0 on success.
1323 int proc_doulongvec_minmax(struct ctl_table
*table
, int write
,
1324 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1326 return do_proc_doulongvec_minmax(table
, write
, buffer
, lenp
, ppos
, 1l, 1l);
1330 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values
1331 * @table: the sysctl table
1332 * @write: %TRUE if this is a write to the sysctl file
1333 * @buffer: the user buffer
1334 * @lenp: the size of the user buffer
1335 * @ppos: file position
1337 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
1338 * values from/to the user buffer, treated as an ASCII string. The values
1339 * are treated as milliseconds, and converted to jiffies when they are stored.
1341 * This routine will ensure the values are within the range specified by
1342 * table->extra1 (min) and table->extra2 (max).
1344 * Returns 0 on success.
1346 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table
*table
, int write
,
1347 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1349 return do_proc_doulongvec_minmax(table
, write
, buffer
,
1350 lenp
, ppos
, HZ
, 1000l);
1354 static int do_proc_dointvec_jiffies_conv(bool *negp
, unsigned long *lvalp
,
1356 int write
, void *data
)
1359 if (*lvalp
> INT_MAX
/ HZ
)
1361 *valp
= *negp
? -(*lvalp
*HZ
) : (*lvalp
*HZ
);
1367 lval
= -(unsigned long)val
;
1370 lval
= (unsigned long)val
;
1377 static int do_proc_dointvec_userhz_jiffies_conv(bool *negp
, unsigned long *lvalp
,
1379 int write
, void *data
)
1382 if (USER_HZ
< HZ
&& *lvalp
> (LONG_MAX
/ HZ
) * USER_HZ
)
1384 *valp
= clock_t_to_jiffies(*negp
? -*lvalp
: *lvalp
);
1390 lval
= -(unsigned long)val
;
1393 lval
= (unsigned long)val
;
1395 *lvalp
= jiffies_to_clock_t(lval
);
1400 static int do_proc_dointvec_ms_jiffies_conv(bool *negp
, unsigned long *lvalp
,
1402 int write
, void *data
)
1405 unsigned long jif
= msecs_to_jiffies(*negp
? -*lvalp
: *lvalp
);
1415 lval
= -(unsigned long)val
;
1418 lval
= (unsigned long)val
;
1420 *lvalp
= jiffies_to_msecs(lval
);
1426 * proc_dointvec_jiffies - read a vector of integers as seconds
1427 * @table: the sysctl table
1428 * @write: %TRUE if this is a write to the sysctl file
1429 * @buffer: the user buffer
1430 * @lenp: the size of the user buffer
1431 * @ppos: file position
1433 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1434 * values from/to the user buffer, treated as an ASCII string.
1435 * The values read are assumed to be in seconds, and are converted into
1438 * Returns 0 on success.
1440 int proc_dointvec_jiffies(struct ctl_table
*table
, int write
,
1441 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1443 return do_proc_dointvec(table
,write
,buffer
,lenp
,ppos
,
1444 do_proc_dointvec_jiffies_conv
,NULL
);
1448 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds
1449 * @table: the sysctl table
1450 * @write: %TRUE if this is a write to the sysctl file
1451 * @buffer: the user buffer
1452 * @lenp: the size of the user buffer
1453 * @ppos: pointer to the file position
1455 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1456 * values from/to the user buffer, treated as an ASCII string.
1457 * The values read are assumed to be in 1/USER_HZ seconds, and
1458 * are converted into jiffies.
1460 * Returns 0 on success.
1462 int proc_dointvec_userhz_jiffies(struct ctl_table
*table
, int write
,
1463 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1465 return do_proc_dointvec(table
,write
,buffer
,lenp
,ppos
,
1466 do_proc_dointvec_userhz_jiffies_conv
,NULL
);
1470 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds
1471 * @table: the sysctl table
1472 * @write: %TRUE if this is a write to the sysctl file
1473 * @buffer: the user buffer
1474 * @lenp: the size of the user buffer
1475 * @ppos: file position
1476 * @ppos: the current position in the file
1478 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1479 * values from/to the user buffer, treated as an ASCII string.
1480 * The values read are assumed to be in 1/1000 seconds, and
1481 * are converted into jiffies.
1483 * Returns 0 on success.
1485 int proc_dointvec_ms_jiffies(struct ctl_table
*table
, int write
, void *buffer
,
1486 size_t *lenp
, loff_t
*ppos
)
1488 return do_proc_dointvec(table
, write
, buffer
, lenp
, ppos
,
1489 do_proc_dointvec_ms_jiffies_conv
, NULL
);
1492 static int proc_do_cad_pid(struct ctl_table
*table
, int write
, void *buffer
,
1493 size_t *lenp
, loff_t
*ppos
)
1495 struct pid
*new_pid
;
1499 tmp
= pid_vnr(cad_pid
);
1501 r
= __do_proc_dointvec(&tmp
, table
, write
, buffer
,
1502 lenp
, ppos
, NULL
, NULL
);
1506 new_pid
= find_get_pid(tmp
);
1510 put_pid(xchg(&cad_pid
, new_pid
));
1515 * proc_do_large_bitmap - read/write from/to a large bitmap
1516 * @table: the sysctl table
1517 * @write: %TRUE if this is a write to the sysctl file
1518 * @buffer: the user buffer
1519 * @lenp: the size of the user buffer
1520 * @ppos: file position
1522 * The bitmap is stored at table->data and the bitmap length (in bits)
1525 * We use a range comma separated format (e.g. 1,3-4,10-10) so that
1526 * large bitmaps may be represented in a compact manner. Writing into
1527 * the file will clear the bitmap then update it with the given input.
1529 * Returns 0 on success.
1531 int proc_do_large_bitmap(struct ctl_table
*table
, int write
,
1532 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1535 size_t left
= *lenp
;
1536 unsigned long bitmap_len
= table
->maxlen
;
1537 unsigned long *bitmap
= *(unsigned long **) table
->data
;
1538 unsigned long *tmp_bitmap
= NULL
;
1539 char tr_a
[] = { '-', ',', '\n' }, tr_b
[] = { ',', '\n', 0 }, c
;
1541 if (!bitmap
|| !bitmap_len
|| !left
|| (*ppos
&& !write
)) {
1550 if (left
> PAGE_SIZE
- 1) {
1551 left
= PAGE_SIZE
- 1;
1552 /* How much of the buffer we'll skip this pass */
1553 skipped
= *lenp
- left
;
1556 tmp_bitmap
= bitmap_zalloc(bitmap_len
, GFP_KERNEL
);
1559 proc_skip_char(&p
, &left
, '\n');
1560 while (!err
&& left
) {
1561 unsigned long val_a
, val_b
;
1565 /* In case we stop parsing mid-number, we can reset */
1567 err
= proc_get_long(&p
, &left
, &val_a
, &neg
, tr_a
,
1570 * If we consumed the entirety of a truncated buffer or
1571 * only one char is left (may be a "-"), then stop here,
1572 * reset, & come back for more.
1574 if ((left
<= 1) && skipped
) {
1581 if (val_a
>= bitmap_len
|| neg
) {
1593 err
= proc_get_long(&p
, &left
, &val_b
,
1594 &neg
, tr_b
, sizeof(tr_b
),
1597 * If we consumed all of a truncated buffer or
1598 * then stop here, reset, & come back for more.
1600 if (!left
&& skipped
) {
1607 if (val_b
>= bitmap_len
|| neg
||
1618 bitmap_set(tmp_bitmap
, val_a
, val_b
- val_a
+ 1);
1619 proc_skip_char(&p
, &left
, '\n');
1623 unsigned long bit_a
, bit_b
= 0;
1627 bit_a
= find_next_bit(bitmap
, bitmap_len
, bit_b
);
1628 if (bit_a
>= bitmap_len
)
1630 bit_b
= find_next_zero_bit(bitmap
, bitmap_len
,
1634 proc_put_char(&buffer
, &left
, ',');
1635 proc_put_long(&buffer
, &left
, bit_a
, false);
1636 if (bit_a
!= bit_b
) {
1637 proc_put_char(&buffer
, &left
, '-');
1638 proc_put_long(&buffer
, &left
, bit_b
, false);
1643 proc_put_char(&buffer
, &left
, '\n');
1649 bitmap_or(bitmap
, bitmap
, tmp_bitmap
, bitmap_len
);
1651 bitmap_copy(bitmap
, tmp_bitmap
, bitmap_len
);
1657 bitmap_free(tmp_bitmap
);
1661 #else /* CONFIG_PROC_SYSCTL */
1663 int proc_dostring(struct ctl_table
*table
, int write
,
1664 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1669 int proc_dobool(struct ctl_table
*table
, int write
,
1670 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1675 int proc_dointvec(struct ctl_table
*table
, int write
,
1676 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1681 int proc_douintvec(struct ctl_table
*table
, int write
,
1682 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1687 int proc_dointvec_minmax(struct ctl_table
*table
, int write
,
1688 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1693 int proc_douintvec_minmax(struct ctl_table
*table
, int write
,
1694 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1699 int proc_dou8vec_minmax(struct ctl_table
*table
, int write
,
1700 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1705 int proc_dointvec_jiffies(struct ctl_table
*table
, int write
,
1706 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1711 int proc_dointvec_userhz_jiffies(struct ctl_table
*table
, int write
,
1712 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1717 int proc_dointvec_ms_jiffies(struct ctl_table
*table
, int write
,
1718 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1723 int proc_doulongvec_minmax(struct ctl_table
*table
, int write
,
1724 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1729 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table
*table
, int write
,
1730 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1735 int proc_do_large_bitmap(struct ctl_table
*table
, int write
,
1736 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1741 #endif /* CONFIG_PROC_SYSCTL */
1743 #if defined(CONFIG_SYSCTL)
1744 int proc_do_static_key(struct ctl_table
*table
, int write
,
1745 void *buffer
, size_t *lenp
, loff_t
*ppos
)
1747 struct static_key
*key
= (struct static_key
*)table
->data
;
1748 static DEFINE_MUTEX(static_key_mutex
);
1750 struct ctl_table tmp
= {
1752 .maxlen
= sizeof(val
),
1753 .mode
= table
->mode
,
1754 .extra1
= SYSCTL_ZERO
,
1755 .extra2
= SYSCTL_ONE
,
1758 if (write
&& !capable(CAP_SYS_ADMIN
))
1761 mutex_lock(&static_key_mutex
);
1762 val
= static_key_enabled(key
);
1763 ret
= proc_dointvec_minmax(&tmp
, write
, buffer
, lenp
, ppos
);
1764 if (write
&& !ret
) {
1766 static_key_enable(key
);
1768 static_key_disable(key
);
1770 mutex_unlock(&static_key_mutex
);
1774 static struct ctl_table kern_table
[] = {
1776 .procname
= "sched_child_runs_first",
1777 .data
= &sysctl_sched_child_runs_first
,
1778 .maxlen
= sizeof(unsigned int),
1780 .proc_handler
= proc_dointvec
,
1782 #ifdef CONFIG_SCHEDSTATS
1784 .procname
= "sched_schedstats",
1786 .maxlen
= sizeof(unsigned int),
1788 .proc_handler
= sysctl_schedstats
,
1789 .extra1
= SYSCTL_ZERO
,
1790 .extra2
= SYSCTL_ONE
,
1792 #endif /* CONFIG_SCHEDSTATS */
1793 #ifdef CONFIG_TASK_DELAY_ACCT
1795 .procname
= "task_delayacct",
1797 .maxlen
= sizeof(unsigned int),
1799 .proc_handler
= sysctl_delayacct
,
1800 .extra1
= SYSCTL_ZERO
,
1801 .extra2
= SYSCTL_ONE
,
1803 #endif /* CONFIG_TASK_DELAY_ACCT */
1804 #ifdef CONFIG_NUMA_BALANCING
1806 .procname
= "numa_balancing",
1807 .data
= NULL
, /* filled in by handler */
1808 .maxlen
= sizeof(unsigned int),
1810 .proc_handler
= sysctl_numa_balancing
,
1811 .extra1
= SYSCTL_ZERO
,
1812 .extra2
= SYSCTL_ONE
,
1814 #endif /* CONFIG_NUMA_BALANCING */
1816 .procname
= "sched_rt_period_us",
1817 .data
= &sysctl_sched_rt_period
,
1818 .maxlen
= sizeof(unsigned int),
1820 .proc_handler
= sched_rt_handler
,
1823 .procname
= "sched_rt_runtime_us",
1824 .data
= &sysctl_sched_rt_runtime
,
1825 .maxlen
= sizeof(int),
1827 .proc_handler
= sched_rt_handler
,
1830 .procname
= "sched_deadline_period_max_us",
1831 .data
= &sysctl_sched_dl_period_max
,
1832 .maxlen
= sizeof(unsigned int),
1834 .proc_handler
= proc_dointvec
,
1837 .procname
= "sched_deadline_period_min_us",
1838 .data
= &sysctl_sched_dl_period_min
,
1839 .maxlen
= sizeof(unsigned int),
1841 .proc_handler
= proc_dointvec
,
1844 .procname
= "sched_rr_timeslice_ms",
1845 .data
= &sysctl_sched_rr_timeslice
,
1846 .maxlen
= sizeof(int),
1848 .proc_handler
= sched_rr_handler
,
1850 #ifdef CONFIG_UCLAMP_TASK
1852 .procname
= "sched_util_clamp_min",
1853 .data
= &sysctl_sched_uclamp_util_min
,
1854 .maxlen
= sizeof(unsigned int),
1856 .proc_handler
= sysctl_sched_uclamp_handler
,
1859 .procname
= "sched_util_clamp_max",
1860 .data
= &sysctl_sched_uclamp_util_max
,
1861 .maxlen
= sizeof(unsigned int),
1863 .proc_handler
= sysctl_sched_uclamp_handler
,
1866 .procname
= "sched_util_clamp_min_rt_default",
1867 .data
= &sysctl_sched_uclamp_util_min_rt_default
,
1868 .maxlen
= sizeof(unsigned int),
1870 .proc_handler
= sysctl_sched_uclamp_handler
,
1873 #ifdef CONFIG_SCHED_AUTOGROUP
1875 .procname
= "sched_autogroup_enabled",
1876 .data
= &sysctl_sched_autogroup_enabled
,
1877 .maxlen
= sizeof(unsigned int),
1879 .proc_handler
= proc_dointvec_minmax
,
1880 .extra1
= SYSCTL_ZERO
,
1881 .extra2
= SYSCTL_ONE
,
1884 #ifdef CONFIG_CFS_BANDWIDTH
1886 .procname
= "sched_cfs_bandwidth_slice_us",
1887 .data
= &sysctl_sched_cfs_bandwidth_slice
,
1888 .maxlen
= sizeof(unsigned int),
1890 .proc_handler
= proc_dointvec_minmax
,
1891 .extra1
= SYSCTL_ONE
,
1894 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
1896 .procname
= "sched_energy_aware",
1897 .data
= &sysctl_sched_energy_aware
,
1898 .maxlen
= sizeof(unsigned int),
1900 .proc_handler
= sched_energy_aware_handler
,
1901 .extra1
= SYSCTL_ZERO
,
1902 .extra2
= SYSCTL_ONE
,
1905 #ifdef CONFIG_PROVE_LOCKING
1907 .procname
= "prove_locking",
1908 .data
= &prove_locking
,
1909 .maxlen
= sizeof(int),
1911 .proc_handler
= proc_dointvec
,
1914 #ifdef CONFIG_LOCK_STAT
1916 .procname
= "lock_stat",
1918 .maxlen
= sizeof(int),
1920 .proc_handler
= proc_dointvec
,
1924 .procname
= "panic",
1925 .data
= &panic_timeout
,
1926 .maxlen
= sizeof(int),
1928 .proc_handler
= proc_dointvec
,
1930 #ifdef CONFIG_COREDUMP
1932 .procname
= "core_uses_pid",
1933 .data
= &core_uses_pid
,
1934 .maxlen
= sizeof(int),
1936 .proc_handler
= proc_dointvec
,
1939 .procname
= "core_pattern",
1940 .data
= core_pattern
,
1941 .maxlen
= CORENAME_MAX_SIZE
,
1943 .proc_handler
= proc_dostring_coredump
,
1946 .procname
= "core_pipe_limit",
1947 .data
= &core_pipe_limit
,
1948 .maxlen
= sizeof(unsigned int),
1950 .proc_handler
= proc_dointvec
,
1953 #ifdef CONFIG_USER_NS
1955 .procname
= "unprivileged_userns_clone",
1956 .data
= &unprivileged_userns_clone
,
1957 .maxlen
= sizeof(int),
1959 .proc_handler
= proc_dointvec
,
1962 #ifdef CONFIG_PROC_SYSCTL
1964 .procname
= "tainted",
1965 .maxlen
= sizeof(long),
1967 .proc_handler
= proc_taint
,
1970 .procname
= "sysctl_writes_strict",
1971 .data
= &sysctl_writes_strict
,
1972 .maxlen
= sizeof(int),
1974 .proc_handler
= proc_dointvec_minmax
,
1976 .extra2
= SYSCTL_ONE
,
1979 #ifdef CONFIG_LATENCYTOP
1981 .procname
= "latencytop",
1982 .data
= &latencytop_enabled
,
1983 .maxlen
= sizeof(int),
1985 .proc_handler
= sysctl_latencytop
,
1988 #ifdef CONFIG_BLK_DEV_INITRD
1990 .procname
= "real-root-dev",
1991 .data
= &real_root_dev
,
1992 .maxlen
= sizeof(int),
1994 .proc_handler
= proc_dointvec
,
1998 .procname
= "print-fatal-signals",
1999 .data
= &print_fatal_signals
,
2000 .maxlen
= sizeof(int),
2002 .proc_handler
= proc_dointvec
,
2006 .procname
= "reboot-cmd",
2007 .data
= reboot_command
,
2010 .proc_handler
= proc_dostring
,
2013 .procname
= "stop-a",
2014 .data
= &stop_a_enabled
,
2015 .maxlen
= sizeof (int),
2017 .proc_handler
= proc_dointvec
,
2020 .procname
= "scons-poweroff",
2021 .data
= &scons_pwroff
,
2022 .maxlen
= sizeof (int),
2024 .proc_handler
= proc_dointvec
,
2027 #ifdef CONFIG_SPARC64
2029 .procname
= "tsb-ratio",
2030 .data
= &sysctl_tsb_ratio
,
2031 .maxlen
= sizeof (int),
2033 .proc_handler
= proc_dointvec
,
2036 #ifdef CONFIG_PARISC
2038 .procname
= "soft-power",
2039 .data
= &pwrsw_enabled
,
2040 .maxlen
= sizeof (int),
2042 .proc_handler
= proc_dointvec
,
2045 #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
2047 .procname
= "unaligned-trap",
2048 .data
= &unaligned_enabled
,
2049 .maxlen
= sizeof (int),
2051 .proc_handler
= proc_dointvec
,
2055 .procname
= "ctrl-alt-del",
2057 .maxlen
= sizeof(int),
2059 .proc_handler
= proc_dointvec
,
2061 #ifdef CONFIG_FUNCTION_TRACER
2063 .procname
= "ftrace_enabled",
2064 .data
= &ftrace_enabled
,
2065 .maxlen
= sizeof(int),
2067 .proc_handler
= ftrace_enable_sysctl
,
2070 #ifdef CONFIG_STACK_TRACER
2072 .procname
= "stack_tracer_enabled",
2073 .data
= &stack_tracer_enabled
,
2074 .maxlen
= sizeof(int),
2076 .proc_handler
= stack_trace_sysctl
,
2079 #ifdef CONFIG_TRACING
2081 .procname
= "ftrace_dump_on_oops",
2082 .data
= &ftrace_dump_on_oops
,
2083 .maxlen
= sizeof(int),
2085 .proc_handler
= proc_dointvec
,
2088 .procname
= "traceoff_on_warning",
2089 .data
= &__disable_trace_on_warning
,
2090 .maxlen
= sizeof(__disable_trace_on_warning
),
2092 .proc_handler
= proc_dointvec
,
2095 .procname
= "tracepoint_printk",
2096 .data
= &tracepoint_printk
,
2097 .maxlen
= sizeof(tracepoint_printk
),
2099 .proc_handler
= tracepoint_printk_sysctl
,
2102 #ifdef CONFIG_KEXEC_CORE
2104 .procname
= "kexec_load_disabled",
2105 .data
= &kexec_load_disabled
,
2106 .maxlen
= sizeof(int),
2108 /* only handle a transition from default "0" to "1" */
2109 .proc_handler
= proc_dointvec_minmax
,
2110 .extra1
= SYSCTL_ONE
,
2111 .extra2
= SYSCTL_ONE
,
2114 #ifdef CONFIG_MODULES
2116 .procname
= "modprobe",
2117 .data
= &modprobe_path
,
2118 .maxlen
= KMOD_PATH_LEN
,
2120 .proc_handler
= proc_dostring
,
2123 .procname
= "modules_disabled",
2124 .data
= &modules_disabled
,
2125 .maxlen
= sizeof(int),
2127 /* only handle a transition from default "0" to "1" */
2128 .proc_handler
= proc_dointvec_minmax
,
2129 .extra1
= SYSCTL_ONE
,
2130 .extra2
= SYSCTL_ONE
,
2133 #ifdef CONFIG_UEVENT_HELPER
2135 .procname
= "hotplug",
2136 .data
= &uevent_helper
,
2137 .maxlen
= UEVENT_HELPER_PATH_LEN
,
2139 .proc_handler
= proc_dostring
,
2142 #ifdef CONFIG_CHR_DEV_SG
2144 .procname
= "sg-big-buff",
2145 .data
= &sg_big_buff
,
2146 .maxlen
= sizeof (int),
2148 .proc_handler
= proc_dointvec
,
2151 #ifdef CONFIG_BSD_PROCESS_ACCT
2155 .maxlen
= 3*sizeof(int),
2157 .proc_handler
= proc_dointvec
,
2160 #ifdef CONFIG_MAGIC_SYSRQ
2162 .procname
= "sysrq",
2164 .maxlen
= sizeof (int),
2166 .proc_handler
= sysrq_sysctl_handler
,
2169 #ifdef CONFIG_PROC_SYSCTL
2171 .procname
= "cad_pid",
2173 .maxlen
= sizeof (int),
2175 .proc_handler
= proc_do_cad_pid
,
2179 .procname
= "threads-max",
2181 .maxlen
= sizeof(int),
2183 .proc_handler
= sysctl_max_threads
,
2186 .procname
= "random",
2188 .child
= random_table
,
2191 .procname
= "usermodehelper",
2193 .child
= usermodehelper_table
,
2195 #ifdef CONFIG_FW_LOADER_USER_HELPER
2197 .procname
= "firmware_config",
2199 .child
= firmware_config_table
,
2203 .procname
= "overflowuid",
2204 .data
= &overflowuid
,
2205 .maxlen
= sizeof(int),
2207 .proc_handler
= proc_dointvec_minmax
,
2208 .extra1
= &minolduid
,
2209 .extra2
= &maxolduid
,
2212 .procname
= "overflowgid",
2213 .data
= &overflowgid
,
2214 .maxlen
= sizeof(int),
2216 .proc_handler
= proc_dointvec_minmax
,
2217 .extra1
= &minolduid
,
2218 .extra2
= &maxolduid
,
2222 .procname
= "userprocess_debug",
2223 .data
= &show_unhandled_signals
,
2224 .maxlen
= sizeof(int),
2226 .proc_handler
= proc_dointvec
,
2231 .procname
= "oops_all_cpu_backtrace",
2232 .data
= &sysctl_oops_all_cpu_backtrace
,
2233 .maxlen
= sizeof(int),
2235 .proc_handler
= proc_dointvec_minmax
,
2236 .extra1
= SYSCTL_ZERO
,
2237 .extra2
= SYSCTL_ONE
,
2239 #endif /* CONFIG_SMP */
2241 .procname
= "pid_max",
2243 .maxlen
= sizeof (int),
2245 .proc_handler
= proc_dointvec_minmax
,
2246 .extra1
= &pid_max_min
,
2247 .extra2
= &pid_max_max
,
2250 .procname
= "panic_on_oops",
2251 .data
= &panic_on_oops
,
2252 .maxlen
= sizeof(int),
2254 .proc_handler
= proc_dointvec
,
2257 .procname
= "panic_print",
2258 .data
= &panic_print
,
2259 .maxlen
= sizeof(unsigned long),
2261 .proc_handler
= proc_doulongvec_minmax
,
2263 #if defined CONFIG_PRINTK
2265 .procname
= "printk",
2266 .data
= &console_loglevel
,
2267 .maxlen
= 4*sizeof(int),
2269 .proc_handler
= proc_dointvec
,
2272 .procname
= "printk_ratelimit",
2273 .data
= &printk_ratelimit_state
.interval
,
2274 .maxlen
= sizeof(int),
2276 .proc_handler
= proc_dointvec_jiffies
,
2279 .procname
= "printk_ratelimit_burst",
2280 .data
= &printk_ratelimit_state
.burst
,
2281 .maxlen
= sizeof(int),
2283 .proc_handler
= proc_dointvec
,
2286 .procname
= "printk_delay",
2287 .data
= &printk_delay_msec
,
2288 .maxlen
= sizeof(int),
2290 .proc_handler
= proc_dointvec_minmax
,
2291 .extra1
= SYSCTL_ZERO
,
2292 .extra2
= &ten_thousand
,
2295 .procname
= "printk_devkmsg",
2296 .data
= devkmsg_log_str
,
2297 .maxlen
= DEVKMSG_STR_MAX_SIZE
,
2299 .proc_handler
= devkmsg_sysctl_set_loglvl
,
2302 .procname
= "dmesg_restrict",
2303 .data
= &dmesg_restrict
,
2304 .maxlen
= sizeof(int),
2306 .proc_handler
= proc_dointvec_minmax_sysadmin
,
2307 .extra1
= SYSCTL_ZERO
,
2308 .extra2
= SYSCTL_ONE
,
2311 .procname
= "kptr_restrict",
2312 .data
= &kptr_restrict
,
2313 .maxlen
= sizeof(int),
2315 .proc_handler
= proc_dointvec_minmax_sysadmin
,
2316 .extra1
= SYSCTL_ZERO
,
2321 .procname
= "ngroups_max",
2322 .data
= &ngroups_max
,
2323 .maxlen
= sizeof (int),
2325 .proc_handler
= proc_dointvec
,
2328 .procname
= "cap_last_cap",
2329 .data
= (void *)&cap_last_cap
,
2330 .maxlen
= sizeof(int),
2332 .proc_handler
= proc_dointvec
,
2334 #if defined(CONFIG_LOCKUP_DETECTOR)
2336 .procname
= "watchdog",
2337 .data
= &watchdog_user_enabled
,
2338 .maxlen
= sizeof(int),
2340 .proc_handler
= proc_watchdog
,
2341 .extra1
= SYSCTL_ZERO
,
2342 .extra2
= SYSCTL_ONE
,
2345 .procname
= "watchdog_thresh",
2346 .data
= &watchdog_thresh
,
2347 .maxlen
= sizeof(int),
2349 .proc_handler
= proc_watchdog_thresh
,
2350 .extra1
= SYSCTL_ZERO
,
2354 .procname
= "nmi_watchdog",
2355 .data
= &nmi_watchdog_user_enabled
,
2356 .maxlen
= sizeof(int),
2357 .mode
= NMI_WATCHDOG_SYSCTL_PERM
,
2358 .proc_handler
= proc_nmi_watchdog
,
2359 .extra1
= SYSCTL_ZERO
,
2360 .extra2
= SYSCTL_ONE
,
2363 .procname
= "watchdog_cpumask",
2364 .data
= &watchdog_cpumask_bits
,
2367 .proc_handler
= proc_watchdog_cpumask
,
2369 #ifdef CONFIG_SOFTLOCKUP_DETECTOR
2371 .procname
= "soft_watchdog",
2372 .data
= &soft_watchdog_user_enabled
,
2373 .maxlen
= sizeof(int),
2375 .proc_handler
= proc_soft_watchdog
,
2376 .extra1
= SYSCTL_ZERO
,
2377 .extra2
= SYSCTL_ONE
,
2380 .procname
= "softlockup_panic",
2381 .data
= &softlockup_panic
,
2382 .maxlen
= sizeof(int),
2384 .proc_handler
= proc_dointvec_minmax
,
2385 .extra1
= SYSCTL_ZERO
,
2386 .extra2
= SYSCTL_ONE
,
2390 .procname
= "softlockup_all_cpu_backtrace",
2391 .data
= &sysctl_softlockup_all_cpu_backtrace
,
2392 .maxlen
= sizeof(int),
2394 .proc_handler
= proc_dointvec_minmax
,
2395 .extra1
= SYSCTL_ZERO
,
2396 .extra2
= SYSCTL_ONE
,
2398 #endif /* CONFIG_SMP */
2400 #ifdef CONFIG_HARDLOCKUP_DETECTOR
2402 .procname
= "hardlockup_panic",
2403 .data
= &hardlockup_panic
,
2404 .maxlen
= sizeof(int),
2406 .proc_handler
= proc_dointvec_minmax
,
2407 .extra1
= SYSCTL_ZERO
,
2408 .extra2
= SYSCTL_ONE
,
2412 .procname
= "hardlockup_all_cpu_backtrace",
2413 .data
= &sysctl_hardlockup_all_cpu_backtrace
,
2414 .maxlen
= sizeof(int),
2416 .proc_handler
= proc_dointvec_minmax
,
2417 .extra1
= SYSCTL_ZERO
,
2418 .extra2
= SYSCTL_ONE
,
2420 #endif /* CONFIG_SMP */
2424 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
2426 .procname
= "unknown_nmi_panic",
2427 .data
= &unknown_nmi_panic
,
2428 .maxlen
= sizeof (int),
2430 .proc_handler
= proc_dointvec
,
2434 #if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \
2435 defined(CONFIG_DEBUG_STACKOVERFLOW)
2437 .procname
= "panic_on_stackoverflow",
2438 .data
= &sysctl_panic_on_stackoverflow
,
2439 .maxlen
= sizeof(int),
2441 .proc_handler
= proc_dointvec
,
2444 #if defined(CONFIG_X86)
2446 .procname
= "panic_on_unrecovered_nmi",
2447 .data
= &panic_on_unrecovered_nmi
,
2448 .maxlen
= sizeof(int),
2450 .proc_handler
= proc_dointvec
,
2453 .procname
= "panic_on_io_nmi",
2454 .data
= &panic_on_io_nmi
,
2455 .maxlen
= sizeof(int),
2457 .proc_handler
= proc_dointvec
,
2460 .procname
= "bootloader_type",
2461 .data
= &bootloader_type
,
2462 .maxlen
= sizeof (int),
2464 .proc_handler
= proc_dointvec
,
2467 .procname
= "bootloader_version",
2468 .data
= &bootloader_version
,
2469 .maxlen
= sizeof (int),
2471 .proc_handler
= proc_dointvec
,
2474 .procname
= "io_delay_type",
2475 .data
= &io_delay_type
,
2476 .maxlen
= sizeof(int),
2478 .proc_handler
= proc_dointvec
,
2481 #if defined(CONFIG_MMU)
2483 .procname
= "randomize_va_space",
2484 .data
= &randomize_va_space
,
2485 .maxlen
= sizeof(int),
2487 .proc_handler
= proc_dointvec
,
2490 #if defined(CONFIG_S390) && defined(CONFIG_SMP)
2492 .procname
= "spin_retry",
2493 .data
= &spin_retry
,
2494 .maxlen
= sizeof (int),
2496 .proc_handler
= proc_dointvec
,
2499 #if defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86)
2501 .procname
= "acpi_video_flags",
2502 .data
= &acpi_realmode_flags
,
2503 .maxlen
= sizeof (unsigned long),
2505 .proc_handler
= proc_doulongvec_minmax
,
2508 #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
2510 .procname
= "ignore-unaligned-usertrap",
2511 .data
= &no_unaligned_warning
,
2512 .maxlen
= sizeof (int),
2514 .proc_handler
= proc_dointvec
,
2519 .procname
= "unaligned-dump-stack",
2520 .data
= &unaligned_dump_stack
,
2521 .maxlen
= sizeof (int),
2523 .proc_handler
= proc_dointvec
,
2526 #ifdef CONFIG_DETECT_HUNG_TASK
2529 .procname
= "hung_task_all_cpu_backtrace",
2530 .data
= &sysctl_hung_task_all_cpu_backtrace
,
2531 .maxlen
= sizeof(int),
2533 .proc_handler
= proc_dointvec_minmax
,
2534 .extra1
= SYSCTL_ZERO
,
2535 .extra2
= SYSCTL_ONE
,
2537 #endif /* CONFIG_SMP */
2539 .procname
= "hung_task_panic",
2540 .data
= &sysctl_hung_task_panic
,
2541 .maxlen
= sizeof(int),
2543 .proc_handler
= proc_dointvec_minmax
,
2544 .extra1
= SYSCTL_ZERO
,
2545 .extra2
= SYSCTL_ONE
,
2548 .procname
= "hung_task_check_count",
2549 .data
= &sysctl_hung_task_check_count
,
2550 .maxlen
= sizeof(int),
2552 .proc_handler
= proc_dointvec_minmax
,
2553 .extra1
= SYSCTL_ZERO
,
2556 .procname
= "hung_task_timeout_secs",
2557 .data
= &sysctl_hung_task_timeout_secs
,
2558 .maxlen
= sizeof(unsigned long),
2560 .proc_handler
= proc_dohung_task_timeout_secs
,
2561 .extra2
= &hung_task_timeout_max
,
2564 .procname
= "hung_task_check_interval_secs",
2565 .data
= &sysctl_hung_task_check_interval_secs
,
2566 .maxlen
= sizeof(unsigned long),
2568 .proc_handler
= proc_dohung_task_timeout_secs
,
2569 .extra2
= &hung_task_timeout_max
,
2572 .procname
= "hung_task_warnings",
2573 .data
= &sysctl_hung_task_warnings
,
2574 .maxlen
= sizeof(int),
2576 .proc_handler
= proc_dointvec_minmax
,
2580 #ifdef CONFIG_RT_MUTEXES
2582 .procname
= "max_lock_depth",
2583 .data
= &max_lock_depth
,
2584 .maxlen
= sizeof(int),
2586 .proc_handler
= proc_dointvec
,
2590 .procname
= "poweroff_cmd",
2591 .data
= &poweroff_cmd
,
2592 .maxlen
= POWEROFF_CMD_PATH_LEN
,
2594 .proc_handler
= proc_dostring
,
2600 .child
= key_sysctls
,
2603 #ifdef CONFIG_PERF_EVENTS
2605 * User-space scripts rely on the existence of this file
2606 * as a feature check for perf_events being enabled.
2608 * So it's an ABI, do not remove!
2611 .procname
= "perf_event_paranoid",
2612 .data
= &sysctl_perf_event_paranoid
,
2613 .maxlen
= sizeof(sysctl_perf_event_paranoid
),
2615 .proc_handler
= proc_dointvec
,
2618 .procname
= "perf_event_mlock_kb",
2619 .data
= &sysctl_perf_event_mlock
,
2620 .maxlen
= sizeof(sysctl_perf_event_mlock
),
2622 .proc_handler
= proc_dointvec
,
2625 .procname
= "perf_event_max_sample_rate",
2626 .data
= &sysctl_perf_event_sample_rate
,
2627 .maxlen
= sizeof(sysctl_perf_event_sample_rate
),
2629 .proc_handler
= perf_proc_update_handler
,
2630 .extra1
= SYSCTL_ONE
,
2633 .procname
= "perf_cpu_time_max_percent",
2634 .data
= &sysctl_perf_cpu_time_max_percent
,
2635 .maxlen
= sizeof(sysctl_perf_cpu_time_max_percent
),
2637 .proc_handler
= perf_cpu_time_max_percent_handler
,
2638 .extra1
= SYSCTL_ZERO
,
2639 .extra2
= &one_hundred
,
2642 .procname
= "perf_event_max_stack",
2643 .data
= &sysctl_perf_event_max_stack
,
2644 .maxlen
= sizeof(sysctl_perf_event_max_stack
),
2646 .proc_handler
= perf_event_max_stack_handler
,
2647 .extra1
= SYSCTL_ZERO
,
2648 .extra2
= &six_hundred_forty_kb
,
2651 .procname
= "perf_event_max_contexts_per_stack",
2652 .data
= &sysctl_perf_event_max_contexts_per_stack
,
2653 .maxlen
= sizeof(sysctl_perf_event_max_contexts_per_stack
),
2655 .proc_handler
= perf_event_max_stack_handler
,
2656 .extra1
= SYSCTL_ZERO
,
2657 .extra2
= &one_thousand
,
2661 .procname
= "panic_on_warn",
2662 .data
= &panic_on_warn
,
2663 .maxlen
= sizeof(int),
2665 .proc_handler
= proc_dointvec_minmax
,
2666 .extra1
= SYSCTL_ZERO
,
2667 .extra2
= SYSCTL_ONE
,
2669 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
2671 .procname
= "timer_migration",
2672 .data
= &sysctl_timer_migration
,
2673 .maxlen
= sizeof(unsigned int),
2675 .proc_handler
= timer_migration_handler
,
2676 .extra1
= SYSCTL_ZERO
,
2677 .extra2
= SYSCTL_ONE
,
2680 #ifdef CONFIG_BPF_SYSCALL
2682 .procname
= "unprivileged_bpf_disabled",
2683 .data
= &sysctl_unprivileged_bpf_disabled
,
2684 .maxlen
= sizeof(sysctl_unprivileged_bpf_disabled
),
2686 .proc_handler
= bpf_unpriv_handler
,
2687 .extra1
= SYSCTL_ZERO
,
2691 .procname
= "bpf_stats_enabled",
2692 .data
= &bpf_stats_enabled_key
.key
,
2693 .maxlen
= sizeof(bpf_stats_enabled_key
),
2695 .proc_handler
= bpf_stats_handler
,
2698 #if defined(CONFIG_TREE_RCU)
2700 .procname
= "panic_on_rcu_stall",
2701 .data
= &sysctl_panic_on_rcu_stall
,
2702 .maxlen
= sizeof(sysctl_panic_on_rcu_stall
),
2704 .proc_handler
= proc_dointvec_minmax
,
2705 .extra1
= SYSCTL_ZERO
,
2706 .extra2
= SYSCTL_ONE
,
2709 #if defined(CONFIG_TREE_RCU)
2711 .procname
= "max_rcu_stall_to_panic",
2712 .data
= &sysctl_max_rcu_stall_to_panic
,
2713 .maxlen
= sizeof(sysctl_max_rcu_stall_to_panic
),
2715 .proc_handler
= proc_dointvec_minmax
,
2716 .extra1
= SYSCTL_ONE
,
2717 .extra2
= SYSCTL_INT_MAX
,
2720 #ifdef CONFIG_STACKLEAK_RUNTIME_DISABLE
2722 .procname
= "stack_erasing",
2724 .maxlen
= sizeof(int),
2726 .proc_handler
= stack_erasing_sysctl
,
2727 .extra1
= SYSCTL_ZERO
,
2728 .extra2
= SYSCTL_ONE
,
2734 static struct ctl_table vm_table
[] = {
2736 .procname
= "overcommit_memory",
2737 .data
= &sysctl_overcommit_memory
,
2738 .maxlen
= sizeof(sysctl_overcommit_memory
),
2740 .proc_handler
= overcommit_policy_handler
,
2741 .extra1
= SYSCTL_ZERO
,
2745 .procname
= "panic_on_oom",
2746 .data
= &sysctl_panic_on_oom
,
2747 .maxlen
= sizeof(sysctl_panic_on_oom
),
2749 .proc_handler
= proc_dointvec_minmax
,
2750 .extra1
= SYSCTL_ZERO
,
2754 .procname
= "oom_kill_allocating_task",
2755 .data
= &sysctl_oom_kill_allocating_task
,
2756 .maxlen
= sizeof(sysctl_oom_kill_allocating_task
),
2758 .proc_handler
= proc_dointvec
,
2761 .procname
= "oom_dump_tasks",
2762 .data
= &sysctl_oom_dump_tasks
,
2763 .maxlen
= sizeof(sysctl_oom_dump_tasks
),
2765 .proc_handler
= proc_dointvec
,
2768 .procname
= "overcommit_ratio",
2769 .data
= &sysctl_overcommit_ratio
,
2770 .maxlen
= sizeof(sysctl_overcommit_ratio
),
2772 .proc_handler
= overcommit_ratio_handler
,
2775 .procname
= "overcommit_kbytes",
2776 .data
= &sysctl_overcommit_kbytes
,
2777 .maxlen
= sizeof(sysctl_overcommit_kbytes
),
2779 .proc_handler
= overcommit_kbytes_handler
,
2782 .procname
= "page-cluster",
2783 .data
= &page_cluster
,
2784 .maxlen
= sizeof(int),
2786 .proc_handler
= proc_dointvec_minmax
,
2787 .extra1
= SYSCTL_ZERO
,
2790 .procname
= "dirty_background_ratio",
2791 .data
= &dirty_background_ratio
,
2792 .maxlen
= sizeof(dirty_background_ratio
),
2794 .proc_handler
= dirty_background_ratio_handler
,
2795 .extra1
= SYSCTL_ZERO
,
2796 .extra2
= &one_hundred
,
2799 .procname
= "dirty_background_bytes",
2800 .data
= &dirty_background_bytes
,
2801 .maxlen
= sizeof(dirty_background_bytes
),
2803 .proc_handler
= dirty_background_bytes_handler
,
2807 .procname
= "dirty_ratio",
2808 .data
= &vm_dirty_ratio
,
2809 .maxlen
= sizeof(vm_dirty_ratio
),
2811 .proc_handler
= dirty_ratio_handler
,
2812 .extra1
= SYSCTL_ZERO
,
2813 .extra2
= &one_hundred
,
2816 .procname
= "dirty_bytes",
2817 .data
= &vm_dirty_bytes
,
2818 .maxlen
= sizeof(vm_dirty_bytes
),
2820 .proc_handler
= dirty_bytes_handler
,
2821 .extra1
= &dirty_bytes_min
,
2824 .procname
= "dirty_writeback_centisecs",
2825 .data
= &dirty_writeback_interval
,
2826 .maxlen
= sizeof(dirty_writeback_interval
),
2828 .proc_handler
= dirty_writeback_centisecs_handler
,
2831 .procname
= "dirty_expire_centisecs",
2832 .data
= &dirty_expire_interval
,
2833 .maxlen
= sizeof(dirty_expire_interval
),
2835 .proc_handler
= proc_dointvec_minmax
,
2836 .extra1
= SYSCTL_ZERO
,
2839 .procname
= "dirtytime_expire_seconds",
2840 .data
= &dirtytime_expire_interval
,
2841 .maxlen
= sizeof(dirtytime_expire_interval
),
2843 .proc_handler
= dirtytime_interval_handler
,
2844 .extra1
= SYSCTL_ZERO
,
2847 .procname
= "swappiness",
2848 .data
= &vm_swappiness
,
2849 .maxlen
= sizeof(vm_swappiness
),
2851 .proc_handler
= proc_dointvec_minmax
,
2852 .extra1
= SYSCTL_ZERO
,
2853 .extra2
= &two_hundred
,
2855 #ifdef CONFIG_HUGETLB_PAGE
2857 .procname
= "nr_hugepages",
2859 .maxlen
= sizeof(unsigned long),
2861 .proc_handler
= hugetlb_sysctl_handler
,
2865 .procname
= "nr_hugepages_mempolicy",
2867 .maxlen
= sizeof(unsigned long),
2869 .proc_handler
= &hugetlb_mempolicy_sysctl_handler
,
2872 .procname
= "numa_stat",
2873 .data
= &sysctl_vm_numa_stat
,
2874 .maxlen
= sizeof(int),
2876 .proc_handler
= sysctl_vm_numa_stat_handler
,
2877 .extra1
= SYSCTL_ZERO
,
2878 .extra2
= SYSCTL_ONE
,
2882 .procname
= "hugetlb_shm_group",
2883 .data
= &sysctl_hugetlb_shm_group
,
2884 .maxlen
= sizeof(gid_t
),
2886 .proc_handler
= proc_dointvec
,
2889 .procname
= "nr_overcommit_hugepages",
2891 .maxlen
= sizeof(unsigned long),
2893 .proc_handler
= hugetlb_overcommit_handler
,
2897 .procname
= "lowmem_reserve_ratio",
2898 .data
= &sysctl_lowmem_reserve_ratio
,
2899 .maxlen
= sizeof(sysctl_lowmem_reserve_ratio
),
2901 .proc_handler
= lowmem_reserve_ratio_sysctl_handler
,
2904 .procname
= "drop_caches",
2905 .data
= &sysctl_drop_caches
,
2906 .maxlen
= sizeof(int),
2908 .proc_handler
= drop_caches_sysctl_handler
,
2909 .extra1
= SYSCTL_ONE
,
2912 #ifdef CONFIG_COMPACTION
2914 .procname
= "compact_memory",
2916 .maxlen
= sizeof(int),
2918 .proc_handler
= sysctl_compaction_handler
,
2921 .procname
= "compaction_proactiveness",
2922 .data
= &sysctl_compaction_proactiveness
,
2923 .maxlen
= sizeof(sysctl_compaction_proactiveness
),
2925 .proc_handler
= compaction_proactiveness_sysctl_handler
,
2926 .extra1
= SYSCTL_ZERO
,
2927 .extra2
= &one_hundred
,
2930 .procname
= "extfrag_threshold",
2931 .data
= &sysctl_extfrag_threshold
,
2932 .maxlen
= sizeof(int),
2934 .proc_handler
= proc_dointvec_minmax
,
2935 .extra1
= &min_extfrag_threshold
,
2936 .extra2
= &max_extfrag_threshold
,
2939 .procname
= "compact_unevictable_allowed",
2940 .data
= &sysctl_compact_unevictable_allowed
,
2941 .maxlen
= sizeof(int),
2943 .proc_handler
= proc_dointvec_minmax_warn_RT_change
,
2944 .extra1
= SYSCTL_ZERO
,
2945 .extra2
= SYSCTL_ONE
,
2948 #endif /* CONFIG_COMPACTION */
2950 .procname
= "min_free_kbytes",
2951 .data
= &min_free_kbytes
,
2952 .maxlen
= sizeof(min_free_kbytes
),
2954 .proc_handler
= min_free_kbytes_sysctl_handler
,
2955 .extra1
= SYSCTL_ZERO
,
2958 .procname
= "watermark_boost_factor",
2959 .data
= &watermark_boost_factor
,
2960 .maxlen
= sizeof(watermark_boost_factor
),
2962 .proc_handler
= proc_dointvec_minmax
,
2963 .extra1
= SYSCTL_ZERO
,
2966 .procname
= "watermark_scale_factor",
2967 .data
= &watermark_scale_factor
,
2968 .maxlen
= sizeof(watermark_scale_factor
),
2970 .proc_handler
= watermark_scale_factor_sysctl_handler
,
2971 .extra1
= SYSCTL_ONE
,
2972 .extra2
= &one_thousand
,
2975 .procname
= "percpu_pagelist_high_fraction",
2976 .data
= &percpu_pagelist_high_fraction
,
2977 .maxlen
= sizeof(percpu_pagelist_high_fraction
),
2979 .proc_handler
= percpu_pagelist_high_fraction_sysctl_handler
,
2980 .extra1
= SYSCTL_ZERO
,
2983 .procname
= "page_lock_unfairness",
2984 .data
= &sysctl_page_lock_unfairness
,
2985 .maxlen
= sizeof(sysctl_page_lock_unfairness
),
2987 .proc_handler
= proc_dointvec_minmax
,
2988 .extra1
= SYSCTL_ZERO
,
2992 .procname
= "max_map_count",
2993 .data
= &sysctl_max_map_count
,
2994 .maxlen
= sizeof(sysctl_max_map_count
),
2996 .proc_handler
= proc_dointvec_minmax
,
2997 .extra1
= SYSCTL_ZERO
,
3001 .procname
= "nr_trim_pages",
3002 .data
= &sysctl_nr_trim_pages
,
3003 .maxlen
= sizeof(sysctl_nr_trim_pages
),
3005 .proc_handler
= proc_dointvec_minmax
,
3006 .extra1
= SYSCTL_ZERO
,
3010 .procname
= "laptop_mode",
3011 .data
= &laptop_mode
,
3012 .maxlen
= sizeof(laptop_mode
),
3014 .proc_handler
= proc_dointvec_jiffies
,
3017 .procname
= "vfs_cache_pressure",
3018 .data
= &sysctl_vfs_cache_pressure
,
3019 .maxlen
= sizeof(sysctl_vfs_cache_pressure
),
3021 .proc_handler
= proc_dointvec_minmax
,
3022 .extra1
= SYSCTL_ZERO
,
3024 #if defined(HAVE_ARCH_PICK_MMAP_LAYOUT) || \
3025 defined(CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT)
3027 .procname
= "legacy_va_layout",
3028 .data
= &sysctl_legacy_va_layout
,
3029 .maxlen
= sizeof(sysctl_legacy_va_layout
),
3031 .proc_handler
= proc_dointvec_minmax
,
3032 .extra1
= SYSCTL_ZERO
,
3037 .procname
= "zone_reclaim_mode",
3038 .data
= &node_reclaim_mode
,
3039 .maxlen
= sizeof(node_reclaim_mode
),
3041 .proc_handler
= proc_dointvec_minmax
,
3042 .extra1
= SYSCTL_ZERO
,
3045 .procname
= "min_unmapped_ratio",
3046 .data
= &sysctl_min_unmapped_ratio
,
3047 .maxlen
= sizeof(sysctl_min_unmapped_ratio
),
3049 .proc_handler
= sysctl_min_unmapped_ratio_sysctl_handler
,
3050 .extra1
= SYSCTL_ZERO
,
3051 .extra2
= &one_hundred
,
3054 .procname
= "min_slab_ratio",
3055 .data
= &sysctl_min_slab_ratio
,
3056 .maxlen
= sizeof(sysctl_min_slab_ratio
),
3058 .proc_handler
= sysctl_min_slab_ratio_sysctl_handler
,
3059 .extra1
= SYSCTL_ZERO
,
3060 .extra2
= &one_hundred
,
3065 .procname
= "stat_interval",
3066 .data
= &sysctl_stat_interval
,
3067 .maxlen
= sizeof(sysctl_stat_interval
),
3069 .proc_handler
= proc_dointvec_jiffies
,
3072 .procname
= "stat_refresh",
3076 .proc_handler
= vmstat_refresh
,
3081 .procname
= "mmap_min_addr",
3082 .data
= &dac_mmap_min_addr
,
3083 .maxlen
= sizeof(unsigned long),
3085 .proc_handler
= mmap_min_addr_handler
,
3090 .procname
= "numa_zonelist_order",
3091 .data
= &numa_zonelist_order
,
3092 .maxlen
= NUMA_ZONELIST_ORDER_LEN
,
3094 .proc_handler
= numa_zonelist_order_handler
,
3097 #if (defined(CONFIG_X86_32) && !defined(CONFIG_UML))|| \
3098 (defined(CONFIG_SUPERH) && defined(CONFIG_VSYSCALL))
3100 .procname
= "vdso_enabled",
3101 #ifdef CONFIG_X86_32
3102 .data
= &vdso32_enabled
,
3103 .maxlen
= sizeof(vdso32_enabled
),
3105 .data
= &vdso_enabled
,
3106 .maxlen
= sizeof(vdso_enabled
),
3109 .proc_handler
= proc_dointvec
,
3110 .extra1
= SYSCTL_ZERO
,
3113 #ifdef CONFIG_HIGHMEM
3115 .procname
= "highmem_is_dirtyable",
3116 .data
= &vm_highmem_is_dirtyable
,
3117 .maxlen
= sizeof(vm_highmem_is_dirtyable
),
3119 .proc_handler
= proc_dointvec_minmax
,
3120 .extra1
= SYSCTL_ZERO
,
3121 .extra2
= SYSCTL_ONE
,
3124 #ifdef CONFIG_MEMORY_FAILURE
3126 .procname
= "memory_failure_early_kill",
3127 .data
= &sysctl_memory_failure_early_kill
,
3128 .maxlen
= sizeof(sysctl_memory_failure_early_kill
),
3130 .proc_handler
= proc_dointvec_minmax
,
3131 .extra1
= SYSCTL_ZERO
,
3132 .extra2
= SYSCTL_ONE
,
3135 .procname
= "memory_failure_recovery",
3136 .data
= &sysctl_memory_failure_recovery
,
3137 .maxlen
= sizeof(sysctl_memory_failure_recovery
),
3139 .proc_handler
= proc_dointvec_minmax
,
3140 .extra1
= SYSCTL_ZERO
,
3141 .extra2
= SYSCTL_ONE
,
3145 .procname
= "user_reserve_kbytes",
3146 .data
= &sysctl_user_reserve_kbytes
,
3147 .maxlen
= sizeof(sysctl_user_reserve_kbytes
),
3149 .proc_handler
= proc_doulongvec_minmax
,
3152 .procname
= "admin_reserve_kbytes",
3153 .data
= &sysctl_admin_reserve_kbytes
,
3154 .maxlen
= sizeof(sysctl_admin_reserve_kbytes
),
3156 .proc_handler
= proc_doulongvec_minmax
,
3158 #ifdef CONFIG_HAVE_ARCH_MMAP_RND_BITS
3160 .procname
= "mmap_rnd_bits",
3161 .data
= &mmap_rnd_bits
,
3162 .maxlen
= sizeof(mmap_rnd_bits
),
3164 .proc_handler
= proc_dointvec_minmax
,
3165 .extra1
= (void *)&mmap_rnd_bits_min
,
3166 .extra2
= (void *)&mmap_rnd_bits_max
,
3169 #ifdef CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS
3171 .procname
= "mmap_rnd_compat_bits",
3172 .data
= &mmap_rnd_compat_bits
,
3173 .maxlen
= sizeof(mmap_rnd_compat_bits
),
3175 .proc_handler
= proc_dointvec_minmax
,
3176 .extra1
= (void *)&mmap_rnd_compat_bits_min
,
3177 .extra2
= (void *)&mmap_rnd_compat_bits_max
,
3180 #ifdef CONFIG_USERFAULTFD
3182 .procname
= "unprivileged_userfaultfd",
3183 .data
= &sysctl_unprivileged_userfaultfd
,
3184 .maxlen
= sizeof(sysctl_unprivileged_userfaultfd
),
3186 .proc_handler
= proc_dointvec_minmax
,
3187 .extra1
= SYSCTL_ZERO
,
3188 .extra2
= SYSCTL_ONE
,
3194 static struct ctl_table fs_table
[] = {
3196 .procname
= "inode-nr",
3197 .data
= &inodes_stat
,
3198 .maxlen
= 2*sizeof(long),
3200 .proc_handler
= proc_nr_inodes
,
3203 .procname
= "inode-state",
3204 .data
= &inodes_stat
,
3205 .maxlen
= 7*sizeof(long),
3207 .proc_handler
= proc_nr_inodes
,
3210 .procname
= "file-nr",
3211 .data
= &files_stat
,
3212 .maxlen
= sizeof(files_stat
),
3214 .proc_handler
= proc_nr_files
,
3217 .procname
= "file-max",
3218 .data
= &files_stat
.max_files
,
3219 .maxlen
= sizeof(files_stat
.max_files
),
3221 .proc_handler
= proc_doulongvec_minmax
,
3223 .extra2
= &long_max
,
3226 .procname
= "nr_open",
3227 .data
= &sysctl_nr_open
,
3228 .maxlen
= sizeof(unsigned int),
3230 .proc_handler
= proc_dointvec_minmax
,
3231 .extra1
= &sysctl_nr_open_min
,
3232 .extra2
= &sysctl_nr_open_max
,
3235 .procname
= "dentry-state",
3236 .data
= &dentry_stat
,
3237 .maxlen
= 6*sizeof(long),
3239 .proc_handler
= proc_nr_dentry
,
3242 .procname
= "overflowuid",
3243 .data
= &fs_overflowuid
,
3244 .maxlen
= sizeof(int),
3246 .proc_handler
= proc_dointvec_minmax
,
3247 .extra1
= &minolduid
,
3248 .extra2
= &maxolduid
,
3251 .procname
= "overflowgid",
3252 .data
= &fs_overflowgid
,
3253 .maxlen
= sizeof(int),
3255 .proc_handler
= proc_dointvec_minmax
,
3256 .extra1
= &minolduid
,
3257 .extra2
= &maxolduid
,
3259 #ifdef CONFIG_FILE_LOCKING
3261 .procname
= "leases-enable",
3262 .data
= &leases_enable
,
3263 .maxlen
= sizeof(int),
3265 .proc_handler
= proc_dointvec
,
3268 #ifdef CONFIG_DNOTIFY
3270 .procname
= "dir-notify-enable",
3271 .data
= &dir_notify_enable
,
3272 .maxlen
= sizeof(int),
3274 .proc_handler
= proc_dointvec
,
3278 #ifdef CONFIG_FILE_LOCKING
3280 .procname
= "lease-break-time",
3281 .data
= &lease_break_time
,
3282 .maxlen
= sizeof(int),
3284 .proc_handler
= proc_dointvec
,
3289 .procname
= "aio-nr",
3291 .maxlen
= sizeof(aio_nr
),
3293 .proc_handler
= proc_doulongvec_minmax
,
3296 .procname
= "aio-max-nr",
3297 .data
= &aio_max_nr
,
3298 .maxlen
= sizeof(aio_max_nr
),
3300 .proc_handler
= proc_doulongvec_minmax
,
3302 #endif /* CONFIG_AIO */
3303 #ifdef CONFIG_INOTIFY_USER
3305 .procname
= "inotify",
3307 .child
= inotify_table
,
3310 #ifdef CONFIG_FANOTIFY
3312 .procname
= "fanotify",
3314 .child
= fanotify_table
,
3319 .procname
= "epoll",
3321 .child
= epoll_table
,
3326 .procname
= "protected_symlinks",
3327 .data
= &sysctl_protected_symlinks
,
3328 .maxlen
= sizeof(int),
3330 .proc_handler
= proc_dointvec_minmax
,
3331 .extra1
= SYSCTL_ZERO
,
3332 .extra2
= SYSCTL_ONE
,
3335 .procname
= "protected_hardlinks",
3336 .data
= &sysctl_protected_hardlinks
,
3337 .maxlen
= sizeof(int),
3339 .proc_handler
= proc_dointvec_minmax
,
3340 .extra1
= SYSCTL_ZERO
,
3341 .extra2
= SYSCTL_ONE
,
3344 .procname
= "protected_fifos",
3345 .data
= &sysctl_protected_fifos
,
3346 .maxlen
= sizeof(int),
3348 .proc_handler
= proc_dointvec_minmax
,
3349 .extra1
= SYSCTL_ZERO
,
3353 .procname
= "protected_regular",
3354 .data
= &sysctl_protected_regular
,
3355 .maxlen
= sizeof(int),
3357 .proc_handler
= proc_dointvec_minmax
,
3358 .extra1
= SYSCTL_ZERO
,
3362 .procname
= "suid_dumpable",
3363 .data
= &suid_dumpable
,
3364 .maxlen
= sizeof(int),
3366 .proc_handler
= proc_dointvec_minmax_coredump
,
3367 .extra1
= SYSCTL_ZERO
,
3370 #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
3372 .procname
= "binfmt_misc",
3374 .child
= sysctl_mount_point
,
3378 .procname
= "pipe-max-size",
3379 .data
= &pipe_max_size
,
3380 .maxlen
= sizeof(pipe_max_size
),
3382 .proc_handler
= proc_dopipe_max_size
,
3385 .procname
= "pipe-user-pages-hard",
3386 .data
= &pipe_user_pages_hard
,
3387 .maxlen
= sizeof(pipe_user_pages_hard
),
3389 .proc_handler
= proc_doulongvec_minmax
,
3392 .procname
= "pipe-user-pages-soft",
3393 .data
= &pipe_user_pages_soft
,
3394 .maxlen
= sizeof(pipe_user_pages_soft
),
3396 .proc_handler
= proc_doulongvec_minmax
,
3399 .procname
= "mount-max",
3400 .data
= &sysctl_mount_max
,
3401 .maxlen
= sizeof(unsigned int),
3403 .proc_handler
= proc_dointvec_minmax
,
3404 .extra1
= SYSCTL_ONE
,
3409 static struct ctl_table debug_table
[] = {
3410 #ifdef CONFIG_SYSCTL_EXCEPTION_TRACE
3412 .procname
= "exception-trace",
3413 .data
= &show_unhandled_signals
,
3414 .maxlen
= sizeof(int),
3416 .proc_handler
= proc_dointvec
3419 #if defined(CONFIG_OPTPROBES)
3421 .procname
= "kprobes-optimization",
3422 .data
= &sysctl_kprobes_optimization
,
3423 .maxlen
= sizeof(int),
3425 .proc_handler
= proc_kprobes_optimization_handler
,
3426 .extra1
= SYSCTL_ZERO
,
3427 .extra2
= SYSCTL_ONE
,
3433 static struct ctl_table dev_table
[] = {
3437 static struct ctl_table sysctl_base_table
[] = {
3439 .procname
= "kernel",
3441 .child
= kern_table
,
3454 .procname
= "debug",
3456 .child
= debug_table
,
3466 int __init
sysctl_init(void)
3468 struct ctl_table_header
*hdr
;
3470 hdr
= register_sysctl_table(sysctl_base_table
);
3471 kmemleak_not_leak(hdr
);
3474 #endif /* CONFIG_SYSCTL */
3476 * No sense putting this after each symbol definition, twice,
3477 * exception granted :-)
3479 EXPORT_SYMBOL(proc_dobool
);
3480 EXPORT_SYMBOL(proc_dointvec
);
3481 EXPORT_SYMBOL(proc_douintvec
);
3482 EXPORT_SYMBOL(proc_dointvec_jiffies
);
3483 EXPORT_SYMBOL(proc_dointvec_minmax
);
3484 EXPORT_SYMBOL_GPL(proc_douintvec_minmax
);
3485 EXPORT_SYMBOL(proc_dointvec_userhz_jiffies
);
3486 EXPORT_SYMBOL(proc_dointvec_ms_jiffies
);
3487 EXPORT_SYMBOL(proc_dostring
);
3488 EXPORT_SYMBOL(proc_doulongvec_minmax
);
3489 EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax
);
3490 EXPORT_SYMBOL(proc_do_large_bitmap
);