linux/arch
Kees Cook 34e1169d99 module: add syscall to load module from fd
As part of the effort to create a stronger boundary between root and
kernel, Chrome OS wants to be able to enforce that kernel modules are
being loaded only from our read-only crypto-hash verified (dm_verity)
root filesystem. Since the init_module syscall hands the kernel a module
as a memory blob, no reasoning about the origin of the blob can be made.

Earlier proposals for appending signatures to kernel modules would not be
useful in Chrome OS, since it would involve adding an additional set of
keys to our kernel and builds for no good reason: we already trust the
contents of our root filesystem. We don't need to verify those kernel
modules a second time. Having to do signature checking on module loading
would slow us down and be redundant. All we need to know is where a
module is coming from so we can say yes/no to loading it.

If a file descriptor is used as the source of a kernel module, many more
things can be reasoned about. In Chrome OS's case, we could enforce that
the module lives on the filesystem we expect it to live on.  In the case
of IMA (or other LSMs), it would be possible, for example, to examine
extended attributes that may contain signatures over the contents of
the module.

This introduces a new syscall (on x86), similar to init_module, that has
only two arguments. The first argument is used as a file descriptor to
the module and the second argument is a pointer to the NULL terminated
string of module arguments.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (merge fixes)
2012-12-14 13:05:22 +10:30
..
alpha Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-11-18 09:13:48 -10:00
arm ARM: SoC fixes for 3.7 2012-11-30 10:30:34 -08:00
arm64 arm64: Distinguish between user and kernel XN bits 2012-11-16 15:50:25 +00:00
avr32 Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
blackfin Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
c6x c6x: use generic kvm_para.h 2012-11-28 14:33:03 -05:00
cris Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
frv frv: fix the broken preempt 2012-11-02 12:08:25 -04:00
h8300 h8300: add missing L1_CACHE_SHIFT 2012-11-09 06:41:47 +01:00
hexagon Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
ia64 revert "mm: fix-up zone present pages" 2012-11-16 14:33:04 -08:00
m32r Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
m68k m68k: fix sigset_t accessor functions 2012-11-18 10:32:16 +01:00
microblaze microblaze: rt_sigreturn is too trigger-happy about sigaltstack errors 2012-11-28 21:46:12 -05:00
mips MIPS: Fix crash that occurs when function tracing is enabled 2012-11-23 18:44:38 +01:00
mn10300 UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty 2012-10-17 12:32:35 +01:00
openrisc openrisk: fix altstack switching on sigreturn 2012-11-28 21:46:11 -05:00
parisc [PARISC] fix user-triggerable panic on parisc 2012-11-22 09:33:12 +00:00
powerpc powerpc/eeh: Do not invalidate PE properly 2012-11-26 09:14:16 +11:00
s390 s390/mm: have 16 byte aligned struct pages 2012-11-13 11:03:09 +01:00
score score: do_sigaltstack() expects a userland pointer... 2012-11-28 21:46:12 -05:00
sh sh64: fix altstack switching on sigreturn 2012-11-28 21:46:11 -05:00
sparc Device tree regression fix for v3.7 2012-11-23 12:36:06 -10:00
tile arch/tile: avoid build warnings from duplicate ELF_R_xxx #defines 2012-10-23 10:22:48 -04:00
um um: get_safe_registers() should be done in flush_thread(), not start_thread() 2012-11-28 21:46:03 -05:00
unicore32 arch/unicore32: remove CONFIG_EXPERIMENTAL 2012-11-09 17:30:10 +08:00
x86 module: add syscall to load module from fd 2012-12-14 13:05:22 +10:30
xtensa xtensa: switch to generic sys_execve() 2012-10-25 15:00:44 -07:00
.gitignore
Kconfig Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00