From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S980889AbdDYGi6 (ORCPT ); Tue, 25 Apr 2017 02:38:58 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:32805 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S980873AbdDYGir (ORCPT ); Tue, 25 Apr 2017 02:38:47 -0400 Date: Tue, 25 Apr 2017 08:38:42 +0200 From: Ingo Molnar To: "Kirill A. Shutemov" Cc: Dan Williams , "Kirill A. Shutemov" , dvlasenk@redhat.com, Andy Lutomirski , Andrew Morton , brgerst@gmail.com, Arnd Bergmann , Josh Poimboeuf , Michal Hocko , "H. Peter Anvin" , Dave Hansen , Peter Zijlstra , Thomas Gleixner , Linus Torvalds , Andy Lutomirski , Borislav Petkov , Linux Kernel Mailing List , linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/mm] x86: Convert the rest of the code to support p4d_t Message-ID: <20170425063842.nwop6meglpylxmoz@gmail.com> References: <20170317185515.8636-7-kirill.shutemov@linux.intel.com> <20170424165757.76g6qdm4yf4a5ggx@node.shutemov.name> <20170425005702.ccvxdavjo432ccdc@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170425005702.ccvxdavjo432ccdc@black.fi.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Kirill A. Shutemov wrote: > On Mon, Apr 24, 2017 at 11:42:34AM -0700, Dan Williams wrote: > > > > > > I cannot reproduce the issue. > > > > > > Could you share your kernel kernel config? > > > > Kernel config available here: > > https://gist.github.com/djbw/2b99a014396cca9f4406586573be98c0 > > Patch below should help. Please check. > > diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c > index a242139df8fe..745e5e183169 100644 > --- a/arch/x86/mm/init_64.c > +++ b/arch/x86/mm/init_64.c > @@ -962,7 +962,7 @@ remove_pud_table(pud_t *pud_start, unsigned long addr, unsigned long end, > continue; > } > > - pmd_base = (pmd_t *)pud_page_vaddr(*pud); > + pmd_base = pmd_offset(pud, 0); > remove_pmd_table(pmd_base, addr, next, direct); > free_pmd_table(pmd_base, pud); > } > @@ -988,7 +988,7 @@ remove_p4d_table(p4d_t *p4d_start, unsigned long addr, unsigned long end, > > BUILD_BUG_ON(p4d_large(*p4d)); > > - pud_base = (pud_t *)p4d_page_vaddr(*p4d); > + pud_base = pud_offset(p4d, 0); > remove_pud_table(pud_base, addr, next, direct); > free_pud_table(pud_base, p4d); > } > @@ -1013,7 +1013,7 @@ remove_pagetable(unsigned long start, unsigned long end, bool direct) > if (!pgd_present(*pgd)) > continue; > > - p4d = (p4d_t *)pgd_page_vaddr(*pgd); > + p4d = p4d_offset(pgd, 0); > remove_p4d_table(p4d, addr, next, direct); > } Type casts are dangerous, chapter 378. I missed them when applying the patches. Could you please double-check all other type casts introduced by the 5-level paging patches, to make sure it's all using natural type conversions? Thanks, Ingo