Lines Matching full:write
185 * enum sysctl_writes_mode - supported sysctl write modes
187 * @SYSCTL_WRITES_LEGACY: each write syscall must fully contain the sysctl value
195 * sent to the write syscall. If dealing with strings respect the file
200 * These write modes control how current file position affects the behavior of
201 * updating sysctl values through the proc interface on each write.
211 static int proc_do_cad_pid(struct ctl_table *table, int write,
213 static int proc_taint(struct ctl_table *table, int write,
218 static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
222 static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write,
225 static int proc_dostring_coredump(struct ctl_table *table, int write,
228 static int proc_dopipe_max_size(struct ctl_table *table, int write,
235 static int sysrq_sysctl_handler(struct ctl_table *table, int write, in sysrq_sysctl_handler() argument
241 error = proc_dointvec(table, write, buffer, lenp, ppos); in sysrq_sysctl_handler()
245 if (write) in sysrq_sysctl_handler()
2000 static int _proc_do_string(char *data, int maxlen, int write, in _proc_do_string() argument
2013 if (write) { in _proc_do_string()
2104 * @write: %TRUE if this is a write to the sysctl file
2118 int proc_dostring(struct ctl_table *table, int write, in proc_dostring() argument
2121 if (write) in proc_dostring()
2124 return _proc_do_string((char *)(table->data), table->maxlen, write, in proc_dostring()
2291 int write, void *data) in do_proc_dointvec_conv() argument
2293 if (write) { in do_proc_dointvec_conv()
2318 int write, void *data) in do_proc_douintvec_conv() argument
2320 if (write) { in do_proc_douintvec_conv()
2334 int write, void __user *buffer, in __do_proc_dointvec() argument
2337 int write, void *data), in __do_proc_dointvec()
2344 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_dointvec()
2356 if (write) { in __do_proc_dointvec()
2371 if (write) { in __do_proc_dointvec()
2400 if (!write && !first && left && !err) in __do_proc_dointvec()
2402 if (write && !err && left) in __do_proc_dointvec()
2404 if (write) { in __do_proc_dointvec()
2415 static int do_proc_dointvec(struct ctl_table *table, int write, in do_proc_dointvec() argument
2418 int write, void *data), in do_proc_dointvec()
2421 return __do_proc_dointvec(table->data, table, write, in do_proc_dointvec()
2431 int write, void *data), in do_proc_douintvec_w() argument
2491 int write, void *data), in do_proc_douintvec_r() argument
2519 int write, void __user *buffer, in __do_proc_douintvec() argument
2523 int write, void *data), in __do_proc_douintvec()
2528 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_douintvec()
2548 if (write) in __do_proc_douintvec()
2554 static int do_proc_douintvec(struct ctl_table *table, int write, in do_proc_douintvec() argument
2558 int write, void *data), in do_proc_douintvec()
2561 return __do_proc_douintvec(table->data, table, write, in do_proc_douintvec()
2568 * @write: %TRUE if this is a write to the sysctl file
2578 int proc_dointvec(struct ctl_table *table, int write, in proc_dointvec() argument
2581 return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL); in proc_dointvec()
2587 * @write: %TRUE if this is a write to the sysctl file
2597 int proc_douintvec(struct ctl_table *table, int write, in proc_douintvec() argument
2600 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec()
2608 static int proc_taint(struct ctl_table *table, int write, in proc_taint() argument
2615 if (write && !capable(CAP_SYS_ADMIN)) in proc_taint()
2620 err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos); in proc_taint()
2624 if (write) { in proc_taint()
2640 static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, in proc_dointvec_minmax_sysadmin() argument
2643 if (write && !capable(CAP_SYS_ADMIN)) in proc_dointvec_minmax_sysadmin()
2646 return proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_dointvec_minmax_sysadmin()
2666 int write, void *data) in do_proc_dointvec_minmax_conv() argument
2674 int *ip = write ? &tmp : valp; in do_proc_dointvec_minmax_conv()
2676 ret = do_proc_dointvec_conv(negp, lvalp, ip, write, data); in do_proc_dointvec_minmax_conv()
2680 if (write) { in do_proc_dointvec_minmax_conv()
2693 * @write: %TRUE if this is a write to the sysctl file
2704 * Returns 0 on success or -EINVAL on write when the range check fails.
2706 int proc_dointvec_minmax(struct ctl_table *table, int write, in proc_dointvec_minmax() argument
2713 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_minmax()
2733 int write, void *data) in do_proc_douintvec_minmax_conv() argument
2738 /* write via temporary local uint for bounds-checking */ in do_proc_douintvec_minmax_conv()
2739 unsigned int *up = write ? &tmp : valp; in do_proc_douintvec_minmax_conv()
2741 ret = do_proc_douintvec_conv(lvalp, up, write, data); in do_proc_douintvec_minmax_conv()
2745 if (write) { in do_proc_douintvec_minmax_conv()
2759 * @write: %TRUE if this is a write to the sysctl file
2773 * Returns 0 on success or -ERANGE on write when the range check fails.
2775 int proc_douintvec_minmax(struct ctl_table *table, int write, in proc_douintvec_minmax() argument
2782 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_douintvec_minmax()
2788 int write, void *data) in do_proc_dopipe_max_size_conv() argument
2790 if (write) { in do_proc_dopipe_max_size_conv()
2806 static int proc_dopipe_max_size(struct ctl_table *table, int write, in proc_dopipe_max_size() argument
2809 return do_proc_douintvec(table, write, buffer, lenp, ppos, in proc_dopipe_max_size()
2827 static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write, in proc_dointvec_minmax_coredump() argument
2830 int error = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_dointvec_minmax_coredump()
2837 static int proc_dostring_coredump(struct ctl_table *table, int write, in proc_dostring_coredump() argument
2840 int error = proc_dostring(table, write, buffer, lenp, ppos); in proc_dostring_coredump()
2847 static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, in __do_proc_doulongvec_minmax() argument
2858 if (!data || !table->maxlen || !*lenp || (*ppos && !write)) { in __do_proc_doulongvec_minmax()
2869 if (write) { in __do_proc_doulongvec_minmax()
2883 if (write) { in __do_proc_doulongvec_minmax()
2916 if (!write && !first && left && !err) in __do_proc_doulongvec_minmax()
2918 if (write && !err) in __do_proc_doulongvec_minmax()
2920 if (write) { in __do_proc_doulongvec_minmax()
2931 static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, in do_proc_doulongvec_minmax() argument
2937 return __do_proc_doulongvec_minmax(table->data, table, write, in do_proc_doulongvec_minmax()
2944 * @write: %TRUE if this is a write to the sysctl file
2957 int proc_doulongvec_minmax(struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
2960 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); in proc_doulongvec_minmax()
2966 * @write: %TRUE if this is a write to the sysctl file
2980 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
2984 return do_proc_doulongvec_minmax(table, write, buffer, in proc_doulongvec_ms_jiffies_minmax()
2991 int write, void *data) in do_proc_dointvec_jiffies_conv() argument
2993 if (write) { in do_proc_dointvec_jiffies_conv()
3014 int write, void *data) in do_proc_dointvec_userhz_jiffies_conv() argument
3016 if (write) { in do_proc_dointvec_userhz_jiffies_conv()
3037 int write, void *data) in do_proc_dointvec_ms_jiffies_conv() argument
3039 if (write) { in do_proc_dointvec_ms_jiffies_conv()
3063 * @write: %TRUE if this is a write to the sysctl file
3075 int proc_dointvec_jiffies(struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
3078 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_jiffies()
3085 * @write: %TRUE if this is a write to the sysctl file
3097 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
3100 return do_proc_dointvec(table,write,buffer,lenp,ppos, in proc_dointvec_userhz_jiffies()
3107 * @write: %TRUE if this is a write to the sysctl file
3120 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, in proc_dointvec_ms_jiffies() argument
3123 return do_proc_dointvec(table, write, buffer, lenp, ppos, in proc_dointvec_ms_jiffies()
3127 static int proc_do_cad_pid(struct ctl_table *table, int write, in proc_do_cad_pid() argument
3136 r = __do_proc_dointvec(&tmp, table, write, buffer, in proc_do_cad_pid()
3138 if (r || !write) in proc_do_cad_pid()
3150 * proc_do_large_bitmap - read/write from/to a large bitmap
3152 * @write: %TRUE if this is a write to the sysctl file
3166 int proc_do_large_bitmap(struct ctl_table *table, int write, in proc_do_large_bitmap() argument
3177 if (!bitmap || !bitmap_len || !left || (*ppos && !write)) { in proc_do_large_bitmap()
3182 if (write) { in proc_do_large_bitmap()
3300 if (write) { in proc_do_large_bitmap()
3316 int proc_dostring(struct ctl_table *table, int write, in proc_dostring() argument
3322 int proc_dointvec(struct ctl_table *table, int write, in proc_dointvec() argument
3328 int proc_douintvec(struct ctl_table *table, int write, in proc_douintvec() argument
3334 int proc_dointvec_minmax(struct ctl_table *table, int write, in proc_dointvec_minmax() argument
3340 int proc_douintvec_minmax(struct ctl_table *table, int write, in proc_douintvec_minmax() argument
3346 int proc_dointvec_jiffies(struct ctl_table *table, int write, in proc_dointvec_jiffies() argument
3352 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, in proc_dointvec_userhz_jiffies() argument
3358 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, in proc_dointvec_ms_jiffies() argument
3364 int proc_doulongvec_minmax(struct ctl_table *table, int write, in proc_doulongvec_minmax() argument
3370 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, in proc_doulongvec_ms_jiffies_minmax() argument
3377 int proc_do_large_bitmap(struct ctl_table *table, int write, in proc_do_large_bitmap() argument
3386 int proc_do_static_key(struct ctl_table *table, int write, in proc_do_static_key() argument
3401 if (write && !capable(CAP_SYS_ADMIN)) in proc_do_static_key()
3406 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in proc_do_static_key()
3407 if (write && !ret) { in proc_do_static_key()