[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-0d55083698ed2f498e5682c5c252e6b7224890be@git.kernel.org>
Date: Wed, 4 Mar 2015 14:53:59 -0800
From: tip-bot for Denys Vlasenko <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, torvalds@...ux-foundation.org,
mingo@...nel.org, luto@...capital.net, fweisbec@...il.com,
ast@...mgrid.com, dvlasenk@...hat.com, bp@...en8.de,
keescook@...omium.org, linux-kernel@...r.kernel.org, hpa@...or.com,
wad@...omium.org, oleg@...hat.com
Subject: [tip:x86/asm] x86/asm/entry/64: Shrink code in 'paranoid_exit'
Commit-ID: 0d55083698ed2f498e5682c5c252e6b7224890be
Gitweb: http://git.kernel.org/tip/0d55083698ed2f498e5682c5c252e6b7224890be
Author: Denys Vlasenko <dvlasenk@...hat.com>
AuthorDate: Thu, 26 Feb 2015 14:40:29 -0800
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 4 Mar 2015 22:50:50 +0100
x86/asm/entry/64: Shrink code in 'paranoid_exit'
RESTORE_EXTRA_REGS + RESTORE_C_REGS looks small, but it's
a lot of instructions (fourteen). Let's reuse them.
Signed-off-by: Denys Vlasenko <dvlasenk@...hat.com>
[ Cleaned up the labels. ]
Signed-off-by: Andy Lutomirski <luto@...capital.net>
Cc: Alexei Starovoitov <ast@...mgrid.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Will Drewry <wad@...omium.org>
Link: http://lkml.kernel.org/r/1421272101-16847-2-git-send-email-dvlasenk@redhat.com
Link: http://lkml.kernel.org/r/59d71848cee3ec9eb48c0252e602efd6bd560e3c.1424989793.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/entry_64.S | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 695f4d4..8fafed9 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -1285,15 +1285,13 @@ ENTRY(paranoid_exit)
DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF_DEBUG
testl %ebx,%ebx /* swapgs needed? */
- jnz paranoid_restore
+ jnz paranoid_exit_no_swapgs
TRACE_IRQS_IRETQ 0
SWAPGS_UNSAFE_STACK
- RESTORE_EXTRA_REGS
- RESTORE_C_REGS
- REMOVE_PT_GPREGS_FROM_STACK 8
- INTERRUPT_RETURN
-paranoid_restore:
+ jmp paranoid_exit_restore
+paranoid_exit_no_swapgs:
TRACE_IRQS_IRETQ_DEBUG 0
+paranoid_exit_restore:
RESTORE_EXTRA_REGS
RESTORE_C_REGS
REMOVE_PT_GPREGS_FROM_STACK 8
--
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