Home
last modified time | relevance | path

Searched refs:iint (Results 1 – 11 of 11) sorted by relevance

/linux-4.1.27/security/integrity/
Diint.c35 struct integrity_iint_cache *iint; in __integrity_iint_find() local
39 iint = rb_entry(n, struct integrity_iint_cache, rb_node); in __integrity_iint_find()
41 if (inode < iint->inode) in __integrity_iint_find()
43 else if (inode > iint->inode) in __integrity_iint_find()
51 return iint; in __integrity_iint_find()
59 struct integrity_iint_cache *iint; in integrity_iint_find() local
65 iint = __integrity_iint_find(inode); in integrity_iint_find()
68 return iint; in integrity_iint_find()
71 static void iint_free(struct integrity_iint_cache *iint) in iint_free() argument
73 kfree(iint->ima_hash); in iint_free()
[all …]
DMakefile7 integrity-y := iint.o
/linux-4.1.27/security/integrity/ima/
Dima_appraise.c49 struct integrity_iint_cache *iint) in ima_fix_xattr() argument
52 u8 algo = iint->ima_hash->algo; in ima_fix_xattr()
56 iint->ima_hash->xattr.sha1.type = IMA_XATTR_DIGEST; in ima_fix_xattr()
59 iint->ima_hash->xattr.ng.type = IMA_XATTR_DIGEST_NG; in ima_fix_xattr()
60 iint->ima_hash->xattr.ng.algo = algo; in ima_fix_xattr()
63 &iint->ima_hash->xattr.data[offset], in ima_fix_xattr()
64 (sizeof(iint->ima_hash->xattr) - offset) + in ima_fix_xattr()
65 iint->ima_hash->length, 0); in ima_fix_xattr()
70 enum integrity_status ima_get_cache_status(struct integrity_iint_cache *iint, in ima_get_cache_status() argument
75 return iint->ima_mmap_status; in ima_get_cache_status()
[all …]
Dima_main.c81 struct integrity_iint_cache *iint, in ima_rdwr_violation_check() argument
92 if (!iint) in ima_rdwr_violation_check()
93 iint = integrity_iint_find(inode); in ima_rdwr_violation_check()
95 if (iint && (iint->flags & IMA_MEASURE)) in ima_rdwr_violation_check()
115 static void ima_check_last_writer(struct integrity_iint_cache *iint, in ima_check_last_writer() argument
125 if ((iint->version != inode->i_version) || in ima_check_last_writer()
126 (iint->flags & IMA_NEW_FILE)) { in ima_check_last_writer()
127 iint->flags &= ~(IMA_DONE_MASK | IMA_NEW_FILE); in ima_check_last_writer()
128 if (iint->flags & IMA_APPRAISE) in ima_check_last_writer()
129 ima_update_xattr(iint, file); in ima_check_last_writer()
[all …]
Dima_api.c40 int ima_alloc_init_template(struct integrity_iint_cache *iint, in ima_alloc_init_template() argument
58 result = field->field_init(iint, file, filename, in ima_alloc_init_template()
191 int ima_collect_measurement(struct integrity_iint_cache *iint, in ima_collect_measurement() argument
208 if (!(iint->flags & IMA_COLLECTED)) { in ima_collect_measurement()
226 void *tmpbuf = krealloc(iint->ima_hash, length, in ima_collect_measurement()
229 iint->ima_hash = tmpbuf; in ima_collect_measurement()
230 memcpy(iint->ima_hash, &hash, length); in ima_collect_measurement()
231 iint->version = i_version; in ima_collect_measurement()
232 iint->flags |= IMA_COLLECTED; in ima_collect_measurement()
260 void ima_store_measurement(struct integrity_iint_cache *iint, in ima_store_measurement() argument
[all …]
Dima_template_lib.c199 int ima_eventdigest_init(struct integrity_iint_cache *iint, struct file *file, in ima_eventdigest_init() argument
215 if (!iint) /* recording a violation. */ in ima_eventdigest_init()
218 if (ima_template_hash_algo_allowed(iint->ima_hash->algo)) { in ima_eventdigest_init()
219 cur_digest = iint->ima_hash->digest; in ima_eventdigest_init()
220 cur_digestsize = iint->ima_hash->length; in ima_eventdigest_init()
247 int ima_eventdigest_ng_init(struct integrity_iint_cache *iint, in ima_eventdigest_ng_init() argument
256 if (!iint) in ima_eventdigest_ng_init()
259 cur_digest = iint->ima_hash->digest; in ima_eventdigest_ng_init()
260 cur_digestsize = iint->ima_hash->length; in ima_eventdigest_ng_init()
262 hash_algo = iint->ima_hash->algo; in ima_eventdigest_ng_init()
[all …]
Dima.h64 int (*field_init) (struct integrity_iint_cache *iint, struct file *file,
133 int ima_collect_measurement(struct integrity_iint_cache *iint,
137 void ima_store_measurement(struct integrity_iint_cache *iint, struct file *file,
141 void ima_audit_measurement(struct integrity_iint_cache *iint,
143 int ima_alloc_init_template(struct integrity_iint_cache *iint,
171 int ima_appraise_measurement(int func, struct integrity_iint_cache *iint,
176 void ima_update_xattr(struct integrity_iint_cache *iint, struct file *file);
177 enum integrity_status ima_get_cache_status(struct integrity_iint_cache *iint,
186 struct integrity_iint_cache *iint, in ima_appraise_measurement() argument
201 static inline void ima_update_xattr(struct integrity_iint_cache *iint, in ima_update_xattr() argument
[all …]
Dima_init.c57 struct integrity_iint_cache tmp_iint, *iint = &tmp_iint; in ima_add_boot_aggregate() local
65 memset(iint, 0, sizeof(*iint)); in ima_add_boot_aggregate()
67 iint->ima_hash = &hash.hdr; in ima_add_boot_aggregate()
68 iint->ima_hash->algo = HASH_ALGO_SHA1; in ima_add_boot_aggregate()
69 iint->ima_hash->length = SHA1_DIGEST_SIZE; in ima_add_boot_aggregate()
79 result = ima_alloc_init_template(iint, NULL, boot_aggregate_name, in ima_add_boot_aggregate()
Dima_template_lib.h29 int ima_eventdigest_init(struct integrity_iint_cache *iint, struct file *file,
33 int ima_eventname_init(struct integrity_iint_cache *iint, struct file *file,
37 int ima_eventdigest_ng_init(struct integrity_iint_cache *iint,
41 int ima_eventname_ng_init(struct integrity_iint_cache *iint, struct file *file,
45 int ima_eventsig_init(struct integrity_iint_cache *iint, struct file *file,
/linux-4.1.27/security/integrity/evm/
Devm_main.c114 struct integrity_iint_cache *iint) in evm_verify_hmac() argument
121 if (iint && iint->evm_status == INTEGRITY_PASS) in evm_verify_hmac()
122 return iint->evm_status; in evm_verify_hmac()
185 if (iint) in evm_verify_hmac()
186 iint->evm_status = evm_status; in evm_verify_hmac()
233 struct integrity_iint_cache *iint) in evm_verifyxattr() argument
238 if (!iint) { in evm_verifyxattr()
239 iint = integrity_iint_find(d_backing_inode(dentry)); in evm_verifyxattr()
240 if (!iint) in evm_verifyxattr()
244 xattr_value_len, iint); in evm_verifyxattr()
[all …]
/linux-4.1.27/include/linux/
Devm.h21 struct integrity_iint_cache *iint);
50 struct integrity_iint_cache *iint) in evm_verifyxattr() argument