Lines Matching refs:entry

23 void ima_free_template_entry(struct ima_template_entry *entry)  in ima_free_template_entry()  argument
27 for (i = 0; i < entry->template_desc->num_fields; i++) in ima_free_template_entry()
28 kfree(entry->template_data[i].data); in ima_free_template_entry()
30 kfree(entry->digests); in ima_free_template_entry()
31 kfree(entry); in ima_free_template_entry()
38 struct ima_template_entry **entry, in ima_alloc_init_template() argument
50 *entry = kzalloc(struct_size(*entry, template_data, in ima_alloc_init_template()
52 if (!*entry) in ima_alloc_init_template()
58 kfree(*entry); in ima_alloc_init_template()
59 *entry = NULL; in ima_alloc_init_template()
63 (*entry)->digests = digests; in ima_alloc_init_template()
64 (*entry)->template_desc = template_desc; in ima_alloc_init_template()
71 &((*entry)->template_data[i])); in ima_alloc_init_template()
75 len = (*entry)->template_data[i].len; in ima_alloc_init_template()
76 (*entry)->template_data_len += sizeof(len); in ima_alloc_init_template()
77 (*entry)->template_data_len += len; in ima_alloc_init_template()
81 ima_free_template_entry(*entry); in ima_alloc_init_template()
82 *entry = NULL; in ima_alloc_init_template()
102 int ima_store_template(struct ima_template_entry *entry, in ima_store_template() argument
108 char *template_name = entry->template_desc->name; in ima_store_template()
112 result = ima_calc_field_array_hash(&entry->template_data[0], in ima_store_template()
113 entry); in ima_store_template()
121 entry->pcr = pcr; in ima_store_template()
122 result = ima_add_template_entry(entry, violation, op, inode, filename); in ima_store_template()
137 struct ima_template_entry *entry; in ima_add_violation() local
149 result = ima_alloc_init_template(&event_data, &entry, NULL); in ima_add_violation()
154 result = ima_store_template(entry, violation, inode, in ima_add_violation()
157 ima_free_template_entry(entry); in ima_add_violation()
358 struct ima_template_entry *entry; in ima_store_measurement() local
376 result = ima_alloc_init_template(&event_data, &entry, template_desc); in ima_store_measurement()
383 result = ima_store_template(entry, violation, inode, filename, pcr); in ima_store_measurement()
389 ima_free_template_entry(entry); in ima_store_measurement()