Lines Matching refs:entry
27 void ima_free_template_entry(struct ima_template_entry *entry) in ima_free_template_entry() argument
31 for (i = 0; i < entry->template_desc->num_fields; i++) in ima_free_template_entry()
32 kfree(entry->template_data[i].data); in ima_free_template_entry()
34 kfree(entry); in ima_free_template_entry()
41 struct ima_template_entry **entry) in ima_alloc_init_template() argument
46 *entry = kzalloc(sizeof(**entry) + template_desc->num_fields * in ima_alloc_init_template()
48 if (!*entry) in ima_alloc_init_template()
51 (*entry)->template_desc = template_desc; in ima_alloc_init_template()
57 &((*entry)->template_data[i])); in ima_alloc_init_template()
61 len = (*entry)->template_data[i].len; in ima_alloc_init_template()
62 (*entry)->template_data_len += sizeof(len); in ima_alloc_init_template()
63 (*entry)->template_data_len += len; in ima_alloc_init_template()
67 ima_free_template_entry(*entry); in ima_alloc_init_template()
68 *entry = NULL; in ima_alloc_init_template()
88 int ima_store_template(struct ima_template_entry *entry, in ima_store_template() argument
94 char *template_name = entry->template_desc->name; in ima_store_template()
102 int num_fields = entry->template_desc->num_fields; in ima_store_template()
106 result = ima_calc_field_array_hash(&entry->template_data[0], in ima_store_template()
107 entry->template_desc, in ima_store_template()
115 memcpy(entry->digest, hash.hdr.digest, hash.hdr.length); in ima_store_template()
117 result = ima_add_template_entry(entry, violation, op, inode, filename); in ima_store_template()
132 struct ima_template_entry *entry; in ima_add_violation() local
142 result = ima_alloc_init_template(&event_data, &entry); in ima_add_violation()
147 result = ima_store_template(entry, violation, inode, filename); in ima_add_violation()
149 ima_free_template_entry(entry); in ima_add_violation()
268 struct ima_template_entry *entry; in ima_store_measurement() local
276 result = ima_alloc_init_template(&event_data, &entry); in ima_store_measurement()
283 result = ima_store_template(entry, violation, inode, filename); in ima_store_measurement()
287 ima_free_template_entry(entry); in ima_store_measurement()