[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zh3dnivt.fsf@nanos.tec.linutronix.de>
Date: Thu, 19 Nov 2020 22:20:38 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Alexandre Chartre <alexandre.chartre@...cle.com>,
Andy Lutomirski <luto@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Joerg Roedel <jroedel@...e.de>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
jan.setjeeilers@...cle.com, Junaid Shahid <junaids@...gle.com>,
oweisse@...gle.com, Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Alexander Graf <graf@...zon.de>, mgross@...ux.intel.com,
kuzuno@...il.com
Subject: Re: [RFC][PATCH v2 12/21] x86/pti: Use PTI stack instead of trampoline stack
On Thu, Nov 19 2020 at 20:55, Alexandre Chartre wrote:
> On 11/19/20 8:10 PM, Thomas Gleixner wrote:
> Sorry I mixed up a few thing; I got confused with my own code which is not a
> good sign...
>
> It's not sleeping with the user page-table which, as you mentioned, doesn't
> make sense, it's sleeping with the kernel page-table but with the PTI stack.
>
> Basically, it is:
> - entering C code with (user page-table, PTI stack);
> - then it switches to the kernel page-table so we have (kernel page-table, PTI stack);
> - and then it switches to the kernel stack so we have (kernel page-table, kernel stack).
>
> As this is all C code, some of which is executed with the PTI stack, we need the PTI stack
> to be per-task so that the stack is preserved, in case that C code does a sleep/schedule
> (no matter if this happens when using the PTI stack or the kernel stack).
That makes some more sense, but I'm not convinced that this dual stack
is really a good thing.
Thanks,
tglx
Powered by blists - more mailing lists