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(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(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(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(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(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(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(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(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(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(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()
983 return -EINVAL; in proc_dou8vec_minmax()
985 if (table->extra2) { in proc_dou8vec_minmax()
986 max = *(unsigned int *) table->extra2; in proc_dou8vec_minmax()
988 return -EINVAL; in proc_dou8vec_minmax()
994 tmp.data = &val; in proc_dou8vec_minmax()
995 val = READ_ONCE(*data); in proc_dou8vec_minmax()
996 res = do_proc_douintvec(&tmp, write, buffer, lenp, ppos, in proc_dou8vec_minmax()
1000 if (write) in proc_dou8vec_minmax()
1001 WRITE_ONCE(*data, val); in proc_dou8vec_minmax()
1007 static int sysrq_sysctl_handler(struct ctl_table *table, int write, in sysrq_sysctl_handler() argument
1014 ret = __do_proc_dointvec(&tmp, table, write, buffer, in sysrq_sysctl_handler()
1016 if (ret || !write) in sysrq_sysctl_handler()
1019 if (write) in sysrq_sysctl_handler()
1026 static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, in __do_proc_doulongvec_minmax() argument
1027 int write, void *buffer, size_t *lenp, loff_t *ppos, in __do_proc_doulongvec_minmax() argument
1035 if (!data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_doulongvec_minmax()
1040 i = data; in __do_proc_doulongvec_minmax()
1041 min = table->extra1; in __do_proc_doulongvec_minmax()
1042 max = table->extra2; in __do_proc_doulongvec_minmax()
1043 vleft = table->maxlen / sizeof(unsigned long); in __do_proc_doulongvec_minmax()
1046 if (write) { in __do_proc_doulongvec_minmax()
1050 if (left > PAGE_SIZE - 1) in __do_proc_doulongvec_minmax()
1051 left = PAGE_SIZE - 1; in __do_proc_doulongvec_minmax()
1055 for (; left && vleft--; i++, first = 0) { in __do_proc_doulongvec_minmax()
1058 if (write) { in __do_proc_doulongvec_minmax()
1069 err = -EINVAL; in __do_proc_doulongvec_minmax()
1075 err = -EINVAL; in __do_proc_doulongvec_minmax()
1087 if (!write && !first && left && !err) in __do_proc_doulongvec_minmax()
1089 if (write && !err) in __do_proc_doulongvec_minmax()
1091 if (write && first) in __do_proc_doulongvec_minmax()
1092 return err ? : -EINVAL; in __do_proc_doulongvec_minmax()
1093 *lenp -= left; in __do_proc_doulongvec_minmax()
1099 static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, in do_proc_doulongvec_minmax() argument
1103 return __do_proc_doulongvec_minmax(table->data, table, write, in do_proc_doulongvec_minmax()
1108 * proc_doulongvec_minmax - read a vector of long integers with min/max values
1110 * @write: %TRUE if this is a write to the sysctl file
1115 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
1119 * table->extra1 (min) and table->extra2 (max).
1123 int proc_doulongvec_minmax(struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1126 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); in proc_doulongvec_minmax()
1130 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values
1132 * @write: %TRUE if this is a write to the sysctl file
1137 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
1142 * table->extra1 (min) and table->extra2 (max).
1146 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1149 return do_proc_doulongvec_minmax(table, write, buffer, in proc_doulongvec_ms_jiffies_minmax()
1156 int write, void *data) in do_proc_dointvec_jiffies_conv() argument
1158 if (write) { in do_proc_dointvec_jiffies_conv()
1162 WRITE_ONCE(*valp, -*lvalp * HZ); in do_proc_dointvec_jiffies_conv()
1170 lval = -(unsigned long)val; in do_proc_dointvec_jiffies_conv()
1182 int write, void *data) in do_proc_dointvec_userhz_jiffies_conv() argument
1184 if (write) { in do_proc_dointvec_userhz_jiffies_conv()
1187 *valp = clock_t_to_jiffies(*negp ? -*lvalp : *lvalp); in do_proc_dointvec_userhz_jiffies_conv()
1193 lval = -(unsigned long)val; in do_proc_dointvec_userhz_jiffies_conv()
1205 int write, void *data) in do_proc_dointvec_ms_jiffies_conv() argument
1207 if (write) { in do_proc_dointvec_ms_jiffies_conv()
1208 unsigned long jif = msecs_to_jiffies(*negp ? -*lvalp : *lvalp); in do_proc_dointvec_ms_jiffies_conv()
1218 lval = -(unsigned long)val; in do_proc_dointvec_ms_jiffies_conv()
1229 int *valp, int write, void *data) in do_proc_dointvec_ms_jiffies_minmax_conv() argument
1232 struct do_proc_dointvec_minmax_conv_param *param = data; in do_proc_dointvec_ms_jiffies_minmax_conv()
1235 * bounds-check it before touching *valp. in do_proc_dointvec_ms_jiffies_minmax_conv()
1237 int *ip = write ? &tmp : valp; in do_proc_dointvec_ms_jiffies_minmax_conv()
1239 ret = do_proc_dointvec_ms_jiffies_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_ms_jiffies_minmax_conv()
1243 if (write) { in do_proc_dointvec_ms_jiffies_minmax_conv()
1244 if ((param->min && *param->min > tmp) || in do_proc_dointvec_ms_jiffies_minmax_conv()
1245 (param->max && *param->max < tmp)) in do_proc_dointvec_ms_jiffies_minmax_conv()
1246 return -EINVAL; in do_proc_dointvec_ms_jiffies_minmax_conv()
1253 * proc_dointvec_jiffies - read a vector of integers as seconds
1255 * @write: %TRUE if this is a write to the sysctl file
1260 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1267 int proc_dointvec_jiffies(struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1270 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_jiffies()
1274 int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1278 .min = (int *) table->extra1, in proc_dointvec_ms_jiffies_minmax()
1279 .max = (int *) table->extra2, in proc_dointvec_ms_jiffies_minmax()
1281 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies_minmax()
1286 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds
1288 * @write: %TRUE if this is a write to the sysctl file
1293 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1300 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1303 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_userhz_jiffies()
1308 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds
1310 * @write: %TRUE if this is a write to the sysctl file
1316 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1323 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, void *buffer, in proc_dointvec_ms_jiffies() argument
1326 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies()
1330 static int proc_do_cad_pid(struct ctl_table *table, int write, void *buffer, in proc_do_cad_pid() argument
1339 r = __do_proc_dointvec(&tmp, table, write, buffer, in proc_do_cad_pid()
1341 if (r || !write) in proc_do_cad_pid()
1346 return -ESRCH; in proc_do_cad_pid()
1353 * proc_do_large_bitmap - read/write from/to a large bitmap
1355 * @write: %TRUE if this is a write to the sysctl file
1360 * The bitmap is stored at table->data and the bitmap length (in bits)
1361 * in table->maxlen.
1363 * We use a range comma separated format (e.g. 1,3-4,10-10) so that
1369 int proc_do_large_bitmap(struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1374 unsigned long bitmap_len = table->maxlen; in proc_do_large_bitmap()
1375 unsigned long *bitmap = *(unsigned long **) table->data; in proc_do_large_bitmap()
1377 char tr_a[] = { '-', ',', '\n' }, tr_b[] = { ',', '\n', 0 }, c; in proc_do_large_bitmap()
1379 if (!bitmap || !bitmap_len || !left || (*ppos && !write)) { in proc_do_large_bitmap()
1384 if (write) { in proc_do_large_bitmap()
1388 if (left > PAGE_SIZE - 1) { in proc_do_large_bitmap()
1389 left = PAGE_SIZE - 1; in proc_do_large_bitmap()
1391 skipped = *lenp - left; in proc_do_large_bitmap()
1396 return -ENOMEM; in proc_do_large_bitmap()
1403 /* In case we stop parsing mid-number, we can reset */ in proc_do_large_bitmap()
1409 * only one char is left (may be a "-"), then stop here, in proc_do_large_bitmap()
1420 err = -EINVAL; in proc_do_large_bitmap()
1427 left--; in proc_do_large_bitmap()
1430 if (c == '-') { in proc_do_large_bitmap()
1447 err = -EINVAL; in proc_do_large_bitmap()
1452 left--; in proc_do_large_bitmap()
1456 bitmap_set(tmp_bitmap, val_a, val_b - val_a + 1); in proc_do_large_bitmap()
1469 bit_a + 1) - 1; in proc_do_large_bitmap()
1475 proc_put_char(&buffer, &left, '-'); in proc_do_large_bitmap()
1485 if (write) { in proc_do_large_bitmap()
1491 *lenp -= left; in proc_do_large_bitmap()
1501 int proc_dostring(struct ctl_table *table, int write, in proc_dostring() argument
1504 return -ENOSYS; in proc_dostring()
1507 int proc_dobool(struct ctl_table *table, int write, in proc_dobool() argument
1510 return -ENOSYS; in proc_dobool()
1513 int proc_dointvec(struct ctl_table *table, int write, in proc_dointvec() argument
1516 return -ENOSYS; in proc_dointvec()
1519 int proc_douintvec(struct ctl_table *table, int write, in proc_douintvec() argument
1522 return -ENOSYS; in proc_douintvec()
1525 int proc_dointvec_minmax(struct ctl_table *table, int write, in proc_dointvec_minmax() argument
1528 return -ENOSYS; in proc_dointvec_minmax()
1531 int proc_douintvec_minmax(struct ctl_table *table, int write, in proc_douintvec_minmax() argument
1534 return -ENOSYS; in proc_douintvec_minmax()
1537 int proc_dou8vec_minmax(struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
1540 return -ENOSYS; in proc_dou8vec_minmax()
1543 int proc_dointvec_jiffies(struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1546 return -ENOSYS; in proc_dointvec_jiffies()
1549 int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1552 return -ENOSYS; in proc_dointvec_ms_jiffies_minmax()
1555 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1558 return -ENOSYS; in proc_dointvec_userhz_jiffies()
1561 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, in proc_dointvec_ms_jiffies() argument
1564 return -ENOSYS; in proc_dointvec_ms_jiffies()
1567 int proc_doulongvec_minmax(struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1570 return -ENOSYS; in proc_doulongvec_minmax()
1573 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1576 return -ENOSYS; in proc_doulongvec_ms_jiffies_minmax()
1579 int proc_do_large_bitmap(struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1582 return -ENOSYS; in proc_do_large_bitmap()
1588 int proc_do_static_key(struct ctl_table *table, int write, in proc_do_static_key() argument
1591 struct static_key *key = (struct static_key *)table->data; in proc_do_static_key()
1595 .data = &val, in proc_do_static_key()
1597 .mode = table->mode, in proc_do_static_key()
1602 if (write && !capable(CAP_SYS_ADMIN)) in proc_do_static_key()
1603 return -EPERM; in proc_do_static_key()
1607 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in proc_do_static_key()
1608 if (write && !ret) { in proc_do_static_key()
1621 .data = &panic_timeout,
1635 .data = &sysctl_writes_strict,
1644 .procname = "print-fatal-signals",
1645 .data = &print_fatal_signals,
1652 .procname = "reboot-cmd",
1653 .data = reboot_command,
1659 .procname = "stop-a",
1660 .data = &stop_a_enabled,
1666 .procname = "scons-poweroff",
1667 .data = &scons_pwroff,
1675 .procname = "tsb-ratio",
1676 .data = &sysctl_tsb_ratio,
1684 .procname = "soft-power",
1685 .data = &pwrsw_enabled,
1693 .procname = "unaligned-trap",
1694 .data = &unaligned_enabled,
1703 .data = &stack_tracer_enabled,
1712 .data = &ftrace_dump_on_oops,
1719 .data = &__disable_trace_on_warning,
1726 .data = &tracepoint_printk,
1735 .data = &modprobe_path,
1742 .data = &modules_disabled,
1754 .data = &uevent_helper,
1763 .data = NULL,
1772 .data = NULL,
1779 .procname = "threads-max",
1780 .data = NULL,
1787 .data = &overflowuid,
1796 .data = &overflowgid,
1806 .data = &show_unhandled_signals,
1814 .data = &pid_max,
1823 .data = &panic_on_oops,
1830 .data = &panic_print,
1837 .data = (void *)&ngroups_max,
1844 .data = (void *)&cap_last_cap,
1852 .data = &unknown_nmi_panic,
1863 .data = &sysctl_panic_on_stackoverflow,
1872 .data = &panic_on_unrecovered_nmi,
1879 .data = &panic_on_io_nmi,
1886 .data = &bootloader_type,
1893 .data = &bootloader_version,
1900 .data = &io_delay_type,
1909 .data = &randomize_va_space,
1918 .data = &spin_retry,
1927 .data = &acpi_realmode_flags,
1935 .procname = "ignore-unaligned-usertrap",
1936 .data = &no_unaligned_warning,
1944 .procname = "unaligned-dump-stack",
1945 .data = &unaligned_dump_stack,
1954 .data = &max_lock_depth,
1962 * User-space scripts rely on the existence of this file
1969 .data = &sysctl_perf_event_paranoid,
1976 .data = &sysctl_perf_event_mlock,
1983 .data = &sysctl_perf_event_sample_rate,
1991 .data = &sysctl_perf_cpu_time_max_percent,
2000 .data = &sysctl_perf_event_max_stack,
2009 .data = &sysctl_perf_event_max_contexts_per_stack,
2019 .data = &panic_on_warn,
2029 .data = &sysctl_panic_on_rcu_stall,
2038 .data = &sysctl_max_rcu_stall_to_panic,
2052 .data = &sysctl_overcommit_memory,
2061 .data = &sysctl_overcommit_ratio,
2068 .data = &sysctl_overcommit_kbytes,
2074 .procname = "page-cluster",
2075 .data = &page_cluster,
2084 .data = &dirtytime_expire_interval,
2092 .data = &vm_swappiness,
2102 .data = &sysctl_vm_numa_stat,
2112 .data = &sysctl_drop_caches,
2121 .data = &sysctl_page_lock_unfairness,
2130 .data = &sysctl_max_map_count,
2139 .data = &sysctl_nr_trim_pages,
2148 .data = &sysctl_vfs_cache_pressure,
2158 .data = &sysctl_legacy_va_layout,
2168 .data = &node_reclaim_mode,
2178 .data = &sysctl_stat_interval,
2185 .data = NULL,
2194 .data = &dac_mmap_min_addr,
2205 .data = &vdso32_enabled,
2208 .data = &vdso_enabled,
2218 .data = &sysctl_user_reserve_kbytes,
2225 .data = &sysctl_admin_reserve_kbytes,
2233 .data = &mmap_rnd_bits,
2244 .data = &mmap_rnd_compat_bits,
2265 * exception granted :-)