diff options
Diffstat (limited to 'arch/s390/include/asm/uaccess.h')
-rw-r--r-- | arch/s390/include/asm/uaccess.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h index 9c33ed4e666f..79330af9a5f8 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h | |||
@@ -94,9 +94,7 @@ static inline unsigned long extable_fixup(const struct exception_table_entry *x) | |||
94 | 94 | ||
95 | struct uaccess_ops { | 95 | struct uaccess_ops { |
96 | size_t (*copy_from_user)(size_t, const void __user *, void *); | 96 | size_t (*copy_from_user)(size_t, const void __user *, void *); |
97 | size_t (*copy_from_user_small)(size_t, const void __user *, void *); | ||
98 | size_t (*copy_to_user)(size_t, void __user *, const void *); | 97 | size_t (*copy_to_user)(size_t, void __user *, const void *); |
99 | size_t (*copy_to_user_small)(size_t, void __user *, const void *); | ||
100 | size_t (*copy_in_user)(size_t, void __user *, const void __user *); | 98 | size_t (*copy_in_user)(size_t, void __user *, const void __user *); |
101 | size_t (*clear_user)(size_t, void __user *); | 99 | size_t (*clear_user)(size_t, void __user *); |
102 | size_t (*strnlen_user)(size_t, const char __user *); | 100 | size_t (*strnlen_user)(size_t, const char __user *); |
@@ -106,22 +104,20 @@ struct uaccess_ops { | |||
106 | }; | 104 | }; |
107 | 105 | ||
108 | extern struct uaccess_ops uaccess; | 106 | extern struct uaccess_ops uaccess; |
109 | extern struct uaccess_ops uaccess_std; | ||
110 | extern struct uaccess_ops uaccess_mvcos; | 107 | extern struct uaccess_ops uaccess_mvcos; |
111 | extern struct uaccess_ops uaccess_mvcos_switch; | ||
112 | extern struct uaccess_ops uaccess_pt; | 108 | extern struct uaccess_ops uaccess_pt; |
113 | 109 | ||
114 | extern int __handle_fault(unsigned long, unsigned long, int); | 110 | extern int __handle_fault(unsigned long, unsigned long, int); |
115 | 111 | ||
116 | static inline int __put_user_fn(size_t size, void __user *ptr, void *x) | 112 | static inline int __put_user_fn(size_t size, void __user *ptr, void *x) |
117 | { | 113 | { |
118 | size = uaccess.copy_to_user_small(size, ptr, x); | 114 | size = uaccess.copy_to_user(size, ptr, x); |
119 | return size ? -EFAULT : size; | 115 | return size ? -EFAULT : size; |
120 | } | 116 | } |
121 | 117 | ||
122 | static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | 118 | static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) |
123 | { | 119 | { |
124 | size = uaccess.copy_from_user_small(size, ptr, x); | 120 | size = uaccess.copy_from_user(size, ptr, x); |
125 | return size ? -EFAULT : size; | 121 | return size ? -EFAULT : size; |
126 | } | 122 | } |
127 | 123 | ||
@@ -226,10 +222,7 @@ extern int __get_user_bad(void) __attribute__((noreturn)); | |||
226 | static inline unsigned long __must_check | 222 | static inline unsigned long __must_check |
227 | __copy_to_user(void __user *to, const void *from, unsigned long n) | 223 | __copy_to_user(void __user *to, const void *from, unsigned long n) |
228 | { | 224 | { |
229 | if (__builtin_constant_p(n) && (n <= 256)) | 225 | return uaccess.copy_to_user(n, to, from); |
230 | return uaccess.copy_to_user_small(n, to, from); | ||
231 | else | ||
232 | return uaccess.copy_to_user(n, to, from); | ||
233 | } | 226 | } |
234 | 227 | ||
235 | #define __copy_to_user_inatomic __copy_to_user | 228 | #define __copy_to_user_inatomic __copy_to_user |
@@ -275,10 +268,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n) | |||
275 | static inline unsigned long __must_check | 268 | static inline unsigned long __must_check |
276 | __copy_from_user(void *to, const void __user *from, unsigned long n) | 269 | __copy_from_user(void *to, const void __user *from, unsigned long n) |
277 | { | 270 | { |
278 | if (__builtin_constant_p(n) && (n <= 256)) | 271 | return uaccess.copy_from_user(n, from, to); |
279 | return uaccess.copy_from_user_small(n, from, to); | ||
280 | else | ||
281 | return uaccess.copy_from_user(n, from, to); | ||
282 | } | 272 | } |
283 | 273 | ||
284 | extern void copy_from_user_overflow(void) | 274 | extern void copy_from_user_overflow(void) |