Commit 770546b9 authored by Glauber Costa's avatar Glauber Costa Committed by Ingo Molnar

x86: clobber rbx in putuser_64.S.

Instead of clobbering r8, clobber rbx, which is the i386 way.
Signed-off-by: default avatarGlauber Costa <gcosta@redhat.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 70706e43
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* *
* Outputs: %rax is error code (0 or -EFAULT) * Outputs: %rax is error code (0 or -EFAULT)
* *
* %r8 is destroyed. * %rbx is destroyed.
* *
* These functions should not modify any other registers, * These functions should not modify any other registers,
* as they get called from within inline assembly. * as they get called from within inline assembly.
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
.text .text
ENTRY(__put_user_1) ENTRY(__put_user_1)
CFI_STARTPROC CFI_STARTPROC
GET_THREAD_INFO(%r8) GET_THREAD_INFO(%rbx)
cmpq TI_addr_limit(%r8),%rcx cmpq TI_addr_limit(%rbx),%rcx
jae bad_put_user jae bad_put_user
1: movb %dl,(%rcx) 1: movb %dl,(%rcx)
xorl %eax,%eax xorl %eax,%eax
...@@ -45,10 +45,10 @@ ENDPROC(__put_user_1) ...@@ -45,10 +45,10 @@ ENDPROC(__put_user_1)
ENTRY(__put_user_2) ENTRY(__put_user_2)
CFI_STARTPROC CFI_STARTPROC
GET_THREAD_INFO(%r8) GET_THREAD_INFO(%rbx)
addq $1,%rcx addq $1,%rcx
jc 20f jc 20f
cmpq TI_addr_limit(%r8),%rcx cmpq TI_addr_limit(%rbx),%rcx
jae 20f jae 20f
decq %rcx decq %rcx
2: movw %dx,(%rcx) 2: movw %dx,(%rcx)
...@@ -61,10 +61,10 @@ ENDPROC(__put_user_2) ...@@ -61,10 +61,10 @@ ENDPROC(__put_user_2)
ENTRY(__put_user_4) ENTRY(__put_user_4)
CFI_STARTPROC CFI_STARTPROC
GET_THREAD_INFO(%r8) GET_THREAD_INFO(%rbx)
addq $3,%rcx addq $3,%rcx
jc 30f jc 30f
cmpq TI_addr_limit(%r8),%rcx cmpq TI_addr_limit(%rbx),%rcx
jae 30f jae 30f
subq $3,%rcx subq $3,%rcx
3: movl %edx,(%rcx) 3: movl %edx,(%rcx)
...@@ -77,10 +77,10 @@ ENDPROC(__put_user_4) ...@@ -77,10 +77,10 @@ ENDPROC(__put_user_4)
ENTRY(__put_user_8) ENTRY(__put_user_8)
CFI_STARTPROC CFI_STARTPROC
GET_THREAD_INFO(%r8) GET_THREAD_INFO(%rbx)
addq $7,%rcx addq $7,%rcx
jc 40f jc 40f
cmpq TI_addr_limit(%r8),%rcx cmpq TI_addr_limit(%rbx),%rcx
jae 40f jae 40f
subq $7,%rcx subq $7,%rcx
4: movq %rdx,(%rcx) 4: movq %rdx,(%rcx)
......
...@@ -131,7 +131,7 @@ extern void __put_user_bad(void); ...@@ -131,7 +131,7 @@ extern void __put_user_bad(void);
asm volatile("call __put_user_" #size \ asm volatile("call __put_user_" #size \
:"=a" (ret) \ :"=a" (ret) \
:"c" (ptr),"d" (x) \ :"c" (ptr),"d" (x) \
:"r8") :"ebx")
#define put_user(x, ptr) \ #define put_user(x, ptr) \
__put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr))) __put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment