Lines Matching refs:iint
134 struct integrity_iint_cache *iint,
139 struct ima_event_data event_data = { .iint = iint,
204 static bool ima_get_verity_digest(struct integrity_iint_cache *iint,
214 digest_len = fsverity_get_digest(iint->inode, hash->digest, NULL, &alg);
234 * storing the measurement and i_version in the iint.
236 * Must be called with iint->mutex held.
240 int ima_collect_measurement(struct integrity_iint_cache *iint,
263 if (iint->flags & IMA_COLLECTED)
282 if (iint->flags & IMA_VERITY_REQUIRED) {
283 if (!ima_get_verity_digest(iint, &hash)) {
297 tmpbuf = krealloc(iint->ima_hash, length, GFP_NOFS);
303 iint->ima_hash = tmpbuf;
304 memcpy(iint->ima_hash, &hash, length);
305 iint->version = i_version;
307 iint->real_ino = real_inode->i_ino;
308 iint->real_dev = real_inode->i_sb->s_dev;
313 iint->flags |= IMA_COLLECTED;
336 * - the inode was previously flushed as well as the iint info,
339 * Must be called with iint->mutex held.
341 void ima_store_measurement(struct integrity_iint_cache *iint,
352 struct ima_event_data event_data = { .iint = iint,
366 if (iint->measured_pcrs & (0x1 << pcr) && !modsig)
378 iint->flags |= IMA_MEASURED;
379 iint->measured_pcrs |= (0x1 << pcr);
385 void ima_audit_measurement(struct integrity_iint_cache *iint,
390 const char *algo_name = hash_algo_name[iint->ima_hash->algo];
393 if (iint->flags & IMA_AUDITED)
396 hash = kzalloc((iint->ima_hash->length * 2) + 1, GFP_KERNEL);
400 for (i = 0; i < iint->ima_hash->length; i++)
401 hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]);
416 iint->flags |= IMA_AUDITED;