x86, reloc: Use xorl instead of xorq in relocate_kernel_64.S
There is no point in using "xorq" to clear a register... use "xorl" to clear the bottom 32 bits, and the upper 32 bits get cleared by virtue of zero extension. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Kees Cook <keescook@chromium.org> Link: http://lkml.kernel.org/n/tip-b76zi1gep39c0zs8fbvkhie9@git.kernel.org
This commit is contained in:
parent
e6bca5a6a8
commit
f037e416af
|
@ -151,21 +151,21 @@ identity_mapped:
|
||||||
|
|
||||||
testq %r11, %r11
|
testq %r11, %r11
|
||||||
jnz 1f
|
jnz 1f
|
||||||
xorq %rax, %rax
|
xorl %eax, %eax
|
||||||
xorq %rbx, %rbx
|
xorl %ebx, %ebx
|
||||||
xorq %rcx, %rcx
|
xorl %ecx, %ecx
|
||||||
xorq %rdx, %rdx
|
xorl %edx, %edx
|
||||||
xorq %rsi, %rsi
|
xorl %esi, %esi
|
||||||
xorq %rdi, %rdi
|
xorl %edi, %edi
|
||||||
xorq %rbp, %rbp
|
xorl %ebp, %ebp
|
||||||
xorq %r8, %r8
|
xorl %r8d, %r8d
|
||||||
xorq %r9, %r9
|
xorl %r9d, %r9d
|
||||||
xorq %r10, %r10
|
xorl %r10d, %r10d
|
||||||
xorq %r11, %r11
|
xorl %r11d, %r11d
|
||||||
xorq %r12, %r12
|
xorl %r12d, %r12d
|
||||||
xorq %r13, %r13
|
xorl %r13d, %r13d
|
||||||
xorq %r14, %r14
|
xorl %r14d, %r14d
|
||||||
xorq %r15, %r15
|
xorl %r15d, %r15d
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -212,8 +212,8 @@ virtual_mapped:
|
||||||
/* Do the copies */
|
/* Do the copies */
|
||||||
swap_pages:
|
swap_pages:
|
||||||
movq %rdi, %rcx /* Put the page_list in %rcx */
|
movq %rdi, %rcx /* Put the page_list in %rcx */
|
||||||
xorq %rdi, %rdi
|
xorl %edi, %edi
|
||||||
xorq %rsi, %rsi
|
xorl %esi, %esi
|
||||||
jmp 1f
|
jmp 1f
|
||||||
|
|
||||||
0: /* top, read another word for the indirection page */
|
0: /* top, read another word for the indirection page */
|
||||||
|
|
Loading…
Reference in New Issue