[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <BEEA447A-26A1-49C9-925A-63F96E9115B0@amacapital.net>
Date: Thu, 12 Jul 2018 13:53:19 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Joerg Roedel <joro@...tes.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...el.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Juergen Gross <jgross@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>, Jiri Kosina <jkosina@...e.cz>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Brian Gerst <brgerst@...il.com>,
David Laight <David.Laight@...lab.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
Eduardo Valentin <eduval@...zon.com>,
Greg KH <gregkh@...uxfoundation.org>,
Will Deacon <will.deacon@....com>, aliguori@...zon.com,
daniel.gruss@...k.tugraz.at, hughd@...gle.com, keescook@...gle.com,
Andrea Arcangeli <aarcange@...hat.com>,
Waiman Long <llong@...hat.com>, Pavel Machek <pavel@....cz>,
"David H . Gutteridge" <dhgutteridge@...patico.ca>, jroedel@...e.de
Subject: Re: [PATCH 05/39] x86/entry/32: Unshare NMI return path
> On Jul 11, 2018, at 4:29 AM, Joerg Roedel <joro@...tes.org> wrote:
>
> From: Joerg Roedel <jroedel@...e.de>
>
> NMI will no longer use most of the shared return path,
> because NMI needs special handling when the CR3 switches for
> PTI are added.
Why? What would go wrong?
How many return-to-usermode paths will we have? 64-bit has only one.
> This patch prepares for that.
>
> Signed-off-by: Joerg Roedel <jroedel@...e.de>
> ---
> arch/x86/entry/entry_32.S | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
> index d35a69a..571209e 100644
> --- a/arch/x86/entry/entry_32.S
> +++ b/arch/x86/entry/entry_32.S
> @@ -1017,7 +1017,7 @@ ENTRY(nmi)
>
> /* Not on SYSENTER stack. */
> call do_nmi
> - jmp .Lrestore_all_notrace
> + jmp .Lnmi_return
>
> .Lnmi_from_sysenter_stack:
> /*
> @@ -1028,7 +1028,11 @@ ENTRY(nmi)
> movl PER_CPU_VAR(cpu_current_top_of_stack), %esp
> call do_nmi
> movl %ebx, %esp
> - jmp .Lrestore_all_notrace
> +
> +.Lnmi_return:
> + CHECK_AND_APPLY_ESPFIX
> + RESTORE_REGS 4
> + jmp .Lirq_return
>
> #ifdef CONFIG_X86_ESPFIX32
> .Lnmi_espfix_stack:
> --
> 2.7.4
>
Powered by blists - more mailing lists