Lines Matching refs:template_desc
101 struct ima_template_desc *template_desc; in ima_template_setup() local
113 template_desc = lookup_template_desc(str); in ima_template_setup()
114 if (!template_desc) { in ima_template_setup()
130 ima_template = template_desc; in ima_template_setup()
157 struct ima_template_desc *template_desc; in lookup_template_desc() local
161 list_for_each_entry_rcu(template_desc, &defined_templates, list) { in lookup_template_desc()
162 if ((strcmp(template_desc->name, name) == 0) || in lookup_template_desc()
163 (strcmp(template_desc->fmt, name) == 0)) { in lookup_template_desc()
169 return found ? template_desc : NULL; in lookup_template_desc()
319 struct ima_template_desc *template_desc = NULL; in restore_template_fmt() local
329 template_desc = kzalloc(sizeof(*template_desc), GFP_KERNEL); in restore_template_fmt()
330 if (!template_desc) in restore_template_fmt()
333 template_desc->name = ""; in restore_template_fmt()
334 template_desc->fmt = kstrdup(template_name, GFP_KERNEL); in restore_template_fmt()
335 if (!template_desc->fmt) in restore_template_fmt()
339 list_add_tail_rcu(&template_desc->list, &defined_templates); in restore_template_fmt()
342 return template_desc; in restore_template_fmt()
345 static int ima_restore_template_data(struct ima_template_desc *template_desc, in ima_restore_template_data() argument
355 template_desc->num_fields), GFP_NOFS); in ima_restore_template_data()
369 NULL, template_desc->num_fields, in ima_restore_template_data()
378 (*entry)->template_desc = template_desc; in ima_restore_template_data()
379 for (i = 0; i < template_desc->num_fields; i++) { in ima_restore_template_data()
417 struct ima_template_desc *template_desc; in ima_restore_measurement_list() local
478 template_desc = lookup_template_desc(template_name); in ima_restore_measurement_list()
479 if (!template_desc) { in ima_restore_measurement_list()
480 template_desc = restore_template_fmt(template_name); in ima_restore_measurement_list()
481 if (!template_desc) in ima_restore_measurement_list()
489 ret = template_desc_init_fields(template_desc->fmt, in ima_restore_measurement_list()
490 &(template_desc->fields), in ima_restore_measurement_list()
491 &(template_desc->num_fields)); in ima_restore_measurement_list()
494 template_desc->fmt); in ima_restore_measurement_list()
499 ret = ima_restore_template_data(template_desc, in ima_restore_measurement_list()