lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 27 Jun 2008 18:34:24 -0300
From:	Glauber Costa <gcosta@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	tglx@...utronix.de, mingo@...e.hu, x86@...nel.org
Subject: [PATCH 17/39] clobber rbx in putuser_64.S

Instead of clobbering r8, clobber rbx, which is the i386 way.

Signed-off-by: Glauber Costa <gcosta@...hat.com>
---
 arch/x86/lib/putuser_64.S    |   18 +++++++++---------
 include/asm-x86/uaccess_64.h |    2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/x86/lib/putuser_64.S b/arch/x86/lib/putuser_64.S
index 940796f..0702885 100644
--- a/arch/x86/lib/putuser_64.S
+++ b/arch/x86/lib/putuser_64.S
@@ -18,7 +18,7 @@
  *
  * Outputs:	%rax is error code (0 or -EFAULT)
  *
- * %r8 is destroyed.
+ * %rbx is destroyed.
  *
  * These functions should not modify any other registers,
  * as they get called from within inline assembly.
@@ -34,8 +34,8 @@
 	.text
 ENTRY(__put_user_1)
 	CFI_STARTPROC
-	GET_THREAD_INFO(%r8)
-	cmpq TI_addr_limit(%r8),%rcx
+	GET_THREAD_INFO(%rbx)
+	cmpq TI_addr_limit(%rbx),%rcx
 	jae bad_put_user
 1:	movb %dl,(%rcx)
 	xorl %eax,%eax
@@ -45,10 +45,10 @@ ENDPROC(__put_user_1)
 
 ENTRY(__put_user_2)
 	CFI_STARTPROC
-	GET_THREAD_INFO(%r8)
+	GET_THREAD_INFO(%rbx)
 	addq $1,%rcx
 	jc 20f
-	cmpq TI_addr_limit(%r8),%rcx
+	cmpq TI_addr_limit(%rbx),%rcx
 	jae 20f
 	decq %rcx
 2:	movw %dx,(%rcx)
@@ -61,10 +61,10 @@ ENDPROC(__put_user_2)
 
 ENTRY(__put_user_4)
 	CFI_STARTPROC
-	GET_THREAD_INFO(%r8)
+	GET_THREAD_INFO(%rbx)
 	addq $3,%rcx
 	jc 30f
-	cmpq TI_addr_limit(%r8),%rcx
+	cmpq TI_addr_limit(%rbx),%rcx
 	jae 30f
 	subq $3,%rcx
 3:	movl %edx,(%rcx)
@@ -77,10 +77,10 @@ ENDPROC(__put_user_4)
 
 ENTRY(__put_user_8)
 	CFI_STARTPROC
-	GET_THREAD_INFO(%r8)
+	GET_THREAD_INFO(%rbx)
 	addq $7,%rcx
 	jc 40f
-	cmpq TI_addr_limit(%r8),%rcx
+	cmpq TI_addr_limit(%rbx),%rcx
 	jae 40f
 	subq $7,%rcx
 4:	movq %rdx,(%rcx)
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h
index 9049f4e..8933ddb 100644
--- a/include/asm-x86/uaccess_64.h
+++ b/include/asm-x86/uaccess_64.h
@@ -131,7 +131,7 @@ extern void __put_user_bad(void);
 	asm volatile("call __put_user_" #size				\
 		     :"=a" (ret)					\
 		     :"c" (ptr),"d" (x)					\
-		     :"r8")
+		     :"ebx")
 
 #define put_user(x, ptr)						\
 	__put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
-- 
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ