Searched refs:ima_hash (Results 1 - 8 of 8) sorted by last modified time

/linux-master/security/integrity/ima/
H A Dima_main.c78 __setup("ima_hash=", hash_setup);
599 /* ima_hash could be allocated in case of failure. */
601 kfree(tmp_iint.ima_hash);
617 if (!iint->ima_hash || !(iint->flags & IMA_COLLECTED)) {
625 copied_size = min_t(size_t, iint->ima_hash->length, buf_size);
626 memcpy(buf, iint->ima_hash->digest, copied_size);
628 hash_algo = iint->ima_hash->algo;
632 kfree(iint->ima_hash);
1004 iint.ima_hash = hash_hdr;
1005 iint.ima_hash
[all...]
H A Dima_template_lib.c354 if (ima_template_hash_algo_allowed(event_data->iint->ima_hash->algo)) {
355 cur_digest = event_data->iint->ima_hash->digest;
356 cur_digestsize = event_data->iint->ima_hash->length;
411 cur_digest = event_data->iint->ima_hash->digest;
412 cur_digestsize = event_data->iint->ima_hash->length;
414 hash_algo = event_data->iint->ima_hash->algo;
435 cur_digest = event_data->iint->ima_hash->digest;
436 cur_digestsize = event_data->iint->ima_hash->length;
438 hash_algo = event_data->iint->ima_hash->algo;
H A Dima_init.c58 iint->ima_hash = hash_hdr;
59 iint->ima_hash->algo = ima_hash_algo;
60 iint->ima_hash->length = hash_digest_size[ima_hash_algo];
H A Dima_iint.c61 iint->ima_hash = NULL;
77 kfree(iint->ima_hash);
H A Dima_appraise.c90 u8 algo = iint->ima_hash->algo;
94 iint->ima_hash->xattr.sha1.type = IMA_XATTR_DIGEST;
97 iint->ima_hash->xattr.ng.type = IMA_XATTR_DIGEST_NG;
98 iint->ima_hash->xattr.ng.algo = algo;
101 &iint->ima_hash->xattr.data[offset],
102 (sizeof(iint->ima_hash->xattr) - offset) +
103 iint->ima_hash->length, 0);
306 iint->ima_hash->length)
312 iint->ima_hash->digest,
313 iint->ima_hash
[all...]
H A Dima.h195 struct ima_digest_data *ima_hash; member in struct:ima_iint_cache
H A Dima_api.c300 tmpbuf = krealloc(iint->ima_hash, length, GFP_NOFS);
306 iint->ima_hash = tmpbuf;
307 memcpy(iint->ima_hash, &hash, length);
397 const char *algo_name = hash_algo_name[iint->ima_hash->algo];
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]);
/linux-master/tools/testing/selftests/bpf/progs/
H A Dima.c28 u64 ima_hash = 0; local
36 ret = bpf_ima_inode_hash(file->f_inode, &ima_hash,
37 sizeof(ima_hash));
39 ret = bpf_ima_file_hash(file, &ima_hash,
40 sizeof(ima_hash));
41 if (ret < 0 || ima_hash == 0)
48 *sample = ima_hash;

Completed in 283 milliseconds