lkml.org 
[lkml]   [2017]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] x86/mm/64: Fix crash in remove_pagetable()
On Tue, Apr 25, 2017 at 11:53 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Dan Williams <dan.j.williams@intel.com> wrote:
>
>> On Tue, Apr 25, 2017 at 2:25 AM, Kirill A. Shutemov
>> <kirill.shutemov@linux.intel.com> 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 introducing folded p4d page table level.
>> >
>> > As result, remove_pagetable() interprets PMD as PUD and it leads to
>> > crash:
>> >
>> > BUG: unable to handle kernel paging request at ffff880300000000
>> > IP: memchr_inv+0x60/0x110
>> > PGD 317d067
>> > P4D 317d067
>> > PUD 3180067
>> > PMD 33f102067
>> > PTE 8000000300000060
>> >
>> > Let's fix this by using p*d_offset() instead of p*d_page_vaddr() for
>> > page walk.
>> >
>> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>> > Reported-by: Dan Williams <dan.j.williams@intel.com>
>> > Fixes: f2a6a7050109 ("x86: Convert the rest of the code to support p4d_t")
>>
>> Thanks! This patch on top of tip/master passes a full run of the
>> nvdimm regression suite.
>>
>> Tested-by: Dan Williams <dan.j.williams@intel.com>
>
> Does a re-application of:
>
> "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation"
>
> still work (which you can achive via 'git revert 6dd29b3df975'), or is that
> another breakage?

That's another breakage. We're discussing how to resolve it in this thread:

http://www.spinics.net/lists/linux-mm/msg126056.html

\
 
 \ /
  Last update: 2017-04-25 21:02    [W:0.044 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site