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