Lines Matching +full:write +full:- +full:data
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.
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
116 * sent to the write syscall. If dealing with strings respect the file
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
152 if (!data || !maxlen || !*lenp) { in _proc_do_string()
157 if (write) { in _proc_do_string()
160 len = strlen(data); 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()
178 data[len++] = c; in _proc_do_string()
180 data[len] = 0; in _proc_do_string()
182 len = strlen(data); in _proc_do_string()
191 data += *ppos; in _proc_do_string()
192 len -= *ppos; in _proc_do_string()
197 memcpy(buffer, data, len); in _proc_do_string()
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
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
313 return -ERANGE; in strtoul_lenient()
326 * proc_get_long - reads an ASCII formatted integer from a user buffer
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
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() argument
476 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()
517 if (conv(&neg, &lval, i, 1, data)) { in __do_proc_dointvec()
518 err = -EINVAL; in __do_proc_dointvec()
522 if (conv(&neg, &lval, i, 0, data)) { 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() argument
548 void *data) in do_proc_dointvec()
550 return __do_proc_dointvec(table->data, table, write, in do_proc_dointvec()
551 buffer, lenp, ppos, conv, data); in do_proc_dointvec()
560 int write, void *data), in do_proc_douintvec_w() argument
561 void *data) in do_proc_douintvec_w()
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()
591 if (conv(&lval, tbl_data, 1, data)) { 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
616 void *data) in do_proc_douintvec_r()
624 if (conv(&lval, tbl_data, 0, data)) { in do_proc_douintvec_r()
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() argument
648 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()
674 conv, data); in __do_proc_douintvec()
675 return do_proc_douintvec_r(i, buffer, lenp, ppos, conv, data); 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() argument
683 void *data) in do_proc_douintvec()
685 return __do_proc_douintvec(table->data, table, write, in do_proc_douintvec()
686 buffer, lenp, ppos, conv, data); in do_proc_douintvec()
690 * proc_dobool - read/write a bool
692 * @write: %TRUE if this is a write to the sysctl file
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() local
713 if (table->maxlen != sizeof(bool)) in proc_dobool()
714 return -EINVAL; in proc_dobool()
718 tmp.data = &val; in proc_dobool()
720 val = READ_ONCE(*data); in proc_dobool()
721 res = proc_dointvec(&tmp, write, buffer, lenp, ppos); in proc_dobool()
724 if (write) in proc_dobool()
725 WRITE_ONCE(*data, val); 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
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
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()
783 t.data = &tmptaint; in proc_taint()
784 err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos); in proc_taint()
788 if (write) { in proc_taint()
797 return -EINVAL; in proc_taint()
812 * struct do_proc_dointvec_minmax_conv_param - proc_dointvec_minmax() range checking structure
827 int write, void *data) in do_proc_dointvec_minmax_conv() argument
830 struct do_proc_dointvec_minmax_conv_param *param = data; in do_proc_dointvec_minmax_conv()
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
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
894 int write, void *data) in do_proc_douintvec_minmax_conv() argument
898 struct do_proc_douintvec_minmax_conv_param *param = data; in do_proc_douintvec_minmax_conv()
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
930 * table->extra1 (min) and table->extra2 (max). There is a final sanity
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
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() local
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()
988 tmp.data = &val; in proc_dou8vec_minmax()
989 val = READ_ONCE(*data); 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()
995 WRITE_ONCE(*data, val); 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()
1020 static int __do_proc_doulongvec_minmax(void *data, in __do_proc_doulongvec_minmax() argument
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()
1035 i = data; 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
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
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
1227 struct do_proc_dointvec_minmax_conv_param *param = data; in do_proc_dointvec_ms_jiffies_minmax_conv()
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
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
1288 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
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
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()
1590 .data = &val, 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()
1616 .data = &panic_timeout,
1630 .data = &sysctl_writes_strict,
1639 .procname = "print-fatal-signals",
1640 .data = &print_fatal_signals,
1647 .procname = "reboot-cmd",
1648 .data = reboot_command,
1654 .procname = "stop-a",
1655 .data = &stop_a_enabled,
1661 .procname = "scons-poweroff",
1662 .data = &scons_pwroff,
1670 .procname = "tsb-ratio",
1671 .data = &sysctl_tsb_ratio,
1679 .procname = "soft-power",
1680 .data = &pwrsw_enabled,
1688 .procname = "unaligned-trap",
1689 .data = &unaligned_enabled,
1698 .data = &stack_tracer_enabled,
1707 .data = &ftrace_dump_on_oops,
1714 .data = &__disable_trace_on_warning,
1721 .data = &tracepoint_printk,
1730 .data = &modprobe_path,
1737 .data = &modules_disabled,
1749 .data = &uevent_helper,
1758 .data = NULL,
1767 .data = NULL,
1774 .procname = "threads-max",
1775 .data = NULL,
1782 .data = &overflowuid,
1791 .data = &overflowgid,
1801 .data = &show_unhandled_signals,
1809 .data = &pid_max,
1818 .data = &panic_on_oops,
1825 .data = &panic_print,
1832 .data = (void *)&ngroups_max,
1839 .data = (void *)&cap_last_cap,
1847 .data = &unknown_nmi_panic,
1858 .data = &sysctl_panic_on_stackoverflow,
1867 .data = &panic_on_unrecovered_nmi,
1874 .data = &panic_on_io_nmi,
1881 .data = &bootloader_type,
1888 .data = &bootloader_version,
1895 .data = &io_delay_type,
1904 .data = &randomize_va_space,
1913 .data = &spin_retry,
1922 .data = &acpi_realmode_flags,
1930 .procname = "ignore-unaligned-usertrap",
1931 .data = &no_unaligned_warning,
1940 .data = &max_lock_depth,
1948 * User-space scripts rely on the existence of this file
1955 .data = &sysctl_perf_event_paranoid,
1962 .data = &sysctl_perf_event_mlock,
1969 .data = &sysctl_perf_event_sample_rate,
1977 .data = &sysctl_perf_cpu_time_max_percent,
1986 .data = &sysctl_perf_event_max_stack,
1995 .data = &sysctl_perf_event_max_contexts_per_stack,
2005 .data = &panic_on_warn,
2015 .data = &sysctl_panic_on_rcu_stall,
2024 .data = &sysctl_max_rcu_stall_to_panic,
2037 .data = &sysctl_overcommit_memory,
2046 .data = &sysctl_overcommit_ratio,
2053 .data = &sysctl_overcommit_kbytes,
2059 .procname = "page-cluster",
2060 .data = &page_cluster,
2069 .data = &dirtytime_expire_interval,
2077 .data = &vm_swappiness,
2087 .data = &sysctl_vm_numa_stat,
2097 .data = &sysctl_drop_caches,
2106 .data = &sysctl_page_lock_unfairness,
2115 .data = &sysctl_max_map_count,
2124 .data = &sysctl_nr_trim_pages,
2133 .data = &sysctl_vfs_cache_pressure,
2143 .data = &sysctl_legacy_va_layout,
2153 .data = &node_reclaim_mode,
2163 .data = &sysctl_stat_interval,
2170 .data = NULL,
2179 .data = &dac_mmap_min_addr,
2190 .data = &vdso32_enabled,
2193 .data = &vdso_enabled,
2203 .data = &sysctl_user_reserve_kbytes,
2210 .data = &sysctl_admin_reserve_kbytes,
2218 .data = &mmap_rnd_bits,
2229 .data = &mmap_rnd_compat_bits,
2249 * exception granted :-)