summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/uaccess.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-23 02:53:19 +0200
committerDavid S. Miller <davem@davemloft.net>2012-05-23 08:32:27 +0200
commitff06dffbc8abfc60d6a0332f058f1d1bb01abb31 (patch)
tree0845d6acfaf8221fb5d6ae3281cb1c33a8212cff /arch/sparc/include/asm/uaccess.h
parentsparc32: use the common implementation of alloc_thread_info_node() (diff)
downloadlinux-ff06dffbc8abfc60d6a0332f058f1d1bb01abb31.tar.xz
linux-ff06dffbc8abfc60d6a0332f058f1d1bb01abb31.zip
sparc: Add full proper error handling to strncpy_from_user().
Linus removed the end-of-address-space hackery from fs/namei.c:do_getname() so we really have to validate these edge conditions and cannot cheat any more (as x86 used to as well). Move to a common C implementation like x86 did. And if both src and dst are sufficiently aligned we'll do word at a time copies and checks as well. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/uaccess.h')
-rw-r--r--arch/sparc/include/asm/uaccess.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h
index e88fbe5c0457..42a28cfd941f 100644
--- a/arch/sparc/include/asm/uaccess.h
+++ b/arch/sparc/include/asm/uaccess.h
@@ -5,4 +5,7 @@
#else
#include <asm/uaccess_32.h>
#endif
+
+extern long strncpy_from_user(char *dest, const char __user *src, long count);
+
#endif