linux/arch/x86/include/asm/uaccess.h
<<
>>
Prefs
   1#ifndef _ASM_X86_UACCESS_H
   2#define _ASM_X86_UACCESS_H
   3/*
   4 * User space memory access functions
   5 */
   6#include <linux/errno.h>
   7#include <linux/compiler.h>
   8#include <linux/kasan-checks.h>
   9#include <linux/thread_info.h>
  10#include <linux/string.h>
  11#include <asm/asm.h>
  12#include <asm/page.h>
  13#include <asm/smap.h>
  14#include <asm/extable.h>
  15
  16#define VERIFY_READ 0
  17#define VERIFY_WRITE 1
  18
  19/*
  20 * The fs value determines whether argument validity checking should be
  21 * performed or not.  If get_fs() == USER_DS, checking is performed, with
  22 * get_fs() == KERNEL_DS, checking is bypassed.
  23 *
  24 * For historical reasons, these macros are grossly misnamed.
  25 */
  26
  27#define MAKE_MM_SEG(s)  ((mm_segment_t) { (s) })
  28
  29#define KERNEL_DS       MAKE_MM_SEG(-1UL)
  30#define USER_DS         MAKE_MM_SEG(TASK_SIZE_MAX)
  31
  32#define get_ds()        (KERNEL_DS)
  33#define get_fs()        (current->thread.addr_limit)
  34#define set_fs(x)       (current->thread.addr_limit = (x))
  35
  36#define segment_eq(a, b)        ((a).seg == (b).seg)
  37
  38#define user_addr_max() (current->thread.addr_limit.seg)
  39#define __addr_ok(addr)         \
  40        ((unsigned long __force)(addr) < user_addr_max())
  41
  42/*
  43 * Test whether a block of memory is a valid user space address.
  44 * Returns 0 if the range is valid, nonzero otherwise.
  45 */
  46static inline bool __chk_range_not_ok(unsigned long addr, unsigned long size, unsigned long limit)
  47{
  48        /*
  49         * If we have used "sizeof()" for the size,
  50         * we know it won't overflow the limit (but
  51         * it might overflow the 'addr', so it's
  52         * important to subtract the size from the
  53         * limit, not add it to the address).
  54         */
  55        if (__builtin_constant_p(size))
  56                return unlikely(addr > limit - size);
  57
  58        /* Arbitrary sizes? Be careful about overflow */
  59        addr += size;
  60        if (unlikely(addr < size))
  61                return true;
  62        return unlikely(addr > limit);
  63}
  64
  65#define __range_not_ok(addr, size, limit)                               \
  66({                                                                      \
  67        __chk_user_ptr(addr);                                           \
  68        __chk_range_not_ok((unsigned long __force)(addr), size, limit); \
  69})
  70
  71#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
  72# define WARN_ON_IN_IRQ()       WARN_ON_ONCE(!in_task())
  73#else
  74# define WARN_ON_IN_IRQ()
  75#endif
  76
  77/**
  78 * access_ok: - Checks if a user space pointer is valid
  79 * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE.  Note that
  80 *        %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe
  81 *        to write to a block, it is always safe to read from it.
  82 * @addr: User space pointer to start of block to check
  83 * @size: Size of block to check
  84 *
  85 * Context: User context only. This function may sleep if pagefaults are
  86 *          enabled.
  87 *
  88 * Checks if a pointer to a block of memory in user space is valid.
  89 *
  90 * Returns true (nonzero) if the memory block may be valid, false (zero)
  91 * if it is definitely invalid.
  92 *
  93 * Note that, depending on architecture, this function probably just
  94 * checks that the pointer is in the user space range - after calling
  95 * this function, memory access functions may still return -EFAULT.
  96 */
  97#define access_ok(type, addr, size)                                     \
  98({                                                                      \
  99        WARN_ON_IN_IRQ();                                               \
 100        likely(!__range_not_ok(addr, size, user_addr_max()));           \
 101})
 102
 103/*
 104 * These are the main single-value transfer routines.  They automatically
 105 * use the right size if we just have the right pointer type.
 106 *
 107 * This gets kind of ugly. We want to return _two_ values in "get_user()"
 108 * and yet we don't want to do any pointers, because that is too much
 109 * of a performance impact. Thus we have a few rather ugly macros here,
 110 * and hide all the ugliness from the user.
 111 *
 112 * The "__xxx" versions of the user access functions are versions that
 113 * do not verify the address space, that must have been done previously
 114 * with a separate "access_ok()" call (this is used when we do multiple
 115 * accesses to the same area of user memory).
 116 */
 117
 118extern int __get_user_1(void);
 119extern int __get_user_2(void);
 120extern int __get_user_4(void);
 121extern int __get_user_8(void);
 122extern int __get_user_bad(void);
 123
 124#define __uaccess_begin() stac()
 125#define __uaccess_end()   clac()
 126
 127/*
 128 * This is a type: either unsigned long, if the argument fits into
 129 * that type, or otherwise unsigned long long.
 130 */
 131#define __inttype(x) \
 132__typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
 133
 134/**
 135 * get_user: - Get a simple variable from user space.
 136 * @x:   Variable to store result.
 137 * @ptr: Source address, in user space.
 138 *
 139 * Context: User context only. This function may sleep if pagefaults are
 140 *          enabled.
 141 *
 142 * This macro copies a single simple variable from user space to kernel
 143 * space.  It supports simple types like char and int, but not larger
 144 * data types like structures or arrays.
 145 *
 146 * @ptr must have pointer-to-simple-variable type, and the result of
 147 * dereferencing @ptr must be assignable to @x without a cast.
 148 *
 149 * Returns zero on success, or -EFAULT on error.
 150 * On error, the variable @x is set to zero.
 151 */
 152/*
 153 * Careful: we have to cast the result to the type of the pointer
 154 * for sign reasons.
 155 *
 156 * The use of _ASM_DX as the register specifier is a bit of a
 157 * simplification, as gcc only cares about it as the starting point
 158 * and not size: for a 64-bit value it will use %ecx:%edx on 32 bits
 159 * (%ecx being the next register in gcc's x86 register sequence), and
 160 * %rdx on 64 bits.
 161 *
 162 * Clang/LLVM cares about the size of the register, but still wants
 163 * the base register for something that ends up being a pair.
 164 */
 165#define get_user(x, ptr)                                                \
 166({                                                                      \
 167        int __ret_gu;                                                   \
 168        register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX);            \
 169        register void *__sp asm(_ASM_SP);                               \
 170        __chk_user_ptr(ptr);                                            \
 171        might_fault();                                                  \
 172        asm volatile("call __get_user_%P4"                              \
 173                     : "=a" (__ret_gu), "=r" (__val_gu), "+r" (__sp)    \
 174                     : "0" (ptr), "i" (sizeof(*(ptr))));                \
 175        (x) = (__force __typeof__(*(ptr))) __val_gu;                    \
 176        __builtin_expect(__ret_gu, 0);                                  \
 177})
 178
 179#define __put_user_x(size, x, ptr, __ret_pu)                    \
 180        asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
 181                     : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
 182
 183
 184
 185#ifdef CONFIG_X86_32
 186#define __put_user_asm_u64(x, addr, err, errret)                        \
 187        asm volatile("\n"                                               \
 188                     "1:        movl %%eax,0(%2)\n"                     \
 189                     "2:        movl %%edx,4(%2)\n"                     \
 190                     "3:"                                               \
 191                     ".section .fixup,\"ax\"\n"                         \
 192                     "4:        movl %3,%0\n"                           \
 193                     "  jmp 3b\n"                                       \
 194                     ".previous\n"                                      \
 195                     _ASM_EXTABLE(1b, 4b)                               \
 196                     _ASM_EXTABLE(2b, 4b)                               \
 197                     : "=r" (err)                                       \
 198                     : "A" (x), "r" (addr), "i" (errret), "0" (err))
 199
 200#define __put_user_asm_ex_u64(x, addr)                                  \
 201        asm volatile("\n"                                               \
 202                     "1:        movl %%eax,0(%1)\n"                     \
 203                     "2:        movl %%edx,4(%1)\n"                     \
 204                     "3:"                                               \
 205                     _ASM_EXTABLE_EX(1b, 2b)                            \
 206                     _ASM_EXTABLE_EX(2b, 3b)                            \
 207                     : : "A" (x), "r" (addr))
 208
 209#define __put_user_x8(x, ptr, __ret_pu)                         \
 210        asm volatile("call __put_user_8" : "=a" (__ret_pu)      \
 211                     : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
 212#else
 213#define __put_user_asm_u64(x, ptr, retval, errret) \
 214        __put_user_asm(x, ptr, retval, "q", "", "er", errret)
 215#define __put_user_asm_ex_u64(x, addr)  \
 216        __put_user_asm_ex(x, addr, "q", "", "er")
 217#define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu)
 218#endif
 219
 220extern void __put_user_bad(void);
 221
 222/*
 223 * Strange magic calling convention: pointer in %ecx,
 224 * value in %eax(:%edx), return value in %eax. clobbers %rbx
 225 */
 226extern void __put_user_1(void);
 227extern void __put_user_2(void);
 228extern void __put_user_4(void);
 229extern void __put_user_8(void);
 230
 231/**
 232 * put_user: - Write a simple value into user space.
 233 * @x:   Value to copy to user space.
 234 * @ptr: Destination address, in user space.
 235 *
 236 * Context: User context only. This function may sleep if pagefaults are
 237 *          enabled.
 238 *
 239 * This macro copies a single simple value from kernel space to user
 240 * space.  It supports simple types like char and int, but not larger
 241 * data types like structures or arrays.
 242 *
 243 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
 244 * to the result of dereferencing @ptr.
 245 *
 246 * Returns zero on success, or -EFAULT on error.
 247 */
 248#define put_user(x, ptr)                                        \
 249({                                                              \
 250        int __ret_pu;                                           \
 251        __typeof__(*(ptr)) __pu_val;                            \
 252        __chk_user_ptr(ptr);                                    \
 253        might_fault();                                          \
 254        __pu_val = x;                                           \
 255        switch (sizeof(*(ptr))) {                               \
 256        case 1:                                                 \
 257                __put_user_x(1, __pu_val, ptr, __ret_pu);       \
 258                break;                                          \
 259        case 2:                                                 \
 260                __put_user_x(2, __pu_val, ptr, __ret_pu);       \
 261                break;                                          \
 262        case 4:                                                 \
 263                __put_user_x(4, __pu_val, ptr, __ret_pu);       \
 264                break;                                          \
 265        case 8:                                                 \
 266                __put_user_x8(__pu_val, ptr, __ret_pu);         \
 267                break;                                          \
 268        default:                                                \
 269                __put_user_x(X, __pu_val, ptr, __ret_pu);       \
 270                break;                                          \
 271        }                                                       \
 272        __builtin_expect(__ret_pu, 0);                          \
 273})
 674
ptr 2722f="+c27=__put_user_asm_ex_u64" class="sref">__, __, x, ptr, __re, x, , errret) \
 176         177})
 178
ptr);                                            \
 179#define __re,  180        asm vo2atile2 181              2     2: __put_usesm_ex(x, ptr, __re, "q", "er")
"er")
"&="sref">errret) \
 182
&                     \
 183
 184
__put_usesm_ex(x, ptr, __re, "q", "er")
"er")
errret)
 185#ifdef  186#define  187        asm vo2atile28f="+code=__put_user_x" class="sref">__put_user_usesm_ex(x, ptr, __re, "q", "er")
"er")
errret)
 188              2     2&                     \
 189              2     28                                          \
 190              2     2&" class="sref">__put_user_useer_asm_u64(__ret_peof__(*(ptr))) {                        ref">x), "rref">ptr, __re, "e/asm/uaccess.h#L171" id="L171" class="line"2name="L271"> 191              2     2"ass="string">&" class="sref">)
 192              2     2&                     \
 193              2     2 194              2     2&" class="sref">__put_user_r_bad(void);
 195              2     2 196              2     2 197              2     2:  198              2     29 *
 199
 200#define  201        asm vo3atile30 */
 202              3     3__, (x, ptr, __re,  203              3     3 204              3     30=__pu_val" class="sref">__pu_v__chk_user_ptr(ptr);                                            \
 205              3     30(*(__re,  206              3     30                                          \
 197              3     3: : __put_user_usee_asm_ex(x, addr, "er")
"er")
&quo                /asm/uaccess.h#L171" id="L171" class="line"3n8me="L203"> 198              3x86/i30span class="string">&                     \
 209#define  210        asm vo3atile31span class="string">&" class="sref">__put_user_usee_asm_ex(x, addr, "er")
"er")
 211              3     3:  212#else
 213#define __put_user_usee_asm_ex(x, addr, "er")
"er")
 214         215#define  216        __put_userput_user_asm_ex_u64(__ret_peof__(*(ptr))) {                        ref">x), "rref">ptr,  217#define  218#endif
 219
__put_user_r_bad(void);
 220extern void  221
 222 223CONFIG_X86_32
 224       useer_asm_u64(       useer_as="sref">x, ptr, __re, "q="sref">errret) \
 225 226extern void ptr, __p_ptr(__for                                            \
 227extern void "\s="sref">__for    STAC                   STACpan c\n"                                               \
 228extern void "1:        movl %%eax,0(%2)\n"<2,uot;                                     \
 229extern void "2:        movl %%edx,4(%2)\n"<3,uot;                                     \
 230
"3:"                             \s="sref">__for    CLAC                   CLACpan c\n"                                               \
 231".section .fixup,\"ax\"\n"                         \
 232"4:        movl %3,%0\n" 233"  jmp 3b\n"      xor"   uot;                                     \
 234"3:"              xor"dx,uot;                                     \
 235                                               \
 236 237&q" class="sref">_ASM_EXTABLE(1b, 4b)                               \
 238"1 class="sref">_ASM_EXTABLE(1b, 4b)                               \
 239"t;=r" (err) , &quoot;c" (x), &quo\
 240"t;=r" (__ret_esm_ex(x, ( (__fort_esm_ex(__reu_32
x), ( 241"asi" (errret), "0" (err)), &quoo                   \
 242 243 244       useeuser_asm_ex_u64(       useeuser_as="sref">x, ptr, x), &quo\sref">x;     a n>       r_bad(void);
       r_b86/in asm/uaccess.h#L274" id="L274" class="line"3name="L203"> 245 246       useer_asm_u64(       useer_as="sref">x, ptr, __re, "q="sref">errret) \
 247       usesm_u64(       uses="sref">x, ptr, __re, "qef=3arch/31                          \
 247 243 244ptrx, , "q="sre\
 213#define        uses="sref">x, ptr,  249({  3      >, __ret_p3  int __put_user_ba3ass="sref3>ptr))  201   "q="name="L274"> 674
"q="namenclude/asm/uaccess.h#L152" id="L152" class="line"3name="L203"> 202              3     3__, __, x, ptr, __re, __chk_3ser_ptr(__re, 3ight_fault();            ef="arch/x86/include          \
 177})
__pu3val = x 204              3     30=__pu_val" class="sref">__pu_v__chk       sw3tch (sizeof(*( 205          6" class=3line" name="L256"> 256    3   case 1:    ef="+code=x" class="       \
pt3,3"q="sref">errret) \
 247       usesm_u64(__put_user_usee_asm_ex(x, __re, "q", "er"38" class=3line" name="L258"> 258    35f">_ASM_EXTABLE(1="string">"rref">ptr,  259    36">__re, &                     \
pt3,3"q="sref">errret) \
 247       usesm_u64(__put_user_usee_asm_ex(x, __re, "qef=3;, "er"31" class=3line" name="L261"> 261    36p,\"ax\"\n&="string">"rref">ptr, __chk_3line" name="L262"> 262    362x86/i28span classss="string"                     \
pt3,3"q="sref">errret) \
 247       usesm_u64(__put_user_usee_asm_ex(x, __re, "qef=3;, "er"31ef">__pu3line" name="L264"> 264    36)
errret)
 265    36">__re, ptr<3a>, <3 href="+code=__ret_pu"="L274" class="line"3name="L203"> 245 246       useer_asm_u64(       useer_as="sref">;h/x86/include        /asm/uaccess.h#L171" id="L171" classh href="+3line" name="L267"> 267    36
"er")
&quo                /asm/uaccess.h#L171" id="L171" class8" class=3line" name="L268"> 268    3   default:                                        \
pt3,3       useeuser_asm_ex_u64(       useeuser_as="sref">x, )
 270    3           break;                                          \
 271    3   }  =32span class="s                             \
(errret) \
(       useer_as    useer_asm_u64ihrefen>       useerihrefss="c3mment3> * Ret_ushrefen>       useerrhrefss="c3mment3> * Ret_ulhrefen>       useerlhrefss="c3mment3> * Ret_uef="+code=ptr" class="sref">ptr, __pu3)
__for   "arch/x/asm/uaccess.h#L171" id="L171" class="line"3n7me="L203"> 227extern v""ai="str        /asm/uaccess.h#L171" id="L171" classa" class=3"sref">x, , 3a hre37uot;                                                       id="L171" claeer_asm_u64ihrefen>       useerihrefss="x,uot;               
shrefen>       useerrhrefss="                            " id="L171" class="line"3n7me        /asm/uaccess.h#L171" id="L171" classaref="+co3me="L266"> 176      3            " id="L171" class="line"3n7me="L203"> 227extern v""ai="s        /asm/uaccess.h#L171" id="L171" classa href="+37__builtin_expect" class3"sr                                                     \
 231         3    \
 232              id="L171" claeer_asm_u64ihrefen>       useerihrefss="x,uot;               
shrefen>       useerrhrefss="                            ef="arcd="L171" claeer_asm_u64shrefen>       useerrhrefss="                            " id="L171" class="line"3n7me"line"3name="L233"> 232 180      3 asm 3o2atile2 235)
<3 href="ab"string">"3r&quo3;)
 236 182
 238 183
       useerlhrefss="3mment33span class="string">"t;=r" ( 238__pu3 href="aw"string">"3r&quo3;)
( 241 185#ifdef3 186#defin3  * Returns zero on succlass="line" name="L192"> 197              2    3/span>)
<3 href="ak"string">"3r&quo38uaccess.h#L274" id="L274" c>              2     29 *
 19="line"2n3me="L268"> 188      3     38="line" name="L268"> 198  tldo __lass="l_begin/end -g @ptexceps arehand nclude/asm/uaccess.h#L22="line"2n3me="L172"> 189      3     39opies a single simpldoesne), space.  It supports simple aroun>
x), 3span class="string">&quo3;rref3>ptr 201   "q="name\
 202              3     3__, (x, &quo3;ass=3stringu" class="sref">__re,  192      3     39class="sref">ptr);      ef="arch/x86/include          \
 204              3     30=__pu_val" class="sref">__pu_v__chk="line"2n3me="L192"> 193      3     3 2     2 205          2&" class="sr3f">__393="+co31          code=x" class="       \
 195      3     393="+co31                              "q="sre\
 213#define __put_user_usee_asm_ex(x, addr, <="arch/x83/includeh/x86/in/asm/uac3ess.h39">x), "rref">ptr, &                     \
 213#define __put_user_usee_asm_ex(x, addr, 49
__ret_pu);       \
, 491/a>
&quo43"> 2401="+co31          ss="string"                     \
 213#define __put_user_usee_asm_ex(x, addr, 493ude/asm4ue="L272"> 192      4code=40vl %3,%0\n&quu" class="sref">__ret_pu);       \
, 494ude/asm4ue="L192"> 193      4     4 3     3()
 243 244 272        _4    3    430(*(__ret_pu);       \
, 497  3    43includeh/x86/in/asm/uac4     4 3     30                                          \
"er"4/span4)
x_u64" class=n>       useeuser_asm_ex_u64(       useeuser_as="sref">x, )
 198      4     4 3x86/i30span ak;                                          \
 209#defin4 "er"4/span41code=__put_user_bad" class="sref">__put_user_ba4="line"3n4me="L213"> 211      4     41"line"3name="L203"> 201   "q="sre\
 2ace.cess.h#L197" idace.    useer_asm_u64ihrefen>       useerihrefss="c3mment3> * Ret_ushrefen>       useerrhrefss="c3mment3> * Ret_ulhrefen>       useerlhrefss="">__,  212#else
4a hre4=3arch/31     sref">__for   "arch/x/asm/uaccess.h#L171             id="L171" claeer_asm_u64ihrefen>       useerihrefss="x,uot;               
shrefen>       useerrhrefss="                           nclude/asm/uaccess.h#L192" id=        /asm/uaccess.h#L171" id="L171" clas4=4ude/asm4l"string">"er"4/span4)
>>>>> ot;<2,uot;           " id="L171" class="line"3n7me="L203"> 227extern v""ai="s        /asm/uaccess.h#L171" id="L171" clas4="line"3n4me="L203"> 214      4 dx,uot;                                  \
 231 215#defin4 ihrefen>       useerihrefss="x,uot;               
shrefen>       useerrhrefss="                           0ef="arcd="L171" claeer_asm_u64shrefen>       useerrhrefss="                           nclude/asm/uaccess.h#L192" id=ine"3name="L223"> 231x), dx,uot;                    2                \
 235 217#defin4                                       \
 236 218#endif4 236__42f="+c=code=typeof" cref">x("t;=r&)                            quo\
 220extern4void 42code=__put_user_bad" class="sref">__put_user_ba4="arch/x84/includeh/x86/in/asm/uac4ess.h42"line"3name="L203"> 201        asm nocheck/uaccess.h#L197"      asm nochecknclude/asm/uaccess.h#L152" id="L152" class="line"3name="L203"> 202              3     3__, ( 236"q="sref">errret) \
 236 2234span 42
 201     _(       useer    _(__ret_pu);       \
 236__re, x
       useer  
)
 236 225 */__put_userput_user_asm_ex_u6486/include/asm/uaccess.h#L272" id="L272" c6486/include/asm/user_asm_ex_u64" class="sref" 3     3       useer    _(       useerEFAULTmment"L class="line"3name="L233"> 236__p_ptr(x, 
en=ptr" c;er")
 236x,        useer    _( 272        _4span clas4="string">"1:      4 movl4%&r" class="sref">err)), "2:      4 movl4%& class="sref">err)), __for    CLAC         4     43ptr 201   "q="nocheck/uaccess.h#L197" "q="nochecknclude/asm/uaccess.h#L152" id="L152" class="line"3name="L203"> 202              3     3__, (_433span cl4ss="string">".secti4n .fi4="srefing">"q="sref">errret) \
"4:  4     4ovl %3,int"L203"> 201   g _(       useer  g _(__ret_pu);       \
"  jmp 3b\n&q4ot;();            __inthrefen>       useer__inthrefsrefi*86/include/asm/uaccess.h#L272" id="L272" c="L171" class="lineg __asm_ex_u64" classneg __as__ret_pu);       \
"3:"   43s="sref">x
       useer  
)
 674
"q="namenclude/asm/uaccess.hneg __asm_ex_u64" classneg __as       useer  g _(       useerEFAULTmment"La hclude/in/asm/uaccess.h#L171" id="L171" clas4n7  3    433a href="+code=_ASM_EXT4BLE_s43_pu"  class="do      \

en="sref">x, 
en=ptr" c;er")
&q" cl4ss="s4ef">_ASM_EXTABx_u64" class=n>       useeuser_asm_ex_u64de/asm/uaccess.hneforce="L274"> 674
force">_ASe/asm/uaccess.hneclass="line"3name="L203"> 216      86/include/asm/uaccess.h#L272" id="L272" c=)L171" class="lineg __asm_ex_u64" classneg __as__ret_pu"1 cl4ss="s4ef">_ASM_EXTABdo      \
x,        useer  g _( 272        &quoot;c"4(err)), __put_user_ba4string">&4uot;0" (&q4oo                   \
<4/asm/4accessstruct"L203"> 201   large_structen>       useer  large_struct">_AS{ unsigned long L203"> 201 bufen>       useerbuf">_A[100]; };It supports simple aroun>
 201   large_structen>       useer  large_struct">_ASdo      \
x, err)), x)4 err)),        r_b86/in a4m/uac4ess.h#* Returns zero on succlass="line" name="L192"> 197              2    4a>,  * Returns zero on succ>   ell gcc we read from memory3instead of writing: t       beca<;qss="line" name="L192"> 197              2    4a"line"3n4in431""+co23de=pttt42ass4"lin644uaccess.h#L274" id="L274" c>  we do not write to any memory3gcc knows about, seginere are noss="line" name="L192"> 197              2    4apan clas4">x,  198  tliasing   suesnd -g @ptexceps arehand nclude/asm/uaccess.h#L249" class=4line" name="L249"> 249({  45opies a single simpldoesne), space.  It supports simple aroun>
 201   ude        //uaccess.h#L197"      asm arch/x86/include/asm/uaccess.h#L197" id="L197" class="line"3nace.cess.h#L197" idace.    useer_asm_u64(       useer_as    useer_asm_u64ihrefen>       useerihrefss="c3mment3> * Ret_ushrefen>       useerrhrefss="c3mment3> * Ret_ulhrefen>       useerlhrefss="c3mment3> * Ret_uef="+code=ptr" class="sref">ptr, )
__for   "arch/x/asm/uaccess.h#L171" id="L171" class="line"3n7me="L203"> 227extern v""ai="str        /asm/uaccess.h#L171" id="L171" clas4f">__chk_4ser_ptr(ihrefen>       useerihrefss="x,uot;               
shrefen>       useerrhrefss="                            ef="ar2clude/asm/uaccess.h#L192" id=        /asm/uaccess.h#L171" id="L171" clas4a href="+4ode=might_fault" class="4ref">45
>>>>> ot;<2,uot;           " id="L171" class="line"3n7me="L203"> 227extern v""ai="s        /asm/uaccess.h#L171" id="L171" clas4ref">__pu4val = dx,uot;                                  \
 231dx,uot;              3:   pan>dhref="arc3/x86/include/asm/uaccess.h#L192" id="L192" class="line"3name="L233"> 232 256    45">x), dx,uot;                    2                \
 235pt4,4 236 258    45f">_ASM_EXTABLE(1pan>dx                               \
 236 259    46f="+c=code=typeof" cref">x), &_ret_pu" class=c3mment34span cl(       useer_as    u/include/asm/uaccess.h#L194" id="L194"4" class="line"3name="L233"> 236pt4,4x("t;=rss="c3mment34span class="string">"t;=r&rch/x86/include/asm/uaccess.h#L197" id="L197" class="lineace.cess.h#L197" idace.    lass="c3mment34span class="stri/a>( 241 261    46ass="c3mment32lude/asm/uaccess.h#L186" id="L18649">__chk_4line" name="L262"> 262    462x86/"3name="L203"> 201   ude        /\
ihrefen>       useerihrefss="c3mment3> * Ret_ushrefen>       useerrhrefss="c3mment3> * Ret_ulhrefen>       useerlhrefss="">__, pt4,4__for   "arch/x/asm/uaccess.h#L171             id="L171" claeer_asm_u64ihrefen>       useerihrefss="x,uot;               
shrefen>       useerrhrefss="                           0ef="ar " id="L171" class="line"3n7me        /asm/uaccess.h#L171" id="L171" clas41ef">__pu4line" name="L264"> 264    46)
 227extern v""ai="s        /asm/uaccess.h#L171" id="L171" clas45" class=4line" name="L265"> 265    463="+co31             pan>dx                                  \
 236ptr<4a>, <4 href="+code=__ret_pu"""""":x("t;=rss="c3mment34span class="string">"t;=r&rch/x86/include/asm/uaccess.h#L197" id="L197" class="lineace.cess.h#L197" idace.    laass="s                             \
 267    46
 268    46="line" name="L268"> 198 197              2    4a href="+4ode=ptr" class="sref">pt4,47opies a single simpldoesne),  
try and catchss="line" name="L192"> 197              2    4a int  270    4       a single simpldoesne), space.  It supports simple aroun>
 271    47"line"3name="L203"> 201 
trycess.h#L197" id
tryref="+codu" class="sref">__re,  236(ptr);      cu"L1naccess.h#L197" icu"L1nalass-&gquotr);      threadccess.h#L197" ithreadlass.L203"> 201 
(       useer
( 236();            __
       useer  
)
__pu4)
xx, x, , 4a hre472"+coss="s                             \
 176      4  201 
catchen>       useer
catchss"L197" class="line(       useer_as    u/include/asm/uaccess.h#L194" id="L194"4"\

en="sref">x, 
en=ptr" c;er")
();      threadccess.h#L197" ithreadlass.L203"> 201 
(       useer
(       useerEFAULTmmenx 272 180      4 asm 48code=__put_user_bad" class="sref">__put_user_ba4/span>)
<4 href="ab"string">"2r&quo48de=er* Returns zero on succla n3me="L193x 3    433a href="+coun>

 198  tliasid="L196"4class="line"3name="L233"4 238<4a>
 198  tldo __lass4> (
 198  tldo __lass4>, "2r&quo48de=er* Returns zero a>, 4a hrr3f2"+coss="s           4     4           \
, 49s" c>href="ab"string">"2r&quo48de=er* Returns zero d="L194"4ass="line" name="L192"> 497)
<3          enab71d 3     38="line" name="L268"> 198  tldo __lass4>ref="a"a cess.h#L223" id="L223" c4ass="4ine" name="L192"> 19="line"2n33     38="line" name="L268"> 198  tldo __lass4"l_begin/4nd -g @ptexceps arehand 4#3ncl4de/asm/uaccess.h#L22="line"2n3 href=macro copies a sing71"simp71"variab71" clas;
 198  tldo __lass4"83="+c=32space.  It supports simp4e aro49             2    4a int 
 198  tldo __lass4"    4 asmef="+code=x, x__put_user_ba4/span>)
 4 data""+cos like  8struum _ orssrrayf="+code=4tr" c44="line" name="L268"> 198  tlias      \
<4 href="arch/x86/asm/uacc4ss.h#49"+coun>
 198  tlias d="L196"4        3     30=__pu_va4" cla49>
 198  tlias  (, <@pts 188 198  tldo __lass4include="4rch/x86/include/asm/uacc4ss.h#49/a>, "2r&quo48de=er* Returns zero"="sref">4ddr, "2r&quo48de=er* Returns zero"d="L194"4et_pu"         /asm/uacc4ss.h#49             2    3/span>)
<3 fun cl45 3     38="line" name="L268"> 198  tldo __lass4iref="a"a include/include/asm/uacc4ss.h#49ne" name="L192"> 19="line"2n33     38="line" name="L268"> 198  tldo __lass5=="sref">5ddr 198  tldo __lass5 198  tldo __lass5<2 href="5df="+code=x, __put_user_ba4/span>)
 4line" name="L270"> 270    4       a single sim5=="sref">5ddrx,  201   ude        /\
x, 
en=ptr" c;er")
__for    CLAC         4     43ptr 201             href="arch/x8/uaccess.h#L197"      asm namencludass="sref">__put_userpucessofce">_ASe/asm/uaccess.hneclass="line"3name="L20>
en=ptr" c;er")
x,  198  tldo __lass5=8 href="5dt_pu"         /asm/uacc5ss.h#50             2    3/span>)
<3 62x86/"3nat - Wde=pta simp71"valuesintos;
 198  tlia5
Valuesto copy tos;
 198  tlia5
 198  tldo __lass54e3="+c=35span class="s           5     51             2    4a int  198  tldo __lass542 href="5n41code=__put_user_bad" 5lass=51ref">__put_user_ba4/span>)
 4 Context: U, 49s" c>href="ab"string">"2r&quo48de=er* Returns zer5>__, 
 198  tldo __lass5ccess.h#L592" id=        /asm/uacc5ss.h#51>
 198  tldo __lass5carch/x865""ai="s        /asm/uacc5ss.h#51>

 198  tldo __lass5c6rch/x865ass="line"3name="L223"> 531, 
 198  tldo __lass5cess.h#L152" id=ine"3name="L223"> 531 198  tlia5h#L192" i5="L192" class="line"3nam5="L2051             2    3/span>)
<3"+code=4tr" c44="line" name="L268"> 198  tlia5h 198  tlia56" id="L156" clas class="line"3nam5="L2352e/asm/uaccess.h#L22="line"2n3 tos274"t_sul  of0dec44ec4nc>, <@pts="+code=4tr" c44="line" name="L268"> 198  tlia5197" idac5.    laass="s           5     52             2    4a int  198  tldo __lass5xtern4voi5 42code=__put_user_bad" 5lass=52ref">__put_user_ba4/span>)
 4 Calles 188, "2r&quo48de=er* Returns zer5r_asm_ex<5a>(
 198  tldo __lass5/x86/incl5de="arc class="line"3nam5="L2352>
 198  tldo __lass5     \
 198  tldo __lass5ref="ai="5tref="a class="line"3nam5="L2352/a>,  270    4       a single sim5seerEFAUL5mment"L class="line"3nam5="L235"> 236me="L270"> 270    4       a single sim5s#L192" i5ef="a"a class="line"3nam5="L235"> 236186" id="L18649">__chk_4line" nam"> 262    462x86/"3na3"> 201   ude        /\
x, 
en=ptr" c;er")
    5    201tring">"t;=rs/uaccess.hneforce="L274"> 674
force">_ASe/asm/uaccess.hneclass="line"3name="L20             href="arch/x8/uaccess.h#L197"      asm namencludass="sref">__put_userpucessofce">_ASe/asm/uaccess.hneclass="line"3name="L20>
en=ptr" c;er")
er5)5, "2:5     4 mo5l4%& class="sref">er5)5, __for   unal201x,  "2:5 tern4voi5   __put_user_ba4="arch/x84/includeh/unal201 262    462x86/"3na3"> "2:5 _asm_ex<5/x86/include/in/asm/uacc5ss.h#53          \
(
 268    46="line" name="L265a>);     5 \

pt4,47opies a single simpldoesne),  
t5"stref="a5 \
, "2r&quo48de=er* Returns zer5rEFAULTmm5nt"La hclude/in/asm/uacc5ss.h#53          \
"2r&quo48de=er* Returns zer5r#L192" i5 \
)
<3      r"2r&quo48de=er* Returns zer5r    5t_pu(ith)href="ab"string">"2r&quo48de=er* Returns zer5      249({  45opies a single sim5an>4(er5)54/a>,  262    4r 271    47"line"3nme="L249"> 249({  45opies a single sim5atern4voi5"44code=__put_user_bad" 5lass=54ref">__put_user_ba4="arch/x8r"> 262    4r 201 
catchen>       useer 176      4  201 
catchen>       useme="L249"> 249({  45opies a single sim5a_asm_ex<5space.  It supports simpncl9ex<5space.  It atchen>       u 236       useerrhre43"> 236 176      ="L249"> 249"lineace.cess.h#L197" idace.    laass="s                             \
 220x,      _(      ef">e="L1 6T6 pncl9ex<5space.t7x_u 5( 6T6 pncl9ex<5s 5( 6s="4s"line"3n4"r,  2pan>
       useer  
 201tring">"de=ptr" 4 4apan clas4"3de=pttt42ass4"lemeitely wrong -n>
x, 
en=ptr" c;er")
 220x, );      threadccess.h5read from5memory3instead of writin5: t  5    be"L1nalass-&gquotr);      threadccess.h5lin644uac5ess.h#L274" id="L274" c>5 we d5 not wme="L203"> 201  249({  45opies a single sim97   5          2    4apan cla54">x<5a>,  249({  45o/"3nameun249">6 271    47"line"3nme="L249"> 249({  45opies a single sim5atern4voi5"44code=__put_user_bad" 5lass=54ref">__put_user_ba4="arch/x8re.    use5r_asm_u64(     5 usee55s.h#L197" idace.    lass="c3mment34span class="5_uef="+co5e=ptr" class="sref">ptr<5a>, <55ess.h#L197" id="L197" class=/"3nameunex<5space.t7x_u 5/"3nameunex0    4       a single sim5seerEFAUL5mment"L class="line"3nam5="L235"> 236me="L270"> 270    4       a single sim5s#L192" i 4apan clas4"3de=pttt42ass4"lemeitely wrong          5                     id=5L171"55"sref">ptr);      cu"L1nac>__re,  241href
en="sref">x, 
en=ptr" c;er")
    5    201tring">"t;=rs/uaccess.hneforce="L274"> 674ong  9"linr2clude/asm/uaccess.h#L152" id55L197" class="line      useeuser_asm_ex_u  8stru5="L203"> 527extern v""ai="s   5    /5sm/uacextern               class="line      useeuser_asm_ex_u  8stru5=n>
 201tr2   _L592/ss.hnemi/spanvoid *4ess.h42"line"3toe="L203"> 201trtoUL5mmeconst void 4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r_A[100]; };L592UL5mme                    \
();            __me="_ref="arch/x86/ude     me="_ref="ports     class="line      useeuser_asm_ex_u  8stru5=ead from5e/asm/uaccess.h#L192" id5"L1925 class4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r();            __ 2365/a>me="_ref="arch/x86/ude     me="_ref="ports    4="string">"trlen/ss.harch/x86/ude   strlen/ss.h/spanhonst href=4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r 201trs   \
me="_ref="arch/x86/ude     me="_ref="ports    4="string">"trnlen/ss.harch/x86/ude   strnlen/ss.h/spanhonst href=4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r 201trs   \
();            __( 
catchen>       useer_A[100]; };clear>eerb/spanvoid 4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r_A[100]; };me2UL5mme                    \
_A[100]; };len  thclud4/asm/47ght_fault();            __"lins.h#L171             id=5L171"5claeer                    \
_A[100]; };__clear>eerb/spanvoid 4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r_A[100]; };me2UL5mme                    \
_A[100]; };len  thclud4/asm/47ght_fault();            __ 5r " id="L171" class="lin5"3n7m56 201             href="arch/x8/uaccess.h#L197"  "L203"> 257extern v""ai="s    5   /a5m/uaccextern void 4s"line"3n4"rcmpxchg_4ass="3n4ring">"3:&quocmpxchg_4ass="3n4r/spanvoidt;t;=rs/uaccess.hneforce="L274"> 674ong href="+co5e=__ret_pu"""""":x5 176     compiletime_cl5deing">"3:&quocompiletime_cl5de0                     \
"t;=rss="c3mment35span 56   be"L1nalass-&gquotr);      threadccess.h5neace.ces5.h#L197" idace.    laass5"s   57not wme="L203"> 201 _A[100]; };It supmmtomicocmpxchg_"stromic0    4       a su"3n4me="L223"> 220u      use4ess.h42"line"3name="L203"> 201tring">&qse4ess.h42"line"3ol      4     43ptol ">&qse4ess.h42"line"3newicu"L1nalass-&g ew">&qse4ess.h42"line"3;2:      4 movl4%& class="sref" 4apan clas4"3de=pttt42ass4"lemeitely wrong          5   \
 202          5>        5     2    4a href="+4ode5ptr" 57as    useer_a_asm_ex(x( 202          5>ri/a>(
href
en="sref">x,  236me="L270"> 201  220 220u      u
catchen>       useer
catchclass="line"3name="L203"> 202          5>h/x86/in5a>(ptr);      cu"L1nachref
en="sref">x, 
en=ptr" c;er")
);      cu"L1nacol      4     43ptacol    uf="+code=_ASM_EXT4Bol      4     43ptol ">&q
catchen>       useer
catcclass="line"3name="L203"> 202          5>9"lin6/include/asm/uacces cla5s="li5e"3name="L233"> 236
en="sref">x, 
en=ptr" c;er")
);      cu"L1nacnewicu"L1nalass-&gacnew   uf="+code=_ASM_EXT4Bnewicu"L1nalass-&g ew">&q
catchen>       useer
catcclass="line"3name="L203"> 202          5>"L203"> 5en>       useer  5     _(      ef">ecess.h#L197" icu"L1nalass-&gquotr);      threadccess.h#L197" ithreadlass.L203"> 201 
(       useer
( 197              2    4 
(       useer
( 197              2    4 
(       useer
(
(       useer
( 236e"3nace.cess.h#L197" idace.    useer_asm href="+4ode=p453="+co31             pan>dx,uot;              3:   pan>dhref="arc3/x86/inc5L197" ith5eadlass.L203"> 201 <5span>58n cla49" class=4line" name 71" id="L171" clas4ass="sref4>p\tref="+4ode=p45ref="ai="stref=LOCK_PREFIne" name="L264">LOCK_PREFInports  id="L171" clas4ass="sref4cmpxchgbt_ulhr4, s4f">__chk_4ser_ptr(              3:   pan>dhref="arc3/x86/inc5L        5n>       useerEFAULTmmen5               
shref>              3:   pan>dhref="arc3/x86/inc5Lri/a>(45
>>>>> ot;<2,u>              3:   pan>dhref="arc3/x86/inc5Lh/x86/in548de=er* Returns zero on5succl58laeer_asm_u64ihrefen>  71" id="L171" clas4ass="sref43p\tcodeeeee4x" cl4 5         xor"dx,uot;       >              3:   pan>dhref="arc3/x86/inc5L9"linns L203"fss="+code=4tr" 544="l58laeer_asm_u64ihrefen>  71" id="L171" clas4ass="sref4\tf(*(((((dx,uot>              3:   pan>dhref="arc3/x86/inc5L"L203"> 5t_sul  3     38="line" n5me="L58       /asm/uaccess.h#L171 71" id="L171" clas4ass="sref4\tline" name="L256"> 256    45">x), >              3:   pan>dhref="arc3/x86/inc5L hclude/5ounens20@ptst Source /as5 __, 58/uaccess.h#L171" id="L171" > 235pt4,4 232< >x()
              3:   pan>dhref="arc3/x86/inc5Lead from5ay sleep if pagn>, 49s" 5>href58class="line"3name="L203">  >pt4,4SM_EXT4BLE_:433mment3> */              3:   pan>dhref="arc3/x86/inc597)
53    59ine"3name="L233"> 236< > 256    45">x), dx,uot;                    2             5 name="L258"> 198  tldo __lass5"l_be59n cla49" class=4line"
catchen>       useer
catchss"L197" class=">dx,uot;                    2             5         5268"> 198  tldo __la5s4"83592 cla49" class=4line"break  202          5, but"+co5_ex_ur3     38="line" na5e="L259       /asm/u}atchen>       useer
catchss"L197" class=">dx,uod="L152" class="line"3name="L203"> 202          5,h/x86/in5n>)
 4 data""+cos like  5struu594="+co4me="L2case 2u64ihne" name="L192"> 197              2    4 
(       useer
( 198  t5ias d595m/uaccess.h#k/uaccess.h#L197" "q="nochecknclude/asm/uaccess.h#L152" id=an>
(       useer
( 198<5a>  t59       /asm/uaccess.he"3nace.cess.h#L197" idace.    useer_asm href="+4ode=p453="+co31             pan>dx,uot;              3:   pan>dhref="arc3/x86/inc5ec4nc>, <5pts 188 2 id="L171" clas4ass="sref4>p\tref="+4ode=p45ref="ai="stref=LOCK_PREFIne" name="L264">LOCK_PREFInports  id="L171" clas4ass="sref4cmpxchgwt_ulhr4, s4f">__chk_4ser_ptr(              3:   pan>dhref="arc3/x86/inc5ng">"52r&quo48de=er* Returns z5ro"="59ine"3name="L233"> 232< ><" id="L171" clas4ass="sref4/span>               
shref>              3:   pan>dhref="arc3/x86/inc5pointer w5th #L197" ok()/beforreca5l>, <59class="line"3name="L203">  ><" id="L171" clas4ass="sref4\tode=might_fault"  class="4ref">45
>>>>> ot;<2,u>              3:   pan>dhref="arc3/x86/inc6sm/uacc4s6.h#49             2    36span>60ine"3name="L233"> 236< ><" id="L171" clas4ass="sref43p\tcodeeeee4x" cl4 5         xor"dx,uot;       >              3:   pan>dhref="arc3/x86/inc6line"2n336    38="line" name="L2686> 19860n cla49" class=4line" name 71" id="L171" clas4ass="sref4\tf(*(((((dx,uot>              3:   pan>dhref="arc3/x86/inc6er 45 ith6r 3     38="line" name="6268">602 cla49" class=4line" name 71" id="L171" clas4ass="sref4\tline" name="L256"> 256    45">x), >              3:   pan>dhref="arc3/x86/inc64a int pt4,4ihrefen>  71span cla48" class=4line" name+ref="arch/x86/inh/xclude/asm2uaccet_pef">x()
              3:   pan>dhref="arc3/x86/inc6="L233"  6     \360laeer_asm_u64ihrefen>  71span cla48" class=4line" name"sref">pt4,4SM_EXT4BLE_:433mment3> */              3:   pan>dhref="arc3/x86/inc6  CLAC   6     4     43ptr 256    45">x), dx,uot;                    2             6    asm n6mencludass="sref">__put_6serpu60/uaccess.h#L171" id="
catchen>       useer
catchss"L197" class=">dx,uot;                    2             6a href="a6="5"6rch/x865ich/x86/inc6ude/a60ine"3name="L233"> 232break  202          6me="L268"6 198  tldo __lass5=86href=609      /asm/u}atchen>       useer
catchss"L197" class=">dx,uod="L152" class="line"3name="L203"> 202          6with lrns6L203"fss="+code=4tr" c446"line610="+co4me="L2case 4u64ihne" name="L192"> 197              2    4 
(       useer
(
<6e="+code=4tr" c44="line"6name=611m/uaccess.h#k/uaccess.h#L197" "q="nochecknclude/asm/uaccess.h#L152" id=an>
(       useer
(dx,uot;              3:   pan>dhref="arc3/x86/inc6name="L266"> 198  tldo __lass562 hre61       /asm/uaccess.h#L171 71" id="L171" clas4ass="sref4>p\tref="+4ode=p45ref="ai="stref=LOCK_PREFIne" name="L264">LOCK_PREFInports  id="L171" clas4ass="sref4cmpxchglt_ulhr4, s4f">__chk_4ser_ptr(              3:   pan>dhref="arc3/x86/inc6fun cl45 6ay sleep if pagn>, 49s" 6>href61laeer_asm_u64ihrefen>  71" id="L171" clas4ass="sref4/span>               
shref>              3:   pan>dhref="arc3/x86/inc6ss.h#51"+6oun>
45
>>>>> ot;<2,u>              3:   pan>dhref="arc3/x86/inc6ne" name=6L268"> 198  tldo __l6ss5ca61       /asm/uaccess.h#L171 71" id="L171" clas4ass="sref43p\tcodeeeee4x" cl4 5         xor"dx,uot;       >              3:   pan>dhref="arc3/x86/inc6e" name="6268"> 198  tldo __la6s5c6r61/uaccess.h#L171" id="L171" > 2 id="L171" clas4ass="sref4\tf(*(((((dx,uot>              3:   pan>dhref="arc3/x86/inc6, but"+co6_ex_ur3     38="line" na6e="L261ine"3name="L233"> 232< ><" id="L171" clas4ass="sref4\tline" name="L256"> 256    45">x), >              3:   pan>dhref="arc3/x86/inc6a href=re6="+cs20data""+cos like  6struu61class="line"3name="L203">  ><"35pt4,4 198  tlia5h 236< >x()
              3:   pan>dhref="arc3/x86/inc6e;
<6201ab71"+code=4tr" c44="6ine" 62n cla49" class=4line" name 71span cla48" class=4line" name"sref">pt4,4SM_EXT4BLE_:433mment3> */              3:   pan>dhref="arc3/x86/inc6s.h#L22="6ine"2n3 tos274"t_sul  of6dec44622 cla49" class=4line" name 71span cla48" class=4line" name    4a"L256"> 256    45">x), dx,uot;                    2             6e" name="6268"> 198  tldo __la6s5xte62       /asm/uaccess.h
catchen>       useer
catchss"L197" class=">dx,uot;                    2             6pointer w6th #L197" ok()/beforreca6l>, <62laeer_asm_u64ihrebreak  202          6ne"3nam5=6L2352"+coun>
       useer
catchss"L197" class=">dx,uod="L152" class="line"3name="L203"> 202          6counens236    38="line" name="L2686> 198626="+co4me="L2case 8u64ihne" name="L192"> 197              2    4 
(       useer
(
(       useer
( 232if (!h/xclude/asm2uaIS_ENt4
(       useer
( 262    62class="line"3name="L203">  ><"35cmpxchg_4ass="3n4ring">"3:&quocmpxchg_4ass="3n4r/span
catchen>       useer
(       useer
(_ASe/6sm/uaccess.hneclass="lin6"3nam63ine"3name="L233"> 236< ><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
(       useer
(
<6mencludass="sref">__put_6serpu63n cla49" class=4line"e"3nace.cess.h#L197" idace.    useer_asm href="+4ode=p453="+co31             pan>dx,uot;              3:   pan>dhref="arc3/x86/inc6   4 mo5l6%& class="sref">er5<6a>)5<632 cla49" class=4line" name 71" id="L171" clas4ass="sref4>p\tref="+4ode=p45ref="ai="stref=LOCK_PREFIne" name="L264">LOCK_PREFInports  id="L171" clas4ass="sref4cmpxchgqt_ulhr4, s4f">__chk_4ser_ptr(              3:   pan>dhref="arc3/x86/inc6ern4voi5 6 shref>              3:   pan>dhref="arc3/x86/inc6     4   6 43ptincludeh/unal201ihrefen>  71" id="L171" clas4ass="sref4\tode=might_fault"  class="4ref">45
>>>>> ot;<2,u>              3:   pan>dhref="arc3/x86/inc6ing">&quo6;2:5 _asm_ex<5/x86/inclu6e/in/63laeer_asm_u64ihrefen>  71" id="L171" clas4ass="sref43p\tcodeeeee4x" cl4 5         xor"dx,uot;       >              3:   pan>dhref="arc3/x86/inc6an>
dx,uot>              3:   pan>dhref="arc3/x86/inc6an>
 2 id="L171" clas4ass="sref4\tline" name="L256"> 256    45">x), >              3:   pan>dhref="arc3/x86/inc6cc5ss.h#56/a>,  232< ><"35pt4,4  >x()
              3:   pan>dhref="arc3/x86/inc6span>)
<36     r 236< >pt4,4SM_EXT4BLE_:433mment3> */              3:   pan>dhref="arc3/x86/inc6s;
<6     2    4apan clas4"} 6 256    45">x), dx,uot;                    2             65an>4(e65642 cla49" class=4line"
catchen>       useer
catchss"L197" class=">dx,uot;                    2             6"> 26264       /asm/uaccess.hbreak  202          6="+co4me=6L266"> 176      4        useer
catchss"L197" class=">dx,uod="L152" class="line"3name="L203"> 202          649"li6eace.cess.h#L197" idace.6   la6ss="s         d      u64ihne" name="L192"> 197              2    4  202          64n>
cmpxchg_4ass="3n4ring">"3:&quocmpxchg_4ass="3n4r/span
catchen>       useer 202          64n>
 202          64c5ss.h#56n a4m/uac4ess.h#* Return6 zero64f="+co4me="L266"> 176     otr)en      4     43ptacotr)en   threadccess.h#L197" ithreadlass.L203"> 201  202          64 href=re6memory3instead of writin6: t  64class="line"3 4s"line"3n4"r 220 201  202          6lin644uac6ess.h#L274" id="L274" c>6 we d650="+co4me="L266"> 176     et_pef">x(       useer
catchss"L197" class=">dx,uosp" class="line"3name="L203"> 202          6l;
<6          2    4apan cla64">x<6a>,  674ong6e.    use6r_asm_u64(     6 usee65s.h#L197" idace.    lass="c3mment34span class="6_uef="+co6e=ptr" class="sref">ptr<6a>, <65ess.h#L197" id="L197" class=="c3mmtomicocmpxchg_"stromicuf">_A[100]; }; supmmtomicocmpxchg_"stromic0    4       a su"3n4me="L223"> 220u      use4ess.h42"line"3name="L203"> 201tring">&qse4ess.h42"line"3ol      4     43ptol ">&qse4ess.h42"line"3newicu"L1nalass-&g ew">&q="+code=__ret_ppclass="line"3name="L203"> 202          6l"+co4me=6                     id=6L171"65"srefck/uaccess.h#L197" "q="nochecknclude/asm/uaccess.h#L152" id="L152" class="line"3name="L203"> 202          6 9"li6r2clude/asm/uaccess.h#L162" id65"3name="L233"> 236)o"arch/x86/ude   tr)o"0    4       a sVERIFY_WRIT4ode=ptr" class=VERIFY_WRIT4">&qse71" id="L171" clas4npan clas4lincludeh/x86/in/asm/uac4ess.h42"line"3name="L203"> 201tring">" ?L152" id="L152" class="line"3name="L203"> 202          6 n>
extern v""ai="s   6    /65       /asm/uaccess.h"35="c3mmtomicocmpxchg_"stromicuf">_A[100]; };It supmmtomicocmpxchg_"stromic0+code=_ASM_EXT4Bu"3n4me="L223"> 220u      u
se71" id="L171" clas4npan clas4lincludeh/x86/iid="L152" class="line"3name="L203"> 202          6 n>
         +code=_ASM_EXT4Bol      4     43ptol ">&q
se71" id="L171" clnewicu"L1nalass-&g ew">&q=/in/asm/uac4ess.h42"line"3name="L203"> 201tring">" u64ihnclass="line"3name="L203"> 202          6 c5ss.h#56ccess.h#L192" id="L192" 6lass=65ine"3name="L233"> 232SM_EXT4BLE_:433mment3> */ 201  202          6l href=re6e/asm/uaccess.h#L192" id6"L1926 class}t;t;=rs/uaccess.hneforce="L274"> 674ong6ude/asm/u6ccess.h#L194" id="L194" 6lass=66"L20             href="arch/x8/uaccess.h#L197" 6s94" clas6="line"3name="L233"> 2366/a> 198  tlia56"    462x86/"3na3"> x<01     5t_pu"li6s.h#L171             id=6L171"6claeerextern n clash"35
(();            __ 267extern v""ai="s    6   /a6m/uacc}h"35uocache v""_<01_A[100]; };Ituocache v""_<01();            __6"t;=rss="c3mment36span 66   be"L1nalass-&gquotr);      threadccess.h6neace.ces6.h#L197" idace.    laass6"s   67not wme="L203"> 201 );      threadccess.h6n94" clas6   \
);      threadccess.h6n.    use6     2    4a href="+4ode6ptr" 67as   #ifL19h"35ri/a>(();            __9"li66/include/asm/uacces cla6s="li6e"3nam# ="c3mme <97" idace="c3mment34-lassotr)64.> 249(fde   t34span cla)64.>rts >lud4/asm/47ght_fault();            __n>
       useer  6();            __ 1986aref="+co6                    \
 201trtoUL5mmeconst void 4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r_A[100]; };L592UL5mmithor 3     38="line" name="L268"> 1986a href=re6194" id="L194"4"\
  ><<<<<<<<<<<<<<<<<<<<         1" id="L171" clnicu"L1nalass-&g ">&qulud4/asm/47ght_fault();            __void 4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r 201trtoUL5mmeconst void  4s"line"3n4"r_A[100]; };L592UL5mmithor 3     38="line" name="L268"> 1986L197" ith6eadlass.L203"> 201 <6span>68n cla49" class=4line" name 71<<<<<<<<<<<<<<<<<         1" id="L171" clnicu"L1nalass-&g ">&qulud4/asm/47ght_fault();            __       useerEFAULTmmen6(compiletime_cl5deing">"3:&quocompiletime_cl5de0                     \
 256 674ong6Lh/x86/in648de=er* Returns zero on6succl68laeer4s"line"3n4"rbad 2   _eerbuf">_A[100]; };Itbad 2   _eerb0voidulud4/asm/47ght_fault();            __"li6ns L203"fss="+code=4tr" 644="l68L197" class="line      useeuser_asm_ex_u  8stru6L"L203"> 6t_sul  3     38="line" n6me="L68     static 4s"line"3n4"r_A[100]; };in  38 cla4void 4s"line"3n4"r_A[100]; };2   _eerb_overflow0_asm_ex( 176   WARNn"do      WARNa>,4 256();            __, 49s" 6>href68class}ud4/asm/47ght_fault();            __)
63    69"L20             href="arch/x8/uaccess.h#L197" 6 name="L268"> 198  tldo __lass6"l_be69n clastatic 4s"line"3n4"r_A[100]; };__<0ways_in  38="+co                    \
 198  tldo __la6s4"83692 cla4s"line"3n4"rvoid *4ess.h42"line"3toe="L203"> 201trtoUL5mmeconst void 4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r_A[100]; };L592UL5mme                    \
()
 4 data""+cos like  6struu694="+co4me="L2_asm_ex("3:&quocompiletime_object"3n4r0    4       a stoe="L203"> 201trtoUL5mclud4/asm/47ght_fault();            __ 198  t6ias d69L197" class="line      useeuser_asm_ex_u  8stru6=4tr" c446"line" name="L268"> 198<6a>  t69rong ->     _(      ef"might_     arch/x86/ude   might_       threa class="line      useeuser_asm_ex_u  8stru6= hclude/6pts 188 1986ng">"62r&quo48de=er* Returns z6ro"="69f="+co4me="L266"> 176   kasan_ref="_writring">"3:&qkasan_ref="_writr0    4       a stoe="L203"> 201trtoUL5mse4ess.h42"line"3nicu"L1nalass-&g ">&qulud4/asm/47ght_fault();            __, <69   be"L1nalass-&gquotr);      threadccess.h7sm/uacc4s7.h#49             2    37span>70ine"3name="L2if (4ess.h42"line"3likel/uaccess.h#L249"likel/0    4       a s"z     4 movl4%z   uf< 0 ||m_ex(&qu)n{            href="arch/x8/uaccess.h#L197" 7line"2n337    38="line" name="L2687> 19870n cla49" class=4line"4s"line"3n4"r"3:&q2ef="_object"3n4r0    4       a stoe="L203"> 201trtoUL5mse4ess.h42"line"3nicu"L1nalass-&g ">&qse4ess.h42"line"3falsring">"3:&qfalsr">&qulud4/asm/47ght_fault();            __702 cla49" class=4line"icu"L1nalass-&g ">&qse4ess.h42"line"f="h/xclude/asm2uacre4_2   _L592/ss.harch/x86/ude    2   _L592/ss.h0cu"L1nalass-&g ">&qse4ess.h42"line"f="h/xclude/asm2uacrsm_excompiletime_cl5deing">"3>              7:   p70"> 202         6 tldo __l6ss5ref="airo uilti="+ _L5ant_"s    6   /a6m/uac uilti="+ _L5ant_"f="h/xclude/asm2uacr||m_ex(compiletime_cl5deing">&quo4;3dhref="arc3/x86/inc6    static 4s"line"3n4"r_A[100]; };in  38 cla4void 4s"line"49"likel/0    4       a s"z     4 se4ess.h42"line"f="h/xclude/asm2uacrsm_excompiletime_cl5deing">&quo5;3dhref="arc3/          __h/x86/in6a>( 674ong6Lh/x86/in648de=er* Returns zero on6succl68laeer4s_excompiletime_cl5deing">&quo7acol   7u    threa class="line  7     70user_asm_ex_u  8stru6= hclude/6pts 188compiletime_cl5deing">&quo997" cla7s&g ">&qulud4/asm/47ght_7e="L270>();            __7ss=">dx,u7d="L152" class="line"3na7e="L271>();            __
(     7 usee71/x8/uaccess.h#L197" 6 name="L268"> 198  tldo __lass6"l_be69n clastatic 4s"line"3n4"r_A[100]; };__<0ways_in  38="+co                    \

(     7 usee71/x8/uaccess.h#L197" 6 .  me="_ref="arch/x86/ude    me="_ref="ports      \
void 4s"line"3n4"reerbuf">_A[100]; };It supports 4s"line"3n4"r 201tr100]; };It supports 4s"line"3n4"r_A[100]; };L592UL5mme                    \
dx,7ot;              7:   p71/x8/uaccess.h#L197" 6 ri/a>()
 4 data""+cos like  6struu694="+co4me="L2_asm_ex( 201t_excompiletime_cl5deing">&quer_asm_u67shref>              7:   p71>();            __ 197ring">>>>7> ot;<2,u>              7:   p71user_asm_ex_u  8stru6=4tr" c"69f="+co4merea6"3nam65/uaccess"69f="+co4merea6compiletime_object"3ine"3n4"r 201tse4ess.h42"line"f="h/xclude/asm2uacrsm_excompiletime_cl5deing">&qu,uot;       >              7:   p71user_asm_ex_u  8stru6= hclude/6pts 188dx,uot>              7:   p71name="L268"> 1986ng">&qu446"line" name="L268"> 198<6a>  t69rong ->     _(      ef"might_     arch/x86/ude7>), >              7:   p71>();            __7x,uot;              7:   p72;      threadccess.h7sm/uacc4s7.h#49             2    37span>70ine"3name="L2if (4ess.h42"line"3likel/uaccess.h#L249"likel/0    4       a s"z     4 movl4%z   uf< 0 ||m_ex(              7:   p7n>dhref="arc3/x86/inc6line"2n337    38="line" name="L2687> 19870n cla49" class=4line"4s"line"3n4"r 201tse4ess.h42"line"f="h/xclude/asm2uacrsmse4ess.h42"line"ftru2687> 19870n clatru2crsm_excompiletime_cl5deing">&quptacol   7u uot;              7:   p7n>dhref="arc3/x86/inc6er 45 ith7r 3     38="line" name="7268">702 cla49" class=4lime="_ref="arch/x86/ude     me="_ref="porxclude/asm2uacre4_2   _L592/ss.harch/x86/ude    2   _L592/ss.h0cu"L1nalass-&g ">&qse4ess.h42"line"f="h/xclude/asm2uacrsm_excompiletime_cl5deing">&quspan clas7pan>dx,uot;      7     72"> 202         6 tldo __l6ss5ref="airo uilti="+ _L5ant_"s    6   /a6m/uac uilti="+ _L5ant_"f="h/xclude/asm2uacr||m_ex(compiletime_cl5deing">&quL197" cla7s=">dx,uot;      7     7       2             6    static 4s"line"3n4"r_A[100]; };in  38 cla4void 4s"line"49"likel/0    4       a s"z     4 se4ess.h42"line"f="h/xclude/asm2uacrsm_excompiletime_cl5deing">&qush#L152" 7d="L152" class="line"3na7e="L272>dhref="arc3/          __h/x86/in6a>(dx,u7d="L152" class="line"3na7e="L272>dhref="arc3/x86/inc674"> 674ong6Lh/x86/in648de=er* Returns zero on6succl68laeer4s_excompiletime_cl5deing">&qu        27   4 
(     7 usee72user_asm_ex_u  8stru6= hclude/6pts 188
(     7 usee72      2      retuss.h#L197"  s.    ="h/xclude/asm2uacrsmexcompiletime_cl5deing">&quuaccess.h7L152" id=an>
(     7 usee72>();            __7>       u7eer
(     7 usee73>();            __
(     7 usee73/x8/uaccess.h#L197" 6s94" clas6="line"3name="L233"> 2366/a> 198<7  pan>dx,7ot;              7:   p73ass="4span clas4="st6s.    useWe rely on the nes   WNMI work to aluot;mmtomi t69ros -&g  the NMI path; thes6="line"3name="L233"> 2366/a> 198<7 pan clas7>(              7:   p73ass="4span clas4="st6suef="+c nes   WNMI paths <@ptc<@pful to pre8lave CR2.s6="line"3name="L233"> 2366/a> 198<7 197" cla7shref>              7:   p7n>dhre4span clas4="st6suef="+cs6="line"3name="L233"> 2366/a> 198<7 h#L152" 7> ot;<2,u>              7:   p7n>dhre4span clas4="st6suef="+c Caluer ="+c 68l pag      _enable/disable, or runh#Lh#L1errupt>_A[text,s6="line"3name="L233"> 2366/a> 198<7 s=">dx,u7n>       >              7:   p7n>dhre4span clas4="st6suef="+c c664also do a me <9ok()        ="line"3name="L233"> 2366/a> 198<7        27an>dx,uot>              7:   p7n>dhre4span clas4="st6suef="+co6href="+et_pu" uo + 1ot;/6sm/ua664voi5 42code=__p7>), >              7:   p7n>dhre  threadccess.h6neace.c_e4ess.h42"line"_nmi    4 movl4%z   ss.h42"line"_nmi     ccess.h6neace.c_e4ess.h42"line"_  /65       /asm/uaccess.4ess.h42"line"_  /65   ();            __              7:   p73>();            __              7:   p7n>dhreaccess.h#L197" 6s94" clas6="line"3name="L233"> 2366/a> 198<7ptacol   7u uot;              7:   p74/x8/uaccess.h#L197" 6s94" c+c The 5deing"nsafe5deing 68lr 268"> es <@pn't realuy 5deing"nsafe5deing, but the namings6="line"3name="L233"> 2366/a> 198<7p pan>dx,7pan>dx,uot;      7     74ass="4span clas4="st6s.    useis < big t6t warning: you have to s="+onuy do the e <9ok()s6="line"3name="L233"> 2366/a> 198<7ppan clas7s=">dx,uot;      7     74ass="4span clas4="st6suef="+c      ing befo@ptusing them, but you have to surrou664them with thes6="line"3name="L233"> 2366/a> 198<7sh#L152" 7d="L152" class="line"3na7e="L274>dhre4span clas4="st6suef="+c h"35 2366/a> 198<7ss=">dx,u7d="L152" class="line"3na7e="L274>dhre4span clas4="st6suef="+co6href="+et_pu" uo + 1ot;/6sm/ua664voi5 42code=__p7         7    4  20t34span class="6_uef="+co6e=p <9begin    /asm/uaccesco6e=p <9begineer4s_/inc674"> 674ong6Lup <9begin    /asm/uacces6Lup <9begineer4s_+et_pu" uo + 1ot;/6sm/ua664voi5 42code=__p7        27n   4  20t34span class="6_uef="+co6e=p <9ac4ess.h#* Return6co6e=p <9ac4eer4s_/inc6         64c5ss.h#56n a4m/uac4ess.h#* Return6 zero64f="+co4me="L+et_pu" uo + 1ot;/6sm/ua664voi5 42code=__p7 ),  20+et_pu" uo + 1ot;/6sm/ua664voi5 42code=__p7 access.h7a>  20t34span class="6_uef="+cnsafe_put648de=er* Returns zecnsafe_put648deline"49"likel/0 x=er* Returns zex  4 se4ess.h42"line"f    4       a su"3n4me="L223"> 220u   err_labe[100]; };It supmerr_labe[crsm_f="arc3/x86/inc66666666666666666666666           &quadccess.h#L197" ithreadlass.L703"> 201<7a>  20do           6l"+co4me=6                     id=6L171"65"srefck/uacces666666           &quadccess.h#L197" ithreadlass.L70tacol   7dx,uosp" class="line"3na7e="L275>dhref="arc3/#L197" 6,h/x86/in6n__pu 4s"ess.h#* Return6 zpu 4s"crsmeco4me=6                     id=6L171"65"srefck/uacces666666           &quadccess.h#L197" ithreadlass.L70 pan>dx,7<6a>, dhref="arc3/7" 6,h/x86/in6n__put648de  "z     4 movl4%z put648de  "z line""49"likel/0 x=er* Returns zex  4 mpxchg_"stromic0+code=_ASM_EXT4Bu"3n4me="L2     43ptol ">&q
se71" id="L171" clnewicu"L1nalass-e="L223"> 220u   __pu 4s"ess.h#* Return6 zpu 4s"crsm,6 c5ss.h#56ccess.h#L192" id="L192" 6lass=65ine"3L266"> 176<           &quadccess.h#L197" ithreadlass.L70pan clas7see65s.h#L197" idace.   7lass=75"> 202   ccess.h7sm/uacc4s7.unh#49             2   unh#49  line"49"likel/0 __pu 4s"ess.h#* Return6 zpu 4s"crsm)) goto "L223"> 220u   err_labe[100]; };It supmerr_labe[crsmcla>cmpxchg_4ass="3n4ring">"3:&quocmpxchg_4ass="3n4r/span
catchen>      7>&q="+cod7=__ret_ppclass="line"3na7e="L273"> 20} while (0L+et_pu" uo + 1ot;/6sm/ua664voi5 42code=__p7.h#L152" 7d="L152" class="line"3na7e="L275>();            __ 197t ?L152" 7d="L152" class="line"3na7e="L275"> 20t34span class="6_uef="+cnsafe_get648de=er* Returns zecnsafe_get648deline"49"likel/0 x=er* Returns zex  4 se4ess.h42"line"f    4       a su"3n4me="L223"> 220u   err_labe[100]; };It supmerr_labe[crsm_f="arc3/x86/inc66666666666666666666666           &quadccess.h#L197" ithreadlass.L70       27d="L152" class="line"3na7e="L273"> 20do           6l"+co4me=6                     id=6L171"65"srefck/uacces666666           &quadccess.h#L197" ithreadlass.L70), ihnclass="line"3na7e="L273"> 202   #L197" 6,h/x86/in6n__gu 4s"ess.h#* Return6 zgu 4s"crsmeco4me=6                     id=6L171"65"srefck/uacces666666           &quadccess.h#L197" ithreadlass.L70access.h7a>  "line"3n4"r 202          6lin644uacget648de  "z     4 movl4%z get648de  "z line"49"likel/0 __gu emory3instead of wrigu emocrsmpxchg_"stromic0+code=_ASM_EXT4Bu"3n4me="L2     43ptol ">&q
se71" id="L171" clnewicu"L1nalass-e="L223"> 220u   __gu 4s"ess.h#* Return6 zgu 4s"crsm,6 c5ss.h#56ccess.h#L192" id="L192" 6lass=65ine"3L266">           &quadccess.h#L197" ithreadlass.L72tacol   7ss=66"L20             hr7f="ar76>dhref="arc3/"49"likel/0 x=er* Returns zex  4 m =1nalass-&gacnew   ufo@c     4 movl4%z fo@c      ccess.h6neace.c_etyp  4__    4 movl4%z typ  4__line"ptol ">&q
se71" id="L171" clnewicu"L1nalass-&_<0ways_in  38=""gu emory3instead of wrigu emocrsmeco4me=6                     i           &quadccess.h#L197" ithreadlass.L72 pan>dx,7"    462x86/"3na3"> 7span 762> 202   ccess.h7sm/uacc4s7.unh#49             2   unh#49  line"49"likel/0 __gu 4s"ess.h#* Return6 zgu 4s"crsm)) goto "L223"> 220u   err_labe[100]; };It supmerr_labe[crsmcla>cmpxchg_4ass="3n4ring">"3:&quocmpxchg_4ass="3n4r/span
catchen>      7-by">x<017/1" i    462x86/"3na3"> 7span 7lass="} while (0L+et_pu" uo + 1ot;/6sm/ua664voi5 42code=__p7t_user_ba7" eturns zer5r    5t7pu(); 
The original LXR softw<@ptby the et_pu" uohttp://in6acefo@ge.net/pros=4ls/lxe=>LXR " 6sunitycrsm,6this experis94"al verslaeeby et_pu" uomailto:lxe@d4/ux.no">lxe@d4/ux.nocrsm.
lxe.d4/ux.no kindly hos Wby et_pu" uohttp://www.redpill-d4/pro.no">Redpill L4/pro AScrsm,6provid WARf L4/ux>_A[1ulti=g c664opera3laes 8lavicod2 nce 1995.