Lines Matching full:hash

91  * Calculate the hash of a template entry, add the template entry
131 * Violations are flagged in the measurement list with zero hash values.
177 * @allowed_algos: allowlist of hash algorithms for the IMA xattr
208 struct ima_max_digest_data *hash) in ima_get_verity_digest() argument
215 * hash containing 0's. in ima_get_verity_digest()
217 digest_len = fsverity_get_digest(inode, hash->digest, NULL, &alg); in ima_get_verity_digest()
222 * Unlike in the case of actually calculating the file hash, in in ima_get_verity_digest()
223 * the fsverity case regardless of the hash algorithm, return in ima_get_verity_digest()
228 hash->hdr.algo = alg; in ima_get_verity_digest()
229 hash->hdr.length = digest_len; in ima_get_verity_digest()
236 * Calculate the file hash, if it doesn't already exist,
250 struct ima_max_digest_data hash; in ima_collect_measurement() local
251 struct ima_digest_data *hash_hdr = container_of(&hash.hdr, in ima_collect_measurement()
281 hash.hdr.algo = algo; in ima_collect_measurement()
282 hash.hdr.length = hash_digest_size[algo]; in ima_collect_measurement()
284 /* Initialize hash digest to 0's in case of failure */ in ima_collect_measurement()
285 memset(&hash.digest, 0, sizeof(hash.digest)); in ima_collect_measurement()
288 if (!ima_get_verity_digest(iint, inode, &hash)) { in ima_collect_measurement()
301 length = sizeof(hash.hdr) + hash.hdr.length; in ima_collect_measurement()
309 memcpy(iint->ima_hash, &hash, length); in ima_collect_measurement()
398 char *hash; in ima_audit_measurement() local
405 hash = kzalloc((iint->ima_hash->length * 2) + 1, GFP_KERNEL); in ima_audit_measurement()
406 if (!hash) in ima_audit_measurement()
410 hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]); in ima_audit_measurement()
411 hash[i * 2] = '\0'; in ima_audit_measurement()
420 audit_log_format(ab, " hash=\"%s:%s\"", algo_name, hash); in ima_audit_measurement()
427 kfree(hash); in ima_audit_measurement()