lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4j6woeE7QfTVXEohh-kCbcFFJQmciMmgf5RDDWntM+P5w@mail.gmail.com>
Date:   Tue, 25 Apr 2017 09:43:43 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc:     X86 ML <x86@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Andy Lutomirski <luto@...capital.net>,
        Linux MM <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/mm/64: Fix crash in remove_pagetable()

On Tue, Apr 25, 2017 at 2:25 AM, Kirill A. Shutemov
<kirill.shutemov@...ux.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@...ux.intel.com>
> Reported-by: Dan Williams <dan.j.williams@...el.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@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ