From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1AE3C5DF64 for ; Wed, 6 Nov 2019 15:05:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7E45A217F5 for ; Wed, 6 Nov 2019 15:05:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E45A217F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1F7AC6B0006; Wed, 6 Nov 2019 10:05:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 182536B0007; Wed, 6 Nov 2019 10:05:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 049E66B0008; Wed, 6 Nov 2019 10:05:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id E412D6B0006 for ; Wed, 6 Nov 2019 10:05:54 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 602344DB5 for ; Wed, 6 Nov 2019 15:05:54 +0000 (UTC) X-FDA: 76126177428.17.bears94_6db6b5d221224 X-HE-Tag: bears94_6db6b5d221224 X-Filterd-Recvd-Size: 3995 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Wed, 6 Nov 2019 15:05:53 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD1D07CD; Wed, 6 Nov 2019 07:05:51 -0800 (PST) Received: from [10.1.32.101] (e122027.cambridge.arm.com [10.1.32.101]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EEA113F71A; Wed, 6 Nov 2019 07:05:48 -0800 (PST) From: Steven Price Subject: Re: [PATCH v15 00/23] Generic page walk and ptdump To: Qian Cai , Andrew Morton , linux-mm@kvack.org Cc: Mark Rutland , x86@kernel.org, Arnd Bergmann , Ard Biesheuvel , Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-kernel@vger.kernel.org, =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , James Morse , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org, "Liang, Kan" References: <20191101140942.51554-1-steven.price@arm.com> <1572896147.5937.116.camel@lca.pw> <7B040741-EC8A-4CC0-964B-4046AE2E617A@lca.pw> Message-ID: <16da6118-ac4d-a165-6202-0731a776ac72@arm.com> Date: Wed, 6 Nov 2019 15:05:29 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <7B040741-EC8A-4CC0-964B-4046AE2E617A@lca.pw> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 06/11/2019 13:31, Qian Cai wrote: > > >> On Nov 4, 2019, at 2:35 PM, Qian Cai wrote: >> >> On Fri, 2019-11-01 at 14:09 +0000, Steven Price wrote: [...] >>> Changes since v14: >>> https://lore.kernel.org/lkml/20191028135910.33253-1-steven.price@arm.com/ >>> * Switch walk_page_range() into two functions, the existing >>> walk_page_range() now still requires VMAs (and treats areas without a >>> VMA as a 'hole'). The new walk_page_range_novma() ignores VMAs and >>> will report the actual page table layout. This fixes the previous >>> breakage of /proc//pagemap >>> * New patch at the end of the series which reduces the 'level' numbers >>> by 1 to simplify the code slightly >>> * Added tags >> >> Does this new version also take care of this boot crash seen with v14? Suppose >> it is now breaking CONFIG_EFI_PGT_DUMP=y? The full config is, >> >> https://raw.githubusercontent.com/cailca/linux-mm/master/x86.config >> > > V15 is indeed DOA here. Thanks for finding this, it looks like EFI causes issues here. The below fixes this for me (booting in QEMU). Andrew: do you want me to send out the entire series again for this fix, or can you squash this into mm-pagewalk-allow-walking-without-vma.patch? Thanks, Steve ---8<--- diff --git a/mm/pagewalk.c b/mm/pagewalk.c index c7529dc4f82b..70dcaa23598f 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c @@ -90,7 +90,7 @@ static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, split_huge_pmd(walk->vma, pmd, addr); if (pmd_trans_unstable(pmd)) goto again; - } else if (pmd_leaf(*pmd)) { + } else if (pmd_leaf(*pmd) || !pmd_present(*pmd)) { continue; } @@ -141,7 +141,7 @@ static int walk_pud_range(p4d_t *p4d, unsigned long addr, unsigned long end, split_huge_pud(walk->vma, pud, addr); if (pud_none(*pud)) goto again; - } else if (pud_leaf(*pud)) { + } else if (pud_leaf(*pud) || !pud_present(*pud)) { continue; }