summaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/uaccess_32.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-09 11:45:46 +0400
committerDavid S. Miller <davem@davemloft.net>2010-08-09 11:45:46 +0400
commit4cb6066af9ee58ddba58a63cc77b324ac21add75 (patch)
tree4159489e6d6e3c7160f6dd2103992a163eded1a7 /arch/sparc/include/asm/uaccess_32.h
parentb11287e8c5b2797b86351f6db0fcd9ff99b20bab (diff)
downloadlinux-4cb6066af9ee58ddba58a63cc77b324ac21add75.tar.xz
sparc: Kill user copy check code.
For whatever reason GCC isn't able to figure things out in the control flow (in particular when min() and max() expressions are involved) on sparc as well as it can on x86. So lots of useless incorrect user copy warnings get spewed and the full-on compile failure mode of the user copy checks were never usable on sparc at all. People can debug these kinds of problems on x86. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/uaccess_32.h')
-rw-r--r--arch/sparc/include/asm/uaccess_32.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
index 25f1d10155e8..8303ac481034 100644
--- a/arch/sparc/include/asm/uaccess_32.h
+++ b/arch/sparc/include/asm/uaccess_32.h
@@ -260,23 +260,8 @@ static inline unsigned long __copy_to_user(void __user *to, const void *from, un
return __copy_user(to, (__force void __user *) from, n);
}
-extern void copy_from_user_overflow(void)
-#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
- __compiletime_error("copy_from_user() buffer size is not provably correct")
-#else
- __compiletime_warning("copy_from_user() buffer size is not provably correct")
-#endif
-;
-
static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
{
- int sz = __compiletime_object_size(to);
-
- if (unlikely(sz != -1 && sz < n)) {
- copy_from_user_overflow();
- return n;
- }
-
if (n && __access_ok((unsigned long) from, n))
return __copy_user((__force void __user *) to, from, n);
else