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>
This commit is contained in:
David S. Miller
2012-05-22 17:53:19 -07:00
parent 29af0ebaa2
commit ff06dffbc8
8 changed files with 136 additions and 198 deletions

View File

@@ -33,9 +33,6 @@ EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(__bzero);
/* Moving data to/from/in userspace. */
EXPORT_SYMBOL(__strncpy_from_user);
/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial);