summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2014-01-23 15:54:38 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 16:36:57 -0800
commit3e2a4c183ace8708c69f589505fb82bb63010ade (patch)
treee201c3d60f39bbe3ba5026417d454553ad2fe073 /lib/Makefile
parent93e9ef83f40603535ffe6b60498149e75f33aa8f (diff)
downloadblackbird-op-linux-3e2a4c183ace8708c69f589505fb82bb63010ade.tar.gz
blackbird-op-linux-3e2a4c183ace8708c69f589505fb82bb63010ade.zip
test: check copy_to/from_user boundary validation
To help avoid an architecture failing to correctly check kernel/user boundaries when handling copy_to_user, copy_from_user, put_user, or get_user, perform some simple tests and fail to load if any of them behave unexpectedly. Specifically, this is to make sure there is a way to notice if things like what was fixed in commit 8404663f81d2 ("ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS") ever regresses again, for any architecture. Additionally, adds new "user" selftest target, which loads this module. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: 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 b494b9af631c..98ec3b861062 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -32,6 +32,7 @@ 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
+obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG
OpenPOWER on IntegriCloud