Lines Matching refs:write

200 static int bpf_stats_handler(struct ctl_table *table, int write,  in bpf_stats_handler()  argument
214 if (write && !capable(CAP_SYS_ADMIN)) in bpf_stats_handler()
219 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in bpf_stats_handler()
220 if (write && !ret && val != saved_val) { in bpf_stats_handler()
231 static int bpf_unpriv_handler(struct ctl_table *table, int write, in bpf_unpriv_handler() argument
238 if (write && !capable(CAP_SYS_ADMIN)) in bpf_unpriv_handler()
242 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in bpf_unpriv_handler()
243 if (write && !ret) { in bpf_unpriv_handler()
258 static int _proc_do_string(char *data, int maxlen, int write, in _proc_do_string() argument
269 if (write) { in _proc_do_string()
371 int proc_dostring(struct ctl_table *table, int write, in proc_dostring() argument
374 if (write) in proc_dostring()
377 return _proc_do_string(table->data, table->maxlen, write, buffer, lenp, in proc_dostring()
541 int write, void *data) in do_proc_dobool_conv() argument
543 if (write) { in do_proc_dobool_conv()
556 int write, void *data) in do_proc_dointvec_conv() argument
558 if (write) { in do_proc_dointvec_conv()
583 int write, void *data) in do_proc_douintvec_conv() argument
585 if (write) { in do_proc_douintvec_conv()
599 int write, void *buffer, in __do_proc_dointvec() argument
602 int write, void *data), in __do_proc_dointvec()
609 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_dointvec()
621 if (write) { in __do_proc_dointvec()
634 if (write) { in __do_proc_dointvec()
659 if (!write && !first && left && !err) in __do_proc_dointvec()
661 if (write && !err && left) in __do_proc_dointvec()
663 if (write && first) in __do_proc_dointvec()
671 static int do_proc_dointvec(struct ctl_table *table, int write, in do_proc_dointvec() argument
674 int write, void *data), in do_proc_dointvec()
677 return __do_proc_dointvec(table->data, table, write, in do_proc_dointvec()
687 int write, void *data), in do_proc_douintvec_w() argument
742 int write, void *data), in do_proc_douintvec_r() argument
770 int write, void *buffer, in __do_proc_douintvec() argument
774 int write, void *data), in __do_proc_douintvec()
779 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_douintvec()
799 if (write) in __do_proc_douintvec()
805 static int do_proc_douintvec(struct ctl_table *table, int write, in do_proc_douintvec() argument
809 int write, void *data), in do_proc_douintvec()
812 return __do_proc_douintvec(table->data, table, write, in do_proc_douintvec()
829 int proc_dobool(struct ctl_table *table, int write, void *buffer, in proc_dobool() argument
832 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dobool()
849 int proc_dointvec(struct ctl_table *table, int write, void *buffer, in proc_dointvec() argument
852 return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL); in proc_dointvec()
857 int write, void *buffer, size_t *lenp, loff_t *ppos) in proc_dointvec_minmax_warn_RT_change() argument
861 if (!IS_ENABLED(CONFIG_PREEMPT_RT) || !write) in proc_dointvec_minmax_warn_RT_change()
862 return proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_dointvec_minmax_warn_RT_change()
865 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_dointvec_minmax_warn_RT_change()
889 int proc_douintvec(struct ctl_table *table, int write, void *buffer, in proc_douintvec() argument
892 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec()
900 static int proc_taint(struct ctl_table *table, int write, in proc_taint() argument
907 if (write && !capable(CAP_SYS_ADMIN)) in proc_taint()
912 err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos); in proc_taint()
916 if (write) { in proc_taint()
940 static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, in proc_dointvec_minmax_sysadmin() argument
943 if (write && !capable(CAP_SYS_ADMIN)) in proc_dointvec_minmax_sysadmin()
946 return proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_dointvec_minmax_sysadmin()
966 int write, void *data) in do_proc_dointvec_minmax_conv() argument
974 int *ip = write ? &tmp : valp; in do_proc_dointvec_minmax_conv()
976 ret = do_proc_dointvec_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_minmax_conv()
980 if (write) { in do_proc_dointvec_minmax_conv()
1006 int proc_dointvec_minmax(struct ctl_table *table, int write, in proc_dointvec_minmax() argument
1013 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_minmax()
1033 int write, void *data) in do_proc_douintvec_minmax_conv() argument
1039 unsigned int *up = write ? &tmp : valp; in do_proc_douintvec_minmax_conv()
1041 ret = do_proc_douintvec_conv(lvalp, up, write, data); in do_proc_douintvec_minmax_conv()
1045 if (write) { in do_proc_douintvec_minmax_conv()
1075 int proc_douintvec_minmax(struct ctl_table *table, int write, in proc_douintvec_minmax() argument
1082 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec_minmax()
1103 int proc_dou8vec_minmax(struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
1135 res = do_proc_douintvec(&tmp, write, buffer, lenp, ppos, in proc_dou8vec_minmax()
1139 if (write) in proc_dou8vec_minmax()
1147 int write, void *data) in do_proc_dopipe_max_size_conv() argument
1149 if (write) { in do_proc_dopipe_max_size_conv()
1165 static int proc_dopipe_max_size(struct ctl_table *table, int write, in proc_dopipe_max_size() argument
1168 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_dopipe_max_size()
1186 static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write, in proc_dointvec_minmax_coredump() argument
1189 int error = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_dointvec_minmax_coredump()
1196 static int proc_dostring_coredump(struct ctl_table *table, int write, in proc_dostring_coredump() argument
1199 int error = proc_dostring(table, write, buffer, lenp, ppos); in proc_dostring_coredump()
1207 static int sysrq_sysctl_handler(struct ctl_table *table, int write, in sysrq_sysctl_handler() argument
1214 ret = __do_proc_dointvec(&tmp, table, write, buffer, in sysrq_sysctl_handler()
1216 if (ret || !write) in sysrq_sysctl_handler()
1219 if (write) in sysrq_sysctl_handler()
1227 int write, void *buffer, size_t *lenp, loff_t *ppos, in __do_proc_doulongvec_minmax() argument
1235 if (!data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_doulongvec_minmax()
1246 if (write) { in __do_proc_doulongvec_minmax()
1258 if (write) { in __do_proc_doulongvec_minmax()
1286 if (!write && !first && left && !err) in __do_proc_doulongvec_minmax()
1288 if (write && !err) in __do_proc_doulongvec_minmax()
1290 if (write && first) in __do_proc_doulongvec_minmax()
1298 static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, in do_proc_doulongvec_minmax() argument
1302 return __do_proc_doulongvec_minmax(table->data, table, write, in do_proc_doulongvec_minmax()
1322 int proc_doulongvec_minmax(struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1325 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); in proc_doulongvec_minmax()
1345 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1348 return do_proc_doulongvec_minmax(table, write, buffer, in proc_doulongvec_ms_jiffies_minmax()
1355 int write, void *data) in do_proc_dointvec_jiffies_conv() argument
1357 if (write) { in do_proc_dointvec_jiffies_conv()
1378 int write, void *data) in do_proc_dointvec_userhz_jiffies_conv() argument
1380 if (write) { in do_proc_dointvec_userhz_jiffies_conv()
1401 int write, void *data) in do_proc_dointvec_ms_jiffies_conv() argument
1403 if (write) { in do_proc_dointvec_ms_jiffies_conv()
1439 int proc_dointvec_jiffies(struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1442 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_jiffies()
1461 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1464 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_userhz_jiffies()
1484 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, void *buffer, in proc_dointvec_ms_jiffies() argument
1487 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies()
1491 static int proc_do_cad_pid(struct ctl_table *table, int write, void *buffer, in proc_do_cad_pid() argument
1500 r = __do_proc_dointvec(&tmp, table, write, buffer, in proc_do_cad_pid()
1502 if (r || !write) in proc_do_cad_pid()
1530 int proc_do_large_bitmap(struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1540 if (!bitmap || !bitmap_len || !left || (*ppos && !write)) { in proc_do_large_bitmap()
1545 if (write) { in proc_do_large_bitmap()
1646 if (write) { in proc_do_large_bitmap()
1662 int proc_dostring(struct ctl_table *table, int write, in proc_dostring() argument
1668 int proc_dobool(struct ctl_table *table, int write, in proc_dobool() argument
1674 int proc_dointvec(struct ctl_table *table, int write, in proc_dointvec() argument
1680 int proc_douintvec(struct ctl_table *table, int write, in proc_douintvec() argument
1686 int proc_dointvec_minmax(struct ctl_table *table, int write, in proc_dointvec_minmax() argument
1692 int proc_douintvec_minmax(struct ctl_table *table, int write, in proc_douintvec_minmax() argument
1698 int proc_dou8vec_minmax(struct ctl_table *table, int write, in proc_dou8vec_minmax() argument
1704 int proc_dointvec_jiffies(struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
1710 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
1716 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, in proc_dointvec_ms_jiffies() argument
1722 int proc_doulongvec_minmax(struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
1728 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
1734 int proc_do_large_bitmap(struct ctl_table *table, int write, in proc_do_large_bitmap() argument
1743 int proc_do_static_key(struct ctl_table *table, int write, in proc_do_static_key() argument
1757 if (write && !capable(CAP_SYS_ADMIN)) in proc_do_static_key()
1762 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in proc_do_static_key()
1763 if (write && !ret) { in proc_do_static_key()