4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alexander Kuleshov <kuleshovm...@gmail.com>

commit a4733143085d6c782ac1e6c85778655b6bac1d4e upstream

We are using %rax as temporary register to check the kernel
address alignment. We don't really have to since the TEST
instruction does not clobber the destination operand.

Suggested-by: Brian Gerst <brge...@gmail.com>
Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com>
Signed-off-by: Borislav Petkov <b...@suse.de>
Cc: Alexander Popov <alpo...@ptsecurity.com>
Cc: Andrey Ryabinin <ryabinin....@gmail.com>
Cc: Andy Lutomirski <l...@amacapital.net>
Cc: Andy Lutomirski <l...@kernel.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Denys Vlasenko <dvlas...@redhat.com>
Cc: H. Peter Anvin <h...@zytor.com>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Thomas Gleixner <t...@linutronix.de>
Link: 
http://lkml.kernel.org/r/1453531828-19291-1-git-send-email-kuleshovm...@gmail.com
Link: http://lkml.kernel.org/r/1453842730-28463-11-git-send-email...@alien8.de
Signed-off-by: Ingo Molnar <mi...@kernel.org>
Signed-off-by: Srivatsa S. Bhat <sriva...@csail.mit.edu>
Reviewed-by: Matt Helsley (VMware) <matt.hels...@gmail.com>
Reviewed-by: Alexey Makhalov <amakha...@vmware.com>
Reviewed-by: Bo Gan <g...@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---

 arch/x86/kernel/head_64.S |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -76,9 +76,7 @@ startup_64:
        subq    $_text - __START_KERNEL_map, %rbp
 
        /* Is the address not 2M aligned? */
-       movq    %rbp, %rax
-       andl    $~PMD_PAGE_MASK, %eax
-       testl   %eax, %eax
+       testl   $~PMD_PAGE_MASK, %ebp
        jnz     bad_address
 
        /*


Reply via email to