Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3018526rwb; Mon, 15 Aug 2022 16:15:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR4zh5nG2eLKfgb/MHfZVrLFxrRZKM/4e4y0KKI5pcMAq89fqq968lNa/ZqfjQnecGt0Rbak X-Received: by 2002:a05:6402:e94:b0:443:e3fe:7c87 with SMTP id h20-20020a0564020e9400b00443e3fe7c87mr3828012eda.144.1660605321183; Mon, 15 Aug 2022 16:15:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605321; cv=none; d=google.com; s=arc-20160816; b=QmL5HdjvoPwGcqrOX77qSNWaTBb5DdbLq11mGUaJ99emBT1e+zf40gNE/n8FeAbeOJ 8d2K/RLFOpsve4KSsRdk3E9icAKJ61t8I7FVFVtf18389OLze4C//6tJEZ9NvaVPRaTr ewvY95kO/DeuMReHn5f/QGtRs2RwOh/R+NCQkenuUsKkORV/jKRJB6ahRuf4XbI4RsoU iFhTlQ+I/fjeICbjZbwaUKdDvb3I3nVG+fCxm//zAe1XFyYSkFSV26bP8uTPUbYVwVcb YsoN3tSmZQ5CZ6fQnVBoDEYHPTieAQ8wfNc/jtDUPsUBMol9sB6MYkGG0F+X1f4N+ffR zBgA== 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=nydIGjuTh7vOjkkYRxgiqNJN35r8OIzEtexy5vMbgXo=; b=fbYF7dJXCfsCh7lmSdQlAiDQRz934mJFjes4lZ/W3iPjN9NyLsad3fPwRoJRwFjW14 C8JdbbbE4tge3sjiADFqXBl6UaWDRJ7n9Q0WLu+dnbJpEA813Xq34r90AjlVzLy/A6o8 J5iB8BnLdqXzaW/tdQQQ2zp/XWKZKWocS+q9kkNfGLxk2jlH2I6Uj+xlk7WRN8+A1DCK WswVf3f8+QZr/Gy8wCyndVOif/iFlr5GyOwnNegcbEKtBNhbJE4SPRQoHXdctwMcvZx6 iULmTs+MB85D6W3bGg0E+ozlWYF4iW/ic4uNlzq9hHBbc6yl47bMQ+6G0bAfiTwC4ihI PbWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hU2Atgml; 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 v3-20020a509543000000b0044301c6aca9si8601349eda.379.2022.08.15.16.14.56; Mon, 15 Aug 2022 16:15:21 -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=hU2Atgml; 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 S1347816AbiHOWH6 (ORCPT + 99 others); Mon, 15 Aug 2022 18:07:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350493AbiHOWCQ (ORCPT ); Mon, 15 Aug 2022 18:02:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7EC03057E; Mon, 15 Aug 2022 12:36:59 -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 EF563610A5; Mon, 15 Aug 2022 19:36:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEE95C433D6; Mon, 15 Aug 2022 19:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592218; bh=S03DrVIez8ZhURF5AK3S4u4nvNPVH0sG3GwEDu/RG8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hU2Atgml2UGkoAsbDyn7ImVdn5Akhj1IpoT91dg6AOfwufUVxUp5GzUy5iPa/iMmF fp1b58NroqaRqh/ZXv6ObwRNfTI7RFBkhBPZRum/txug9abg50smPSbrO7a6VsLDv/ pJEvbVSl+OpxwY6Uo7cBrqffgXRfYTseN8ucA5w4= 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.19 0076/1157] RISC-V: Add modules to virtual kernel memory layout dump Date: Mon, 15 Aug 2022 19:50:32 +0200 Message-Id: <20220815180442.559813771@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 @@ -135,6 +135,10 @@ static void __init print_vm_layout(void) (unsigned long)VMEMMAP_END); print_ml("vmalloc", (unsigned long)VMALLOC_START, (unsigned long)VMALLOC_END); +#ifdef CONFIG_64BIT + print_ml("modules", (unsigned long)MODULES_VADDR, + (unsigned long)MODULES_END); +#endif print_ml("lowmem", (unsigned long)PAGE_OFFSET, (unsigned long)high_memory); if (IS_ENABLED(CONFIG_64BIT)) {