X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fx86%2Finclude%2Fasm%2Fuaccess_64.h;fp=include%2Fasm-x86%2Fuaccess_64.h;h=84210c479fca83524c6cef4c6bc069bcff76e272;hb=b19b3c74c7bbec45a848631b8f970ac110665a01;hp=515d4dce96b598bc6e9d07dba21332a44924948c;hpb=42569c39917a08e8de1e8b5685463be7b74baebd;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-x86/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h similarity index 96% rename from include/asm-x86/uaccess_64.h rename to arch/x86/include/asm/uaccess_64.h index 515d4dce96b..84210c479fc 100644 --- a/include/asm-x86/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -1,5 +1,5 @@ -#ifndef __X86_64_UACCESS_H -#define __X86_64_UACCESS_H +#ifndef _ASM_X86_UACCESS_64_H +#define _ASM_X86_UACCESS_64_H /* * User space memory access functions @@ -7,6 +7,7 @@ #include #include #include +#include #include /* @@ -28,6 +29,8 @@ static __always_inline __must_check int __copy_from_user(void *dst, const void __user *src, unsigned size) { int ret = 0; + + might_fault(); if (!__builtin_constant_p(size)) return copy_user_generic(dst, (__force void *)src, size); switch (size) { @@ -45,7 +48,7 @@ int __copy_from_user(void *dst, const void __user *src, unsigned size) return ret; case 10: __get_user_asm(*(u64 *)dst, (u64 __user *)src, - ret, "q", "", "=r", 16); + ret, "q", "", "=r", 10); if (unlikely(ret)) return ret; __get_user_asm(*(u16 *)(8 + (char *)dst), @@ -70,6 +73,8 @@ static __always_inline __must_check int __copy_to_user(void __user *dst, const void *src, unsigned size) { int ret = 0; + + might_fault(); if (!__builtin_constant_p(size)) return copy_user_generic((__force void *)dst, src, size); switch (size) { @@ -112,6 +117,8 @@ static __always_inline __must_check int __copy_in_user(void __user *dst, const void __user *src, unsigned size) { int ret = 0; + + might_fault(); if (!__builtin_constant_p(size)) return copy_user_generic((__force void *)dst, (__force void *)src, size); @@ -198,4 +205,4 @@ static inline int __copy_from_user_inatomic_nocache(void *dst, unsigned long copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest); -#endif /* __X86_64_UACCESS_H */ +#endif /* _ASM_X86_UACCESS_64_H */