summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/uaccess_64.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-09 00:45:46 -0700
committerDavid S. Miller <davem@davemloft.net>2010-08-09 00:45:46 -0700
commit4cb6066af9ee58ddba58a63cc77b324ac21add75 (patch)
tree4159489e6d6e3c7160f6dd2103992a163eded1a7 /arch/sparc/include/asm/uaccess_64.h
parentb11287e8c5b2797b86351f6db0fcd9ff99b20bab (diff)
downloadop-kernel-dev-4cb6066af9ee58ddba58a63cc77b324ac21add75.zip
op-kernel-dev-4cb6066af9ee58ddba58a63cc77b324ac21add75.tar.gz
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_64.h')
-rw-r--r--arch/sparc/include/asm/uaccess_64.h23
1 files changed, 5 insertions, 18 deletions
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
index 2406788..3e1449f 100644
--- a/arch/sparc/include/asm/uaccess_64.h
+++ b/arch/sparc/include/asm/uaccess_64.h
@@ -205,14 +205,6 @@ __asm__ __volatile__( \
extern int __get_user_bad(void);
-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
-;
-
extern unsigned long __must_check ___copy_from_user(void *to,
const void __user *from,
unsigned long size);
@@ -221,16 +213,11 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from,
static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long size)
{
- int sz = __compiletime_object_size(to);
- unsigned long ret = size;
-
- if (likely(sz == -1 || sz >= size)) {
- ret = ___copy_from_user(to, from, size);
- if (unlikely(ret))
- ret = copy_from_user_fixup(to, from, size);
- } else {
- copy_from_user_overflow();
- }
+ unsigned long ret = ___copy_from_user(to, from, size);
+
+ if (unlikely(ret))
+ ret = copy_from_user_fixup(to, from, size);
+
return ret;
}
#define __copy_from_user copy_from_user
OpenPOWER on IntegriCloud