• Kees Cook's avatar
    test: add minimal module for verification testing · 93e9ef83
    Kees Cook authored
    This is a pair of test modules I'd like to see in the tree.  Instead of
    putting these in lkdtm, where I've been adding various tests that trigger
    crashes, these don't make sense there since they need to be either
    distinctly separate, or their pass/fail state don't need to crash the
    machine.
    
    These live in lib/ for now, along with a few other in-kernel test modules,
    and use the slightly more common "test_" naming convention, instead of
    "test-".  We should likely standardize on the former:
    
    $ find . -name 'test_*.c' | grep -v /tools/ | wc -l
    4
    $ find . -name 'test-*.c' | grep -v /tools/ | wc -l
    2
    
    The first is entirely a no-op module, designed to allow simple testing of
    the module loading and verification interface.  It's useful to have a
    module that has no other uses or dependencies so it can be reliably used
    for just testing module loading and verification.
    
    The second is a module that exercises the user memory access functions, in
    an effort to make sure that we can quickly catch any regressions in
    boundary checking (e.g.  like what was recently fixed on ARM).
    
    This patch (of 2):
    
    When doing module loading verification tests (for example, with module
    signing, or LSM hooks), it is very handy to have a module that can be
    built on all systems under test, isn't auto-loaded at boot, and has no
    device or similar dependencies.  This creates the "test_module.ko" module
    for that purpose, which only reports its load and unload to printk.
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    Cc: Joe Perches <joe@perches.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    93e9ef83
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...