Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5142125pxj; Wed, 9 Jun 2021 10:04:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR4eeHhFiTVBO82Hn0f53VV0brZxWVzFdpeUC+1/6svA2wCdzaS93KJiTnviY33fpJbkgw X-Received: by 2002:a17:906:7203:: with SMTP id m3mr776131ejk.381.1623258273675; Wed, 09 Jun 2021 10:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258273; cv=none; d=google.com; s=arc-20160816; b=U/QRlhml0/fXuy/vALOKoidKYa9oswoJ568BhkPmufKyYysmRIqEZfciMlcKKbyLuF 4m7efKLGZgI31It6G6ngu7vsEB4WhsPv7s95//51ooB28Cq7F/jmiUldU8rXVZFTuiU9 xoMC2luJtTecNz4uP6xDtRmt8Cxp/GCS+DsR2JlhRux+cOFRdf6s3/GiuG/Zk5JKpNvQ eaLorjaEvISrwe5UakPpUNTAATModOY6n8ZcoCs8u1VTAiErRLQpAXTNAVBi5JIiCme/ ygAZXsVZrW5/VB2Qn5PXVCSxQ4dVprGe2FhCLmKwqdpMBpHh8a/dh/ooIvBeC8+pvbTA dNWQ== 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=M6AD2nLmb56QVhFCgYdZqvhrlY7oWTcZgGvZozkCcw0=; b=VlhC1itXpQpvLM88EebJsoi81ihEfpuK87QtA+R9T9YCdxM4nIwKcrvQzttiacHPcO CCrymuUR28iAtEjprFb0XlovYAPKS5iBYUa7WkE3XdW8EM1QOSI2UPlE2cZ77ucOi03I aOcCZLiQItGLh6qRyqmtICjJw7pJEv5sa1x9SV8TV0oqTpeEolpC0ujtSaP2NWv6VNcU QmdmdCagUcFak1ilDQ+ddO1JXJjTHLbw4mGjanmJ71MC9mR0d7WCF7xigpUfFApvHpnX yOUwXFV3q9swKGF/wdO4HzzIppmsa1RlKh9grF1jLb8lDqwJZqWF+7SaVoOnnlhJj5xl rC2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JrZbxaRs; 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 m25si177388edr.588.2021.06.09.10.04.03; Wed, 09 Jun 2021 10:04:33 -0700 (PDT) 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=JrZbxaRs; 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 S235831AbhFICtV (ORCPT + 99 others); Tue, 8 Jun 2021 22:49:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47593 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231668AbhFICtU (ORCPT ); Tue, 8 Jun 2021 22:49:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623206846; 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=M6AD2nLmb56QVhFCgYdZqvhrlY7oWTcZgGvZozkCcw0=; b=JrZbxaRs3FfRuNVNfiSiRpuE08zFVo6iGIxxYekCCvQsvsMf2k1xjnSNDawy/DNKBa7Y9Q 2B4Ku2RoPoDKniE9B/QfjJmKZ1znqJow8be8OnltmjRDhea6o5XeV6yHyAGFK0sX0Xa/Uz c1gHj1rihM6VHZFzrJawAaINELUoMvM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-518-ycxNtIymMJ2lkUBWT-83bg-1; Tue, 08 Jun 2021 22:47:23 -0400 X-MC-Unique: ycxNtIymMJ2lkUBWT-83bg-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 9DFB2107ACE4; Wed, 9 Jun 2021 02:47:20 +0000 (UTC) Received: from localhost (ovpn-13-223.pek2.redhat.com [10.72.13.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 14C5160CC9; Wed, 9 Jun 2021 02:47:12 +0000 (UTC) Date: Wed, 9 Jun 2021 10:47:09 +0800 From: Baoquan He To: Andrew Morton Cc: Pingfan Liu , Bhupesh Sharma , Kazuhito Hagio , Dave Young , Boris Petkov , Ingo Molnar , Thomas Gleixner , James Morse , Mark Rutland , Will Deacon , Catalin Marinas , Michael Ellerman , Paul Mackerras , Benjamin Herrenschmidt , Dave Anderson , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] crash_core, vmcoreinfo: Append 'SECTION_SIZE_BITS' to vmcoreinfo Message-ID: <20210609024709.GA591017@MiWiFi-R3L-srv> References: <20210608103359.84907-1-kernelfans@gmail.com> <20210608142432.GA587883@MiWiFi-R3L-srv> <20210608141410.0026a925ba3a609b0dd4e560@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210608141410.0026a925ba3a609b0dd4e560@linux-foundation.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/08/21 at 02:14pm, Andrew Morton wrote: > On Tue, 8 Jun 2021 22:24:32 +0800 Baoquan He wrote: > > > On 06/08/21 at 06:33am, Pingfan Liu wrote: > > > As mentioned in kernel commit 1d50e5d0c505 ("crash_core, vmcoreinfo: > > > Append 'MAX_PHYSMEM_BITS' to vmcoreinfo"), SECTION_SIZE_BITS in the > > > formula: > > > #define SECTIONS_SHIFT (MAX_PHYSMEM_BITS - SECTION_SIZE_BITS) > > > > > > Besides SECTIONS_SHIFT, SECTION_SIZE_BITS is also used to calculate > > > PAGES_PER_SECTION in makedumpfile just like kernel. > > > > > > Unfortunately, this arch-dependent macro SECTION_SIZE_BITS changes, e.g. > > > recently in kernel commit f0b13ee23241 ("arm64/sparsemem: reduce > > > SECTION_SIZE_BITS"). But user space wants a stable interface to get this > > > info. Such info is impossible to be deduced from a crashdump vmcore. > > > Hence append SECTION_SIZE_BITS to vmcoreinfo. > > > > ... > > > > Add the discussion of the original thread in kexec ML for reference: > > http://lists.infradead.org/pipermail/kexec/2021-June/022676.html > > I added a Link: for this. Thanks, Andrew. > > > This looks good to me. > > > > Acked-by: Baoquan He > > I'm thinking we should backport this at least to Fixes:f0b13ee23241. > But perhaps it's simpler to just backport it as far as possible, so I > added a bare cc:stable with no Fixes:. Thoughts? Yeah, it should add cc:stable, thanks. Otherwise it will break vmcore dumping on 5.12 stable kernel even though with the updated makedumpfile utility. Fixes:f0b13ee23241 will help stable kernel maintainer easier to identify which kernel this patch need be applied on? If only having cc:stable with no Fixes is allowed, it's also OK.