Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8684796ybi; Tue, 23 Jul 2019 13:06:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjtSpT/de88YhDPyFi6kcNGYoCRKqvDFlRJD7zhtJiHo7tlwzm97SE4eAJqE6rJ6RZtt22 X-Received: by 2002:a63:8c0e:: with SMTP id m14mr62640150pgd.219.1563912372140; Tue, 23 Jul 2019 13:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563912372; cv=none; d=google.com; s=arc-20160816; b=dXScI9Bb5fmM6/63pXt97XnFX9/1Umiu3bECog8jRiNjio0DPVj7OfhTkfz+/jqDAO sP+7dEp2o73BWA1dmXDvWp1Jx32JTy8VlwX1KYclOQ9BRmrhmFH1IyWdpARNgTM6xGd8 Inf3TFyhuwbeOENIrLZ1O6w1J4NC+P6ZQxIuzW0Jr4nX7m2XubuErS/NG8VhI8N5UMaB MP2126mP+k+8s8A20vOmDQbeKWttgcmKcF4QidSWgwbh+clWtsXQE60SQV0hcJvQlKMD AHzpZMKfmHeCCw6k5yKxJ3meL7ybJBR2zrGvIna8b9EJU6YqU8lNBJoyWrjWlUz6kNMZ hIDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=uA1+CDRq3YimgpJMRLOHGnGjnaKUGkw4/Oh++uAfZLQ=; b=zIQ7ZsdHADFMYf05Z8aZRPmIbt27zbMPELSyyMAuaAY8bQL+Y8R5Z0Ax0Kg8mhpycl wROXkdTE4D4bPyCvFuOeB+egQriWNn8mV4CN/R5nW4FwCzGgIAPeTQnZrFWMxKTuNsck 70cf4yPMkABAPXHYt9PIr3ydO12TlJknu2l+9l9Y57ZzfEbxIXFnEZYsTUlbEDzl6CDM jUwTy10EekxwcIbEnyrrFFrbeOIJSHkL3D4YcvY+X21KbySTyKhRH2Pkvjsu/GRWZUl7 bGKZ54CG5fWInnUTcgA2z035DPEE0SoV+gzkopXZMdQQQCrdbWeWVdetKj7wSYxi/WYJ plGA== ARC-Authentication-Results: i=1; mx.google.com; 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 i13si12450850pgf.335.2019.07.23.13.05.56; Tue, 23 Jul 2019 13:06:12 -0700 (PDT) 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; 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 S2388951AbfGWKQp (ORCPT + 99 others); Tue, 23 Jul 2019 06:16:45 -0400 Received: from foss.arm.com ([217.140.110.172]:52220 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731030AbfGWKQp (ORCPT ); Tue, 23 Jul 2019 06:16:45 -0400 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 B04A9337; Tue, 23 Jul 2019 03:16:44 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4057E3F71A; Tue, 23 Jul 2019 03:16:42 -0700 (PDT) Date: Tue, 23 Jul 2019 11:16:40 +0100 From: Mark Rutland To: Steven Price Cc: linux-mm@kvack.org, Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dave Hansen , Ingo Molnar , James Morse , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Liang, Kan" , Andrew Morton Subject: Re: [PATCH v9 00/21] Generic page walk and ptdump Message-ID: <20190723101639.GD8085@lakrids.cambridge.arm.com> References: <20190722154210.42799-1-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190722154210.42799-1-steven.price@arm.com> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 04:41:49PM +0100, Steven Price wrote: > This is a slight reworking and extension of my previous patch set > (Convert x86 & arm64 to use generic page walk), but I've continued the > version numbering as most of the changes are the same. In particular > this series ends with a generic PTDUMP implemention for arm64 and x86. > > Many architectures current have a debugfs file for dumping the kernel > page tables. Currently each architecture has to implement custom > functions for this because the details of walking the page tables used > by the kernel are different between architectures. > > This series extends the capabilities of walk_page_range() so that it can > deal with the page tables of the kernel (which have no VMAs and can > contain larger huge pages than exist for user space). A generic PTDUMP > implementation is the implemented making use of the new functionality of > walk_page_range() and finally arm64 and x86 are switch to using it, > removing the custom table walkers. > > To enable a generic page table walker to walk the unusual mappings of > the kernel we need to implement a set of functions which let us know > when the walker has reached the leaf entry. After a suggestion from Will > Deacon I've chosen the name p?d_leaf() as this (hopefully) describes > the purpose (and is a new name so has no historic baggage). Some > architectures have p?d_large macros but this is easily confused with > "large pages". > > Mostly this is a clean up and there should be very little functional > change. The exceptions are: > > * x86 PTDUMP debugfs output no longer display pages which aren't > present (patch 14). > > * arm64 has the ability to efficiently process KASAN pages (which > previously only x86 implemented). This means that the combination of > KASAN and DEBUG_WX is now useable. Are there any visible changes to the arm64 output? Could you dump a before/after example somewhere? Thanks, Mark.