Skip to content

Commit

Permalink
x86: wrong register was used in align macro
Browse files Browse the repository at this point in the history
New ALIGN_DESTINATION macro has sad typo: r8d register was used instead
of ecx in fixup section. This can be considered as a regression.

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

Signed-off-by: Vitaly Mayatskikh <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
vtl authored and torvalds committed Jul 30, 2008
1 parent bd3e64c commit afd962a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/lib/copy_user_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions arch/x86/lib/copy_user_nocache_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit afd962a

Please sign in to comment.