Re: [PATCH 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-24 Thread Kirill A. Shutemov
On Wed, Oct 24, 2018 at 04:54:47AM -0700, Matthew Wilcox wrote: > On Tue, Oct 23, 2018 at 07:31:56PM +0300, Kirill A. Shutemov wrote: > > -8800 - c7ff (=64 TB) direct mapping of all phys. > > memory > > +8880 - 887f (=39 bits) LDT remap for PTI > >

Re: [PATCH 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-24 Thread Kirill A. Shutemov
On Wed, Oct 24, 2018 at 04:54:47AM -0700, Matthew Wilcox wrote: > On Tue, Oct 23, 2018 at 07:31:56PM +0300, Kirill A. Shutemov wrote: > > -8800 - c7ff (=64 TB) direct mapping of all phys. > > memory > > +8880 - 887f (=39 bits) LDT remap for PTI > >

Re: [PATCH 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-24 Thread Matthew Wilcox
On Tue, Oct 23, 2018 at 07:31:56PM +0300, Kirill A. Shutemov wrote: > -8800 - c7ff (=64 TB) direct mapping of all phys. > memory > +8880 - 887f (=39 bits) LDT remap for PTI I'm a little bit cross-eyed at this point, but I think the above '888'

Re: [PATCH 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-24 Thread Matthew Wilcox
On Tue, Oct 23, 2018 at 07:31:56PM +0300, Kirill A. Shutemov wrote: > -8800 - c7ff (=64 TB) direct mapping of all phys. > memory > +8880 - 887f (=39 bits) LDT remap for PTI I'm a little bit cross-eyed at this point, but I think the above '888'

[PATCH 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-23 Thread Kirill A. Shutemov
On 5-level paging LDT remap area is placed in the middle of KASLR randomization region and it can overlap with direct mapping, vmalloc or vmap area. Let's move LDT just before direct mapping which makes it safe for KASLR. This also allows us to unify layout between 4- and 5-level paging. We

[PATCH 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-23 Thread Kirill A. Shutemov
On 5-level paging LDT remap area is placed in the middle of KASLR randomization region and it can overlap with direct mapping, vmalloc or vmap area. Let's move LDT just before direct mapping which makes it safe for KASLR. This also allows us to unify layout between 4- and 5-level paging. We