security: introduce kernel_module_from_file hook
authorKees Cook <keescook@chromium.org>
Mon, 15 Oct 2012 21:02:07 +0000 (07:32 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 14 Dec 2012 02:35:24 +0000 (13:05 +1030)
commit2e72d51b4ac32989496870cd8171b3682fea1839
treeb8190d17aa5d59508f8c979ce0160f21bef89500
parent2f3238aebedb243804f58d62d57244edec4149b2
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>
include/linux/security.h
kernel/module.c
security/capability.c
security/security.c