diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/lib/getuser_64.S | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/lib/getuser_64.S b/arch/x86/lib/getuser_64.S index 0ec7890f9dcc..6134752a75fd 100644 --- a/arch/x86/lib/getuser_64.S +++ b/arch/x86/lib/getuser_64.S | |||
@@ -37,57 +37,57 @@ | |||
37 | ENTRY(__get_user_1) | 37 | ENTRY(__get_user_1) |
38 | CFI_STARTPROC | 38 | CFI_STARTPROC |
39 | GET_THREAD_INFO(%rdx) | 39 | GET_THREAD_INFO(%rdx) |
40 | cmpq TI_addr_limit(%rdx),%rax | 40 | cmp TI_addr_limit(%rdx),%rax |
41 | jae bad_get_user | 41 | jae bad_get_user |
42 | 1: movzb (%rax),%edx | 42 | 1: movzb (%rax),%edx |
43 | xorl %eax,%eax | 43 | xor %eax,%eax |
44 | ret | 44 | ret |
45 | CFI_ENDPROC | 45 | CFI_ENDPROC |
46 | ENDPROC(__get_user_1) | 46 | ENDPROC(__get_user_1) |
47 | 47 | ||
48 | ENTRY(__get_user_2) | 48 | ENTRY(__get_user_2) |
49 | CFI_STARTPROC | 49 | CFI_STARTPROC |
50 | addq $1,%rax | 50 | add $1,%rax |
51 | jc bad_get_user | 51 | jc bad_get_user |
52 | GET_THREAD_INFO(%rdx) | 52 | GET_THREAD_INFO(%rdx) |
53 | cmpq TI_addr_limit(%rdx),%rax | 53 | cmp TI_addr_limit(%rdx),%rax |
54 | jae bad_get_user | 54 | jae bad_get_user |
55 | 2: movzwl -1(%rax),%edx | 55 | 2: movzwl -1(%rax),%edx |
56 | xorl %eax,%eax | 56 | xor %eax,%eax |
57 | ret | 57 | ret |
58 | CFI_ENDPROC | 58 | CFI_ENDPROC |
59 | ENDPROC(__get_user_2) | 59 | ENDPROC(__get_user_2) |
60 | 60 | ||
61 | ENTRY(__get_user_4) | 61 | ENTRY(__get_user_4) |
62 | CFI_STARTPROC | 62 | CFI_STARTPROC |
63 | addq $3,%rax | 63 | add $3,%rax |
64 | jc bad_get_user | 64 | jc bad_get_user |
65 | GET_THREAD_INFO(%rdx) | 65 | GET_THREAD_INFO(%rdx) |
66 | cmpq TI_addr_limit(%rdx),%rax | 66 | cmp TI_addr_limit(%rdx),%rax |
67 | jae bad_get_user | 67 | jae bad_get_user |
68 | 3: movl -3(%rax),%edx | 68 | 3: mov -3(%rax),%edx |
69 | xorl %eax,%eax | 69 | xor %eax,%eax |
70 | ret | 70 | ret |
71 | CFI_ENDPROC | 71 | CFI_ENDPROC |
72 | ENDPROC(__get_user_4) | 72 | ENDPROC(__get_user_4) |
73 | 73 | ||
74 | ENTRY(__get_user_8) | 74 | ENTRY(__get_user_8) |
75 | CFI_STARTPROC | 75 | CFI_STARTPROC |
76 | addq $7,%rax | 76 | add $7,%rax |
77 | jc bad_get_user | 77 | jc bad_get_user |
78 | GET_THREAD_INFO(%rdx) | 78 | GET_THREAD_INFO(%rdx) |
79 | cmpq TI_addr_limit(%rdx),%rax | 79 | cmp TI_addr_limit(%rdx),%rax |
80 | jae bad_get_user | 80 | jae bad_get_user |
81 | 4: movq -7(%rax),%rdx | 81 | 4: movq -7(%rax),%rdx |
82 | xorl %eax,%eax | 82 | xor %eax,%eax |
83 | ret | 83 | ret |
84 | CFI_ENDPROC | 84 | CFI_ENDPROC |
85 | ENDPROC(__get_user_8) | 85 | ENDPROC(__get_user_8) |
86 | 86 | ||
87 | bad_get_user: | 87 | bad_get_user: |
88 | CFI_STARTPROC | 88 | CFI_STARTPROC |
89 | xorl %edx,%edx | 89 | xor %edx,%edx |
90 | movq $(-EFAULT),%rax | 90 | mov $(-EFAULT),%rax |
91 | ret | 91 | ret |
92 | CFI_ENDPROC | 92 | CFI_ENDPROC |
93 | END(bad_get_user) | 93 | END(bad_get_user) |