Lines Matching refs:template_desc

106 	struct ima_template_desc *template_desc;  in ima_template_setup()  local
119 template_desc = lookup_template_desc(str); in ima_template_setup()
120 if (!template_desc) { in ima_template_setup()
136 ima_template = template_desc; in ima_template_setup()
165 struct ima_template_desc *template_desc; in lookup_template_desc() local
169 list_for_each_entry_rcu(template_desc, &defined_templates, list) { in lookup_template_desc()
170 if ((strcmp(template_desc->name, name) == 0) || in lookup_template_desc()
171 (strcmp(template_desc->fmt, name) == 0)) { in lookup_template_desc()
177 return found ? template_desc : NULL; in lookup_template_desc()
327 struct ima_template_desc *template_desc = NULL; in restore_template_fmt() local
337 template_desc = kzalloc(sizeof(*template_desc), GFP_KERNEL); in restore_template_fmt()
338 if (!template_desc) in restore_template_fmt()
341 template_desc->name = ""; in restore_template_fmt()
342 template_desc->fmt = kstrdup(template_name, GFP_KERNEL); in restore_template_fmt()
343 if (!template_desc->fmt) in restore_template_fmt()
347 list_add_tail_rcu(&template_desc->list, &defined_templates); in restore_template_fmt()
350 return template_desc; in restore_template_fmt()
353 static int ima_restore_template_data(struct ima_template_desc *template_desc, in ima_restore_template_data() argument
363 template_desc->num_fields), GFP_NOFS); in ima_restore_template_data()
377 NULL, template_desc->num_fields, in ima_restore_template_data()
386 (*entry)->template_desc = template_desc; in ima_restore_template_data()
387 for (i = 0; i < template_desc->num_fields; i++) { in ima_restore_template_data()
425 struct ima_template_desc *template_desc; in ima_restore_measurement_list() local
486 template_desc = lookup_template_desc(template_name); in ima_restore_measurement_list()
487 if (!template_desc) { in ima_restore_measurement_list()
488 template_desc = restore_template_fmt(template_name); in ima_restore_measurement_list()
489 if (!template_desc) in ima_restore_measurement_list()
497 ret = template_desc_init_fields(template_desc->fmt, in ima_restore_measurement_list()
498 &(template_desc->fields), in ima_restore_measurement_list()
499 &(template_desc->num_fields)); in ima_restore_measurement_list()
502 template_desc->fmt); in ima_restore_measurement_list()
507 ret = ima_restore_template_data(template_desc, in ima_restore_measurement_list()