Lines Matching refs:iint
134 struct ima_iint_cache *iint, const char *op,
139 struct ima_event_data event_data = { .iint = iint,
204 static bool ima_get_verity_digest(struct ima_iint_cache *iint,
235 * storing the measurement and i_version in the iint.
237 * Must be called with iint->mutex held.
241 int ima_collect_measurement(struct ima_iint_cache *iint, struct file *file,
266 if (iint->flags & IMA_COLLECTED)
285 if (iint->flags & IMA_VERITY_REQUIRED) {
286 if (!ima_get_verity_digest(iint, inode, &hash)) {
300 tmpbuf = krealloc(iint->ima_hash, length, GFP_NOFS);
306 iint->ima_hash = tmpbuf;
307 memcpy(iint->ima_hash, &hash, length);
309 iint->real_inode.version = i_version;
311 integrity_inode_attrs_store(&iint->real_inode, i_version,
316 iint->flags |= IMA_COLLECTED;
343 * - the inode was previously flushed as well as the iint info,
346 * Must be called with iint->mutex held.
348 void ima_store_measurement(struct ima_iint_cache *iint, struct file *file,
359 struct ima_event_data event_data = { .iint = iint,
373 if (iint->measured_pcrs & (0x1 << pcr) && !modsig)
385 iint->flags |= IMA_MEASURED;
386 iint->measured_pcrs |= (0x1 << pcr);
392 void ima_audit_measurement(struct ima_iint_cache *iint,
397 const char *algo_name = hash_algo_name[iint->ima_hash->algo];
400 if (iint->flags & IMA_AUDITED)
403 hash = kzalloc((iint->ima_hash->length * 2) + 1, GFP_KERNEL);
407 for (i = 0; i < iint->ima_hash->length; i++)
408 hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]);
423 iint->flags |= IMA_AUDITED;