Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-23 Thread Song Liu
> On Aug 21, 2019, at 3:30 AM, Peter Zijlstra wrote: > > On Wed, Aug 21, 2019 at 12:10:08PM +0200, Peter Zijlstra wrote: >> On Tue, Aug 20, 2019 at 01:23:14PM -0700, Song Liu wrote: > >>> host-5.2-after # grep "x pmd" /sys/kernel/debug/page_tables/dump_pid >>>

Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-23 Thread Song Liu
> On Aug 23, 2019, at 5:59 PM, Thomas Gleixner wrote: > > On Wed, 21 Aug 2019, Thomas Gleixner wrote: >> On Wed, 21 Aug 2019, Song Liu wrote: On Aug 20, 2019, at 1:23 PM, Song Liu wrote: Before 32-bit support, pti_clone_pmds() always adds PMD_SIZE to addr. This behavior

Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-23 Thread Thomas Gleixner
On Wed, 21 Aug 2019, Thomas Gleixner wrote: > On Wed, 21 Aug 2019, Song Liu wrote: > > > On Aug 20, 2019, at 1:23 PM, Song Liu wrote: > > > > > > Before 32-bit support, pti_clone_pmds() always adds PMD_SIZE to addr. > > > This behavior changes after the 32-bit support: pti_clone_pgtable() > > >

Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-21 Thread Peter Zijlstra
On Wed, Aug 21, 2019 at 12:10:08PM +0200, Peter Zijlstra wrote: > On Tue, Aug 20, 2019 at 01:23:14PM -0700, Song Liu wrote: > > host-5.2-after # grep "x pmd" /sys/kernel/debug/page_tables/dump_pid > > 0x0060-0x00e0 8M USR ro PSE > > x pmd > >

Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-21 Thread Thomas Gleixner
On Wed, 21 Aug 2019, Song Liu wrote: > > On Aug 20, 2019, at 1:23 PM, Song Liu wrote: > > > > Before 32-bit support, pti_clone_pmds() always adds PMD_SIZE to addr. > > This behavior changes after the 32-bit support: pti_clone_pgtable() > > increases addr by PUD_SIZE for pud_none(*pud) case, and

Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-21 Thread Peter Zijlstra
On Tue, Aug 20, 2019 at 01:23:14PM -0700, Song Liu wrote: > Before 32-bit support, pti_clone_pmds() always adds PMD_SIZE to addr. > This behavior changes after the 32-bit support: pti_clone_pgtable() > increases addr by PUD_SIZE for pud_none(*pud) case, and increases addr by > PMD_SIZE for

Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-21 Thread Song Liu
> On Aug 20, 2019, at 1:23 PM, Song Liu wrote: > > Before 32-bit support, pti_clone_pmds() always adds PMD_SIZE to addr. > This behavior changes after the 32-bit support: pti_clone_pgtable() > increases addr by PUD_SIZE for pud_none(*pud) case, and increases addr by > PMD_SIZE for

[PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly

2019-08-20 Thread Song Liu
Before 32-bit support, pti_clone_pmds() always adds PMD_SIZE to addr. This behavior changes after the 32-bit support: pti_clone_pgtable() increases addr by PUD_SIZE for pud_none(*pud) case, and increases addr by PMD_SIZE for pmd_none(*pmd) case. However, this is not accurate because addr may not