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 DEF84C433F5 for ; Wed, 9 Feb 2022 03:18:18 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SbhB6nL6geZKRho9GMXEVn7wTJ4iQgaD9sNzFKFBiKo=; b=DVGu0SkQQ6N/u7 jZ/myAGj08Nd+S6BpACekvPv072LNBUkJ3xQIe28McOf2s6NvZ8AIoXzkwYez3gJhISXhrGdUH0Ay P2tMSPHtdPy8A9gdptIgbymb5gaGbs+VFWg4d8646kpZIuF4nyxMHCcG7vdEFQkcaObEdBzqrZO2G LHLbUTeElcsJTNwKni0SnnwcLkCN0v1iAjc2CMuAG8WhZUAiA3jZB4SaFUcWcO9tTyFVFqwf212HY Yh1fO8Bd/gsEHpsByzktX7PfsEyjNalVtdTPGx6999k9b4tJAAalGkqXm0h1LU304mt4hxAETqc5K /oekyDDMzXZR3/ELljyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHdTc-00G5LS-Ge; Wed, 09 Feb 2022 03:17:04 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHdTX-00G5Jv-Nb for linux-arm-kernel@lists.infradead.org; Wed, 09 Feb 2022 03:17:01 +0000 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-Disposition: inline In-Reply-To: <20220209092642.9181-1-shijie@os.amperecomputing.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_191659_895478_AF8A0080 X-CRM114-Status: GOOD ( 20.72 ) 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 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel