Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3022078rwb; Mon, 15 Aug 2022 16:19:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR5sor4LB+TSRGfDDxhpO/6OxQLGeZ5raPuCYoQ9FiL1/kAm4ptgth7d/2+BFFOQzSjTaBuh X-Received: by 2002:a17:903:1c8:b0:171:2ed3:6780 with SMTP id e8-20020a17090301c800b001712ed36780mr19542665plh.30.1660605572276; Mon, 15 Aug 2022 16:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605572; cv=none; d=google.com; s=arc-20160816; b=LNaUjv9dkgx4b9I21vGpjDpxo8GYh92htvVcFVzsuEhNsF6oS+z0Czz4W/ffJUnz0e 0/Bbn/7NmzjrxqIZGgCMHh23t8cMnSq/eR/+rBnjcTf3KgehCUv5MOS4RNqOK4DWdSkk lvxe348b/rZLp1l06wTU+3a0wkRHLYBtrkXjJ/qdVJNdEw7PA3A1N4WqRWaI/rc5Mu25 ej3IIZNkpYgjWw9HRa9zvdsAwzZkMIxHt21EyWXx8FgvJif4xDXgTztS7H4BSYKK4wFg PYpdg1mh1R6OaUHlTfHg+G3VDp2kmdkKQhOs2UpCHumqLthi7PYW2k0iRyhSYOsxU2ZK a+Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WYVvPmeENSl4g8Ba8apc6OjjgZT6VLRZ63yOycyOuS8=; b=NKpMuL1lAYMrolpVTL5XzBe4Ryu78yJ483iBx0j1Jv9RRbZZ7nKTIJ3FPv/DOkUb3F GQByr2whQXL9jtm+0NWo/r3HPRr41/btY1CANfu5DBeznKBCgXVd+t8dGHrZh+pxAqBI SY0QPo8MQ9gP4Exr+iP/b2br812gRc6cIc21ilXJ+fMNC5LxDZjjiphKENow4rHFleKy /tkkF2IAIBsN02xyqArLn/3ScIwBcQ0H5+4irzbBhZUP9epL3SYHp6lY3qqn+nj2Jq+q sFgRPuornwla8l+Bf3tNvC6lJ4HDU1t7s96F2+z5S2OrCA+OLxjvwl33tpaa0a/hSks5 0K7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n8fswHK7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170903234700b0016ccf06c2aesi14459990plh.512.2022.08.15.16.19.21; Mon, 15 Aug 2022 16:19:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n8fswHK7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbiHOUOW (ORCPT + 99 others); Mon, 15 Aug 2022 16:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346431AbiHOULU (ORCPT ); Mon, 15 Aug 2022 16:11:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 374F632B9A; Mon, 15 Aug 2022 11:57:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2243F6125B; Mon, 15 Aug 2022 18:57:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27A63C433C1; Mon, 15 Aug 2022 18:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589860; bh=mxHoA8HG0mqTSRKkAGXxJHbnm4nk9/fztONrA5Rp2+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n8fswHK713Aj/T7slF511fdDYZb4t/mPs+zAQwFOQDgEVN6Lw3r6/lO0IoIGOmTuF gUD5X/xaaQaXmPuq9q++VzNQ+DKsCAZrwrTtLeXjAy8DC5oOru+vPlAt62jraQhYgv H497psJsTGJTkusy+clDR5Z6mtDff8jhfC+F7Dng= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guo Ren , Heiko Stuebner , Xianting Tian , Palmer Dabbelt Subject: [PATCH 5.18 0072/1095] RISC-V: Add modules to virtual kernel memory layout dump Date: Mon, 15 Aug 2022 19:51:11 +0200 Message-Id: <20220815180432.501038672@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xianting Tian commit f9293ad46d8ba9909187a37b7215324420ad4596 upstream. Modules always live before the kernel, MODULES_END is fixed but MODULES_VADDR isn't fixed, it depends on the kernel size. Let's add it to virtual kernel memory layout dump. As MODULES is only defined for CONFIG_64BIT, so we dump it when CONFIG_64BIT=y. eg, MODULES_VADDR - MODULES_END 0xffffffff01133000 - 0xffffffff80000000 Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/20220811074150.3020189-5-xianting.tian@linux.alibaba.com Cc: stable@vger.kernel.org Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/mm/init.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -99,6 +99,10 @@ static void __init print_vm_layout(void) (unsigned long)VMEMMAP_END); print_mlm("vmalloc", (unsigned long)VMALLOC_START, (unsigned long)VMALLOC_END); +#ifdef CONFIG_64BIT + print_mlm("modules", (unsigned long)MODULES_VADDR, + (unsigned long)MODULES_END); +#endif print_mlm("lowmem", (unsigned long)PAGE_OFFSET, (unsigned long)high_memory); if (IS_ENABLED(CONFIG_64BIT)) {