RE: [RFC PATCH v2 6/6] x86/entry/pti: don't switch PGD on when pti_disable is set

From: David Laight
Date: Fri Jan 12 2018 - 11:27:09 EST


From: Linus Torvalds
> Sent: 11 January 2018 18:25
> On Thu, Jan 11, 2018 at 9:40 AM, Willy Tarreau <w@xxxxxx> wrote:
> >> As for per-mm vs per-thread, let's make it only switchable in
> >> single-threaded processes for now and inherited when threads are
> >> created.
> >
> > That's exactly what it does for now, but Linus doesn't like it at all.
>
> Just to clarify: I definitely want the part where it is only
> switchable in single-threaded mode, and I actually do want it
> "inherited" by threads when they do get created.
...

You need to allow for libraries that create threads before main()
is called.

David