Skip to contentSkip to conversation

x86: wrong register was used in align macro

PATCH In review Vitaly Mayatskikh 1 participant 2 messages Jul 30, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: wrong register was used in align macro

New ALIGN_DESTINATION macro has sad typo: r8d register was used instead of ecx in fixup section. This can be considered as a regression.

arch/x86/lib/copy_user_64.S +1 -1
index dfdf428..f118c11 100644
@@ -52,7 +52,7 @@
 	jnz 100b
 102:
 	.section .fixup,"ax"
-103:	addl %r8d,%edx			/* ecx is zerorest also */
+103:	addl %ecx,%edx			/* ecx is zerorest also */
 	jmp copy_user_handle_tail
 	.previous
 
arch/x86/lib/copy_user_nocache_64.S +1 -1
index 40e0e30..108ad1c 100644
@@ -32,7 +32,7 @@
 	jnz 100b
 102:
 	.section .fixup,"ax"
-103:	addl %r8d,%edx			/* ecx is zerorest also */
+103:	addl %ecx,%edx			/* ecx is zerorest also */
 	jmp copy_user_handle_tail
 	.previous
 
Signature · 1 line
wbr, Vitaly
#1 lore raw

Vitaly Mayatskikh <[email protected]> writes:

Register ecx was also wrongly loaded with value in r8d in copy_user_nocache routine.

arch/x86/lib/copy_user_nocache_64.S +0 -1
index 40e0e30..cb0c112 100644
@@ -108,7 +108,6 @@ ENTRY(__copy_user_nocache)
 	jmp 60f
 50:	movl %ecx,%edx
 60:	sfence
-	movl %r8d,%ecx
 	jmp copy_user_handle_tail
 	.previous
 
Signature · 1 line
wbr, Vitaly