Lines Matching refs:table

194 	struct ctl_node *node, const struct ctl_table *table, size_t table_size)  in init_header()  argument
196 head->ctl_table = table; in init_header()
198 head->ctl_table_arg = table; in init_header()
216 if (table == sysctl_mount_point) in init_header()
436 static int sysctl_perm(struct ctl_table_header *head, const struct ctl_table *table, int op) in sysctl_perm() argument
442 mode = root->permissions(head, table); in sysctl_perm()
444 mode = table->mode; in sysctl_perm()
450 struct ctl_table_header *head, const struct ctl_table *table) in proc_sys_make_inode() argument
471 ei->sysctl_entry = table; in proc_sys_make_inode()
477 inode->i_mode = table->mode; in proc_sys_make_inode()
478 if (!S_ISDIR(table->mode)) { in proc_sys_make_inode()
558 const struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_call_handler() local
571 if (sysctl_perm(head, table, write ? MAY_WRITE : MAY_READ)) in proc_sys_call_handler()
576 if (!table->proc_handler) in proc_sys_call_handler()
594 error = BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, &kbuf, &count, in proc_sys_call_handler()
600 error = table->proc_handler(table, write, kbuf, &count, &iocb->ki_pos); in proc_sys_call_handler()
632 const struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_open() local
638 if (table->poll) in proc_sys_open()
639 filp->private_data = proc_sys_poll_event(table->poll); in proc_sys_open()
650 const struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_poll() local
658 if (!table->proc_handler) in proc_sys_poll()
661 if (!table->poll) in proc_sys_poll()
665 poll_wait(filp, &table->poll->wait, wait); in proc_sys_poll()
667 if (event != atomic_read(&table->poll->event)) { in proc_sys_poll()
668 filp->private_data = proc_sys_poll_event(table->poll); in proc_sys_poll()
681 const struct ctl_table *table) in proc_sys_fill_cache() argument
689 qname.name = table->procname; in proc_sys_fill_cache()
690 qname.len = strlen(table->procname); in proc_sys_fill_cache()
701 inode = proc_sys_make_inode(dir->d_sb, head, table); in proc_sys_fill_cache()
725 const struct ctl_table *table) in proc_sys_link_fill_cache() argument
734 if (sysctl_follow_link(&head, &table)) in proc_sys_link_fill_cache()
737 ret = proc_sys_fill_cache(file, ctx, head, table); in proc_sys_link_fill_cache()
743 static int scan(struct ctl_table_header *head, const struct ctl_table *table, in scan() argument
752 if (unlikely(S_ISLNK(table->mode))) in scan()
753 res = proc_sys_link_fill_cache(file, ctx, head, table); in scan()
755 res = proc_sys_fill_cache(file, ctx, head, table); in scan()
800 const struct ctl_table *table; in proc_sys_permission() local
811 table = PROC_I(inode)->sysctl_entry; in proc_sys_permission()
812 if (!table) /* global root - r-xr-xr-x */ in proc_sys_permission()
815 error = sysctl_perm(head, table, mask & ~MAY_NOT_BLOCK); in proc_sys_permission()
844 const struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_getattr() local
850 if (table) in proc_sys_getattr()
851 stat->mode = (stat->mode & S_IFMT) | table->mode; in proc_sys_getattr()
961 struct ctl_table *table; in new_dir() local
973 table = (struct ctl_table *)(node + 1); in new_dir()
974 new_name = (char *)(table + 1); in new_dir()
976 table[0].procname = new_name; in new_dir()
977 table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO; in new_dir()
978 init_header(&new->header, set->dir.header.root, set, node, table, 1); in new_dir()
1091 static int sysctl_err(const char *path, const struct ctl_table *table, char *fmt, ...) in sysctl_err() argument
1101 path, table->procname, &vaf); in sysctl_err()
1107 static int sysctl_check_table_array(const char *path, const struct ctl_table *table) in sysctl_check_table_array() argument
1112 if ((table->proc_handler == proc_douintvec) || in sysctl_check_table_array()
1113 (table->proc_handler == proc_douintvec_minmax)) { in sysctl_check_table_array()
1114 if (table->maxlen != sizeof(unsigned int)) in sysctl_check_table_array()
1115 err |= sysctl_err(path, table, "array not allowed"); in sysctl_check_table_array()
1118 if (table->proc_handler == proc_dou8vec_minmax) { in sysctl_check_table_array()
1119 if (table->maxlen != sizeof(u8)) in sysctl_check_table_array()
1120 err |= sysctl_err(path, table, "array not allowed"); in sysctl_check_table_array()
1122 if (table->extra1) { in sysctl_check_table_array()
1123 extra = *(unsigned int *) table->extra1; in sysctl_check_table_array()
1125 err |= sysctl_err(path, table, in sysctl_check_table_array()
1128 if (table->extra2) { in sysctl_check_table_array()
1129 extra = *(unsigned int *) table->extra2; in sysctl_check_table_array()
1131 err |= sysctl_err(path, table, in sysctl_check_table_array()
1136 if (table->proc_handler == proc_dobool) { in sysctl_check_table_array()
1137 if (table->maxlen != sizeof(bool)) in sysctl_check_table_array()
1138 err |= sysctl_err(path, table, "array not allowed"); in sysctl_check_table_array()
1372 const char *path, const struct ctl_table *table, size_t table_size) in __register_sysctl_table() argument
1385 init_header(header, root, set, node, table, table_size); in __register_sysctl_table()
1433 struct ctl_table_header *register_sysctl_sz(const char *path, const struct ctl_table *table, in register_sysctl_sz() argument
1437 path, table, table_size); in register_sysctl_sz()
1462 void __init __register_sysctl_init(const char *path, const struct ctl_table *table, in __register_sysctl_init() argument
1465 struct ctl_table_header *hdr = register_sysctl_sz(path, table, table_size); in __register_sysctl_init()