Lines Matching +full:write +full:- +full:to +full:- +full:write
1 // SPDX-License-Identifier: GPL-2.0-only
9 * Added kernel/java-{interpreter,appletviewer}, 96/5/10, Mike Shaver.
11 * Added kswapd-interval, ctrl-alt-del, printk stuff, 1/8/97, Chris Horn.
16 * Changed linked lists to use list.h instead of lists.h, 02/24/00, Bill
84 /* shared constants to be used in various sysctls */
85 const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 };
106 * enum sysctl_writes_mode - supported sysctl write modes
108 * @SYSCTL_WRITES_LEGACY: each write syscall must fully contain the sysctl value
109 * to be written, and multiple writes on the same sysctl file descriptor
114 * @SYSCTL_WRITES_STRICT: writes to numeric sysctl entries must always be at
116 * sent to the write syscall. If dealing with strings respect the file
117 * position, but restrict this to the max length of the buffer, anything
119 * to the buffer.
121 * These write modes control how current file position affects the behavior of
122 * updating sysctl values through the proc interface on each write.
125 SYSCTL_WRITES_LEGACY = -1,
146 static int _proc_do_string(char *data, int maxlen, int write, in _proc_do_string() argument
157 if (write) { in _proc_do_string()
161 if (len > maxlen - 1) in _proc_do_string()
162 len = maxlen - 1; in _proc_do_string()
174 while ((p - buffer) < *lenp && len < maxlen - 1) { in _proc_do_string()
192 len -= *ppos; in _proc_do_string()
210 pr_warn_once("%s wrote to %s when file position was not 0!\n" in warn_sysctl_write()
211 "This will not be supported in the future. To silence this\n" in warn_sysctl_write()
212 "warning, set kernel.sysctl_writes_strict = -1\n", in warn_sysctl_write()
213 current->comm, table->procname); in warn_sysctl_write()
217 * proc_first_pos_non_zero_ignore - check if first position is allowed
221 * Returns true if the first position is non-zero and the sysctl_writes_strict
243 * proc_dostring - read a string sysctl
245 * @write: %TRUE if this is a write to the sysctl file
250 * Reads/writes a string from/to the user buffer. If the kernel
251 * buffer provided is not large enough to hold the string, the
252 * string is truncated. The copied string is %NULL-terminated.
259 int proc_dostring(const struct ctl_table *table, int write, in proc_dostring() argument
262 if (write) in proc_dostring()
265 return _proc_do_string(table->data, table->maxlen, write, buffer, lenp, in proc_dostring()
274 (*size)--; in proc_skip_spaces()
284 (*size)--; in proc_skip_char()
290 * strtoul_lenient - parse an ASCII formatted integer from a buffer and only
293 * @cp: kernel buffer containing the string to parse
294 * @endp: pointer to store the trailing characters
295 * @base: the base to use
301 * the function will defer the decision what characters count as invalid to the
313 return -ERANGE; in strtoul_lenient()
326 * proc_get_long - reads an ASCII formatted integer from a user buffer
331 * @neg: set to %TRUE if number is negative
334 * @tr: pointer to store the trailer character
337 * the amount of bytes read. If @tr is non-NULL and a trailing
338 * character exists (size is non-zero after returning from this
349 return -EINVAL; in proc_get_long()
351 if (len > TMPBUFLEN - 1) in proc_get_long()
352 len = TMPBUFLEN - 1; in proc_get_long()
358 if (*p == '-' && *size > 1) { in proc_get_long()
364 return -EINVAL; in proc_get_long()
367 return -EINVAL; in proc_get_long()
369 len = p - tmp; in proc_get_long()
374 if (len == TMPBUFLEN - 1) in proc_get_long()
375 return -EINVAL; in proc_get_long()
378 return -EINVAL; in proc_get_long()
384 *size -= len; in proc_get_long()
390 * proc_put_long - converts an integer to a decimal ASCII formatted string
394 * @val: the integer to be converted
405 sprintf(p, "%s%lu", neg ? "-" : "", val); in proc_put_long()
410 *size -= len; in proc_put_long()
421 (*size)--; in proc_put_char()
429 int write, void *data) in do_proc_dointvec_conv() argument
431 if (write) { in do_proc_dointvec_conv()
434 return -EINVAL; in do_proc_dointvec_conv()
435 WRITE_ONCE(*valp, -*lvalp); in do_proc_dointvec_conv()
438 return -EINVAL; in do_proc_dointvec_conv()
445 *lvalp = -(unsigned long)val; in do_proc_dointvec_conv()
456 int write, void *data) in do_proc_douintvec_conv() argument
458 if (write) { in do_proc_douintvec_conv()
460 return -EINVAL; in do_proc_douintvec_conv()
472 int write, void *buffer, in __do_proc_dointvec() argument
475 int write, void *data), in __do_proc_dointvec()
482 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_dointvec()
488 vleft = table->maxlen / sizeof(*i); in __do_proc_dointvec()
494 if (write) { in __do_proc_dointvec()
498 if (left > PAGE_SIZE - 1) in __do_proc_dointvec()
499 left = PAGE_SIZE - 1; in __do_proc_dointvec()
503 for (; left && vleft--; i++, first=0) { in __do_proc_dointvec()
507 if (write) { in __do_proc_dointvec()
518 err = -EINVAL; in __do_proc_dointvec()
523 err = -EINVAL; in __do_proc_dointvec()
532 if (!write && !first && left && !err) in __do_proc_dointvec()
534 if (write && !err && left) in __do_proc_dointvec()
536 if (write && first) in __do_proc_dointvec()
537 return err ? : -EINVAL; in __do_proc_dointvec()
538 *lenp -= left; in __do_proc_dointvec()
544 static int do_proc_dointvec(const struct ctl_table *table, int write, in do_proc_dointvec() argument
547 int write, void *data), in do_proc_dointvec()
550 return __do_proc_dointvec(table->data, table, write, in do_proc_dointvec()
560 int write, void *data), in do_proc_douintvec_w() argument
574 if (left > PAGE_SIZE - 1) in do_proc_douintvec_w()
575 left = PAGE_SIZE - 1; in do_proc_douintvec_w()
579 err = -EINVAL; in do_proc_douintvec_w()
587 err = -EINVAL; in do_proc_douintvec_w()
592 err = -EINVAL; in do_proc_douintvec_w()
601 return -EINVAL; in do_proc_douintvec_w()
615 int write, void *data), in do_proc_douintvec_r() argument
625 err = -EINVAL; in do_proc_douintvec_r()
636 *lenp -= left; in do_proc_douintvec_r()
643 int write, void *buffer, in __do_proc_douintvec() argument
647 int write, void *data), in __do_proc_douintvec()
652 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_douintvec()
658 vleft = table->maxlen / sizeof(*i); in __do_proc_douintvec()
666 return -EINVAL; in __do_proc_douintvec()
672 if (write) in __do_proc_douintvec()
678 int do_proc_douintvec(const struct ctl_table *table, int write, in do_proc_douintvec() argument
682 int write, void *data), in do_proc_douintvec()
685 return __do_proc_douintvec(table->data, table, write, in do_proc_douintvec()
690 * proc_dobool - read/write a bool
692 * @write: %TRUE if this is a write to the sysctl file
697 * Reads/writes one integer value from/to the user buffer,
700 * table->data must point to a bool variable and table->maxlen must
705 int proc_dobool(const struct ctl_table *table, int write, void *buffer, in proc_dobool() argument
709 bool *data = table->data; in proc_dobool()
713 if (table->maxlen != sizeof(bool)) in proc_dobool()
714 return -EINVAL; in proc_dobool()
721 res = proc_dointvec(&tmp, write, buffer, lenp, ppos); in proc_dobool()
724 if (write) in proc_dobool()
730 * proc_dointvec - read a vector of integers
732 * @write: %TRUE if this is a write to the sysctl file
737 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
738 * values from/to the user buffer, treated as an ASCII string.
742 int proc_dointvec(const struct ctl_table *table, int write, void *buffer, in proc_dointvec() argument
745 return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL); in proc_dointvec()
749 * proc_douintvec - read a vector of unsigned integers
751 * @write: %TRUE if this is a write to the sysctl file
756 * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
757 * values from/to the user buffer, treated as an ASCII string.
761 int proc_douintvec(const struct ctl_table *table, int write, void *buffer, in proc_douintvec() argument
764 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec()
772 static int proc_taint(const struct ctl_table *table, int write, in proc_taint() argument
779 if (write && !capable(CAP_SYS_ADMIN)) in proc_taint()
780 return -EPERM; in proc_taint()
784 err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos); in proc_taint()
788 if (write) { in proc_taint()
793 * false positives due to userspace input, bail out in proc_taint()
797 return -EINVAL; in proc_taint()
801 * to everyone's atomic.h for this in proc_taint()
812 * struct do_proc_dointvec_minmax_conv_param - proc_dointvec_minmax() range checking structure
813 * @min: pointer to minimum allowable value
814 * @max: pointer to maximum allowable value
827 int write, void *data) in do_proc_dointvec_minmax_conv() argument
833 * bounds-check it before touching *valp. in do_proc_dointvec_minmax_conv()
835 int *ip = write ? &tmp : valp; in do_proc_dointvec_minmax_conv()
837 ret = do_proc_dointvec_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_minmax_conv()
841 if (write) { in do_proc_dointvec_minmax_conv()
842 if ((param->min && *param->min > tmp) || in do_proc_dointvec_minmax_conv()
843 (param->max && *param->max < tmp)) in do_proc_dointvec_minmax_conv()
844 return -EINVAL; in do_proc_dointvec_minmax_conv()
852 * proc_dointvec_minmax - read a vector of integers with min/max values
854 * @write: %TRUE if this is a write to the sysctl file
859 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
860 * values from/to the user buffer, treated as an ASCII string.
863 * table->extra1 (min) and table->extra2 (max).
865 * Returns 0 on success or -EINVAL on write when the range check fails.
867 int proc_dointvec_minmax(const struct ctl_table *table, int write, in proc_dointvec_minmax() argument
871 .min = (int *) table->extra1, in proc_dointvec_minmax()
872 .max = (int *) table->extra2, in proc_dointvec_minmax()
874 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_minmax()
879 * struct do_proc_douintvec_minmax_conv_param - proc_douintvec_minmax() range checking structure
880 * @min: pointer to minimum allowable value
881 * @max: pointer to maximum allowable value
894 int write, void *data) in do_proc_douintvec_minmax_conv() argument
899 /* write via temporary local uint for bounds-checking */ in do_proc_douintvec_minmax_conv()
900 unsigned int *up = write ? &tmp : valp; in do_proc_douintvec_minmax_conv()
902 ret = do_proc_douintvec_conv(lvalp, up, write, data); in do_proc_douintvec_minmax_conv()
906 if (write) { in do_proc_douintvec_minmax_conv()
907 if ((param->min && *param->min > tmp) || in do_proc_douintvec_minmax_conv()
908 (param->max && *param->max < tmp)) in do_proc_douintvec_minmax_conv()
909 return -ERANGE; in do_proc_douintvec_minmax_conv()
918 * proc_douintvec_minmax - read a vector of unsigned ints with min/max values
920 * @write: %TRUE if this is a write to the sysctl file
925 * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
926 * values from/to the user buffer, treated as an ASCII string. Negative
930 * table->extra1 (min) and table->extra2 (max). There is a final sanity
931 * check for UINT_MAX to avoid having to support wrap around uses from
934 * Returns 0 on success or -ERANGE on write when the range check fails.
936 int proc_douintvec_minmax(const struct ctl_table *table, int write, in proc_douintvec_minmax() argument
940 .min = (unsigned int *) table->extra1, in proc_douintvec_minmax()
941 .max = (unsigned int *) table->extra2, in proc_douintvec_minmax()
943 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec_minmax()
948 * proc_dou8vec_minmax - read a vector of unsigned chars with min/max values
950 * @write: %TRUE if this is a write to the sysctl file
955 * Reads/writes up to table->maxlen/sizeof(u8) unsigned chars
956 * values from/to the user buffer, treated as an ASCII string. Negative
960 * table->extra1 (min) and table->extra2 (max).
962 * Returns 0 on success or an error on write when the range check fails.
964 int proc_dou8vec_minmax(const struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
969 u8 *data = table->data; in proc_dou8vec_minmax()
977 if (table->maxlen != sizeof(u8)) in proc_dou8vec_minmax()
978 return -EINVAL; in proc_dou8vec_minmax()
980 if (table->extra1) in proc_dou8vec_minmax()
981 min = *(unsigned int *) table->extra1; in proc_dou8vec_minmax()
982 if (table->extra2) in proc_dou8vec_minmax()
983 max = *(unsigned int *) table->extra2; in proc_dou8vec_minmax()
990 res = do_proc_douintvec(&tmp, write, buffer, lenp, ppos, in proc_dou8vec_minmax()
994 if (write) in proc_dou8vec_minmax()
1001 static int sysrq_sysctl_handler(const struct ctl_table *table, int write, in sysrq_sysctl_handler() argument
1008 ret = __do_proc_dointvec(&tmp, table, write, buffer, in sysrq_sysctl_handler()
1010 if (ret || !write) in sysrq_sysctl_handler()
1013 if (write) in sysrq_sysctl_handler()
1021 const struct ctl_table *table, int write, in __do_proc_doulongvec_minmax() argument
1030 if (!data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_doulongvec_minmax()
1036 min = table->extra1; in __do_proc_doulongvec_minmax()
1037 max = table->extra2; in __do_proc_doulongvec_minmax()
1038 vleft = table->maxlen / sizeof(unsigned long); in __do_proc_doulongvec_minmax()
1041 if (write) { in __do_proc_doulongvec_minmax()
1045 if (left > PAGE_SIZE - 1) in __do_proc_doulongvec_minmax()
1046 left = PAGE_SIZE - 1; in __do_proc_doulongvec_minmax()
1050 for (; left && vleft--; i++, first = 0) { in __do_proc_doulongvec_minmax()
1053 if (write) { in __do_proc_doulongvec_minmax()
1064 err = -EINVAL; in __do_proc_doulongvec_minmax()
1070 err = -EINVAL; in __do_proc_doulongvec_minmax()
1082 if (!write && !first && left && !err) in __do_proc_doulongvec_minmax()
1084 if (write && !err) in __do_proc_doulongvec_minmax()
1086 if (write && first) in __do_proc_doulongvec_minmax()
1087 return err ? : -EINVAL; in __do_proc_doulongvec_minmax()
1088 *lenp -= left; in __do_proc_doulongvec_minmax()
1094 static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, in do_proc_doulongvec_minmax() argument
1098 return __do_proc_doulongvec_minmax(table->data, table, write, in do_proc_doulongvec_minmax()
1103 * proc_doulongvec_minmax - read a vector of long integers with min/max values
1105 * @write: %TRUE if this is a write to the sysctl file
1110 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
1111 * values from/to the user buffer, treated as an ASCII string.
1114 * table->extra1 (min) and table->extra2 (max).
1118 int proc_doulongvec_minmax(const struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1121 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); in proc_doulongvec_minmax()
1125 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values
1127 * @write: %TRUE if this is a write to the sysctl file
1132 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
1133 * values from/to the user buffer, treated as an ASCII string. The values
1134 * are treated as milliseconds, and converted to jiffies when they are stored.
1137 * table->extra1 (min) and table->extra2 (max).
1141 int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1144 return do_proc_doulongvec_minmax(table, write, buffer, in proc_doulongvec_ms_jiffies_minmax()
1151 int write, void *data) in do_proc_dointvec_jiffies_conv() argument
1153 if (write) { in do_proc_dointvec_jiffies_conv()
1157 WRITE_ONCE(*valp, -*lvalp * HZ); in do_proc_dointvec_jiffies_conv()
1165 lval = -(unsigned long)val; in do_proc_dointvec_jiffies_conv()
1177 int write, void *data) in do_proc_dointvec_userhz_jiffies_conv() argument
1179 if (write) { in do_proc_dointvec_userhz_jiffies_conv()
1182 *valp = clock_t_to_jiffies(*negp ? -*lvalp : *lvalp); in do_proc_dointvec_userhz_jiffies_conv()
1188 lval = -(unsigned long)val; in do_proc_dointvec_userhz_jiffies_conv()
1200 int write, void *data) in do_proc_dointvec_ms_jiffies_conv() argument
1202 if (write) { in do_proc_dointvec_ms_jiffies_conv()
1203 unsigned long jif = msecs_to_jiffies(*negp ? -*lvalp : *lvalp); in do_proc_dointvec_ms_jiffies_conv()
1213 lval = -(unsigned long)val; in do_proc_dointvec_ms_jiffies_conv()
1224 int *valp, int write, void *data) in do_proc_dointvec_ms_jiffies_minmax_conv() argument
1230 * bounds-check it before touching *valp. in do_proc_dointvec_ms_jiffies_minmax_conv()
1232 int *ip = write ? &tmp : valp; in do_proc_dointvec_ms_jiffies_minmax_conv()
1234 ret = do_proc_dointvec_ms_jiffies_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_ms_jiffies_minmax_conv()
1238 if (write) { in do_proc_dointvec_ms_jiffies_minmax_conv()
1239 if ((param->min && *param->min > tmp) || in do_proc_dointvec_ms_jiffies_minmax_conv()
1240 (param->max && *param->max < tmp)) in do_proc_dointvec_ms_jiffies_minmax_conv()
1241 return -EINVAL; in do_proc_dointvec_ms_jiffies_minmax_conv()
1248 * proc_dointvec_jiffies - read a vector of integers as seconds
1250 * @write: %TRUE if this is a write to the sysctl file
1255 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1256 * values from/to the user buffer, treated as an ASCII string.
1257 * The values read are assumed to be in seconds, and are converted into
1262 int proc_dointvec_jiffies(const struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1265 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_jiffies()
1269 int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1273 .min = (int *) table->extra1, in proc_dointvec_ms_jiffies_minmax()
1274 .max = (int *) table->extra2, in proc_dointvec_ms_jiffies_minmax()
1276 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies_minmax()
1281 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds
1283 * @write: %TRUE if this is a write to the sysctl file
1286 * @ppos: pointer to the file position
1288 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1289 * values from/to the user buffer, treated as an ASCII string.
1290 * The values read are assumed to be in 1/USER_HZ seconds, and
1295 int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1298 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_userhz_jiffies()
1303 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds
1305 * @write: %TRUE if this is a write to the sysctl file
1311 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1312 * values from/to the user buffer, treated as an ASCII string.
1313 * The values read are assumed to be in 1/1000 seconds, and
1318 int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, void *buffer, in proc_dointvec_ms_jiffies() argument
1321 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies()
1325 static int proc_do_cad_pid(const struct ctl_table *table, int write, void *buffer, in proc_do_cad_pid() argument
1334 r = __do_proc_dointvec(&tmp, table, write, buffer, in proc_do_cad_pid()
1336 if (r || !write) in proc_do_cad_pid()
1341 return -ESRCH; in proc_do_cad_pid()
1348 * proc_do_large_bitmap - read/write from/to a large bitmap
1350 * @write: %TRUE if this is a write to the sysctl file
1355 * The bitmap is stored at table->data and the bitmap length (in bits)
1356 * in table->maxlen.
1358 * We use a range comma separated format (e.g. 1,3-4,10-10) so that
1364 int proc_do_large_bitmap(const struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1369 unsigned long bitmap_len = table->maxlen; in proc_do_large_bitmap()
1370 unsigned long *bitmap = *(unsigned long **) table->data; in proc_do_large_bitmap()
1372 char tr_a[] = { '-', ',', '\n' }, tr_b[] = { ',', '\n', 0 }, c; in proc_do_large_bitmap()
1374 if (!bitmap || !bitmap_len || !left || (*ppos && !write)) { in proc_do_large_bitmap()
1379 if (write) { in proc_do_large_bitmap()
1383 if (left > PAGE_SIZE - 1) { in proc_do_large_bitmap()
1384 left = PAGE_SIZE - 1; in proc_do_large_bitmap()
1386 skipped = *lenp - left; in proc_do_large_bitmap()
1391 return -ENOMEM; in proc_do_large_bitmap()
1398 /* In case we stop parsing mid-number, we can reset */ in proc_do_large_bitmap()
1404 * only one char is left (may be a "-"), then stop here, in proc_do_large_bitmap()
1415 err = -EINVAL; in proc_do_large_bitmap()
1422 left--; in proc_do_large_bitmap()
1425 if (c == '-') { in proc_do_large_bitmap()
1442 err = -EINVAL; in proc_do_large_bitmap()
1447 left--; in proc_do_large_bitmap()
1451 bitmap_set(tmp_bitmap, val_a, val_b - val_a + 1); in proc_do_large_bitmap()
1464 bit_a + 1) - 1; in proc_do_large_bitmap()
1470 proc_put_char(&buffer, &left, '-'); in proc_do_large_bitmap()
1480 if (write) { in proc_do_large_bitmap()
1486 *lenp -= left; in proc_do_large_bitmap()
1496 int proc_dostring(const struct ctl_table *table, int write, in proc_dostring() argument
1499 return -ENOSYS; in proc_dostring()
1502 int proc_dobool(const struct ctl_table *table, int write, in proc_dobool() argument
1505 return -ENOSYS; in proc_dobool()
1508 int proc_dointvec(const struct ctl_table *table, int write, in proc_dointvec() argument
1511 return -ENOSYS; in proc_dointvec()
1514 int proc_douintvec(const struct ctl_table *table, int write, in proc_douintvec() argument
1517 return -ENOSYS; in proc_douintvec()
1520 int proc_dointvec_minmax(const struct ctl_table *table, int write, in proc_dointvec_minmax() argument
1523 return -ENOSYS; in proc_dointvec_minmax()
1526 int proc_douintvec_minmax(const struct ctl_table *table, int write, in proc_douintvec_minmax() argument
1529 return -ENOSYS; in proc_douintvec_minmax()
1532 int proc_dou8vec_minmax(const struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
1535 return -ENOSYS; in proc_dou8vec_minmax()
1538 int proc_dointvec_jiffies(const struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1541 return -ENOSYS; in proc_dointvec_jiffies()
1544 int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1547 return -ENOSYS; in proc_dointvec_ms_jiffies_minmax()
1550 int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1553 return -ENOSYS; in proc_dointvec_userhz_jiffies()
1556 int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies() argument
1559 return -ENOSYS; in proc_dointvec_ms_jiffies()
1562 int proc_doulongvec_minmax(const struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1565 return -ENOSYS; in proc_doulongvec_minmax()
1568 int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1571 return -ENOSYS; in proc_doulongvec_ms_jiffies_minmax()
1574 int proc_do_large_bitmap(const struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1577 return -ENOSYS; in proc_do_large_bitmap()
1583 int proc_do_static_key(const struct ctl_table *table, int write, in proc_do_static_key() argument
1586 struct static_key *key = (struct static_key *)table->data; in proc_do_static_key()
1592 .mode = table->mode, in proc_do_static_key()
1597 if (write && !capable(CAP_SYS_ADMIN)) in proc_do_static_key()
1598 return -EPERM; in proc_do_static_key()
1602 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in proc_do_static_key()
1603 if (write && !ret) { in proc_do_static_key()
1639 .procname = "print-fatal-signals",
1647 .procname = "reboot-cmd",
1654 .procname = "stop-a",
1661 .procname = "scons-poweroff",
1670 .procname = "tsb-ratio",
1679 .procname = "soft-power",
1688 .procname = "unaligned-trap",
1740 /* only handle a transition from default "0" to "1" */
1774 .procname = "threads-max",
1930 .procname = "ignore-unaligned-usertrap",
1948 * User-space scripts rely on the existence of this file
2059 .procname = "page-cluster",
2249 * exception granted :-)