summaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2012-10-16 07:32:07 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-12-14 13:05:24 +1030
commit2e72d51b4ac32989496870cd8171b3682fea1839 (patch)
treeb8190d17aa5d59508f8c979ce0160f21bef89500 /security/security.c
parent2f3238aebedb243804f58d62d57244edec4149b2 (diff)
downloadblackbird-op-linux-2e72d51b4ac32989496870cd8171b3682fea1839.tar.gz
blackbird-op-linux-2e72d51b4ac32989496870cd8171b3682fea1839.zip
security: introduce kernel_module_from_file hook
Now that kernel module origins can be reasoned about, provide a hook to the LSMs to make policy decisions about the module file. This will let Chrome OS enforce that loadable kernel modules can only come from its read-only hash-verified root filesystem. Other LSMs can, for example, read extended attributes for signatures, etc. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com> Acked-by: Eric Paris <eparis@redhat.com> Acked-by: Mimi Zohar <zohar@us.ibm.com> Acked-by: James Morris <james.l.morris@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c
index 8dcd4ae10a5f..ce88630de15d 100644
--- a/security/security.c
+++ b/security/security.c
@@ -820,6 +820,11 @@ int security_kernel_module_request(char *kmod_name)
return security_ops->kernel_module_request(kmod_name);
}
+int security_kernel_module_from_file(struct file *file)
+{
+ return security_ops->kernel_module_from_file(file);
+}
+
int security_task_fix_setuid(struct cred *new, const struct cred *old,
int flags)
{
OpenPOWER on IntegriCloud