summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2014-01-23 15:54:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 16:36:57 -0800
commit93e9ef83f40603535ffe6b60498149e75f33aa8f (patch)
tree95d60673c9afaef1d843791265076b9ca7745e80 /lib/Makefile
parentff6f9bbb582c1cb00cbe7ecd96bcde229fd336f7 (diff)
downloadlinux-93e9ef83f40603535ffe6b60498149e75f33aa8f.tar.gz
linux-93e9ef83f40603535ffe6b60498149e75f33aa8f.tar.bz2
linux-93e9ef83f40603535ffe6b60498149e75f33aa8f.zip
test: add minimal module for verification testing
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: Kees Cook <keescook@chromium.org> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index a459c31e8c6b..b494b9af631c 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -31,6 +31,7 @@ obj-y += string_helpers.o
obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
obj-y += kstrtox.o
obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o
+obj-$(CONFIG_TEST_MODULE) += test_module.o
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG