Re: [PATCH] LDT improvements

From: Peter Zijlstra
Date: Fri Dec 08 2017 - 12:49:04 EST


On Fri, Dec 08, 2017 at 08:38:26AM -0800, Andy Lutomirski wrote:

> 4. In an actual vma. I don't see the benefit of doing this at all --
> it's just like #2 except way more error prone. Hell, you have to make
> sure that you can't munmap or mremap it, which isn't a consideration
> at all with the other choices.

mremap is trivially disabled. I've not tried munmap() yet, as long as it
just kills the process doing it we're good of course. Otherwise we need
an extra callback in do_munmap() which isn't too hard.

> Why all the effort to make #4 work?

Seemed like a sensible approach; I really dislike wasting an entire pmd
or whatever on a feature 'nobody' ever uses anyway.

> #1 is working fine right now

doesn't work for pti in its current form.