Re: [PATCH v4 4/6] x86/mm/KASLR: Fix the wrong calculation of memory region initial size

2019-03-24 Thread Baoquan He
On 03/24/19 at 09:58pm, Thomas Gleixner wrote: > On Thu, 14 Mar 2019, Baoquan He wrote: > > In memory region KASLR, __PHYSICAL_MASK_SHIFT is taken to calculate > > the initial size of the direct mapping region. This is correct in > > the old code where __PHYSICAL_MASK_SHIFT was equal to

Re: [PATCH v4 4/6] x86/mm/KASLR: Fix the wrong calculation of memory region initial size

2019-03-24 Thread Thomas Gleixner
On Thu, 14 Mar 2019, Baoquan He wrote: > In memory region KASLR, __PHYSICAL_MASK_SHIFT is taken to calculate > the initial size of the direct mapping region. This is correct in > the old code where __PHYSICAL_MASK_SHIFT was equal to MAX_PHYSMEM_BITS, > 46 bits, and only 4-level mode was supported.

[PATCH v4 4/6] x86/mm/KASLR: Fix the wrong calculation of memory region initial size

2019-03-14 Thread Baoquan He
In memory region KASLR, __PHYSICAL_MASK_SHIFT is taken to calculate the initial size of the direct mapping region. This is correct in the old code where __PHYSICAL_MASK_SHIFT was equal to MAX_PHYSMEM_BITS, 46 bits, and only 4-level mode was supported. Later, in commit: b83ce5ee91471d ("x86/mm/64: