Lines Matching +full:write +full:- +full:1

1 // SPDX-License-Identifier: GPL-2.0-only
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.
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
75 const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 };
78 const unsigned long sysctl_long_vals[] = { 0, 1, LONG_MAX };
90 * enum sysctl_writes_mode - supported sysctl write modes
92 * @SYSCTL_WRITES_LEGACY: each write syscall must fully contain the sysctl value
100 * sent to the write syscall. If dealing with strings respect the file
105 * These write modes control how current file position affects the behavior of
106 * updating sysctl values through the proc interface on each write.
109 SYSCTL_WRITES_LEGACY = -1,
111 SYSCTL_WRITES_STRICT = 1,
124 static int _proc_do_string(char *data, int maxlen, int write, in _proc_do_string() argument
135 if (write) { in _proc_do_string()
139 if (len > maxlen - 1) in _proc_do_string()
140 len = maxlen - 1; in _proc_do_string()
152 while ((p - buffer) < *lenp && len < maxlen - 1) { in _proc_do_string()
170 len -= *ppos; in _proc_do_string()
190 "warning, set kernel.sysctl_writes_strict = -1\n", in warn_sysctl_write()
191 current->comm, table->procname); in warn_sysctl_write()
195 * proc_first_pos_non_zero_ignore - check if first position is allowed
199 * Returns true if the first position is non-zero and the sysctl_writes_strict
221 * proc_dostring - read a string sysctl
223 * @write: %TRUE if this is a write to the sysctl file
230 * string is truncated. The copied string is %NULL-terminated.
237 int proc_dostring(const struct ctl_table *table, int write, in proc_dostring() argument
240 if (write) in proc_dostring()
243 return _proc_do_string(table->data, table->maxlen, write, buffer, lenp, in proc_dostring()
252 (*size)--; in proc_skip_spaces()
262 (*size)--; in proc_skip_char()
268 * strtoul_lenient - parse an ASCII formatted integer from a buffer and only
291 return -ERANGE; in strtoul_lenient()
304 * proc_get_long - reads an ASCII formatted integer from a user buffer
315 * the amount of bytes read. If @tr is non-NULL and a trailing
316 * character exists (size is non-zero after returning from this
327 return -EINVAL; in proc_get_long()
329 if (len > TMPBUFLEN - 1) in proc_get_long()
330 len = TMPBUFLEN - 1; in proc_get_long()
336 if (*p == '-' && *size > 1) { in proc_get_long()
342 return -EINVAL; in proc_get_long()
345 return -EINVAL; in proc_get_long()
347 len = p - tmp; in proc_get_long()
351 * (e.g. 123...1). So lets not allow such large numbers. */ in proc_get_long()
352 if (len == TMPBUFLEN - 1) in proc_get_long()
353 return -EINVAL; in proc_get_long()
356 return -EINVAL; in proc_get_long()
362 *size -= len; in proc_get_long()
368 * proc_put_long - converts an integer to a decimal ASCII formatted string
383 sprintf(p, "%s%lu", neg ? "-" : "", val); in proc_put_long()
388 *size -= len; in proc_put_long()
399 (*size)--; in proc_put_char()
407 int write, void *data) in do_proc_dointvec_conv() argument
409 if (write) { in do_proc_dointvec_conv()
411 if (*lvalp > (unsigned long) INT_MAX + 1) in do_proc_dointvec_conv()
412 return -EINVAL; in do_proc_dointvec_conv()
413 WRITE_ONCE(*valp, -*lvalp); in do_proc_dointvec_conv()
416 return -EINVAL; in do_proc_dointvec_conv()
423 *lvalp = -(unsigned long)val; in do_proc_dointvec_conv()
434 int write, void *data) in do_proc_douintvec_conv() argument
436 if (write) { in do_proc_douintvec_conv()
438 return -EINVAL; in do_proc_douintvec_conv()
450 int write, void *buffer, in __do_proc_dointvec() argument
453 int write, void *data), in __do_proc_dointvec()
456 int *i, vleft, first = 1, err = 0; in __do_proc_dointvec()
460 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_dointvec()
466 vleft = table->maxlen / sizeof(*i); in __do_proc_dointvec()
472 if (write) { in __do_proc_dointvec()
476 if (left > PAGE_SIZE - 1) in __do_proc_dointvec()
477 left = PAGE_SIZE - 1; in __do_proc_dointvec()
481 for (; left && vleft--; i++, first=0) { in __do_proc_dointvec()
485 if (write) { in __do_proc_dointvec()
495 if (conv(&neg, &lval, i, 1, data)) { in __do_proc_dointvec()
496 err = -EINVAL; in __do_proc_dointvec()
501 err = -EINVAL; in __do_proc_dointvec()
510 if (!write && !first && left && !err) in __do_proc_dointvec()
512 if (write && !err && left) in __do_proc_dointvec()
514 if (write && first) in __do_proc_dointvec()
515 return err ? : -EINVAL; in __do_proc_dointvec()
516 *lenp -= left; in __do_proc_dointvec()
522 static int do_proc_dointvec(const struct ctl_table *table, int write, in do_proc_dointvec() argument
525 int write, void *data), in do_proc_dointvec()
528 return __do_proc_dointvec(table->data, table, write, in do_proc_dointvec()
538 int write, void *data), in do_proc_douintvec_w() argument
552 if (left > PAGE_SIZE - 1) in do_proc_douintvec_w()
553 left = PAGE_SIZE - 1; in do_proc_douintvec_w()
557 err = -EINVAL; in do_proc_douintvec_w()
565 err = -EINVAL; in do_proc_douintvec_w()
569 if (conv(&lval, tbl_data, 1, data)) { in do_proc_douintvec_w()
570 err = -EINVAL; in do_proc_douintvec_w()
579 return -EINVAL; in do_proc_douintvec_w()
593 int write, void *data), in do_proc_douintvec_r() argument
603 err = -EINVAL; in do_proc_douintvec_r()
614 *lenp -= left; in do_proc_douintvec_r()
621 int write, void *buffer, in __do_proc_douintvec() argument
625 int write, void *data), in __do_proc_douintvec()
630 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_douintvec()
636 vleft = table->maxlen / sizeof(*i); in __do_proc_douintvec()
642 if (vleft != 1) { in __do_proc_douintvec()
644 return -EINVAL; in __do_proc_douintvec()
650 if (write) in __do_proc_douintvec()
656 int do_proc_douintvec(const struct ctl_table *table, int write, in do_proc_douintvec() argument
660 int write, void *data), in do_proc_douintvec()
663 return __do_proc_douintvec(table->data, table, write, in do_proc_douintvec()
668 * proc_dobool - read/write a bool
670 * @write: %TRUE if this is a write to the sysctl file
678 * table->data must point to a bool variable and table->maxlen must
683 int proc_dobool(const struct ctl_table *table, int write, void *buffer, in proc_dobool() argument
687 bool *data = table->data; in proc_dobool()
691 if (table->maxlen != sizeof(bool)) in proc_dobool()
692 return -EINVAL; in proc_dobool()
699 res = proc_dointvec(&tmp, write, buffer, lenp, ppos); in proc_dobool()
702 if (write) in proc_dobool()
708 * proc_dointvec - read a vector of integers
710 * @write: %TRUE if this is a write to the sysctl file
715 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
720 int proc_dointvec(const struct ctl_table *table, int write, void *buffer, in proc_dointvec() argument
723 return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL); in proc_dointvec()
727 * proc_douintvec - read a vector of unsigned integers
729 * @write: %TRUE if this is a write to the sysctl file
734 * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
739 int proc_douintvec(const struct ctl_table *table, int write, void *buffer, in proc_douintvec() argument
742 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec()
750 static int proc_taint(const struct ctl_table *table, int write, in proc_taint() argument
757 if (write && !capable(CAP_SYS_ADMIN)) in proc_taint()
758 return -EPERM; in proc_taint()
762 err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos); in proc_taint()
766 if (write) { in proc_taint()
775 return -EINVAL; in proc_taint()
782 if ((1UL << i) & tmptaint) in proc_taint()
790 * struct do_proc_dointvec_minmax_conv_param - proc_dointvec_minmax() range checking structure
805 int write, void *data) in do_proc_dointvec_minmax_conv() argument
811 * bounds-check it before touching *valp. in do_proc_dointvec_minmax_conv()
813 int *ip = write ? &tmp : valp; in do_proc_dointvec_minmax_conv()
815 ret = do_proc_dointvec_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_minmax_conv()
819 if (write) { in do_proc_dointvec_minmax_conv()
820 if ((param->min && *param->min > tmp) || in do_proc_dointvec_minmax_conv()
821 (param->max && *param->max < tmp)) in do_proc_dointvec_minmax_conv()
822 return -EINVAL; in do_proc_dointvec_minmax_conv()
830 * proc_dointvec_minmax - read a vector of integers with min/max values
832 * @write: %TRUE if this is a write to the sysctl file
837 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
841 * table->extra1 (min) and table->extra2 (max).
843 * Returns 0 on success or -EINVAL on write when the range check fails.
845 int proc_dointvec_minmax(const struct ctl_table *table, int write, in proc_dointvec_minmax() argument
849 .min = (int *) table->extra1, in proc_dointvec_minmax()
850 .max = (int *) table->extra2, in proc_dointvec_minmax()
852 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_minmax()
857 * struct do_proc_douintvec_minmax_conv_param - proc_douintvec_minmax() range checking structure
872 int write, void *data) in do_proc_douintvec_minmax_conv() argument
877 /* write via temporary local uint for bounds-checking */ in do_proc_douintvec_minmax_conv()
878 unsigned int *up = write ? &tmp : valp; in do_proc_douintvec_minmax_conv()
880 ret = do_proc_douintvec_conv(lvalp, up, write, data); in do_proc_douintvec_minmax_conv()
884 if (write) { in do_proc_douintvec_minmax_conv()
885 if ((param->min && *param->min > tmp) || in do_proc_douintvec_minmax_conv()
886 (param->max && *param->max < tmp)) in do_proc_douintvec_minmax_conv()
887 return -ERANGE; in do_proc_douintvec_minmax_conv()
896 * proc_douintvec_minmax - read a vector of unsigned ints with min/max values
898 * @write: %TRUE if this is a write to the sysctl file
903 * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
908 * table->extra1 (min) and table->extra2 (max). There is a final sanity
912 * Returns 0 on success or -ERANGE on write when the range check fails.
914 int proc_douintvec_minmax(const struct ctl_table *table, int write, in proc_douintvec_minmax() argument
918 .min = (unsigned int *) table->extra1, in proc_douintvec_minmax()
919 .max = (unsigned int *) table->extra2, in proc_douintvec_minmax()
921 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec_minmax()
926 * proc_dou8vec_minmax - read a vector of unsigned chars with min/max values
928 * @write: %TRUE if this is a write to the sysctl file
933 * Reads/writes up to table->maxlen/sizeof(u8) unsigned chars
938 * table->extra1 (min) and table->extra2 (max).
940 * Returns 0 on success or an error on write when the range check fails.
942 int proc_dou8vec_minmax(const struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
947 u8 *data = table->data; in proc_dou8vec_minmax()
955 if (table->maxlen != sizeof(u8)) in proc_dou8vec_minmax()
956 return -EINVAL; in proc_dou8vec_minmax()
958 if (table->extra1) in proc_dou8vec_minmax()
959 min = *(unsigned int *) table->extra1; in proc_dou8vec_minmax()
960 if (table->extra2) in proc_dou8vec_minmax()
961 max = *(unsigned int *) table->extra2; in proc_dou8vec_minmax()
968 res = do_proc_douintvec(&tmp, write, buffer, lenp, ppos, in proc_dou8vec_minmax()
972 if (write) in proc_dou8vec_minmax()
979 static int sysrq_sysctl_handler(const struct ctl_table *table, int write, in sysrq_sysctl_handler() argument
986 ret = __do_proc_dointvec(&tmp, table, write, buffer, in sysrq_sysctl_handler()
988 if (ret || !write) in sysrq_sysctl_handler()
991 if (write) in sysrq_sysctl_handler()
999 const struct ctl_table *table, int write, in __do_proc_doulongvec_minmax() argument
1004 int vleft, first = 1, err = 0; in __do_proc_doulongvec_minmax()
1008 if (!data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_doulongvec_minmax()
1014 min = table->extra1; in __do_proc_doulongvec_minmax()
1015 max = table->extra2; in __do_proc_doulongvec_minmax()
1016 vleft = table->maxlen / sizeof(unsigned long); in __do_proc_doulongvec_minmax()
1019 if (write) { in __do_proc_doulongvec_minmax()
1023 if (left > PAGE_SIZE - 1) in __do_proc_doulongvec_minmax()
1024 left = PAGE_SIZE - 1; in __do_proc_doulongvec_minmax()
1028 for (; left && vleft--; i++, first = 0) { in __do_proc_doulongvec_minmax()
1031 if (write) { in __do_proc_doulongvec_minmax()
1042 err = -EINVAL; in __do_proc_doulongvec_minmax()
1048 err = -EINVAL; in __do_proc_doulongvec_minmax()
1060 if (!write && !first && left && !err) in __do_proc_doulongvec_minmax()
1062 if (write && !err) in __do_proc_doulongvec_minmax()
1064 if (write && first) in __do_proc_doulongvec_minmax()
1065 return err ? : -EINVAL; in __do_proc_doulongvec_minmax()
1066 *lenp -= left; in __do_proc_doulongvec_minmax()
1072 static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, in do_proc_doulongvec_minmax() argument
1076 return __do_proc_doulongvec_minmax(table->data, table, write, in do_proc_doulongvec_minmax()
1081 * proc_doulongvec_minmax - read a vector of long integers with min/max values
1083 * @write: %TRUE if this is a write to the sysctl file
1088 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
1092 * table->extra1 (min) and table->extra2 (max).
1096 int proc_doulongvec_minmax(const struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1099 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); in proc_doulongvec_minmax()
1103 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values 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
1115 * table->extra1 (min) and table->extra2 (max).
1119 int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1122 return do_proc_doulongvec_minmax(table, write, buffer, in proc_doulongvec_ms_jiffies_minmax()
1129 int write, void *data) in do_proc_dointvec_jiffies_conv() argument
1131 if (write) { in do_proc_dointvec_jiffies_conv()
1133 return 1; in do_proc_dointvec_jiffies_conv()
1135 WRITE_ONCE(*valp, -*lvalp * HZ); in do_proc_dointvec_jiffies_conv()
1143 lval = -(unsigned long)val; in do_proc_dointvec_jiffies_conv()
1155 int write, void *data) in do_proc_dointvec_userhz_jiffies_conv() argument
1157 if (write) { in do_proc_dointvec_userhz_jiffies_conv()
1159 return 1; in do_proc_dointvec_userhz_jiffies_conv()
1160 *valp = clock_t_to_jiffies(*negp ? -*lvalp : *lvalp); in do_proc_dointvec_userhz_jiffies_conv()
1166 lval = -(unsigned long)val; in do_proc_dointvec_userhz_jiffies_conv()
1178 int write, void *data) in do_proc_dointvec_ms_jiffies_conv() argument
1180 if (write) { in do_proc_dointvec_ms_jiffies_conv()
1181 unsigned long jif = msecs_to_jiffies(*negp ? -*lvalp : *lvalp); in do_proc_dointvec_ms_jiffies_conv()
1184 return 1; in do_proc_dointvec_ms_jiffies_conv()
1191 lval = -(unsigned long)val; in do_proc_dointvec_ms_jiffies_conv()
1202 int *valp, int write, void *data) in do_proc_dointvec_ms_jiffies_minmax_conv() argument
1208 * bounds-check it before touching *valp. in do_proc_dointvec_ms_jiffies_minmax_conv()
1210 int *ip = write ? &tmp : valp; in do_proc_dointvec_ms_jiffies_minmax_conv()
1212 ret = do_proc_dointvec_ms_jiffies_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_ms_jiffies_minmax_conv()
1216 if (write) { in do_proc_dointvec_ms_jiffies_minmax_conv()
1217 if ((param->min && *param->min > tmp) || in do_proc_dointvec_ms_jiffies_minmax_conv()
1218 (param->max && *param->max < tmp)) in do_proc_dointvec_ms_jiffies_minmax_conv()
1219 return -EINVAL; in do_proc_dointvec_ms_jiffies_minmax_conv()
1226 * proc_dointvec_jiffies - read a vector of integers as seconds
1228 * @write: %TRUE if this is a write to the sysctl file
1233 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1240 int proc_dointvec_jiffies(const struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1243 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_jiffies()
1247 int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1251 .min = (int *) table->extra1, in proc_dointvec_ms_jiffies_minmax()
1252 .max = (int *) table->extra2, in proc_dointvec_ms_jiffies_minmax()
1254 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies_minmax()
1259 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds
1261 * @write: %TRUE if this is a write to the sysctl file
1266 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1268 * The values read are assumed to be in 1/USER_HZ seconds, and
1273 int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1276 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_userhz_jiffies()
1281 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds
1283 * @write: %TRUE if this is a write to the sysctl file
1288 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
1290 * The values read are assumed to be in 1/1000 seconds, and
1295 int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, void *buffer, in proc_dointvec_ms_jiffies() argument
1298 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies()
1302 static int proc_do_cad_pid(const struct ctl_table *table, int write, void *buffer, in proc_do_cad_pid() argument
1311 r = __do_proc_dointvec(&tmp, table, write, buffer, in proc_do_cad_pid()
1313 if (r || !write) in proc_do_cad_pid()
1318 return -ESRCH; in proc_do_cad_pid()
1325 * proc_do_large_bitmap - read/write from/to a large bitmap
1327 * @write: %TRUE if this is a write to the sysctl file
1332 * The bitmap is stored at table->data and the bitmap length (in bits)
1333 * in table->maxlen.
1335 * We use a range comma separated format (e.g. 1,3-4,10-10) so that
1341 int proc_do_large_bitmap(const struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1346 unsigned long bitmap_len = table->maxlen; in proc_do_large_bitmap()
1347 unsigned long *bitmap = *(unsigned long **) table->data; in proc_do_large_bitmap()
1349 char tr_a[] = { '-', ',', '\n' }, tr_b[] = { ',', '\n', 0 }, c; in proc_do_large_bitmap()
1351 if (!bitmap || !bitmap_len || !left || (*ppos && !write)) { in proc_do_large_bitmap()
1356 if (write) { in proc_do_large_bitmap()
1360 if (left > PAGE_SIZE - 1) { in proc_do_large_bitmap()
1361 left = PAGE_SIZE - 1; in proc_do_large_bitmap()
1363 skipped = *lenp - left; in proc_do_large_bitmap()
1368 return -ENOMEM; in proc_do_large_bitmap()
1375 /* In case we stop parsing mid-number, we can reset */ in proc_do_large_bitmap()
1381 * only one char is left (may be a "-"), then stop here, in proc_do_large_bitmap()
1384 if ((left <= 1) && skipped) { in proc_do_large_bitmap()
1392 err = -EINVAL; in proc_do_large_bitmap()
1399 left--; in proc_do_large_bitmap()
1402 if (c == '-') { in proc_do_large_bitmap()
1419 err = -EINVAL; in proc_do_large_bitmap()
1424 left--; in proc_do_large_bitmap()
1428 bitmap_set(tmp_bitmap, val_a, val_b - val_a + 1); in proc_do_large_bitmap()
1434 bool first = 1; in proc_do_large_bitmap()
1441 bit_a + 1) - 1; in proc_do_large_bitmap()
1447 proc_put_char(&buffer, &left, '-'); in proc_do_large_bitmap()
1457 if (write) { in proc_do_large_bitmap()
1463 *lenp -= left; in proc_do_large_bitmap()
1473 int proc_dostring(const struct ctl_table *table, int write, in proc_dostring() argument
1476 return -ENOSYS; in proc_dostring()
1479 int proc_dobool(const struct ctl_table *table, int write, in proc_dobool() argument
1482 return -ENOSYS; in proc_dobool()
1485 int proc_dointvec(const struct ctl_table *table, int write, in proc_dointvec() argument
1488 return -ENOSYS; in proc_dointvec()
1491 int proc_douintvec(const struct ctl_table *table, int write, in proc_douintvec() argument
1494 return -ENOSYS; in proc_douintvec()
1497 int proc_dointvec_minmax(const struct ctl_table *table, int write, in proc_dointvec_minmax() argument
1500 return -ENOSYS; in proc_dointvec_minmax()
1503 int proc_douintvec_minmax(const struct ctl_table *table, int write, in proc_douintvec_minmax() argument
1506 return -ENOSYS; in proc_douintvec_minmax()
1509 int proc_dou8vec_minmax(const struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
1512 return -ENOSYS; in proc_dou8vec_minmax()
1515 int proc_dointvec_jiffies(const struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1518 return -ENOSYS; in proc_dointvec_jiffies()
1521 int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1524 return -ENOSYS; in proc_dointvec_ms_jiffies_minmax()
1527 int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1530 return -ENOSYS; in proc_dointvec_userhz_jiffies()
1533 int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies() argument
1536 return -ENOSYS; in proc_dointvec_ms_jiffies()
1539 int proc_doulongvec_minmax(const struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1542 return -ENOSYS; in proc_doulongvec_minmax()
1545 int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1548 return -ENOSYS; in proc_doulongvec_ms_jiffies_minmax()
1551 int proc_do_large_bitmap(const struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1554 return -ENOSYS; in proc_do_large_bitmap()
1560 int proc_do_static_key(const struct ctl_table *table, int write, in proc_do_static_key() argument
1563 struct static_key *key = (struct static_key *)table->data; in proc_do_static_key()
1569 .mode = table->mode, in proc_do_static_key()
1574 if (write && !capable(CAP_SYS_ADMIN)) in proc_do_static_key()
1575 return -EPERM; in proc_do_static_key()
1579 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in proc_do_static_key()
1580 if (write && !ret) { in proc_do_static_key()
1616 .procname = "print-fatal-signals",
1624 .procname = "reboot-cmd",
1631 .procname = "stop-a",
1638 .procname = "scons-poweroff",
1647 .procname = "tsb-ratio",
1656 .procname = "soft-power",
1665 .procname = "unaligned-trap",
1717 /* only handle a transition from default "0" to "1" */
1751 .procname = "threads-max",
1824 .procname = "ignore-unaligned-usertrap",
1880 * exception granted :-)