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-next>] [day] [month] [year] [list]
Message-Id: <556C660F020000780007FB60@mail.emea.novell.com>
Date:	Mon, 01 Jun 2015 13:02:55 +0100
From:	"Jan Beulich" <JBeulich@...e.com>
To:	<mingo@...e.hu>, <tglx@...utronix.de>, <hpa@...or.com>
Cc:	<linux-kernel@...r.kernel.org>
Subject: [PATCH] x86-64/asm: 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>
---
 arch/x86/include/asm/calling.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 4.1-rc6/arch/x86/include/asm/calling.h
+++ 4.1-rc6-x86_64-invert-stack-adjust/arch/x86/include/asm/calling.h
@@ -91,7 +91,7 @@ For 32-bit we have the following convent
 #define SIZEOF_PTREGS	21*8
 
 	.macro ALLOC_PT_GPREGS_ON_STACK addskip=0
-	subq	$15*8+\addskip, %rsp
+	addq	$-(15*8+\addskip), %rsp
 	CFI_ADJUST_CFA_OFFSET 15*8+\addskip
 	.endm
 
@@ -204,7 +204,7 @@ For 32-bit we have the following convent
 	.endm
 
 	.macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
-	addq $15*8+\addskip, %rsp
+	subq $-(15*8+\addskip), %rsp
 	CFI_ADJUST_CFA_OFFSET -(15*8+\addskip)
 	.endm
 



--
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