Lines Matching refs:datum
180 static int perm_destroy(void *key, void *datum, void *p) in perm_destroy() argument
183 kfree(datum); in perm_destroy()
187 static int common_destroy(void *key, void *datum, void *p) in common_destroy() argument
192 if (datum) { in common_destroy()
193 comdatum = datum; in common_destroy()
197 kfree(datum); in common_destroy()
214 static int cls_destroy(void *key, void *datum, void *p) in cls_destroy() argument
221 if (datum) { in cls_destroy()
222 cladatum = datum; in cls_destroy()
252 kfree(datum); in cls_destroy()
256 static int role_destroy(void *key, void *datum, void *p) in role_destroy() argument
261 if (datum) { in role_destroy()
262 role = datum; in role_destroy()
266 kfree(datum); in role_destroy()
270 static int type_destroy(void *key, void *datum, void *p) in type_destroy() argument
273 kfree(datum); in type_destroy()
277 static int user_destroy(void *key, void *datum, void *p) in user_destroy() argument
282 if (datum) { in user_destroy()
283 usrdatum = datum; in user_destroy()
289 kfree(datum); in user_destroy()
293 static int sens_destroy(void *key, void *datum, void *p) in sens_destroy() argument
298 if (datum) { in sens_destroy()
299 levdatum = datum; in sens_destroy()
304 kfree(datum); in sens_destroy()
308 static int cat_destroy(void *key, void *datum, void *p) in cat_destroy() argument
311 kfree(datum); in cat_destroy()
315 static int (*const destroy_f[SYM_NUM]) (void *key, void *datum, void *datap) = {
326 static int filenametr_destroy(void *key, void *datum, void *p) in filenametr_destroy() argument
329 struct filename_trans_datum *next, *d = datum; in filenametr_destroy()
343 static int range_tr_destroy(void *key, void *datum, void *p) in range_tr_destroy() argument
345 struct mls_range *rt = datum; in range_tr_destroy()
350 kfree(datum); in range_tr_destroy()
355 static int role_tr_destroy(void *key, void *datum, void *p) in role_tr_destroy() argument
358 kfree(datum); in role_tr_destroy()
549 static int common_index(void *key, void *datum, void *datap) in common_index() argument
554 comdatum = datum; in common_index()
564 static int class_index(void *key, void *datum, void *datap) in class_index() argument
569 cladatum = datum; in class_index()
579 static int role_index(void *key, void *datum, void *datap) in role_index() argument
584 role = datum; in role_index()
596 static int type_index(void *key, void *datum, void *datap) in type_index() argument
601 typdatum = datum; in type_index()
616 static int user_index(void *key, void *datum, void *datap) in user_index() argument
621 usrdatum = datum; in user_index()
633 static int sens_index(void *key, void *datum, void *datap) in sens_index() argument
638 levdatum = datum; in sens_index()
652 static int cat_index(void *key, void *datum, void *datap) in cat_index() argument
657 catdatum = datum; in cat_index()
670 static int (*const index_f[SYM_NUM]) (void *key, void *datum, void *datap) = {
1650 static int user_bounds_sanity_check(void *key, void *datum, void *datap) in user_bounds_sanity_check() argument
1656 upper = user = datum; in user_bounds_sanity_check()
1686 static int role_bounds_sanity_check(void *key, void *datum, void *datap) in role_bounds_sanity_check() argument
1692 upper = role = datum; in role_bounds_sanity_check()
1722 static int type_bounds_sanity_check(void *key, void *datum, void *datap) in type_bounds_sanity_check() argument
1728 upper = datum; in type_bounds_sanity_check()
1886 struct filename_trans_datum *last, *datum = NULL; in filename_trans_read_helper_compat() local
1915 datum = policydb_filenametr_search(p, &key); in filename_trans_read_helper_compat()
1916 while (datum) { in filename_trans_read_helper_compat()
1917 if (unlikely(ebitmap_get_bit(&datum->stypes, stype - 1))) { in filename_trans_read_helper_compat()
1919 datum = NULL; in filename_trans_read_helper_compat()
1922 if (likely(datum->otype == otype)) in filename_trans_read_helper_compat()
1924 last = datum; in filename_trans_read_helper_compat()
1925 datum = datum->next; in filename_trans_read_helper_compat()
1927 if (!datum) { in filename_trans_read_helper_compat()
1929 datum = kmalloc(sizeof(*datum), GFP_KERNEL); in filename_trans_read_helper_compat()
1930 if (!datum) in filename_trans_read_helper_compat()
1933 ebitmap_init(&datum->stypes); in filename_trans_read_helper_compat()
1934 datum->otype = otype; in filename_trans_read_helper_compat()
1935 datum->next = NULL; in filename_trans_read_helper_compat()
1938 last->next = datum; in filename_trans_read_helper_compat()
1945 rc = hashtab_insert(&p->filename_trans, ft, datum, in filename_trans_read_helper_compat()
1958 return ebitmap_set_bit(&datum->stypes, stype - 1, 1); in filename_trans_read_helper_compat()
1963 kfree(datum); in filename_trans_read_helper_compat()
1970 struct filename_trans_datum **dst, *datum, *first = NULL; in filename_trans_read_helper() local
2004 datum = kmalloc(sizeof(*datum), GFP_KERNEL); in filename_trans_read_helper()
2005 if (!datum) in filename_trans_read_helper()
2008 *dst = datum; in filename_trans_read_helper()
2011 rc = ebitmap_read(&datum->stypes, fp); in filename_trans_read_helper()
2019 datum->otype = le32_to_cpu(buf[0]); in filename_trans_read_helper()
2020 datum->next = NULL; in filename_trans_read_helper()
2022 dst = &datum->next; in filename_trans_read_helper()
2047 datum = first; in filename_trans_read_helper()
2050 ebitmap_destroy(&datum->stypes); in filename_trans_read_helper()
2051 kfree(datum); in filename_trans_read_helper()
2770 static int sens_write(void *vkey, void *datum, void *ptr) in sens_write() argument
2773 struct level_datum *levdatum = datum; in sens_write()
2798 static int cat_write(void *vkey, void *datum, void *ptr) in cat_write() argument
2801 struct cat_datum *catdatum = datum; in cat_write()
2823 static int role_trans_write_one(void *key, void *datum, void *ptr) in role_trans_write_one() argument
2826 struct role_trans_datum *rtd = datum; in role_trans_write_one()
2917 static int perm_write(void *vkey, void *datum, void *fp) in perm_write() argument
2920 struct perm_datum *perdatum = datum; in perm_write()
2939 static int common_write(void *vkey, void *datum, void *ptr) in common_write() argument
2942 struct common_datum *comdatum = datum; in common_write()
3034 static int class_write(void *vkey, void *datum, void *ptr) in class_write() argument
3037 struct class_datum *cladatum = datum; in class_write()
3119 static int role_write(void *vkey, void *datum, void *ptr) in role_write() argument
3122 struct role_datum *role = datum; in role_write()
3158 static int type_write(void *vkey, void *datum, void *ptr) in type_write() argument
3161 struct type_datum *typdatum = datum; in type_write()
3199 static int user_write(void *vkey, void *datum, void *ptr) in user_write() argument
3202 struct user_datum *usrdatum = datum; in user_write()
3240 static int (*const write_f[SYM_NUM]) (void *key, void *datum, void *datap) = {
3486 struct filename_trans_datum *datum = data; in filename_write_helper_compat() local
3494 ebitmap_for_each_positive_bit(&datum->stypes, node, bit) { in filename_write_helper_compat()
3507 buf[3] = cpu_to_le32(datum->otype); in filename_write_helper_compat()
3514 datum = datum->next; in filename_write_helper_compat()
3515 } while (unlikely(datum)); in filename_write_helper_compat()
3523 struct filename_trans_datum *datum; in filename_write_helper() local
3539 datum = data; in filename_write_helper()
3542 datum = datum->next; in filename_write_helper()
3543 } while (unlikely(datum)); in filename_write_helper()
3552 datum = data; in filename_write_helper()
3554 rc = ebitmap_write(&datum->stypes, fp); in filename_write_helper()
3558 buf[0] = cpu_to_le32(datum->otype); in filename_write_helper()
3563 datum = datum->next; in filename_write_helper()
3564 } while (unlikely(datum)); in filename_write_helper()