]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - security/integrity/ima/ima.h
IMA: use rbtree instead of radix tree for inode information cache
[net-next-2.6.git] / security / integrity / ima / ima.h
index 3fbcd1dda0ef6e06da4a5b4b9c23a240a6378a35..7557791e954d53d1f176a0e518d7b8db1b7ddd7f 100644 (file)
@@ -100,6 +100,8 @@ static inline unsigned long ima_hash_key(u8 *digest)
 
 /* integrity data associated with an inode */
 struct ima_iint_cache {
+       struct rb_node rb_node; /* rooted in ima_iint_tree */
+       struct inode *inode;    /* back pointer to inode in question */
        u64 version;            /* track inode changes */
        unsigned long flags;
        u8 digest[IMA_DIGEST_SIZE];
@@ -108,7 +110,6 @@ struct ima_iint_cache {
        long writecount;        /* measured files writecount */
        long opencount;         /* opens reference count */
        struct kref refcount;   /* ima_iint_cache reference count */
-       struct rcu_head rcu;
 };
 
 /* LIM API function definitions */
@@ -122,13 +123,12 @@ int ima_store_template(struct ima_template_entry *entry, int violation,
 void ima_template_show(struct seq_file *m, void *e,
                       enum ima_show_type show);
 
-/* radix tree calls to lookup, insert, delete
+/* rbtree tree calls to lookup, insert, delete
  * integrity data associated with an inode.
  */
 struct ima_iint_cache *ima_iint_insert(struct inode *inode);
 struct ima_iint_cache *ima_iint_find_get(struct inode *inode);
 void iint_free(struct kref *kref);
-void iint_rcu_free(struct rcu_head *rcu);
 
 /* IMA policy related functions */
 enum ima_hooks { FILE_CHECK = 1, FILE_MMAP, BPRM_CHECK };