Lines Matching refs:template_desc

57 	struct ima_template_desc *template_desc;  in ima_template_setup()  local
69 template_desc = lookup_template_desc(str); in ima_template_setup()
70 if (!template_desc) { in ima_template_setup()
86 ima_template = template_desc; in ima_template_setup()
113 struct ima_template_desc *template_desc; in lookup_template_desc() local
117 list_for_each_entry_rcu(template_desc, &defined_templates, list) { in lookup_template_desc()
118 if ((strcmp(template_desc->name, name) == 0) || in lookup_template_desc()
119 (strcmp(template_desc->fmt, name) == 0)) { in lookup_template_desc()
125 return found ? template_desc : NULL; in lookup_template_desc()
249 struct ima_template_desc *template_desc = NULL; in restore_template_fmt() local
259 template_desc = kzalloc(sizeof(*template_desc), GFP_KERNEL); in restore_template_fmt()
260 if (!template_desc) in restore_template_fmt()
263 template_desc->name = ""; in restore_template_fmt()
264 template_desc->fmt = kstrdup(template_name, GFP_KERNEL); in restore_template_fmt()
265 if (!template_desc->fmt) in restore_template_fmt()
269 list_add_tail_rcu(&template_desc->list, &defined_templates); in restore_template_fmt()
272 return template_desc; in restore_template_fmt()
275 static int ima_restore_template_data(struct ima_template_desc *template_desc, in ima_restore_template_data() argument
284 template_desc->num_fields * sizeof(struct ima_field_data), in ima_restore_template_data()
290 NULL, template_desc->num_fields, in ima_restore_template_data()
298 (*entry)->template_desc = template_desc; in ima_restore_template_data()
299 for (i = 0; i < template_desc->num_fields; i++) { in ima_restore_template_data()
336 struct ima_template_desc *template_desc; in ima_restore_measurement_list() local
397 template_desc = lookup_template_desc(template_name); in ima_restore_measurement_list()
398 if (!template_desc) { in ima_restore_measurement_list()
399 template_desc = restore_template_fmt(template_name); in ima_restore_measurement_list()
400 if (!template_desc) in ima_restore_measurement_list()
408 ret = template_desc_init_fields(template_desc->fmt, in ima_restore_measurement_list()
409 &(template_desc->fields), in ima_restore_measurement_list()
410 &(template_desc->num_fields)); in ima_restore_measurement_list()
413 template_desc->fmt); in ima_restore_measurement_list()
418 ret = ima_restore_template_data(template_desc, in ima_restore_measurement_list()