diff options
Diffstat (limited to 'arch/x86/lib/putuser_64.S')
-rw-r--r-- | arch/x86/lib/putuser_64.S | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/arch/x86/lib/putuser_64.S b/arch/x86/lib/putuser_64.S index ce5fcd5d8c16..a96bd8a5298e 100644 --- a/arch/x86/lib/putuser_64.S +++ b/arch/x86/lib/putuser_64.S | |||
@@ -46,48 +46,39 @@ ENDPROC(__put_user_1) | |||
46 | ENTRY(__put_user_2) | 46 | ENTRY(__put_user_2) |
47 | CFI_STARTPROC | 47 | CFI_STARTPROC |
48 | GET_THREAD_INFO(%rbx) | 48 | GET_THREAD_INFO(%rbx) |
49 | addq $1,%rcx | 49 | mov TI_addr_limit(%rbx),%rbx |
50 | jc 20f | 50 | sub $1, %rbx |
51 | cmpq TI_addr_limit(%rbx),%rcx | 51 | cmpq %rbx ,%rcx |
52 | jae 20f | 52 | jae bad_put_user |
53 | decq %rcx | ||
54 | 2: movw %ax,(%rcx) | 53 | 2: movw %ax,(%rcx) |
55 | xorl %eax,%eax | 54 | xorl %eax,%eax |
56 | ret | 55 | ret |
57 | 20: decq %rcx | ||
58 | jmp bad_put_user | ||
59 | CFI_ENDPROC | 56 | CFI_ENDPROC |
60 | ENDPROC(__put_user_2) | 57 | ENDPROC(__put_user_2) |
61 | 58 | ||
62 | ENTRY(__put_user_4) | 59 | ENTRY(__put_user_4) |
63 | CFI_STARTPROC | 60 | CFI_STARTPROC |
64 | GET_THREAD_INFO(%rbx) | 61 | GET_THREAD_INFO(%rbx) |
65 | addq $3,%rcx | 62 | mov TI_addr_limit(%rbx),%rbx |
66 | jc 30f | 63 | sub $3, %rbx |
67 | cmpq TI_addr_limit(%rbx),%rcx | 64 | cmp %rbx, %rcx |
68 | jae 30f | 65 | jae bad_put_user |
69 | subq $3,%rcx | ||
70 | 3: movl %eax,(%rcx) | 66 | 3: movl %eax,(%rcx) |
71 | xorl %eax,%eax | 67 | xorl %eax,%eax |
72 | ret | 68 | ret |
73 | 30: subq $3,%rcx | ||
74 | jmp bad_put_user | ||
75 | CFI_ENDPROC | 69 | CFI_ENDPROC |
76 | ENDPROC(__put_user_4) | 70 | ENDPROC(__put_user_4) |
77 | 71 | ||
78 | ENTRY(__put_user_8) | 72 | ENTRY(__put_user_8) |
79 | CFI_STARTPROC | 73 | CFI_STARTPROC |
80 | GET_THREAD_INFO(%rbx) | 74 | GET_THREAD_INFO(%rbx) |
81 | addq $7,%rcx | 75 | mov TI_addr_limit(%rbx),%rbx |
82 | jc 40f | 76 | sub $7, %rbx |
83 | cmpq TI_addr_limit(%rbx),%rcx | 77 | cmp %rbx, %rcx |
84 | jae 40f | 78 | jae bad_put_user |
85 | subq $7,%rcx | ||
86 | 4: movq %rax,(%rcx) | 79 | 4: movq %rax,(%rcx) |
87 | xorl %eax,%eax | 80 | xorl %eax,%eax |
88 | ret | 81 | ret |
89 | 40: subq $7,%rcx | ||
90 | jmp bad_put_user | ||
91 | CFI_ENDPROC | 82 | CFI_ENDPROC |
92 | ENDPROC(__put_user_8) | 83 | ENDPROC(__put_user_8) |
93 | 84 | ||