diff options
Diffstat (limited to 'arch/x86/include/asm/uaccess_32.h')
-rw-r--r-- | arch/x86/include/asm/uaccess_32.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h index 7f760a9f1f61..3c03a5de64d3 100644 --- a/arch/x86/include/asm/uaccess_32.h +++ b/arch/x86/include/asm/uaccess_32.h | |||
@@ -184,33 +184,4 @@ __copy_from_user_inatomic_nocache(void *to, const void __user *from, | |||
184 | return __copy_from_user_ll_nocache_nozero(to, from, n); | 184 | return __copy_from_user_ll_nocache_nozero(to, from, n); |
185 | } | 185 | } |
186 | 186 | ||
187 | unsigned long __must_check copy_to_user(void __user *to, | ||
188 | const void *from, unsigned long n); | ||
189 | unsigned long __must_check _copy_from_user(void *to, | ||
190 | const void __user *from, | ||
191 | unsigned long n); | ||
192 | |||
193 | |||
194 | extern void copy_from_user_overflow(void) | ||
195 | #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS | ||
196 | __compiletime_error("copy_from_user() buffer size is not provably correct") | ||
197 | #else | ||
198 | __compiletime_warning("copy_from_user() buffer size is not provably correct") | ||
199 | #endif | ||
200 | ; | ||
201 | |||
202 | static inline unsigned long __must_check copy_from_user(void *to, | ||
203 | const void __user *from, | ||
204 | unsigned long n) | ||
205 | { | ||
206 | int sz = __compiletime_object_size(to); | ||
207 | |||
208 | if (likely(sz == -1 || sz >= n)) | ||
209 | n = _copy_from_user(to, from, n); | ||
210 | else | ||
211 | copy_from_user_overflow(); | ||
212 | |||
213 | return n; | ||
214 | } | ||
215 | |||
216 | #endif /* _ASM_X86_UACCESS_32_H */ | 187 | #endif /* _ASM_X86_UACCESS_32_H */ |