lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-064025f7ea1ebcd9bbb99cfa9492a803e8b01d36@git.kernel.org>
Date:   Mon, 7 Nov 2016 00:53:20 -0800
From:   tip-bot for Wei Yang <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     luto@...nel.org, torvalds@...ux-foundation.org, mingo@...nel.org,
        hpa@...or.com, linux-kernel@...r.kernel.org, peterz@...radead.org,
        bp@...en8.de, brgerst@...il.com, dvlasenk@...hat.com,
        tglx@...utronix.de, richard.weiyang@...il.com, jpoimboe@...hat.com
Subject: [tip:x86/boot] x86/boot: Simplify the GDTR calculation assembly
 code a bit

Commit-ID:  064025f7ea1ebcd9bbb99cfa9492a803e8b01d36
Gitweb:     http://git.kernel.org/tip/064025f7ea1ebcd9bbb99cfa9492a803e8b01d36
Author:     Wei Yang <richard.weiyang@...il.com>
AuthorDate: Tue, 1 Nov 2016 15:49:24 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 7 Nov 2016 08:33:59 +0100

x86/boot: Simplify the GDTR calculation assembly code a bit

This patch calculates the GDTR's base address via a single instruction.

( EBP contains the address where it is loaded and GDTR's base address is
  already set to "gdt" in compilation. It is fine to get the correct base
  address by adding the delta to GDTR's base address. )

Signed-off-by: Wei Yang <richard.weiyang@...il.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1478015364-5547-1-git-send-email-richard.weiyang@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/boot/compressed/head_64.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index efdfba2..4d85e60 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -119,8 +119,7 @@ ENTRY(startup_32)
  */
 
 	/* Load new GDT with the 64bit segments using 32bit descriptor */
-	leal	gdt(%ebp), %eax
-	movl	%eax, gdt+2(%ebp)
+	addl	%ebp, gdt+2(%ebp)
 	lgdt	gdt(%ebp)
 
 	/* Enable PAE mode */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ