From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755528AbdKBKy5 (ORCPT ); Thu, 2 Nov 2017 06:54:57 -0400 Received: from terminus.zytor.com ([65.50.211.136]:54267 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752865AbdKBKxo (ORCPT ); Thu, 2 Nov 2017 06:53:44 -0400 Date: Thu, 2 Nov 2017 03:49:01 -0700 From: tip-bot for Andy Lutomirski Message-ID: Cc: luto@kernel.org, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, dave.hansen@intel.com, peterz@infradead.org, tglx@linutronix.de, bpetkov@suse.de, bp@suse.de, torvalds@linux-foundation.org, brgerst@gmail.com Reply-To: peterz@infradead.org, dave.hansen@intel.com, tglx@linutronix.de, bp@suse.de, bpetkov@suse.de, brgerst@gmail.com, torvalds@linux-foundation.org, hpa@zytor.com, luto@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/entry/64: Remove the restore_c_regs_and_iret label Git-Commit-ID: 9da78ba6b47b46428cfdfc0851511ab29c869798 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 9da78ba6b47b46428cfdfc0851511ab29c869798 Gitweb: https://git.kernel.org/tip/9da78ba6b47b46428cfdfc0851511ab29c869798 Author: Andy Lutomirski AuthorDate: Thu, 2 Nov 2017 00:58:58 -0700 Committer: Ingo Molnar CommitDate: Thu, 2 Nov 2017 11:04:36 +0100 x86/entry/64: Remove the restore_c_regs_and_iret label The only user was the 64-bit opportunistic SYSRET failure path, and that path didn't really need it. This change makes the opportunistic SYSRET code a bit more straightforward and gets rid of the label. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/be3006a7ad3326e3458cf1cc55d416252cbe1986.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/entry/entry_64.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 846e84a..e8ef83d 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -245,7 +245,6 @@ entry_SYSCALL64_slow_path: call do_syscall_64 /* returns with IRQs disabled */ return_from_SYSCALL_64: - RESTORE_EXTRA_REGS TRACE_IRQS_IRETQ /* we're about to change IF */ /* @@ -314,6 +313,7 @@ return_from_SYSCALL_64: */ syscall_return_via_sysret: /* rcx and r11 are already restored (see code above) */ + RESTORE_EXTRA_REGS RESTORE_C_REGS_EXCEPT_RCX_R11 movq RSP(%rsp), %rsp UNWIND_HINT_EMPTY @@ -321,7 +321,7 @@ syscall_return_via_sysret: opportunistic_sysret_failed: SWAPGS - jmp restore_c_regs_and_iret + jmp restore_regs_and_iret END(entry_SYSCALL_64) ENTRY(stub_ptregs_64) @@ -638,7 +638,6 @@ retint_kernel: */ GLOBAL(restore_regs_and_iret) RESTORE_EXTRA_REGS -restore_c_regs_and_iret: RESTORE_C_REGS REMOVE_PT_GPREGS_FROM_STACK 8 INTERRUPT_RETURN