summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/uaccess_32.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-02-15 17:46:30 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2020-03-18 20:53:25 +0100
commit4b842e4e25b12951fa10dedb4bc16bc47e3b850c (patch)
treef8ef35539d2ff303275d19182770732d4e053d0e /arch/x86/include/asm/uaccess_32.h
parentx86: switch sigframe sigset handling to explict __get_user()/__put_user() (diff)
downloadlinux-4b842e4e25b12951fa10dedb4bc16bc47e3b850c.tar.xz
linux-4b842e4e25b12951fa10dedb4bc16bc47e3b850c.zip
x86: get rid of small constant size cases in raw_copy_{to,from}_user()
Very few call sites where that would be triggered remain, and none of those is anywhere near hot enough to bother. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/include/asm/uaccess_32.h')
-rw-r--r--arch/x86/include/asm/uaccess_32.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h
index ba2dc1930630..388a40660c7b 100644
--- a/arch/x86/include/asm/uaccess_32.h
+++ b/arch/x86/include/asm/uaccess_32.h
@@ -23,33 +23,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
static __always_inline unsigned long
raw_copy_from_user(void *to, const void __user *from, unsigned long n)
{
- if (__builtin_constant_p(n)) {
- unsigned long ret;
-
- switch (n) {
- case 1:
- ret = 0;
- __uaccess_begin_nospec();
- __get_user_asm_nozero(*(u8 *)to, from, ret,
- "b", "b", "=q", 1);
- __uaccess_end();
- return ret;
- case 2:
- ret = 0;
- __uaccess_begin_nospec();
- __get_user_asm_nozero(*(u16 *)to, from, ret,
- "w", "w", "=r", 2);
- __uaccess_end();
- return ret;
- case 4:
- ret = 0;
- __uaccess_begin_nospec();
- __get_user_asm_nozero(*(u32 *)to, from, ret,
- "l", "k", "=r", 4);
- __uaccess_end();
- return ret;
- }
- }
return __copy_user_ll(to, (__force const void *)from, n);
}