Lines Matching refs:iint

31  * __integrity_iint_find - return the iint associated with an inode
35 struct integrity_iint_cache *iint;
39 iint = rb_entry(n, struct integrity_iint_cache, rb_node);
41 if (inode < iint->inode)
43 else if (inode > iint->inode)
46 return iint;
53 * integrity_iint_find - return the iint associated with an inode
57 struct integrity_iint_cache *iint;
63 iint = __integrity_iint_find(inode);
66 return iint;
73 * files both on overlayfs and on underlying fs, we need to annotate the iint
77 static inline void iint_lockdep_annotate(struct integrity_iint_cache *iint,
88 lockdep_set_class(&iint->mutex, &iint_mutex_key[depth]);
92 static void iint_init_always(struct integrity_iint_cache *iint,
95 iint->ima_hash = NULL;
96 iint->version = 0;
97 iint->flags = 0UL;
98 iint->atomic_flags = 0UL;
99 iint->ima_file_status = INTEGRITY_UNKNOWN;
100 iint->ima_mmap_status = INTEGRITY_UNKNOWN;
101 iint->ima_bprm_status = INTEGRITY_UNKNOWN;
102 iint->ima_read_status = INTEGRITY_UNKNOWN;
103 iint->ima_creds_status = INTEGRITY_UNKNOWN;
104 iint->evm_status = INTEGRITY_UNKNOWN;
105 iint->measured_pcrs = 0;
106 mutex_init(&iint->mutex);
107 iint_lockdep_annotate(iint, inode);
110 static void iint_free(struct integrity_iint_cache *iint)
112 kfree(iint->ima_hash);
113 mutex_destroy(&iint->mutex);
114 kmem_cache_free(iint_cache, iint);
118 * integrity_inode_get - find or allocate an iint associated with an inode
120 * @return: allocated iint
128 struct integrity_iint_cache *iint, *test_iint;
130 iint = integrity_iint_find(inode);
131 if (iint)
132 return iint;
134 iint = kmem_cache_alloc(iint_cache, GFP_NOFS);
135 if (!iint)
138 iint_init_always(iint, inode);
153 kmem_cache_free(iint_cache, iint);
158 iint->inode = inode;
159 node = &iint->rb_node;
165 return iint;
172 * Free the integrity information(iint) associated with an inode.
176 struct integrity_iint_cache *iint;
182 iint = __integrity_iint_find(inode);
183 rb_erase(&iint->rb_node, &integrity_iint_tree);
186 iint_free(iint);
191 struct integrity_iint_cache *iint = (struct integrity_iint_cache *) foo;
193 memset(iint, 0, sizeof(*iint));