Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / arch / x86 / include / asm / uaccess_32.h
index 566e803..b6f5617 100644 (file)
@@ -48,14 +48,17 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
 
                switch (n) {
                case 1:
+                       barrier_nospec();
                        __put_user_size(*(u8 *)from, (u8 __user *)to,
                                        1, ret, 1);
                        return ret;
                case 2:
+                       barrier_nospec();
                        __put_user_size(*(u16 *)from, (u16 __user *)to,
                                        2, ret, 2);
                        return ret;
                case 4:
+                       barrier_nospec();
                        __put_user_size(*(u32 *)from, (u32 __user *)to,
                                        4, ret, 4);
                        return ret;
@@ -98,12 +101,15 @@ __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n)
 
                switch (n) {
                case 1:
+                       barrier_nospec();
                        __get_user_size(*(u8 *)to, from, 1, ret, 1);
                        return ret;
                case 2:
+                       barrier_nospec();
                        __get_user_size(*(u16 *)to, from, 2, ret, 2);
                        return ret;
                case 4:
+                       barrier_nospec();
                        __get_user_size(*(u32 *)to, from, 4, ret, 4);
                        return ret;
                }
@@ -142,12 +148,15 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
 
                switch (n) {
                case 1:
+                       barrier_nospec();
                        __get_user_size(*(u8 *)to, from, 1, ret, 1);
                        return ret;
                case 2:
+                       barrier_nospec();
                        __get_user_size(*(u16 *)to, from, 2, ret, 2);
                        return ret;
                case 4:
+                       barrier_nospec();
                        __get_user_size(*(u32 *)to, from, 4, ret, 4);
                        return ret;
                }
@@ -164,12 +173,15 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
 
                switch (n) {
                case 1:
+                       barrier_nospec();
                        __get_user_size(*(u8 *)to, from, 1, ret, 1);
                        return ret;
                case 2:
+                       barrier_nospec();
                        __get_user_size(*(u16 *)to, from, 2, ret, 2);
                        return ret;
                case 4:
+                       barrier_nospec();
                        __get_user_size(*(u32 *)to, from, 4, ret, 4);
                        return ret;
                }