xref: /linux/security/lsm.h (revision 250898ca335f337bc032a9693dc0a30a1cb85825)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * LSM functions
4  */
5 
6 #ifndef _LSM_H_
7 #define _LSM_H_
8 
9 #include <linux/lsm_hooks.h>
10 #include <linux/lsm_count.h>
11 
12 /* List of configured LSMs */
13 extern unsigned int lsm_active_cnt;
14 extern const struct lsm_id *lsm_idlist[];
15 
16 /* LSM blob configuration */
17 extern struct lsm_blob_sizes blob_sizes;
18 
19 /* LSM blob caches */
20 extern struct kmem_cache *lsm_file_cache;
21 extern struct kmem_cache *lsm_inode_cache;
22 
23 /* LSM blob allocators */
24 int lsm_cred_alloc(struct cred *cred, gfp_t gfp);
25 int lsm_task_alloc(struct task_struct *task);
26 
27 #endif /* _LSM_H_ */
28