Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp536914ybl; Wed, 4 Dec 2019 06:56:09 -0800 (PST) X-Google-Smtp-Source: APXvYqy1/c94u0EuQcQHL217G8OjXzgsQgQMT3SAaunkfHdEpCJpWy2dK7uX69LyYnuIYKaCU4vL X-Received: by 2002:a54:4f8a:: with SMTP id g10mr1783376oiy.127.1575471369398; Wed, 04 Dec 2019 06:56:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575471369; cv=none; d=google.com; s=arc-20160816; b=foKOgon6wRNnvsOnrod7T1INQuZFnHoxad/yHooTGvVaEHyqEbGCPBQAJD4HftVZQT 8i0Jws+SsPLwqufFBoRHUwL2JCxZub7DnrJuH70Np8PvHPjjSdTG6lbsv1fBkB4lOGUb FT9kFgsHnX2wVCeM5ZDlthDy/7xNSxhRb5MzTVFgQypABjBwjzpS+SJ40ncNmHJadFMR RujJKqKlq1LRfIOFfq/1UJEDxPTYZduQohs5PU4/QQuqKZQ4KhkLBeiCGRSjsG0tmsH5 8ks9Job47cl/ieNQ1e7GkWb+mDWZmNYbObiiaXb5auxEaW1d8PK5AH7MtqGbPDghgalx 9Jzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=VhtN6w8f3pAFcQOPcFVj26+n4AG9pW+AqI+0CrhF1WY=; b=gPpHB6/h+b+QeAKRrtko5osez1egLs0tgYunJ/jVrasAJ3QkjXQYe2ugMoXfRdzmRq hagtKMjKmZRpoZmlOM4jWwPrfJQcC+UyC6LoH0HiW17Up13Geo+YlQ4kUU69sAf4DWGA +gfdD/2ll4g8NthjTYrwAPhHn0JW+MHd7Vye7LI2p7tII7/ZeFt1vFEIjvFfPE17Wonz +7xNa3jB0Yz23Q8eITm/JTsTLn4ESQs5TxRCyE15gxir6J466eY+yezS04F+LJ409a2y HeNqsAPQM71DXmqOg91A0INu5enPz586A1XfqvPJOOpUBZ3XCCCFh7nDhnf09TqIw1Jm yPWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=KSg12ndI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si3130756oir.183.2019.12.04.06.55.57; Wed, 04 Dec 2019 06:56:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=KSg12ndI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbfLDOy5 (ORCPT + 99 others); Wed, 4 Dec 2019 09:54:57 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:34786 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727889AbfLDOy5 (ORCPT ); Wed, 4 Dec 2019 09:54:57 -0500 Received: by mail-qv1-f65.google.com with SMTP id o18so3152039qvf.1 for ; Wed, 04 Dec 2019 06:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VhtN6w8f3pAFcQOPcFVj26+n4AG9pW+AqI+0CrhF1WY=; b=KSg12ndIh9E3OIht1yFvbbmEtc8FFzzewpaSfmPIqXwlXeWvOymL97PMX/XzdfRlbr ssdo3mdWSCre7Rqcf8zB/S3lc82MUW0i10UrOzZfpSihfkcr7DVTzTjLhllcQ5HN3FnS dx+zGEpPHgYZJnR+ZbJfru1Id/k9igxNsd1qA0yR+IRtskJsNtJvXJJqcT22f+dhHTWr u4wDmt+y3OzqPWEWKthpgKnqNqm9wyekNxyc/zNRKT+l3fYxPdx2qa2gq2MbBHQPvU75 LSmG0P16brd+GiDYbaaytEyTd/UMlJ+ro7/Qc0V5eATPEi7JH1FqZZ7Qp/b2oN6hpmL9 8xoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VhtN6w8f3pAFcQOPcFVj26+n4AG9pW+AqI+0CrhF1WY=; b=NjcqpyfutF96f+K2ZXyk0h7yPUUgiKJ3V3OJ/O+Hi6tu/LSLFhNexyviyMJuWEBNN/ X2CNwk7rUQwHTpiNWRKDoVI2vr1aYKq49cBvdt+IN75y4ym3MBKeCFePQzXDbkgYgBbs zW8rJlC5Nhz1K+2w07Ce9caETGWaD8gmx7OPrcjNhFGUA2cWaM/hEIvX7GrMtmBqfzA0 kdVwTYmbABx5S+bVgxlDARHu9ZaOr9S7+/VZkZ+ElqhBvEpo8dM/yz/c32Y4Uu7P87Ua TWquBFcD9qrKtqe7YY0GU108JC5tI/fTOoY0OG4gBvjHNRDHk//ImCT2oD7tTwOLJrW3 LzAQ== X-Gm-Message-State: APjAAAXnAbDcVJhPB5pj4dxLLyCEQGpIFWUM4jqZg33samUroLn3nhPy 2dHd8MGnhfZtkoF09K5yi/bs8A== X-Received: by 2002:a0c:f68f:: with SMTP id p15mr2886839qvn.79.1575471296051; Wed, 04 Dec 2019 06:54:56 -0800 (PST) Received: from [192.168.1.153] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id y184sm3732454qkd.128.2019.12.04.06.54.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Dec 2019 06:54:55 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: [PATCH v15 00/23] Generic page walk and ptdump From: Qian Cai In-Reply-To: <911fac4a-2204-f994-a101-16a60fba12e8@redhat.com> Date: Wed, 4 Dec 2019 09:54:53 -0500 Cc: Steven Price , Andrew Morton , Linux-MM , Mark Rutland , the arch/x86 maintainers , 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" Content-Transfer-Encoding: quoted-printable Message-Id: <0FA196FD-3FCD-431A-AA3E-21BF00EA07DC@lca.pw> References: <20191101140942.51554-1-steven.price@arm.com> <1572896147.5937.116.camel@lca.pw> <7B040741-EC8A-4CC0-964B-4046AE2E617A@lca.pw> <16da6118-ac4d-a165-6202-0731a776ac72@arm.com> <911fac4a-2204-f994-a101-16a60fba12e8@redhat.com> To: David Hildenbrand X-Mailer: Apple Mail (2.3601.0.10) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Dec 3, 2019, at 6:02 AM, David Hildenbrand = wrote: >=20 > On 06.11.19 16:05, Steven Price wrote: >> On 06/11/2019 13:31, Qian Cai wrote: >>>=20 >>>=20 >>>> On Nov 4, 2019, at 2:35 PM, Qian Cai wrote: >>>>=20 >>>> 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 >>>>=20 >>>> Does this new version also take care of this boot crash seen with = v14? Suppose >>>> it is now breaking CONFIG_EFI_PGT_DUMP=3Dy? The full config is, >>>>=20 >>>> https://raw.githubusercontent.com/cailca/linux-mm/master/x86.config >>>>=20 >>>=20 >>> V15 is indeed DOA here. >>=20 >> Thanks for finding this, it looks like EFI causes issues here. The = below fixes >> this for me (booting in QEMU). >>=20 >> 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? >>=20 >> Thanks, >>=20 >> Steve >>=20 >> ---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; >> } >>=20 >> @@ -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; >> } >>=20 >>=20 >=20 > Even with this fix, booting for me under QEMU fails. See >=20 > = https://lore.kernel.org/linux-mm/b7ce62f2-9a48-6e48-6685-003431e521aa@redh= at.com/ >=20 Yes, for some reasons, this starts to crash on almost all arches here, = so it might be worth for Andrew to revert those in the meantime while allowing Steven to = rework.