Re: [PATCH] x86/mm/64: Fix crash in remove_pagetable()

2017-04-25 Thread Dan Williams
On Tue, Apr 25, 2017 at 11:53 AM, Ingo Molnar wrote: > > * Dan Williams wrote: > >> On Tue, Apr 25, 2017 at 2:25 AM, Kirill A. Shutemov >> wrote: >> > remove_pagetable() does page walk using p*d_page_vaddr() plus cast. >> > It's not canonical approach -- we usually use p*d_offset() for that. >>

Re: [PATCH] x86/mm/64: Fix crash in remove_pagetable()

2017-04-25 Thread Ingo Molnar
* Dan Williams wrote: > On Tue, Apr 25, 2017 at 2:25 AM, Kirill A. Shutemov > wrote: > > remove_pagetable() does page walk using p*d_page_vaddr() plus cast. > > It's not canonical approach -- we usually use p*d_offset() for that. > > > > It works fine as long as all page table levels are presen

Re: [PATCH] x86/mm/64: Fix crash in remove_pagetable()

2017-04-25 Thread Dan Williams
On Tue, Apr 25, 2017 at 2:25 AM, Kirill A. Shutemov wrote: > remove_pagetable() does page walk using p*d_page_vaddr() plus cast. > It's not canonical approach -- we usually use p*d_offset() for that. > > It works fine as long as all page table levels are present. We broke the > invariant by introd

[PATCH] x86/mm/64: Fix crash in remove_pagetable()

2017-04-25 Thread Kirill A. Shutemov
remove_pagetable() does page walk using p*d_page_vaddr() plus cast. It's not canonical approach -- we usually use p*d_offset() for that. It works fine as long as all page table levels are present. We broke the invariant by introducing folded p4d page table level. As result, remove_pagetable() int