summaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorJames Morris2017-02-14 14:18:51 +0100
committerJames Morris2017-03-06 01:00:15 +0100
commitca97d939db114c8d1619e10a3b82af8615372dae (patch)
treecb16c707c4015b2dcbfc1f783071b5980ddd9145 /security/selinux/hooks.c
parentsecurity: introduce CONFIG_SECURITY_WRITABLE_HOOKS (diff)
downloadkernel-qcow2-linux-ca97d939db114c8d1619e10a3b82af8615372dae.tar.gz
kernel-qcow2-linux-ca97d939db114c8d1619e10a3b82af8615372dae.tar.xz
kernel-qcow2-linux-ca97d939db114c8d1619e10a3b82af8615372dae.zip
security: mark LSM hooks as __ro_after_init
Mark all of the registration hooks as __ro_after_init (via the __lsm_ro_after_init macro). Signed-off-by: James Morris <james.l.morris@oracle.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Acked-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 3ba5ce1f4e05..d37a72316e9d 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -6123,7 +6123,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer)
#endif
-static struct security_hook_list selinux_hooks[] = {
+static struct security_hook_list selinux_hooks[] __lsm_ro_after_init = {
LSM_HOOK_INIT(binder_set_context_mgr, selinux_binder_set_context_mgr),
LSM_HOOK_INIT(binder_transaction, selinux_binder_transaction),
LSM_HOOK_INIT(binder_transfer_binder, selinux_binder_transfer_binder),