summaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/usercopy.c
diff options
context:
space:
mode:
authorHeiko Carstens2010-02-26 22:37:22 +0100
committerMartin Schwidefsky2010-02-26 22:37:29 +0100
commit1dcec254afe5bc700a4cacf810b71a28bd994ea9 (patch)
treef96d7fbd9f1fba0701e3648d2b5d82f3938353f8 /arch/s390/lib/usercopy.c
parentMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jb... (diff)
downloadkernel-qcow2-linux-1dcec254afe5bc700a4cacf810b71a28bd994ea9.tar.gz
kernel-qcow2-linux-1dcec254afe5bc700a4cacf810b71a28bd994ea9.tar.xz
kernel-qcow2-linux-1dcec254afe5bc700a4cacf810b71a28bd994ea9.zip
[S390] uaccess: implement strict user copy checks
Same as on x86 and sparc, besides the fact that enabling the option will just emit compile time warnings instead of errors. Keeps allyesconfig kernels compiling. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/lib/usercopy.c')
-rw-r--r--arch/s390/lib/usercopy.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/lib/usercopy.c b/arch/s390/lib/usercopy.c
new file mode 100644
index 000000000000..14b363fec8a2
--- /dev/null
+++ b/arch/s390/lib/usercopy.c
@@ -0,0 +1,8 @@
+#include <linux/module.h>
+#include <linux/bug.h>
+
+void copy_from_user_overflow(void)
+{
+ WARN(1, "Buffer overflow detected!\n");
+}
+EXPORT_SYMBOL(copy_from_user_overflow);