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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Feb 2018 22:25:46 +0100
From:   Dominik Brodowski <linux@...inikbrodowski.net>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Dan Williams <dan.j.williams@...el.com>, tglx@...utronix.de,
        Andi Kleen <ak@...ux.intel.com>, torvalds@...ux-foundation.org,
        linux-kernel@...r.kernel.org, luto@...nel.org, x86@...nel.org
Subject: [PATCH tip-pti 1/2] x86/entry: remove SAVE_C_REGS_EXCEPT_* macros

The macros which save all but specific registers have been unused for
a long time. Remove them and the SAVE_C_REGS_HELPER macro, but
instead provide the SAVE_C_REGS macro directly.

Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>

diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
index f4b129d4af42..75a237c95ff7 100644
--- a/arch/x86/entry/calling.h
+++ b/arch/x86/entry/calling.h
@@ -101,41 +101,18 @@ For 32-bit we have the following conventions - kernel is built with
 	addq	$-(15*8), %rsp
 	.endm
 
-	.macro SAVE_C_REGS_HELPER offset=0 rax=1 rcx=1 r8910=1 r11=1
-	.if \r11
+	.macro SAVE_C_REGS offset=0
 	movq %r11, 6*8+\offset(%rsp)
-	.endif
-	.if \r8910
 	movq %r10, 7*8+\offset(%rsp)
 	movq %r9,  8*8+\offset(%rsp)
 	movq %r8,  9*8+\offset(%rsp)
-	.endif
-	.if \rax
 	movq %rax, 10*8+\offset(%rsp)
-	.endif
-	.if \rcx
 	movq %rcx, 11*8+\offset(%rsp)
-	.endif
 	movq %rdx, 12*8+\offset(%rsp)
 	movq %rsi, 13*8+\offset(%rsp)
 	movq %rdi, 14*8+\offset(%rsp)
 	UNWIND_HINT_REGS offset=\offset extra=0
 	.endm
-	.macro SAVE_C_REGS offset=0
-	SAVE_C_REGS_HELPER \offset, 1, 1, 1, 1
-	.endm
-	.macro SAVE_C_REGS_EXCEPT_RAX_RCX offset=0
-	SAVE_C_REGS_HELPER \offset, 0, 0, 1, 1
-	.endm
-	.macro SAVE_C_REGS_EXCEPT_R891011
-	SAVE_C_REGS_HELPER 0, 1, 1, 0, 0
-	.endm
-	.macro SAVE_C_REGS_EXCEPT_RCX_R891011
-	SAVE_C_REGS_HELPER 0, 1, 0, 0, 0
-	.endm
-	.macro SAVE_C_REGS_EXCEPT_RAX_RCX_R11
-	SAVE_C_REGS_HELPER 0, 0, 0, 1, 0
-	.endm
 
 	.macro SAVE_EXTRA_REGS offset=0
 	movq %r15, 0*8+\offset(%rsp)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ