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]
Date:	Tue, 2 Jun 2015 01:24:57 -0700
From:	tip-bot for Jan Beulich <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	peterz@...radead.org, jbeulich@...e.com, bp@...en8.de,
	JBeulich@...e.com, hpa@...or.com, torvalds@...ux-foundation.org,
	linux-kernel@...r.kernel.org, brgerst@...il.com,
	dvlasenk@...hat.com, luto@...capital.net, tglx@...utronix.de,
	mingo@...nel.org
Subject: [tip:x86/asm] x86/asm/entry/64:
  Use negative immediates for stack adjustments

Commit-ID:  2bf557ea3f49576fabe24cd5daf1a34e9ee22c3c
Gitweb:     http://git.kernel.org/tip/2bf557ea3f49576fabe24cd5daf1a34e9ee22c3c
Author:     Jan Beulich <JBeulich@...e.com>
AuthorDate: Mon, 1 Jun 2015 13:02:55 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 2 Jun 2015 10:10:09 +0200

x86/asm/entry/64: Use negative immediates for stack adjustments

Doing so allows adjustments by 128 bytes (occurring for
REMOVE_PT_GPREGS_FROM_STACK 8 uses) to be expressed with a
single byte immediate.

Signed-off-by: Jan Beulich <jbeulich@...e.com>
Cc: Andy Lutomirski <luto@...capital.net>
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: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/556C660F020000780007FB60@mail.emea.novell.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/include/asm/calling.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h
index 0d76acc..f4e6308 100644
--- a/arch/x86/include/asm/calling.h
+++ b/arch/x86/include/asm/calling.h
@@ -89,7 +89,7 @@ For 32-bit we have the following conventions - kernel is built with
 #define SIZEOF_PTREGS	21*8
 
 	.macro ALLOC_PT_GPREGS_ON_STACK addskip=0
-	subq	$15*8+\addskip, %rsp
+	addq	$-(15*8+\addskip), %rsp
 	.endm
 
 	.macro SAVE_C_REGS_HELPER offset=0 rax=1 rcx=1 r8910=1 r11=1
@@ -201,7 +201,7 @@ For 32-bit we have the following conventions - kernel is built with
 	.endm
 
 	.macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
-	addq $15*8+\addskip, %rsp
+	subq $-(15*8+\addskip), %rsp
 	.endm
 
 	.macro icebp
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ