[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <07bbde42-91da-5f7e-d185-d21f6abc9323@intel.com>
Date: Fri, 27 Oct 2017 11:08:28 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>
Cc: Borislav Petkov <bpetkov@...e.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Brian Gerst <brgerst@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 03/18] x86/asm/64: Move SWAPGS into the common
iret-to-usermode path
On 10/26/2017 01:26 AM, Andy Lutomirski wrote:
> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
> index 493e5e234d36..1909a4e42b81 100644
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -254,7 +254,7 @@ return_from_SYSCALL_64:
> movq RCX(%rsp), %rcx
> movq RIP(%rsp), %r11
> cmpq %rcx, %r11 /* RCX == RIP */
> - jne opportunistic_sysret_failed
> + jne swapgs_restore_regs_and_return_to_usermode
Could we just leave the "opportunistic_sysret_failed" label and put it
at the same location as "swapgs_restore_regs_and_return_to_usermode".
It's kinda nice to have the failure paths spelled out.
Just reading this, I have no idea if "RCX == RIP" is good or bad and
whether we're proceeding with the sysret or giving up on it.
Powered by blists - more mailing lists