Lines Matching refs:iint

19  * ima_iint_find - Return the iint associated with an inode
22 * Return the IMA integrity information (iint) associated with an inode, if the
25 * Return: Found iint or NULL.
39 * files both on overlayfs and on underlying fs, we need to annotate the iint
43 static inline void ima_iint_lockdep_annotate(struct ima_iint_cache *iint,
54 lockdep_set_class(&iint->mutex, &ima_iint_mutex_key[depth]);
58 static void ima_iint_init_always(struct ima_iint_cache *iint,
61 iint->ima_hash = NULL;
62 iint->real_inode.version = 0;
63 iint->flags = 0UL;
64 iint->atomic_flags = 0UL;
65 iint->ima_file_status = INTEGRITY_UNKNOWN;
66 iint->ima_mmap_status = INTEGRITY_UNKNOWN;
67 iint->ima_bprm_status = INTEGRITY_UNKNOWN;
68 iint->ima_read_status = INTEGRITY_UNKNOWN;
69 iint->ima_creds_status = INTEGRITY_UNKNOWN;
70 iint->measured_pcrs = 0;
71 mutex_init(&iint->mutex);
72 ima_iint_lockdep_annotate(iint, inode);
75 static void ima_iint_free(struct ima_iint_cache *iint)
77 kfree(iint->ima_hash);
78 mutex_destroy(&iint->mutex);
79 kmem_cache_free(ima_iint_cache, iint);
83 * ima_inode_get - Find or allocate an iint associated with an inode
86 * Find an iint associated with an inode, and allocate a new one if not found.
89 * Return: An iint on success, NULL on error.
93 struct ima_iint_cache *iint;
95 iint = ima_iint_find(inode);
96 if (iint)
97 return iint;
99 iint = kmem_cache_alloc(ima_iint_cache, GFP_NOFS);
100 if (!iint)
103 ima_iint_init_always(iint, inode);
106 ima_inode_set_iint(inode, iint);
108 return iint;
115 * Free the iint associated with an inode.
119 struct ima_iint_cache *iint;
124 iint = ima_iint_find(inode);
127 ima_iint_free(iint);
132 struct ima_iint_cache *iint = (struct ima_iint_cache *)foo;
134 memset(iint, 0, sizeof(*iint));