Lines Matching defs:iint
136 struct ima_iint_cache *iint, const char *op,
141 struct ima_event_data event_data = { .iint = iint,
206 static bool ima_get_verity_digest(struct ima_iint_cache *iint,
237 * storing the measurement and i_version in the iint.
239 * Must be called with iint->mutex held.
243 int ima_collect_measurement(struct ima_iint_cache *iint, struct file *file,
268 if (iint->flags & IMA_COLLECTED)
292 if (iint->flags & IMA_VERITY_REQUIRED) {
293 if (!ima_get_verity_digest(iint, inode, &hash)) {
307 tmpbuf = krealloc(iint->ima_hash, length, GFP_NOFS);
313 iint->ima_hash = tmpbuf;
314 memcpy(iint->ima_hash, &hash, length);
316 iint->real_inode.version = i_version;
318 integrity_inode_attrs_store(&iint->real_inode, i_version,
323 iint->flags |= IMA_COLLECTED;
350 * - the inode was previously flushed as well as the iint info,
353 * Must be called with iint->mutex held.
355 void ima_store_measurement(struct ima_iint_cache *iint, struct file *file,
366 struct ima_event_data event_data = { .iint = iint,
380 if (iint->measured_pcrs & (0x1 << pcr) && !modsig)
392 iint->flags |= IMA_MEASURED;
393 iint->measured_pcrs |= (0x1 << pcr);
399 void ima_audit_measurement(struct ima_iint_cache *iint,
404 const char *algo_name = hash_algo_name[iint->ima_hash->algo];
407 if (iint->flags & IMA_AUDITED)
410 hash = kzalloc((iint->ima_hash->length * 2) + 1, GFP_KERNEL);
414 for (i = 0; i < iint->ima_hash->length; i++)
415 hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]);
430 iint->flags |= IMA_AUDITED;