Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1582720pxb; Tue, 8 Feb 2022 23:05:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJYXtdzWum6XSl+nTa3HEOxQjMAFVJ9rIFoF3DhF0MaBrCWZxMPy152pU2TJMGWt6gm1Gm X-Received: by 2002:a17:902:c40b:: with SMTP id k11mr818012plk.42.1644390343913; Tue, 08 Feb 2022 23:05:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644390343; cv=none; d=google.com; s=arc-20160816; b=M3GYvmHOg1diAwE+YZMHg4FOZCBiSYYe8AxWX8ZH9V/cnLsAx+5TbblYjE7rK4Xuzp H/YDDaISLeOBUq0YztsL/ztsNiaxisCSZ4KVqEXeU5rLJU4bJGJSPtBDEK8Lv33D13yD qZjGqoo3ABmcCmVw0ghlxX2vERzWT8OToYnMginQdkNlpqYgpssq3WQXdgieVPdP+qYm +UfLJ75RazeENwuyh/9ORAQuRCDZE6yJeh/EKt5YUZWjTi2NzmUBVf83QGPfoaLJsLfp Js+kygBadIa6BzOzj/vnqoFFNq+gvX0J7ZePKldK6QIgTTYy3wbjCYOcscRfXpQpO4WY +0eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4KguVXJBsbOFpLwfjfe5WokTE0k6qOeZu3h5xh8SaKs=; b=b0kDMa+DXUle2uLx9jBumST40xI47Acu8CUCSQL51JVHABCPtCcV1lhFcSHsx3DZK/ T/uR/MoQu6tScTldjIh8+v00R2jE9dwb8/N0fJVu1xtaH+k7/xf6zVJpiJZChZLgmumk xZTUK4AhbAJWWE3pfvBNjkuflPSU0iETp37FnKMUkCP1oGqbUN5XNb0rBN9s4xMefMWO tmGgdXWwdh7sU19iKEL+x1wpQlIlAIpSmhlmjYNDcSsqJQQP5wPqY4TLXicf5ZE+hARR BkyRsHDXhIXFbOGmavmYbQccorx6SooSW0CQnDTjIoqfaIqxSdSNy+Q8kHBLdTBqAiq7 pNhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bnv8IALQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si15110415plr.451.2022.02.08.23.05.27; Tue, 08 Feb 2022 23:05:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bnv8IALQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345038AbiBIDRL (ORCPT + 99 others); Tue, 8 Feb 2022 22:17:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346424AbiBIDQ7 (ORCPT ); Tue, 8 Feb 2022 22:16:59 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7CA5FC0613CC for ; Tue, 8 Feb 2022 19:16:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644376618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4KguVXJBsbOFpLwfjfe5WokTE0k6qOeZu3h5xh8SaKs=; b=bnv8IALQ8X+/6aXf97S4/lpZuhqF9a5fxBYUL84mAoE2aNMP2bOBoKcppuwrfPgi5eo01G szIEqFNfso0q1TosHLF0gd/EW5Lr6Gmmh3ojLlnGCLA7M+bfZaIUh5qa1is8wBmG4FGJq2 fg48LRrIXS6oS2nCiISbgalMHYHw7Eo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-149-mfr6iKPnOOirDDrfV4yHKA-1; Tue, 08 Feb 2022 22:16:55 -0500 X-MC-Unique: mfr6iKPnOOirDDrfV4yHKA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 882401091DA1; Wed, 9 Feb 2022 03:16:53 +0000 (UTC) Received: from localhost (ovpn-12-114.pek2.redhat.com [10.72.12.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C176610A6; Wed, 9 Feb 2022 03:16:51 +0000 (UTC) Date: Wed, 9 Feb 2022 11:16:48 +0800 From: Baoquan He To: Huang Shijie , Kazuhito Hagio , Lianbo Jiang Cc: catalin.marinas@arm.com, will@kernel.org, vgoyal@redhat.com, dyoung@redhat.com, corbet@lwn.net, kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, zwang@amperecomputing.com, patches@amperecomputing.com, darren@os.amperecomputing.com Subject: Re: [PATCH] arm64: crash_core: Export MODULES, VMALLOC, and VMEMMAP ranges Message-ID: References: <20220209092642.9181-1-shijie@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209092642.9181-1-shijie@os.amperecomputing.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 02/09/22 at 09:26am, Huang Shijie wrote: > The following interrelated ranges are needed by the kdump crash tool: > MODULES_VADDR ~ MODULES_END, > VMALLOC_START ~ VMALLOC_END, > VMEMMAP_START ~ VMEMMAP_END > > Since these values change from time to time, it is preferable to export > them via vmcoreinfo than to change the crash's code frequently. Add Kazu and Lianbo to CC since they take care of Crash utility now, please check if this is necessary for Crash. > > Signed-off-by: Huang Shijie > --- > Documentation/admin-guide/kdump/vmcoreinfo.rst | 8 ++++++++ > arch/arm64/kernel/crash_core.c | 6 ++++++ > 2 files changed, 14 insertions(+) > > diff --git a/Documentation/admin-guide/kdump/vmcoreinfo.rst b/Documentation/admin-guide/kdump/vmcoreinfo.rst > index 3861a25faae1..a339af45a22e 100644 > --- a/Documentation/admin-guide/kdump/vmcoreinfo.rst > +++ b/Documentation/admin-guide/kdump/vmcoreinfo.rst > @@ -494,6 +494,14 @@ architecture which is used to lookup the page-tables for the Virtual > addresses in the higher VA range (refer to ARMv8 ARM document for > more details). > > +MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END > +------------- > + > +Used to get the correct ranges: > + MODULES_VADDR ~ MODULES_END-1 : Kernel module space. > + VMALLOC_START ~ VMALLOC_END-1 : vmalloc() / ioremap() space. > + VMEMMAP_START ~ VMEMMAP_END-1 : vmemmap region, used for struct page array. > + > arm > === > > diff --git a/arch/arm64/kernel/crash_core.c b/arch/arm64/kernel/crash_core.c > index 314391a156ee..2b65aae332ce 100644 > --- a/arch/arm64/kernel/crash_core.c > +++ b/arch/arm64/kernel/crash_core.c > @@ -20,6 +20,12 @@ void arch_crash_save_vmcoreinfo(void) > { > VMCOREINFO_NUMBER(VA_BITS); > /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */ > + vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR); > + vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END); > + vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START); > + vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END); > + vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START); > + vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END); > vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n", > kimage_voffset); > vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n", > -- > 2.30.2 >