Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4432419pxj; Tue, 8 Jun 2021 14:15:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWClbMerJ3zaCeh7mRTVVwD1Tx8mu2zEu6g2TTurHbrUmUrYA64/QQvj1V8U61sFKLIT9m X-Received: by 2002:a50:8e57:: with SMTP id 23mr27863738edx.354.1623186959114; Tue, 08 Jun 2021 14:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623186959; cv=none; d=google.com; s=arc-20160816; b=RJlCyTcywBvnNhVB40UwSj5PtU6EjK/auOiix8Gq4dT8AvZUn4huJ5Fdzjp0io2dMx 8KozfIaQ+2m3egCCs/tjXCHWVJVua82ob4xuxsK0WSpfKHfVXUFFr3I74nu/xRlCWleP U0Ch6IxCskFU+xjLBBs03BPIhyZdk7vUGHyXLWWMEOQBnEnAVc0J3iB3dw3GEKBVNpUs oTOkybn1UKUrr7Qb+KrE6YdMHKhYfym4/qpN7cKbC8zUVU60e3qbYXbZvBkSv7N9/j7R uKOYkk9HegYC5x7Ry1DJdvebpsG1m2a0sQfPzASjCtGr1l/UjUwIHgwq7NYoSI0BfHu+ +Idg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=oRGUILcWm7RE22c5ZnHdiIR75JOJvANJ2TnsvKomz+U=; b=AupEuuqgi+/jxwr1O2EvYGTzCcnBQ9+jvc2OCMRfxNczjVNUA7A47A6FeL62+/gsYG yTwzTxZTn4jzcdaHBVYqyWQeaSBSAFHZa1BuUmAHBVCb/+lA9QSgRym9ru/D601TW+VX o94nfEgqLGRPJjrC9yhSZiN7stIQmbl3oM0KWTK4oK9qNiSt5ZaWeZzEky2W/Iv+rEYf /+dJOO7wrUDFqNL5yzRFqPtEkNF3Rzly1/0za8nUWhRsZpDG0faGVjgFq1A9Eyem3M76 9TS/zquFCs4nOScOpyLYqDJ+XABMAGIALO3MQxT76S1NLTFpkxIPQbh86uNug0z5zEik BL9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=FSXWgxmd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz3si634138ejb.9.2021.06.08.14.15.34; Tue, 08 Jun 2021 14:15:59 -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=@linux-foundation.org header.s=korg header.b=FSXWgxmd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbhFHVQG (ORCPT + 99 others); Tue, 8 Jun 2021 17:16:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:36708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhFHVQF (ORCPT ); Tue, 8 Jun 2021 17:16:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 52E3660FD8; Tue, 8 Jun 2021 21:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1623186852; bh=G2smJxvAvuJyR2PVlfkCgvduPlzSv6hHhHX7NFNY20I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FSXWgxmd8Uuly+8F/DNMxKu28peM0aEDJWzKxZhCGVBW3OFtmBlFiFDRnIaxVwEjp U+bMQ8ZGcX8xc9CsXU0xGdx9cw1evm79PHu5nuqSh5775dEpcL/aIdLs0/8ZpVRs0n pieXRb46jjM8WiXkFPegtAY9/fQA7BshRhnEuDpc= Date: Tue, 8 Jun 2021 14:14:10 -0700 From: Andrew Morton To: Baoquan He 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: <20210608141410.0026a925ba3a609b0dd4e560@linux-foundation.org> In-Reply-To: <20210608142432.GA587883@MiWiFi-R3L-srv> References: <20210608103359.84907-1-kernelfans@gmail.com> <20210608142432.GA587883@MiWiFi-R3L-srv> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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?