Lines Matching full:dir
76 static int _proc_do_string(char *data, int maxlen, int dir, in _proc_do_string() argument
87 if (SYSCTL_USER_TO_KERN(dir)) { in _proc_do_string()
175 * @dir: %TRUE if this is a write to the sysctl file
189 int proc_dostring(const struct ctl_table *table, int dir, in proc_dostring() argument
192 if (SYSCTL_USER_TO_KERN(dir)) in proc_dostring()
195 return _proc_do_string(table->data, table->maxlen, dir, buffer, lenp, in proc_dostring()
403 * @dir: %TRUE if this is a write to the sysctl file
414 int proc_uint_conv(ulong *u_ptr, uint *k_ptr, int dir, in proc_uint_conv() argument
419 if (SYSCTL_KERN_TO_USER(dir)) in proc_uint_conv()
447 static int do_proc_uint_conv(ulong *u_ptr, uint *k_ptr, int dir, in do_proc_uint_conv() argument
450 return proc_uint_conv(u_ptr, k_ptr, dir, tbl, false, in do_proc_uint_conv()
454 static int do_proc_uint_conv_minmax(ulong *u_ptr, uint *k_ptr, int dir, in do_proc_uint_conv_minmax() argument
457 return proc_uint_conv(u_ptr, k_ptr, dir, tbl, true, in do_proc_uint_conv_minmax()
518 int proc_int_conv(bool *negp, ulong *u_ptr, int *k_ptr, int dir, in proc_int_conv() argument
523 if (SYSCTL_KERN_TO_USER(dir)) in proc_int_conv()
557 int dir, const struct ctl_table *tbl) in do_proc_int_conv() argument
559 return proc_int_conv(negp, u_ptr, k_ptr, dir, tbl, false, in do_proc_int_conv()
566 int dir, const struct ctl_table *tbl) in do_proc_int_conv_minmax() argument
568 return proc_int_conv(negp, u_ptr, k_ptr, dir, tbl, true, in do_proc_int_conv_minmax()
575 static int do_proc_dointvec(const struct ctl_table *table, int dir, in do_proc_dointvec() argument
578 int dir, const struct ctl_table *table)) in do_proc_dointvec()
585 (*ppos && SYSCTL_KERN_TO_USER(dir))) { in do_proc_dointvec()
597 if (SYSCTL_USER_TO_KERN(dir)) { in do_proc_dointvec()
610 if (SYSCTL_USER_TO_KERN(dir)) { in do_proc_dointvec()
635 if (SYSCTL_KERN_TO_USER(dir) && !first && left && !err) in do_proc_dointvec()
637 if (SYSCTL_USER_TO_KERN(dir) && !err && left) in do_proc_dointvec()
639 if (SYSCTL_USER_TO_KERN(dir) && first) in do_proc_dointvec()
650 unsigned int *k_ptr, int dir, in do_proc_douintvec_w() argument
703 unsigned int *k_ptr, int dir, in do_proc_douintvec_r() argument
730 static int do_proc_douintvec(const struct ctl_table *table, int dir, in do_proc_douintvec() argument
733 unsigned int *k_ptr, int dir, in do_proc_douintvec()
739 (*ppos && SYSCTL_KERN_TO_USER(dir))) { in do_proc_douintvec()
758 if (SYSCTL_USER_TO_KERN(dir)) in do_proc_douintvec()
767 * @dir: %TRUE if this is a write to the sysctl file
779 int proc_douintvec_conv(const struct ctl_table *table, int dir, void *buffer, in proc_douintvec_conv() argument
782 int dir, const struct ctl_table *table)) in proc_douintvec_conv()
784 return do_proc_douintvec(table, dir, buffer, lenp, ppos, conv); in proc_douintvec_conv()
790 * @dir: %TRUE if this is a write to the sysctl file
803 int proc_dobool(const struct ctl_table *table, int dir, void *buffer, in proc_dobool() argument
819 res = proc_dointvec(&tmp, dir, buffer, lenp, ppos); in proc_dobool()
822 if (SYSCTL_USER_TO_KERN(dir)) in proc_dobool()
830 * @dir: %TRUE if this is a write to the sysctl file
840 int proc_dointvec(const struct ctl_table *table, int dir, void *buffer, in proc_dointvec() argument
843 return do_proc_dointvec(table, dir, buffer, lenp, ppos, NULL); in proc_dointvec()
849 * @dir: %TRUE if this is a write to the sysctl file
859 int proc_douintvec(const struct ctl_table *table, int dir, void *buffer, in proc_douintvec() argument
862 return do_proc_douintvec(table, dir, buffer, lenp, ppos, in proc_douintvec()
869 * @dir: %TRUE if this is a write to the sysctl file
881 * SYSCTL_USER_TO_KERN(dir) == true
883 int proc_dointvec_minmax(const struct ctl_table *table, int dir, in proc_dointvec_minmax() argument
886 return do_proc_dointvec(table, dir, buffer, lenp, ppos, in proc_dointvec_minmax()
893 * @dir: %TRUE if this is a write to the sysctl file
908 * SYSCTL_USER_TO_KERN(dir) == true
910 int proc_douintvec_minmax(const struct ctl_table *table, int dir, in proc_douintvec_minmax() argument
913 return do_proc_douintvec(table, dir, buffer, lenp, ppos, in proc_douintvec_minmax()
920 * @dir: %TRUE if this is a write to the sysctl file
932 * Returns 0 on success or an error on SYSCTL_USER_TO_KERN(dir) == true
935 int proc_dou8vec_minmax(const struct ctl_table *table, int dir, in proc_dou8vec_minmax() argument
957 res = do_proc_douintvec(&tmp, dir, buffer, lenp, ppos, in proc_dou8vec_minmax()
961 if (SYSCTL_USER_TO_KERN(dir)) in proc_dou8vec_minmax()
967 static int do_proc_doulongvec_minmax(const struct ctl_table *table, int dir, in do_proc_doulongvec_minmax() argument
978 (*ppos && SYSCTL_KERN_TO_USER(dir))) { in do_proc_doulongvec_minmax()
989 if (SYSCTL_USER_TO_KERN(dir)) { in do_proc_doulongvec_minmax()
1001 if (SYSCTL_USER_TO_KERN(dir)) { in do_proc_doulongvec_minmax()
1030 if (SYSCTL_KERN_TO_USER(dir) && !first && left && !err) in do_proc_doulongvec_minmax()
1032 if (SYSCTL_USER_TO_KERN(dir) && !err) in do_proc_doulongvec_minmax()
1034 if (SYSCTL_USER_TO_KERN(dir) && first) in do_proc_doulongvec_minmax()
1042 int proc_doulongvec_minmax_conv(const struct ctl_table *table, int dir, in proc_doulongvec_minmax_conv() argument
1046 return do_proc_doulongvec_minmax(table, dir, buffer, lenp, ppos, in proc_doulongvec_minmax_conv()
1053 * @dir: %TRUE if this is a write to the sysctl file
1066 int proc_doulongvec_minmax(const struct ctl_table *table, int dir, in proc_doulongvec_minmax() argument
1069 return proc_doulongvec_minmax_conv(table, dir, buffer, lenp, ppos, 1l, 1l); in proc_doulongvec_minmax()
1075 * @dir: %TRUE if this is a write to the sysctl file
1088 int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer, in proc_dointvec_conv() argument
1091 int dir, const struct ctl_table *table)) in proc_dointvec_conv()
1093 return do_proc_dointvec(table, dir, buffer, lenp, ppos, conv); in proc_dointvec_conv()
1099 * @dir: %TRUE if this is a write to the sysctl file
1113 int proc_do_large_bitmap(const struct ctl_table *table, int dir, in proc_do_large_bitmap() argument
1123 if (!bitmap || !bitmap_len || !left || (*ppos && SYSCTL_KERN_TO_USER(dir))) { in proc_do_large_bitmap()
1128 if (SYSCTL_USER_TO_KERN(dir)) { in proc_do_large_bitmap()
1229 if (SYSCTL_USER_TO_KERN(dir)) { in proc_do_large_bitmap()
1245 int proc_dostring(const struct ctl_table *table, int dir, in proc_dostring() argument
1251 int proc_dobool(const struct ctl_table *table, int dir, in proc_dobool() argument
1257 int proc_dointvec(const struct ctl_table *table, int dir, in proc_dointvec() argument
1263 int proc_douintvec(const struct ctl_table *table, int dir, in proc_douintvec() argument
1269 int proc_dointvec_minmax(const struct ctl_table *table, int dir, in proc_dointvec_minmax() argument
1275 int proc_douintvec_minmax(const struct ctl_table *table, int dir, in proc_douintvec_minmax() argument
1300 int proc_uint_conv(ulong *u_ptr, uint *k_ptr, int dir, in proc_uint_conv() argument
1308 int proc_dou8vec_minmax(const struct ctl_table *table, int dir, in proc_dou8vec_minmax() argument
1314 int proc_doulongvec_minmax(const struct ctl_table *table, int dir, in proc_doulongvec_minmax() argument
1320 int proc_doulongvec_minmax_conv(const struct ctl_table *table, int dir, in proc_doulongvec_minmax_conv() argument
1327 int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer, in proc_dointvec_conv() argument
1330 int dir, const struct ctl_table *table)) in proc_dointvec_conv()
1335 int proc_do_large_bitmap(const struct ctl_table *table, int dir, in proc_do_large_bitmap() argument
1344 int proc_do_static_key(const struct ctl_table *table, int dir, in proc_do_static_key() argument
1358 if (SYSCTL_USER_TO_KERN(dir) && !capable(CAP_SYS_ADMIN)) in proc_do_static_key()
1363 ret = proc_dointvec_minmax(&tmp, dir, buffer, lenp, ppos); in proc_do_static_key()
1364 if (SYSCTL_USER_TO_KERN(dir) && !ret) { in proc_do_static_key()