uaccess_32.h 19 KB

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