Lines Matching refs:i
167 int i; in policydb_lookup_compat() local
170 for (i = 0; i < ARRAY_SIZE(policydb_compat); i++) { in policydb_lookup_compat()
171 if (policydb_compat[i].version == version) { in policydb_lookup_compat()
172 info = &policydb_compat[i]; in policydb_lookup_compat()
355 static void ocontext_destroy(struct ocontext *c, int i) in ocontext_destroy() argument
362 if (i == OCON_ISID || i == OCON_FS || in ocontext_destroy()
363 i == OCON_NETIF || i == OCON_FSUSE) in ocontext_destroy()
470 int i, rc; in policydb_init() local
474 for (i = 0; i < SYM_NUM; i++) { in policydb_init()
475 rc = symtab_init(&p->symtab[i], symtab_sizes[i]); in policydb_init()
513 for (i = 0; i < SYM_NUM; i++) { in policydb_init()
514 hashtab_map(p->symtab[i].table, destroy_f[i], NULL); in policydb_init()
515 hashtab_destroy(p->symtab[i].table); in policydb_init()
676 int i; in symtab_hash_eval() local
678 for (i = 0; i < SYM_NUM; i++) in symtab_hash_eval()
679 hash_eval(s[i].table, symtab_name[i]); in symtab_hash_eval()
696 int i, rc; in policydb_index() local
743 for (i = 0; i < SYM_NUM; i++) { in policydb_index()
744 p->sym_val_to_name[i] = kvcalloc(p->symtab[i].nprim, in policydb_index()
747 if (!p->sym_val_to_name[i]) in policydb_index()
750 rc = hashtab_map(p->symtab[i].table, index_f[i], p); in policydb_index()
766 int i; in policydb_destroy() local
770 for (i = 0; i < SYM_NUM; i++) { in policydb_destroy()
772 hashtab_map(p->symtab[i].table, destroy_f[i], NULL); in policydb_destroy()
773 hashtab_destroy(p->symtab[i].table); in policydb_destroy()
776 for (i = 0; i < SYM_NUM; i++) in policydb_destroy()
777 kvfree(p->sym_val_to_name[i]); in policydb_destroy()
786 for (i = 0; i < OCON_NUM; i++) { in policydb_destroy()
788 c = p->ocontexts[i]; in policydb_destroy()
792 ocontext_destroy(ctmp, i); in policydb_destroy()
794 p->ocontexts[i] = NULL; in policydb_destroy()
836 for (i = 0; i < p->p_types.nprim; i++) in policydb_destroy()
837 ebitmap_destroy(&p->type_attr_map_array[i]); in policydb_destroy()
1126 int i, rc; in common_read() local
1149 for (i = 0; i < nel; i++) { in common_read()
1197 int rc, i, j, depth; in read_cons_helper() local
1200 for (i = 0; i < ncons; i++) { in read_cons_helper()
1291 int i, rc; in class_read() local
1330 for (i = 0; i < nel; i++) { in class_read()
1810 int i, rc; in range_read() local
1822 for (i = 0; i < nel; i++) { in range_read()
1885 int rc, i; in filename_trans_read() local
1895 for (i = 0; i < nel; i++) { in filename_trans_read()
1962 int i, j, rc; in genfs_read() local
1975 for (i = 0; i < nel; i++) { in genfs_read()
2076 int i, j, rc; in ocontext_read() local
2083 for (i = 0; i < info->ocon_num; i++) { in ocontext_read()
2098 p->ocontexts[i] = c; in ocontext_read()
2101 switch (i) { in ocontext_read()
2263 int i, j, rc; in policydb_read() local
2386 for (i = 0; i < info->sym_num; i++) { in policydb_read()
2393 rc = read_f[i](p, p->symtab[i].table, fp); in policydb_read()
2398 p->symtab[i].nprim = nprim; in policydb_read()
2421 for (i = 0; i < nel; i++) { in policydb_read()
2460 for (i = 0; i < nel; i++) { in policydb_read()
2515 for (i = 0; i < p->p_types.nprim; i++) in policydb_read()
2516 ebitmap_init(&p->type_attr_map_array[i]); in policydb_read()
2518 for (i = 0; i < p->p_types.nprim; i++) { in policydb_read()
2519 struct ebitmap *e = &p->type_attr_map_array[i]; in policydb_read()
2527 rc = ebitmap_set_bit(e, i, 1); in policydb_read()
3087 unsigned int i, j, rc; in ocontext_write() local
3093 for (i = 0; i < info->ocon_num; i++) { in ocontext_write()
3095 for (c = p->ocontexts[i]; c; c = c->next) in ocontext_write()
3101 for (c = p->ocontexts[i]; c; c = c->next) { in ocontext_write()
3102 switch (i) { in ocontext_write()
3394 unsigned int i, num_syms; in policydb_write() local
3464 for (i = 0; i < num_syms; i++) { in policydb_write()
3470 buf[0] = cpu_to_le32(p->symtab[i].nprim); in policydb_write()
3471 buf[1] = cpu_to_le32(p->symtab[i].table->nel); in policydb_write()
3476 rc = hashtab_map(p->symtab[i].table, write_f[i], &pd); in policydb_write()
3513 for (i = 0; i < p->p_types.nprim; i++) { in policydb_write()
3514 struct ebitmap *e = &p->type_attr_map_array[i]; in policydb_write()