Commit afd962a9e8708c571c5c0c4a6d098f931742c229

Authored by Vitaly Mayatskikh
Committed by Linus Torvalds
1 parent bd3e64c175

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.

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

Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 2 changed files with 2 additions and 3 deletions Side-by-side Diff

arch/x86/lib/copy_user_64.S
... ... @@ -52,7 +52,7 @@
52 52 jnz 100b
53 53 102:
54 54 .section .fixup,"ax"
55   -103: addl %r8d,%edx /* ecx is zerorest also */
  55 +103: addl %ecx,%edx /* ecx is zerorest also */
56 56 jmp copy_user_handle_tail
57 57 .previous
58 58  
arch/x86/lib/copy_user_nocache_64.S
... ... @@ -32,7 +32,7 @@
32 32 jnz 100b
33 33 102:
34 34 .section .fixup,"ax"
35   -103: addl %r8d,%edx /* ecx is zerorest also */
  35 +103: addl %ecx,%edx /* ecx is zerorest also */
36 36 jmp copy_user_handle_tail
37 37 .previous
38 38  
... ... @@ -108,7 +108,6 @@
108 108 jmp 60f
109 109 50: movl %ecx,%edx
110 110 60: sfence
111   - movl %r8d,%ecx
112 111 jmp copy_user_handle_tail
113 112 .previous
114 113