H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_UACCESS_64_H |
| 2 | #define _ASM_X86_UACCESS_64_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
| 4 | /* |
| 5 | * User space memory access functions |
| 6 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | #include <linux/compiler.h> |
| 8 | #include <linux/errno.h> |
Nick Piggin | 16dbc6c | 2008-10-02 14:50:12 -0700 | [diff] [blame] | 9 | #include <linux/lockdep.h> |
Jan Beulich | 1b1d925 | 2009-12-18 16:12:56 +0000 | [diff] [blame] | 10 | #include <asm/alternative.h> |
| 11 | #include <asm/cpufeature.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <asm/page.h> |
| 13 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | /* |
| 15 | * Copy To/From Userspace |
| 16 | */ |
| 17 | |
| 18 | /* Handles exceptions in both to and from, but doesn't do access_ok */ |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 19 | __must_check unsigned long |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 20 | copy_user_enhanced_fast_string(void *to, const void *from, unsigned len); |
| 21 | __must_check unsigned long |
Jan Beulich | 1b1d925 | 2009-12-18 16:12:56 +0000 | [diff] [blame] | 22 | copy_user_generic_string(void *to, const void *from, unsigned len); |
| 23 | __must_check unsigned long |
| 24 | copy_user_generic_unrolled(void *to, const void *from, unsigned len); |
| 25 | |
| 26 | static __always_inline __must_check unsigned long |
| 27 | copy_user_generic(void *to, const void *from, unsigned len) |
| 28 | { |
| 29 | unsigned ret; |
| 30 | |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 31 | /* |
| 32 | * If CPU has ERMS feature, use copy_user_enhanced_fast_string. |
| 33 | * Otherwise, if CPU has rep_good feature, use copy_user_generic_string. |
| 34 | * Otherwise, use copy_user_generic_unrolled. |
| 35 | */ |
| 36 | alternative_call_2(copy_user_generic_unrolled, |
Jan Beulich | 1b1d925 | 2009-12-18 16:12:56 +0000 | [diff] [blame] | 37 | copy_user_generic_string, |
| 38 | X86_FEATURE_REP_GOOD, |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 39 | copy_user_enhanced_fast_string, |
| 40 | X86_FEATURE_ERMS, |
Jan Beulich | 1b1d925 | 2009-12-18 16:12:56 +0000 | [diff] [blame] | 41 | ASM_OUTPUT2("=a" (ret), "=D" (to), "=S" (from), |
| 42 | "=d" (len)), |
| 43 | "1" (to), "2" (from), "3" (len) |
| 44 | : "memory", "rcx", "r8", "r9", "r10", "r11"); |
| 45 | return ret; |
| 46 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 48 | __must_check unsigned long |
Frederic Weisbecker | 3c93ca0 | 2009-11-16 15:42:18 +0100 | [diff] [blame] | 49 | _copy_to_user(void __user *to, const void *from, unsigned len); |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 50 | __must_check unsigned long |
Arjan van de Ven | 9f0cf4a | 2009-09-26 14:33:01 +0200 | [diff] [blame] | 51 | _copy_from_user(void *to, const void __user *from, unsigned len); |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 52 | __must_check unsigned long |
| 53 | copy_in_user(void __user *to, const void __user *from, unsigned len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | |
Arjan van de Ven | 9f0cf4a | 2009-09-26 14:33:01 +0200 | [diff] [blame] | 55 | static inline unsigned long __must_check copy_from_user(void *to, |
| 56 | const void __user *from, |
| 57 | unsigned long n) |
| 58 | { |
| 59 | int sz = __compiletime_object_size(to); |
Arjan van de Ven | 9f0cf4a | 2009-09-26 14:33:01 +0200 | [diff] [blame] | 60 | |
Frederic Weisbecker | 3c93ca0 | 2009-11-16 15:42:18 +0100 | [diff] [blame] | 61 | might_fault(); |
Arjan van de Ven | 9f0cf4a | 2009-09-26 14:33:01 +0200 | [diff] [blame] | 62 | if (likely(sz == -1 || sz >= n)) |
Heiko Carstens | 409d02e | 2010-01-05 14:19:11 +0100 | [diff] [blame] | 63 | n = _copy_from_user(to, from, n); |
Arjan van de Ven | 9f0cf4a | 2009-09-26 14:33:01 +0200 | [diff] [blame] | 64 | #ifdef CONFIG_DEBUG_VM |
| 65 | else |
| 66 | WARN(1, "Buffer overflow detected!\n"); |
| 67 | #endif |
Heiko Carstens | 409d02e | 2010-01-05 14:19:11 +0100 | [diff] [blame] | 68 | return n; |
Arjan van de Ven | 9f0cf4a | 2009-09-26 14:33:01 +0200 | [diff] [blame] | 69 | } |
| 70 | |
Frederic Weisbecker | 3c93ca0 | 2009-11-16 15:42:18 +0100 | [diff] [blame] | 71 | static __always_inline __must_check |
| 72 | int copy_to_user(void __user *dst, const void *src, unsigned size) |
| 73 | { |
| 74 | might_fault(); |
| 75 | |
| 76 | return _copy_to_user(dst, src, size); |
| 77 | } |
Arjan van de Ven | 9f0cf4a | 2009-09-26 14:33:01 +0200 | [diff] [blame] | 78 | |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 79 | static __always_inline __must_check |
| 80 | int __copy_from_user(void *dst, const void __user *src, unsigned size) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 81 | { |
Andi Kleen | 383d079 | 2006-09-26 10:52:40 +0200 | [diff] [blame] | 82 | int ret = 0; |
Ingo Molnar | d1a7618 | 2008-10-28 16:54:49 +0100 | [diff] [blame] | 83 | |
| 84 | might_fault(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | if (!__builtin_constant_p(size)) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 86 | return copy_user_generic(dst, (__force void *)src, size); |
| 87 | switch (size) { |
| 88 | case 1:__get_user_asm(*(u8 *)dst, (u8 __user *)src, |
| 89 | ret, "b", "b", "=q", 1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 90 | return ret; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 91 | case 2:__get_user_asm(*(u16 *)dst, (u16 __user *)src, |
| 92 | ret, "w", "w", "=r", 2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 93 | return ret; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 94 | case 4:__get_user_asm(*(u32 *)dst, (u32 __user *)src, |
| 95 | ret, "l", "k", "=r", 4); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | return ret; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 97 | case 8:__get_user_asm(*(u64 *)dst, (u64 __user *)src, |
| 98 | ret, "q", "", "=r", 8); |
| 99 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | case 10: |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 101 | __get_user_asm(*(u64 *)dst, (u64 __user *)src, |
Hiroshi Shimamoto | 20a4a23 | 2008-11-13 18:06:04 -0800 | [diff] [blame] | 102 | ret, "q", "", "=r", 10); |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 103 | if (unlikely(ret)) |
| 104 | return ret; |
| 105 | __get_user_asm(*(u16 *)(8 + (char *)dst), |
| 106 | (u16 __user *)(8 + (char __user *)src), |
| 107 | ret, "w", "w", "=r", 2); |
| 108 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | case 16: |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 110 | __get_user_asm(*(u64 *)dst, (u64 __user *)src, |
| 111 | ret, "q", "", "=r", 16); |
| 112 | if (unlikely(ret)) |
| 113 | return ret; |
| 114 | __get_user_asm(*(u64 *)(8 + (char *)dst), |
| 115 | (u64 __user *)(8 + (char __user *)src), |
| 116 | ret, "q", "", "=r", 8); |
| 117 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | default: |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 119 | return copy_user_generic(dst, (__force void *)src, size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | } |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 121 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 123 | static __always_inline __must_check |
| 124 | int __copy_to_user(void __user *dst, const void *src, unsigned size) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 125 | { |
Andi Kleen | 383d079 | 2006-09-26 10:52:40 +0200 | [diff] [blame] | 126 | int ret = 0; |
Ingo Molnar | d1a7618 | 2008-10-28 16:54:49 +0100 | [diff] [blame] | 127 | |
| 128 | might_fault(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | if (!__builtin_constant_p(size)) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 130 | return copy_user_generic((__force void *)dst, src, size); |
| 131 | switch (size) { |
| 132 | case 1:__put_user_asm(*(u8 *)src, (u8 __user *)dst, |
| 133 | ret, "b", "b", "iq", 1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | return ret; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 135 | case 2:__put_user_asm(*(u16 *)src, (u16 __user *)dst, |
| 136 | ret, "w", "w", "ir", 2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 137 | return ret; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 138 | case 4:__put_user_asm(*(u32 *)src, (u32 __user *)dst, |
| 139 | ret, "l", "k", "ir", 4); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | return ret; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 141 | case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst, |
Uros Bizjak | 155b735 | 2009-07-19 18:06:35 +0200 | [diff] [blame] | 142 | ret, "q", "", "er", 8); |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 143 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | case 10: |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 145 | __put_user_asm(*(u64 *)src, (u64 __user *)dst, |
Uros Bizjak | 155b735 | 2009-07-19 18:06:35 +0200 | [diff] [blame] | 146 | ret, "q", "", "er", 10); |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 147 | if (unlikely(ret)) |
| 148 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | asm("":::"memory"); |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 150 | __put_user_asm(4[(u16 *)src], 4 + (u16 __user *)dst, |
| 151 | ret, "w", "w", "ir", 2); |
| 152 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | case 16: |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 154 | __put_user_asm(*(u64 *)src, (u64 __user *)dst, |
Uros Bizjak | 155b735 | 2009-07-19 18:06:35 +0200 | [diff] [blame] | 155 | ret, "q", "", "er", 16); |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 156 | if (unlikely(ret)) |
| 157 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 158 | asm("":::"memory"); |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 159 | __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst, |
Uros Bizjak | 155b735 | 2009-07-19 18:06:35 +0200 | [diff] [blame] | 160 | ret, "q", "", "er", 8); |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 161 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | default: |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 163 | return copy_user_generic((__force void *)dst, src, size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | } |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 165 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 166 | |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 167 | static __always_inline __must_check |
| 168 | int __copy_in_user(void __user *dst, const void __user *src, unsigned size) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 169 | { |
Andi Kleen | 383d079 | 2006-09-26 10:52:40 +0200 | [diff] [blame] | 170 | int ret = 0; |
Ingo Molnar | d1a7618 | 2008-10-28 16:54:49 +0100 | [diff] [blame] | 171 | |
| 172 | might_fault(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 173 | if (!__builtin_constant_p(size)) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 174 | return copy_user_generic((__force void *)dst, |
| 175 | (__force void *)src, size); |
| 176 | switch (size) { |
| 177 | case 1: { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | u8 tmp; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 179 | __get_user_asm(tmp, (u8 __user *)src, |
| 180 | ret, "b", "b", "=q", 1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 181 | if (likely(!ret)) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 182 | __put_user_asm(tmp, (u8 __user *)dst, |
| 183 | ret, "b", "b", "iq", 1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 184 | return ret; |
| 185 | } |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 186 | case 2: { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | u16 tmp; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 188 | __get_user_asm(tmp, (u16 __user *)src, |
| 189 | ret, "w", "w", "=r", 2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 190 | if (likely(!ret)) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 191 | __put_user_asm(tmp, (u16 __user *)dst, |
| 192 | ret, "w", "w", "ir", 2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | return ret; |
| 194 | } |
| 195 | |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 196 | case 4: { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | u32 tmp; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 198 | __get_user_asm(tmp, (u32 __user *)src, |
| 199 | ret, "l", "k", "=r", 4); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | if (likely(!ret)) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 201 | __put_user_asm(tmp, (u32 __user *)dst, |
| 202 | ret, "l", "k", "ir", 4); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | return ret; |
| 204 | } |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 205 | case 8: { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 206 | u64 tmp; |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 207 | __get_user_asm(tmp, (u64 __user *)src, |
| 208 | ret, "q", "", "=r", 8); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 | if (likely(!ret)) |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 210 | __put_user_asm(tmp, (u64 __user *)dst, |
Uros Bizjak | 155b735 | 2009-07-19 18:06:35 +0200 | [diff] [blame] | 211 | ret, "q", "", "er", 8); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 212 | return ret; |
| 213 | } |
| 214 | default: |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 215 | return copy_user_generic((__force void *)dst, |
| 216 | (__force void *)src, size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | } |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 218 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 219 | |
Andi Kleen | 9591200 | 2006-09-26 10:52:39 +0200 | [diff] [blame] | 220 | __must_check unsigned long clear_user(void __user *mem, unsigned long len); |
| 221 | __must_check unsigned long __clear_user(void __user *mem, unsigned long len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 222 | |
Jan Beulich | 1472248 | 2009-11-13 11:56:24 +0000 | [diff] [blame] | 223 | static __must_check __always_inline int |
| 224 | __copy_from_user_inatomic(void *dst, const void __user *src, unsigned size) |
| 225 | { |
| 226 | return copy_user_generic(dst, (__force const void *)src, size); |
| 227 | } |
Andi Kleen | b885808 | 2006-09-30 01:47:55 +0200 | [diff] [blame] | 228 | |
| 229 | static __must_check __always_inline int |
| 230 | __copy_to_user_inatomic(void __user *dst, const void *src, unsigned size) |
| 231 | { |
| 232 | return copy_user_generic((__force void *)dst, src, size); |
| 233 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | |
Joe Perches | b896313 | 2008-03-23 01:03:49 -0700 | [diff] [blame] | 235 | extern long __copy_user_nocache(void *dst, const void __user *src, |
| 236 | unsigned size, int zerorest); |
Andi Kleen | 0812a57 | 2007-02-13 13:26:19 +0100 | [diff] [blame] | 237 | |
Ingo Molnar | f180053 | 2009-03-02 11:00:57 +0100 | [diff] [blame] | 238 | static inline int |
| 239 | __copy_from_user_nocache(void *dst, const void __user *src, unsigned size) |
Andi Kleen | 0812a57 | 2007-02-13 13:26:19 +0100 | [diff] [blame] | 240 | { |
| 241 | might_sleep(); |
Ingo Molnar | f180053 | 2009-03-02 11:00:57 +0100 | [diff] [blame] | 242 | return __copy_user_nocache(dst, src, size, 1); |
Andi Kleen | 0812a57 | 2007-02-13 13:26:19 +0100 | [diff] [blame] | 243 | } |
| 244 | |
Ingo Molnar | f180053 | 2009-03-02 11:00:57 +0100 | [diff] [blame] | 245 | static inline int |
| 246 | __copy_from_user_inatomic_nocache(void *dst, const void __user *src, |
| 247 | unsigned size) |
Andi Kleen | 0812a57 | 2007-02-13 13:26:19 +0100 | [diff] [blame] | 248 | { |
Ingo Molnar | f180053 | 2009-03-02 11:00:57 +0100 | [diff] [blame] | 249 | return __copy_user_nocache(dst, src, size, 0); |
Andi Kleen | 0812a57 | 2007-02-13 13:26:19 +0100 | [diff] [blame] | 250 | } |
| 251 | |
Vitaly Mayatskikh | 1129585 | 2008-07-02 15:48:21 +0200 | [diff] [blame] | 252 | unsigned long |
| 253 | copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest); |
| 254 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 255 | #endif /* _ASM_X86_UACCESS_64_H */ |