selinux: cache sidtab_context_to_sid results
[linux-flexiantxendom0-natty.git] / security / selinux / ss / sidtab.h
index 64ea5b1..84dc154 100644 (file)
@@ -26,6 +26,8 @@ struct sidtab {
        unsigned int nel;       /* number of elements */
        unsigned int next_sid;  /* next SID to allocate */
        unsigned char shutdown;
+#define SIDTAB_CACHE_LEN       3
+       struct sidtab_node *cache[SIDTAB_CACHE_LEN];
        spinlock_t lock;
 };