Messages in this thread | | | Date | Mon, 8 Jan 2018 18:26:46 +0100 (CET) | From | Thomas Gleixner <> | Subject | Re: [PATCH RFC 2/4] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI |
| |
On Mon, 8 Jan 2018, Ingo Molnar wrote: > * Thomas Gleixner <tglx@linutronix.de> wrote: > > Per task is really an odd choice. That should be per process I think, but > > that of course needs synchronization of some form. Aside of that we need to > > think about fork(). > > So per task (thread) is the most natural approach to low level asm flaggery.
Well, yes and no. PTI is a property of the mm/pgdir and that's process wide.
> Making it per thread also makes some sense conceptually: in a complex > multi-threaded runtime implementation some threads might never execute > 'untrusted' code, some might. No need to penalize the 'server' threads.
If one thread runs untrusted code then your 'trusted' thread is not longer trusted either as they share everything.
Thanks,
tglx
| |