Re: [PATCH] x86_64: uninline TASK_SIZE

From: Ingo Molnar
Date: Wed Apr 24 2019 - 06:38:40 EST

* Andy Lutomirski <luto@xxxxxxxxxx> wrote:

> > Or am I missing some complication?
> Seems like a great idea to me.
> BTW, what the heck is up with get_gate_page()? I'm struggling to
> understand what it's even trying to do. If there's an architecture
> that allows a user program to mremap() or otherwise position its gate
> VMA between TASK_SIZE and TASK_SIZE_MAX, then that code is going to
> explode horribly.

I believe it was an old attempt from the times when the vsyscall area
*didn't* have a vma, at all, and only get_gate_page() kept the mmap
allocator from overlapping it with a user vma?

Should IMHO be entirely solved by the vma-ification of all things
vsyscall and vdso, and we can remove this remnant.

> A whole bunch of work in this direction is here:
> It's almost entirely untested.

Please post it as patches once you are somewhat confident in the outcome
and general direction.