This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / include / asm-i386 / uaccess.h
1 #ifndef __i386_UACCESS_H
2 #define __i386_UACCESS_H
3
4 /*
5  * User space memory access functions
6  */
7 #include <linux/config.h>
8 #include <linux/errno.h>
9 #include <linux/thread_info.h>
10 #include <linux/prefetch.h>
11 #include <linux/string.h>
12 #include <linux/compiler.h>
13 #include <asm/page.h>
14
15 #define VERIFY_READ 0
16 #define VERIFY_WRITE 1
17
18 /*
19  * The fs value determines whether argument validity checking should be
20  * performed or not.  If get_fs() == USER_DS, checking is performed, with
21  * get_fs() == KERNEL_DS, checking is bypassed.
22  *
23  * For historical reasons, these macros are grossly misnamed.
24  */
25
26 #define MAKE_MM_SEG(s)  ((mm_segment_t) { (s) })
27
28
29 #define KERNEL_DS       MAKE_MM_SEG(0xFFFFFFFFUL)
30 #define USER_DS         MAKE_MM_SEG(TASK_SIZE)
31
32 #define get_ds()        (KERNEL_DS)
33 #define get_fs()        (current_thread_info()->addr_limit)
34 #define set_fs(x)       (current_thread_info()->addr_limit = (x))
35
36 #define segment_eq(a,b) ((a).seg == (b).seg)
37
38 /*
39  * movsl can be slow when source and dest are not both 8-byte aligned
40  */
41 #ifdef CONFIG_X86_INTEL_USERCOPY
42 extern struct movsl_mask {
43         int mask;
44 } ____cacheline_aligned_in_smp movsl_mask;
45 #endif
46
47 #define __addr_ok(addr) ((unsigned long __force)(addr) < (current_thread_info()->addr_limit.seg))
48
49 /*
50  * Test whether a block of memory is a valid user space address.
51  * Returns 0 if the range is valid, nonzero otherwise.
52  *
53  * This is equivalent to the following test:
54  * (u33)addr + (u33)size >= (u33)current->addr_limit.seg
55  *
56  * This needs 33-bit arithmetic. We have a carry...
57  */
58 #define __range_ok(addr,size) ({ \
59         unsigned long flag,sum; \
60         __chk_user_ptr(addr); \
61         asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
62                 :"=&r" (flag), "=r" (sum) \
63                 :"1" (addr),"g" ((int)(size)),"g" (current_thread_info()->addr_limit.seg)); \
64         flag; })
65
66 /**
67  * access_ok: - Checks if a user space pointer is valid
68  * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE.  Note that
69  *        %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe
70  *        to write to a block, it is always safe to read from it.
71  * @addr: User space pointer to start of block to check
72  * @size: Size of block to check
73  *
74  * Context: User context only.  This function may sleep.
75  *
76  * Checks if a pointer to a block of memory in user space is valid.
77  *
78  * Returns true (nonzero) if the memory block may be valid, false (zero)
79  * if it is definitely invalid.
80  *
81  * Note that, depending on architecture, this function probably just
82  * checks that the pointer is in the user space range - after calling
83  * this function, memory access functions may still return -EFAULT.
84  */
85 #define access_ok(type,addr,size) (likely(__range_ok(addr,size) == 0))
86
87 /**
88  * verify_area: - Obsolete, use access_ok()
89  * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE
90  * @addr: User space pointer to start of block to check
91  * @size: Size of block to check
92  *
93  * Context: User context only.  This function may sleep.
94  *
95  * This function has been replaced by access_ok().
96  *
97  * Checks if a pointer to a block of memory in user space is valid.
98  *
99  * Returns zero if the memory block may be valid, -EFAULT
100  * if it is definitely invalid.
101  *
102  * See access_ok() for more details.
103  */
104 static inline int verify_area(int type, const void __user * addr, unsigned long size)
105 {
106         return access_ok(type,addr,size) ? 0 : -EFAULT;
107 }
108
109
110 /*
111  * The exception table consists of pairs of addresses: the first is the
112  * address of an instruction that is allowed to fault, and the second is
113  * the address at which the program should continue.  No registers are
114  * modified, so it is entirely up to the continuation code to figure out
115  * what to do.
116  *
117  * All the routines below use bits of fixup code that are out of line
118  * with the main instruction path.  This means when everything is well,
119  * we don't even have to jump over them.  Further, they do not intrude
120  * on our cache or tlb entries.
121  */
122
123 struct exception_table_entry
124 {
125         unsigned long insn, fixup;
126 };
127
128 extern int fixup_exception(struct pt_regs *regs);
129
130 /*
131  * These are the main single-value transfer routines.  They automatically
132  * use the right size if we just have the right pointer type.
133  *
134  * This gets kind of ugly. We want to return _two_ values in "get_user()"
135  * and yet we don't want to do any pointers, because that is too much
136  * of a performance impact. Thus we have a few rather ugly macros here,
137  * and hide all the ugliness from the user.
138  *
139  * The "__xxx" versions of the user access functions are versions that
140  * do not verify the address space, that must have been done previously
141  * with a separate "access_ok()" call (this is used when we do multiple
142  * accesses to the same area of user memory).
143  */
144
145 extern void __get_user_1(void);
146 extern void __get_user_2(void);
147 extern void __get_user_4(void);
148
149 #define __get_user_x(size,ret,x,ptr) \
150         __asm__ __volatile__("call __get_user_" #size \
151                 :"=a" (ret),"=d" (x) \
152                 :"0" (ptr))
153
154 extern int get_user_size(unsigned int size, void *val, const void *ptr);
155 extern int put_user_size(unsigned int size, const void *val, void *ptr);
156 extern int zero_user_size(unsigned int size, void *ptr);
157 extern int copy_str_fromuser_size(unsigned int size, void *val, const void *ptr);
158 extern int strlen_fromuser_size(unsigned int size, const void *ptr);
159
160
161 # define indirect_get_user(x,ptr)                                       \
162 ({      int __ret_gu,__val_gu;                                          \
163         __typeof__(ptr) __ptr_gu = (ptr);                               \
164         __ret_gu = get_user_size(sizeof(*__ptr_gu), &__val_gu,__ptr_gu) ? -EFAULT : 0;\
165         (x) = (__typeof__(*__ptr_gu))__val_gu;                          \
166         __ret_gu;                                                       \
167 })
168 #define indirect_put_user(x,ptr)                                        \
169 ({                                                                      \
170         __typeof__(*(ptr)) *__ptr_pu = (ptr), __x_pu = (x);             \
171         put_user_size(sizeof(*__ptr_pu), &__x_pu, __ptr_pu) ? -EFAULT : 0; \
172 })
173 #define __indirect_put_user indirect_put_user
174 #define __indirect_get_user indirect_get_user
175
176 #define indirect_copy_from_user(to,from,n) get_user_size(n,to,from)
177 #define indirect_copy_to_user(to,from,n) put_user_size(n,from,to)
178
179 #define __indirect_copy_from_user indirect_copy_from_user
180 #define __indirect_copy_to_user indirect_copy_to_user
181
182 #define indirect_strncpy_from_user(dst, src, count) \
183                 copy_str_fromuser_size(count, dst, src)
184
185 extern int strlen_fromuser_size(unsigned int size, const void *ptr);
186 #define indirect_strnlen_user(str, n) strlen_fromuser_size(n, str)
187 #define indirect_strlen_user(str) indirect_strnlen_user(str, ~0UL >> 1)
188
189 extern int zero_user_size(unsigned int size, void *ptr);
190
191 #define indirect_clear_user(mem, len) zero_user_size(len, mem)
192 #define __indirect_clear_user clear_user
193
194 /* Careful: we have to cast the result to the type of the pointer for sign reasons */
195 /**
196  * get_user: - Get a simple variable from user space.
197  * @x:   Variable to store result.
198  * @ptr: Source address, in user space.
199  *
200  * Context: User context only.  This function may sleep.
201  *
202  * This macro copies a single simple variable from user space to kernel
203  * space.  It supports simple types like char and int, but not larger
204  * data types like structures or arrays.
205  *
206  * @ptr must have pointer-to-simple-variable type, and the result of
207  * dereferencing @ptr must be assignable to @x without a cast.
208  *
209  * Returns zero on success, or -EFAULT on error.
210  * On error, the variable @x is set to zero.
211  */
212 #define direct_get_user(x,ptr)                                          \
213 ({      int __ret_gu,__val_gu;                                          \
214         __chk_user_ptr(ptr);                                            \
215         switch(sizeof (*(ptr))) {                                       \
216         case 1:  __get_user_x(1,__ret_gu,__val_gu,ptr); break;          \
217         case 2:  __get_user_x(2,__ret_gu,__val_gu,ptr); break;          \
218         case 4:  __get_user_x(4,__ret_gu,__val_gu,ptr); break;          \
219         default: __get_user_x(X,__ret_gu,__val_gu,ptr); break;          \
220         }                                                               \
221         (x) = (__typeof__(*(ptr)))__val_gu;                             \
222         __ret_gu;                                                       \
223 })
224
225 extern void __put_user_bad(void);
226
227 /**
228  * put_user: - Write a simple value into user space.
229  * @x:   Value to copy to user space.
230  * @ptr: Destination address, in user space.
231  *
232  * Context: User context only.  This function may sleep.
233  *
234  * This macro copies a single simple value from kernel space to user
235  * space.  It supports simple types like char and int, but not larger
236  * data types like structures or arrays.
237  *
238  * @ptr must have pointer-to-simple-variable type, and @x must be assignable
239  * to the result of dereferencing @ptr.
240  *
241  * Returns zero on success, or -EFAULT on error.
242  */
243 #define direct_put_user(x,ptr)                                          \
244   __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
245
246
247 /**
248  * __get_user: - Get a simple variable from user space, with less checking.
249  * @x:   Variable to store result.
250  * @ptr: Source address, in user space.
251  *
252  * Context: User context only.  This function may sleep.
253  *
254  * This macro copies a single simple variable from user space to kernel
255  * space.  It supports simple types like char and int, but not larger
256  * data types like structures or arrays.
257  *
258  * @ptr must have pointer-to-simple-variable type, and the result of
259  * dereferencing @ptr must be assignable to @x without a cast.
260  *
261  * Caller must check the pointer with access_ok() before calling this
262  * function.
263  *
264  * Returns zero on success, or -EFAULT on error.
265  * On error, the variable @x is set to zero.
266  */
267 #define __direct_get_user(x,ptr) \
268   __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
269
270
271 /**
272  * __put_user: - Write a simple value into user space, with less checking.
273  * @x:   Value to copy to user space.
274  * @ptr: Destination address, in user space.
275  *
276  * Context: User context only.  This function may sleep.
277  *
278  * This macro copies a single simple value from kernel space to user
279  * space.  It supports simple types like char and int, but not larger
280  * data types like structures or arrays.
281  *
282  * @ptr must have pointer-to-simple-variable type, and @x must be assignable
283  * to the result of dereferencing @ptr.
284  *
285  * Caller must check the pointer with access_ok() before calling this
286  * function.
287  *
288  * Returns zero on success, or -EFAULT on error.
289  */
290 #define __direct_put_user(x,ptr) \
291   __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
292
293 #define __put_user_nocheck(x,ptr,size)                          \
294 ({                                                              \
295         long __pu_err;                                          \
296         __put_user_size((x),(ptr),(size),__pu_err,-EFAULT);     \
297         __pu_err;                                               \
298 })
299
300
301 #define __put_user_check(x,ptr,size)                                    \
302 ({                                                                      \
303         long __pu_err = -EFAULT;                                        \
304         __typeof__(*(ptr)) *__pu_addr = (ptr);                          \
305         might_sleep();                                          \
306         if (access_ok(VERIFY_WRITE,__pu_addr,size))                     \
307                 __put_user_size((x),__pu_addr,(size),__pu_err,-EFAULT); \
308         __pu_err;                                                       \
309 })                                                      
310
311 #define __put_user_u64(x, addr, err)                            \
312         __asm__ __volatile__(                                   \
313                 "1:     movl %%eax,0(%2)\n"                     \
314                 "2:     movl %%edx,4(%2)\n"                     \
315                 "3:\n"                                          \
316                 ".section .fixup,\"ax\"\n"                      \
317                 "4:     movl %3,%0\n"                           \
318                 "       jmp 3b\n"                               \
319                 ".previous\n"                                   \
320                 ".section __ex_table,\"a\"\n"                   \
321                 "       .align 4\n"                             \
322                 "       .long 1b,4b\n"                          \
323                 "       .long 2b,4b\n"                          \
324                 ".previous"                                     \
325                 : "=r"(err)                                     \
326                 : "A" (x), "r" (addr), "i"(-EFAULT), "0"(err))
327
328 #ifdef CONFIG_X86_WP_WORKS_OK
329
330 #define __put_user_size(x,ptr,size,retval,errret)                       \
331 do {                                                                    \
332         retval = 0;                                                     \
333         __chk_user_ptr(ptr);                                            \
334         switch (size) {                                                 \
335         case 1: __put_user_asm(x,ptr,retval,"b","b","iq",errret);break; \
336         case 2: __put_user_asm(x,ptr,retval,"w","w","ir",errret);break; \
337         case 4: __put_user_asm(x,ptr,retval,"l","","ir",errret); break; \
338         case 8: __put_user_u64((__typeof__(*ptr))(x),ptr,retval); break;\
339           default: __put_user_bad();                                    \
340         }                                                               \
341 } while (0)
342
343 #else
344
345 #define __put_user_size(x,ptr,size,retval,errret)                       \
346 do {                                                                    \
347         __typeof__(*(ptr)) __pus_tmp = x;                               \
348         retval = 0;                                                     \
349                                                                         \
350         if(unlikely(__copy_to_user_ll(ptr, &__pus_tmp, size) != 0))     \
351                 retval = errret;                                        \
352 } while (0)
353
354 #endif
355 struct __large_struct { unsigned long buf[100]; };
356 #define __m(x) (*(struct __large_struct *)(x))
357
358 /*
359  * Tell gcc we read from memory instead of writing: this is because
360  * we do not write to any memory gcc knows about, so there are no
361  * aliasing issues.
362  */
363 #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret)       \
364         __asm__ __volatile__(                                           \
365                 "1:     mov"itype" %"rtype"1,%2\n"                      \
366                 "2:\n"                                                  \
367                 ".section .fixup,\"ax\"\n"                              \
368                 "3:     movl %3,%0\n"                                   \
369                 "       jmp 2b\n"                                       \
370                 ".previous\n"                                           \
371                 ".section __ex_table,\"a\"\n"                           \
372                 "       .align 4\n"                                     \
373                 "       .long 1b,3b\n"                                  \
374                 ".previous"                                             \
375                 : "=r"(err)                                             \
376                 : ltype (x), "m"(__m(addr)), "i"(errret), "0"(err))
377
378
379 #define __get_user_nocheck(x,ptr,size)                          \
380 ({                                                              \
381         long __gu_err, __gu_val;                                \
382         __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\
383         (x) = (__typeof__(*(ptr)))__gu_val;                     \
384         __gu_err;                                               \
385 })
386
387 extern long __get_user_bad(void);
388
389 #define __get_user_size(x,ptr,size,retval,errret)                       \
390 do {                                                                    \
391         retval = 0;                                                     \
392         __chk_user_ptr(ptr);                                            \
393         switch (size) {                                                 \
394         case 1: __get_user_asm(x,ptr,retval,"b","b","=q",errret);break; \
395         case 2: __get_user_asm(x,ptr,retval,"w","w","=r",errret);break; \
396         case 4: __get_user_asm(x,ptr,retval,"l","","=r",errret);break;  \
397         default: (x) = __get_user_bad();                                \
398         }                                                               \
399 } while (0)
400
401 #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret)       \
402         __asm__ __volatile__(                                           \
403                 "1:     mov"itype" %2,%"rtype"1\n"                      \
404                 "2:\n"                                                  \
405                 ".section .fixup,\"ax\"\n"                              \
406                 "3:     movl %3,%0\n"                                   \
407                 "       xor"itype" %"rtype"1,%"rtype"1\n"               \
408                 "       jmp 2b\n"                                       \
409                 ".previous\n"                                           \
410                 ".section __ex_table,\"a\"\n"                           \
411                 "       .align 4\n"                                     \
412                 "       .long 1b,3b\n"                                  \
413                 ".previous"                                             \
414                 : "=r"(err), ltype (x)                                  \
415                 : "m"(__m(addr)), "i"(errret), "0"(err))
416
417
418 unsigned long __must_check __copy_to_user_ll(void __user *to, const void *from, unsigned long n);
419 unsigned long __must_check __copy_from_user_ll(void *to, const void __user *from, unsigned long n);
420
421 /*
422  * Here we special-case 1, 2 and 4-byte copy_*_user invocations.  On a fault
423  * we return the initial request size (1, 2 or 4), as copy_*_user should do.
424  * If a store crosses a page boundary and gets a fault, the x86 will not write
425  * anything, so this is accurate.
426  */
427
428 /**
429  * __copy_to_user: - Copy a block of data into user space, with less checking.
430  * @to:   Destination address, in user space.
431  * @from: Source address, in kernel space.
432  * @n:    Number of bytes to copy.
433  *
434  * Context: User context only.  This function may sleep.
435  *
436  * Copy data from kernel space to user space.  Caller must check
437  * the specified block with access_ok() before calling this function.
438  *
439  * Returns number of bytes that could not be copied.
440  * On success, this will be zero.
441  */
442 static inline unsigned long __must_check
443 __direct_copy_to_user(void __user *to, const void *from, unsigned long n)
444 {
445         if (__builtin_constant_p(n)) {
446                 unsigned long ret;
447
448                 switch (n) {
449                 case 1:
450                         __put_user_size(*(u8 *)from, (u8 __user *)to, 1, ret, 1);
451                         return ret;
452                 case 2:
453                         __put_user_size(*(u16 *)from, (u16 __user *)to, 2, ret, 2);
454                         return ret;
455                 case 4:
456                         __put_user_size(*(u32 *)from, (u32 __user *)to, 4, ret, 4);
457                         return ret;
458                 }
459         }
460         return __copy_to_user_ll(to, from, n);
461 }
462
463 /**
464  * __copy_from_user: - Copy a block of data from user space, with less checking.
465  * @to:   Destination address, in kernel space.
466  * @from: Source address, in user space.
467  * @n:    Number of bytes to copy.
468  *
469  * Context: User context only.  This function may sleep.
470  *
471  * Copy data from user space to kernel space.  Caller must check
472  * the specified block with access_ok() before calling this function.
473  *
474  * Returns number of bytes that could not be copied.
475  * On success, this will be zero.
476  *
477  * If some data could not be copied, this function will pad the copied
478  * data to the requested size using zero bytes.
479  */
480 static inline unsigned long __must_check
481 __direct_copy_from_user(void *to, const void __user *from, unsigned long n)
482 {
483         if (__builtin_constant_p(n)) {
484                 unsigned long ret;
485
486                 switch (n) {
487                 case 1:
488                         __get_user_size(*(u8 *)to, from, 1, ret, 1);
489                         return ret;
490                 case 2:
491                         __get_user_size(*(u16 *)to, from, 2, ret, 2);
492                         return ret;
493                 case 4:
494                         __get_user_size(*(u32 *)to, from, 4, ret, 4);
495                         return ret;
496                 }
497         }
498         return __copy_from_user_ll(to, from, n);
499 }
500
501 /**
502  * copy_to_user: - Copy a block of data into user space.
503  * @to:   Destination address, in user space.
504  * @from: Source address, in kernel space.
505  * @n:    Number of bytes to copy.
506  *
507  * Context: User context only.  This function may sleep.
508  *
509  * Copy data from kernel space to user space.
510  *
511  * Returns number of bytes that could not be copied.
512  * On success, this will be zero.
513  */
514 static inline unsigned long __must_check
515 direct_copy_to_user(void __user *to, const void *from, unsigned long n)
516 {
517         might_sleep();
518         if (access_ok(VERIFY_WRITE, to, n))
519                 n = __direct_copy_to_user(to, from, n);
520         return n;
521 }
522
523 /**
524  * copy_from_user: - Copy a block of data from user space.
525  * @to:   Destination address, in kernel space.
526  * @from: Source address, in user space.
527  * @n:    Number of bytes to copy.
528  *
529  * Context: User context only.  This function may sleep.
530  *
531  * Copy data from user space to kernel space.
532  *
533  * Returns number of bytes that could not be copied.
534  * On success, this will be zero.
535  *
536  * If some data could not be copied, this function will pad the copied
537  * data to the requested size using zero bytes.
538  */
539 static inline unsigned long __must_check
540 direct_copy_from_user(void *to, const void __user *from, unsigned long n)
541 {
542         might_sleep();
543         if (access_ok(VERIFY_READ, from, n))
544                 n = __direct_copy_from_user(to, from, n);
545         else
546                 memset(to, 0, n);
547         return n;
548 }
549
550 long strncpy_from_user(char *dst, const char __user *src, long count);
551 long __strncpy_from_user(char *dst, const char __user *src, long count);
552
553 /**
554  * strlen_user: - Get the size of a string in user space.
555  * @str: The string to measure.
556  *
557  * Context: User context only.  This function may sleep.
558  *
559  * Get the size of a NUL-terminated string in user space.
560  *
561  * Returns the size of the string INCLUDING the terminating NUL.
562  * On exception, returns 0.
563  *
564  * If there is a limit on the length of a valid string, you may wish to
565  * consider using strnlen_user() instead.
566  */
567
568 long direct_strncpy_from_user(char *dst, const char *src, long count);
569 long __direct_strncpy_from_user(char *dst, const char *src, long count);
570 #define direct_strlen_user(str) direct_strnlen_user(str, ~0UL >> 1)
571 long direct_strnlen_user(const char *str, long n);
572 unsigned long direct_clear_user(void *mem, unsigned long len);
573 unsigned long __direct_clear_user(void *mem, unsigned long len);
574
575 extern int indirect_uaccess;
576
577 #ifdef CONFIG_X86_UACCESS_INDIRECT
578
579 /*
580  * Return code and zeroing semantics:
581
582  __clear_user          0                      <-> bytes not done
583  clear_user            0                      <-> bytes not done
584  __copy_to_user        0                      <-> bytes not done
585  copy_to_user          0                      <-> bytes not done
586  __copy_from_user      0                      <-> bytes not done, zero rest
587  copy_from_user        0                      <-> bytes not done, zero rest
588  __get_user            0                      <-> -EFAULT
589  get_user              0                      <-> -EFAULT
590  __put_user            0                      <-> -EFAULT
591  put_user              0                      <-> -EFAULT
592  strlen_user           strlen + 1             <-> 0
593  strnlen_user          strlen + 1 (or n+1)    <-> 0
594  strncpy_from_user     strlen (or n)          <-> -EFAULT
595
596  */
597
598 #define __clear_user(mem,len) __indirect_clear_user(mem,len)
599 #define clear_user(mem,len) indirect_clear_user(mem,len)
600 #define __copy_to_user(to,from,n) __indirect_copy_to_user(to,from,n)
601 #define copy_to_user(to,from,n) indirect_copy_to_user(to,from,n)
602 #define __copy_from_user(to,from,n) __indirect_copy_from_user(to,from,n)
603 #define copy_from_user(to,from,n) indirect_copy_from_user(to,from,n)
604 #define __get_user(val,ptr) __indirect_get_user(val,ptr)
605 #define get_user(val,ptr) indirect_get_user(val,ptr)
606 #define __put_user(val,ptr) __indirect_put_user(val,ptr)
607 #define put_user(val,ptr) indirect_put_user(val,ptr)
608 #define strlen_user(str) indirect_strlen_user(str)
609 #define strnlen_user(src,count) indirect_strnlen_user(src,count)
610 #define strncpy_from_user(dst,src,count) \
611                         indirect_strncpy_from_user(dst,src,count)
612
613 #else
614
615 #define __clear_user __direct_clear_user
616 #define clear_user direct_clear_user
617 #define __copy_to_user __direct_copy_to_user
618 #define copy_to_user direct_copy_to_user
619 #define __copy_from_user __direct_copy_from_user
620 #define copy_from_user direct_copy_from_user
621 #define __get_user __direct_get_user
622 #define get_user direct_get_user
623 #define __put_user __direct_put_user
624 #define put_user direct_put_user
625 #define strlen_user direct_strlen_user
626 #define strnlen_user direct_strnlen_user
627 #define strncpy_from_user direct_strncpy_from_user
628
629 #endif /* CONFIG_X86_UACCESS_INDIRECT */
630
631 #endif /* __i386_UACCESS_H */