summaryrefslogtreecommitdiff
path: root/security/lsm_init.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2025-02-12 15:36:51 -0500
committerPaul Moore <paul@paul-moore.com>2025-10-22 19:24:19 -0400
commit250898ca335f337bc032a9693dc0a30a1cb85825 (patch)
tree2647692b2aaea4b1748f2d68de95c87cbad29224 /security/lsm_init.c
parent592b104f9b516b2c22cb23a2f4c34486fdb21bae (diff)
lsm: rework lsm_active_cnt and lsm_idlist[]
Move the LSM active count and lsm_id list declarations out of a header that is visible across the kernel and into a header that is limited to the LSM framework. This not only helps keep the include/linux headers smaller and cleaner, it helps prevent misuse of these variables. Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: John Johansen <john.johhansen@canonical.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/lsm_init.c')
-rw-r--r--security/lsm_init.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/security/lsm_init.c b/security/lsm_init.c
index a0785ca081c7..d40f31e79bd5 100644
--- a/security/lsm_init.c
+++ b/security/lsm_init.c
@@ -217,12 +217,6 @@ static void __init initialize_lsm(struct lsm_info *lsm)
}
}
-/*
- * Current index to use while initializing the lsm id list.
- */
-u32 lsm_active_cnt __ro_after_init;
-const struct lsm_id *lsm_idlist[MAX_LSM_COUNT];
-
/* Populate ordered LSMs list from comma-separated LSM name list. */
static void __init ordered_lsm_parse(const char *order, const char *origin)
{