Lines Matching full:write

42  * enum sysctl_writes_mode - supported sysctl write modes
44 * @SYSCTL_WRITES_LEGACY: each write syscall must fully contain the sysctl value
52 * sent to the write syscall. If dealing with strings respect the file
57 * These write modes control how current file position affects the behavior of
58 * updating sysctl values through the proc interface on each write.
76 static int _proc_do_string(char *data, int maxlen, int write, in _proc_do_string() argument
87 if (write) { in _proc_do_string()
175 * @write: %TRUE if this is a write to the sysctl file
189 int proc_dostring(const struct ctl_table *table, int write, in proc_dostring() argument
192 if (write) in proc_dostring()
195 return _proc_do_string(table->data, table->maxlen, write, buffer, lenp, in proc_dostring()
359 int write, void *data) in do_proc_dointvec_conv() argument
361 if (write) { in do_proc_dointvec_conv()
386 int write, void *data) in do_proc_douintvec_conv() argument
388 if (write) { in do_proc_douintvec_conv()
402 int write, void *buffer, in __do_proc_dointvec() argument
405 int write, void *data), in __do_proc_dointvec()
412 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_dointvec()
424 if (write) { in __do_proc_dointvec()
437 if (write) { in __do_proc_dointvec()
462 if (!write && !first && left && !err) in __do_proc_dointvec()
464 if (write && !err && left) in __do_proc_dointvec()
466 if (write && first) in __do_proc_dointvec()
474 static int do_proc_dointvec(const struct ctl_table *table, int write, in do_proc_dointvec() argument
477 int write, void *data), in do_proc_dointvec()
480 return __do_proc_dointvec(table->data, table, write, in do_proc_dointvec()
490 int write, void *data), in do_proc_douintvec_w() argument
545 int write, void *data), in do_proc_douintvec_r() argument
573 int write, void *buffer, in __do_proc_douintvec() argument
577 int write, void *data), in __do_proc_douintvec()
582 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_douintvec()
602 if (write) in __do_proc_douintvec()
608 int do_proc_douintvec(const struct ctl_table *table, int write, in do_proc_douintvec() argument
612 int write, void *data), in do_proc_douintvec()
615 return __do_proc_douintvec(table->data, table, write, in do_proc_douintvec()
620 * proc_dobool - read/write a bool
622 * @write: %TRUE if this is a write to the sysctl file
635 int proc_dobool(const struct ctl_table *table, int write, void *buffer, in proc_dobool() argument
651 res = proc_dointvec(&tmp, write, buffer, lenp, ppos); in proc_dobool()
654 if (write) in proc_dobool()
662 * @write: %TRUE if this is a write to the sysctl file
672 int proc_dointvec(const struct ctl_table *table, int write, void *buffer, in proc_dointvec() argument
675 return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL); in proc_dointvec()
681 * @write: %TRUE if this is a write to the sysctl file
691 int proc_douintvec(const struct ctl_table *table, int write, void *buffer, in proc_douintvec() argument
694 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec()
714 int write, void *data) in do_proc_dointvec_minmax_conv() argument
722 int *ip = write ? &tmp : valp; in do_proc_dointvec_minmax_conv()
724 ret = do_proc_dointvec_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_minmax_conv()
728 if (write) { in do_proc_dointvec_minmax_conv()
741 * @write: %TRUE if this is a write to the sysctl file
752 * Returns 0 on success or -EINVAL on write when the range check fails.
754 int proc_dointvec_minmax(const struct ctl_table *table, int write, in proc_dointvec_minmax() argument
761 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_minmax()
781 int write, void *data) in do_proc_douintvec_minmax_conv() argument
786 /* write via temporary local uint for bounds-checking */ in do_proc_douintvec_minmax_conv()
787 unsigned int *up = write ? &tmp : valp; in do_proc_douintvec_minmax_conv()
789 ret = do_proc_douintvec_conv(lvalp, up, write, data); in do_proc_douintvec_minmax_conv()
793 if (write) { in do_proc_douintvec_minmax_conv()
807 * @write: %TRUE if this is a write to the sysctl file
821 * Returns 0 on success or -ERANGE on write when the range check fails.
823 int proc_douintvec_minmax(const struct ctl_table *table, int write, in proc_douintvec_minmax() argument
830 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec_minmax()
837 * @write: %TRUE if this is a write to the sysctl file
849 * Returns 0 on success or an error on write when the range check fails.
851 int proc_dou8vec_minmax(const struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
877 res = do_proc_douintvec(&tmp, write, buffer, lenp, ppos, in proc_dou8vec_minmax()
881 if (write) in proc_dou8vec_minmax()
888 const struct ctl_table *table, int write, in __do_proc_doulongvec_minmax() argument
897 if (!data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_doulongvec_minmax()
908 if (write) { in __do_proc_doulongvec_minmax()
920 if (write) { in __do_proc_doulongvec_minmax()
949 if (!write && !first && left && !err) in __do_proc_doulongvec_minmax()
951 if (write && !err) in __do_proc_doulongvec_minmax()
953 if (write && first) in __do_proc_doulongvec_minmax()
961 static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, in do_proc_doulongvec_minmax() argument
965 return __do_proc_doulongvec_minmax(table->data, table, write, in do_proc_doulongvec_minmax()
972 * @write: %TRUE if this is a write to the sysctl file
985 int proc_doulongvec_minmax(const struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
988 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); in proc_doulongvec_minmax()
994 * @write: %TRUE if this is a write to the sysctl file
1008 int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1011 return do_proc_doulongvec_minmax(table, write, buffer, in proc_doulongvec_ms_jiffies_minmax()
1018 int write, void *data) in do_proc_dointvec_jiffies_conv() argument
1020 if (write) { in do_proc_dointvec_jiffies_conv()
1044 int write, void *data) in do_proc_dointvec_userhz_jiffies_conv() argument
1046 if (write) { in do_proc_dointvec_userhz_jiffies_conv()
1067 int write, void *data) in do_proc_dointvec_ms_jiffies_conv() argument
1069 if (write) { in do_proc_dointvec_ms_jiffies_conv()
1091 int *valp, int write, void *data) in do_proc_dointvec_ms_jiffies_minmax_conv() argument
1099 int *ip = write ? &tmp : valp; in do_proc_dointvec_ms_jiffies_minmax_conv()
1101 ret = do_proc_dointvec_ms_jiffies_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_ms_jiffies_minmax_conv()
1105 if (write) { in do_proc_dointvec_ms_jiffies_minmax_conv()
1117 * @write: %TRUE if this is a write to the sysctl file
1129 int proc_dointvec_jiffies(const struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1132 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_jiffies()
1136 int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1143 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies_minmax()
1150 * @write: %TRUE if this is a write to the sysctl file
1162 int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1165 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_userhz_jiffies()
1172 * @write: %TRUE if this is a write to the sysctl file
1184 int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, void *buffer, in proc_dointvec_ms_jiffies() argument
1187 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies()
1192 * proc_do_large_bitmap - read/write from/to a large bitmap
1194 * @write: %TRUE if this is a write to the sysctl file
1208 int proc_do_large_bitmap(const struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1218 if (!bitmap || !bitmap_len || !left || (*ppos && !write)) { in proc_do_large_bitmap()
1223 if (write) { in proc_do_large_bitmap()
1324 if (write) { in proc_do_large_bitmap()
1340 int proc_dostring(const struct ctl_table *table, int write, in proc_dostring() argument
1346 int proc_dobool(const struct ctl_table *table, int write, in proc_dobool() argument
1352 int proc_dointvec(const struct ctl_table *table, int write, in proc_dointvec() argument
1358 int proc_douintvec(const struct ctl_table *table, int write, in proc_douintvec() argument
1364 int proc_dointvec_minmax(const struct ctl_table *table, int write, in proc_dointvec_minmax() argument
1370 int proc_douintvec_minmax(const struct ctl_table *table, int write, in proc_douintvec_minmax() argument
1376 int proc_dou8vec_minmax(const struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
1382 int proc_dointvec_jiffies(const struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1388 int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies_minmax() argument
1394 int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1400 int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, in proc_dointvec_ms_jiffies() argument
1406 int proc_doulongvec_minmax(const struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1412 int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1418 int proc_do_large_bitmap(const struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1427 int proc_do_static_key(const struct ctl_table *table, int write, in proc_do_static_key() argument
1441 if (write && !capable(CAP_SYS_ADMIN)) in proc_do_static_key()
1446 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in proc_do_static_key()
1447 if (write && !ret) { in proc_do_static_key()