[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201116202426.GF1131@zn.tnic>
Date: Mon, 16 Nov 2020 21:24:26 +0100
From: Borislav Petkov <bp@...en8.de>
To: Alexandre Chartre <alexandre.chartre@...cle.com>
Cc: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, dave.hansen@...ux.intel.com, luto@...nel.org,
peterz@...radead.org, linux-kernel@...r.kernel.org,
thomas.lendacky@....com, jroedel@...e.de, konrad.wilk@...cle.com,
jan.setjeeilers@...cle.com, junaids@...gle.com, oweisse@...gle.com,
rppt@...ux.vnet.ibm.com, graf@...zon.de, mgross@...ux.intel.com,
kuzuno@...il.com
Subject: Re: [RFC][PATCH v2 00/21] x86/pti: Defer CR3 switch to C code
On Mon, Nov 16, 2020 at 03:47:36PM +0100, Alexandre Chartre wrote:
> Deferring CR3 switch to C code means that we need to run more of the
> kernel entry code with the user page-table. To do so, we need to:
>
> - map more syscall, interrupt and exception entry code into the user
> page-table (map all noinstr code);
>
> - map additional data used in the entry code (such as stack canary);
>
> - run more entry code on the trampoline stack (which is mapped both
> in the kernel and in the user page-table) until we switch to the
> kernel page-table and then switch to the kernel stack;
So PTI was added exactly to *not* have kernel memory mapped in the user
page table. You're partially reversing that...
> - have a per-task trampoline stack instead of a per-cpu trampoline
> stack, so the task can be scheduled out while it hasn't switched
> to the kernel stack.
per-task? How much more memory is that per task?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists