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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B82CAC6FD1E for ; Tue, 7 Mar 2023 16:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3jhknSrYFzCF47VzHmxrQ3NYcHl75fU5nODGapI+HQA=; b=HG+AB3sdaM+kde YlAXazFX6Vs7w2d0vyplJjhjyAcIL/DzXanwI8PwZfAD4R1xfGxmzpq/TAtb7+ETzFrI8t/Xh44KZ Kl9KPUcTXOr5ZRyCbGwDBz0WQGuftx251pkWBVxsFiiCFYQ9oov15jYJthKPqrCAC36NY/SS4UhcV usvWk4luwhe/RDBJOgZ7vuqWf7HFXmLDASzeOdUayTZo5HxI7+pwp9yP5q/ni+D7rSAoTf2E5eU+m zhCyrwoC2iBHQy1iHPipv5LehMWAY+q2R0WYjdpuTtpq25XuGGqayE0ru6HL4PiFvGKcvXQICj4cK Seg2wiYyffgsLRFgcPig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZaIc-001Zgt-Av; Tue, 07 Mar 2023 16:36:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZaIZ-001Zer-0O for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 16:36:24 +0000 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 B1DD211FB; Tue, 7 Mar 2023 08:37:02 -0800 (PST) Received: from [10.1.29.181] (C02CF1NRLVDN.cambridge.arm.com [10.1.29.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22B433F67D; Tue, 7 Mar 2023 08:36:18 -0800 (PST) Message-ID: Date: Tue, 7 Mar 2023 16:36:16 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v3 07/60] arm64: ptdump: Discover start of vmemmap region at runtime Content-Language: en-US To: Ard Biesheuvel , linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Marc Zyngier , Mark Rutland , Anshuman Khandual , Kees Cook References: <20230307140522.2311461-1-ardb@kernel.org> <20230307140522.2311461-8-ardb@kernel.org> From: Ryan Roberts In-Reply-To: <20230307140522.2311461-8-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_083623_122981_F9AD4FE1 X-CRM114-Status: GOOD ( 18.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07/03/2023 14:04, Ard Biesheuvel wrote: > We will soon reclaim the part of the vmemmap region that covers VA space > that is not addressable by the hardware. To avoid confusion, ensure that > the 'vmemmap start' marker points at the start of the region that is > actually being used for the struct page array, rather than the start of > the region we set aside for it at build time. > > Signed-off-by: Ard Biesheuvel > --- > arch/arm64/mm/ptdump.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c > index 910b35f02280cbdb..8f37d6d8b5216473 100644 > --- a/arch/arm64/mm/ptdump.c > +++ b/arch/arm64/mm/ptdump.c > @@ -37,6 +37,7 @@ enum address_markers_idx { > MODULES_END_NR, > VMALLOC_START_NR, > VMALLOC_END_NR, > + VMEMMAP_START_NR, > }; > > static struct addr_marker address_markers[] = { > @@ -386,6 +387,10 @@ static int __init ptdump_init(void) > #endif > address_markers[VMALLOC_END_NR].start_address = VMALLOC_END; > ptdump_initialize(); > + if (vabits_actual < VA_BITS) { > + address_markers[VMEMMAP_START_NR].start_address = > + (unsigned long)virt_to_page(_PAGE_OFFSET(vabits_actual)); > + } nit: Do you need the conditional here? Why not just do it unconditionally? > ptdump_debugfs_register(&kernel_ptdump_info, "kernel_page_tables"); > return 0; > } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel