From: Linus Torvalds Date: Tue, 12 Nov 2013 02:46:06 +0000 (+0900) Subject: Merge branch 'x86-uaccess-for-linus' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: firefly_0821_release~176^2~5019 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c2136301e43cbb3b71d0163a9949f30dafcb4590;p=firefly-linux-kernel-4.4.55.git Merge branch 'x86-uaccess-for-linus' of git://git./linux/kernel/git/tip/tip Pull x86 uaccess changes from Ingo Molnar: "A single change that micro-optimizes __copy_*_user_inatomic(), used by the futex code" * 'x86-uaccess-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic --- c2136301e43cbb3b71d0163a9949f30dafcb4590 diff --cc arch/x86/include/asm/uaccess_64.h index 0acae710fa00,64476bb2a146..190413d0de57 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@@ -48,8 -48,36 +48,8 @@@ copy_user_generic(void *to, const void __must_check unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len); -static inline unsigned long __must_check copy_from_user(void *to, - const void __user *from, - unsigned long n) -{ - int sz = __compiletime_object_size(to); - - might_fault(); - if (likely(sz == -1 || sz >= n)) - n = _copy_from_user(to, from, n); -#ifdef CONFIG_DEBUG_VM - else - WARN(1, "Buffer overflow detected!\n"); -#endif - return n; -} - -static __always_inline __must_check -int copy_to_user(void __user *dst, const void *src, unsigned size) -{ - might_fault(); - - return _copy_to_user(dst, src, size); -} - static __always_inline __must_check - int __copy_from_user(void *dst, const void __user *src, unsigned size) + int __copy_from_user_nocheck(void *dst, const void __user *src, unsigned size) { int ret = 0;