summaryrefslogtreecommitdiff
path: root/security/selinux/ss/ebitmap.h
diff options
context:
space:
mode:
authorJunil Lee <junil0814.lee@lge.com>2017-06-08 13:18:09 +0900
committerPaul Moore <paul@paul-moore.com>2017-06-09 16:13:50 -0400
commitb4958c892e02241b9bd121f3397b76225ff6f4a3 (patch)
treee471fff24bbfa77f27596102f1be03c9dde77988 /security/selinux/ss/ebitmap.h
parent8e71bf75efceff07e04e1f8a4b7c0dbff7205949 (diff)
selinux: use kmem_cache for ebitmap
The allocated size for each ebitmap_node is 192byte by kzalloc(). Then, ebitmap_node size is fixed, so it's possible to use only 144byte for each object by kmem_cache_zalloc(). It can reduce some dynamic allocation size. Signed-off-by: Junil Lee <junil0814.lee@lge.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/ebitmap.h')
-rw-r--r--security/selinux/ss/ebitmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/selinux/ss/ebitmap.h b/security/selinux/ss/ebitmap.h
index 9637b8c71085..6d5a9ac4251f 100644
--- a/security/selinux/ss/ebitmap.h
+++ b/security/selinux/ss/ebitmap.h
@@ -130,6 +130,9 @@ void ebitmap_destroy(struct ebitmap *e);
int ebitmap_read(struct ebitmap *e, void *fp);
int ebitmap_write(struct ebitmap *e, void *fp);
+void ebitmap_cache_init(void);
+void ebitmap_cache_destroy(void);
+
#ifdef CONFIG_NETLABEL
int ebitmap_netlbl_export(struct ebitmap *ebmap,
struct netlbl_lsm_catmap **catmap);