From patchwork Sun Jun 27 21:52:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 468256 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18BB7C48BC2 for ; Sun, 27 Jun 2021 21:52:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 012A361C31 for ; Sun, 27 Jun 2021 21:52:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231737AbhF0VzS (ORCPT ); Sun, 27 Jun 2021 17:55:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:53724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231707AbhF0VzS (ORCPT ); Sun, 27 Jun 2021 17:55:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B940161A1D; Sun, 27 Jun 2021 21:52:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1624830773; bh=1SV5cEy9xuijtighVey/hFigV31oPBCFfAR4uETCFsA=; h=Date:From:To:Subject:From; b=Z1tM7LT7vPGP9wEWak8AqbPCLVlqHIMzyMDVPJWEReTOoS1rV3NvUegCFgiBDvL0r Ypn6/ijDJ0hlrZvvEL76qskZB98uzAt5lUd+EJ3iO6ZaPDN2ZypuflNBQST779WrGn ee3w5w3iIDy51Iy2Ey4cWPU44iY0R4hSg3IWuPXc= Date: Sun, 27 Jun 2021 14:52:52 -0700 From: akpm@linux-foundation.org To: anderson@redhat.com, benh@kernel.crashing.org, bhe@redhat.com, bhupesh.sharma@linaro.org, bp@alien8.de, catalin.marinas@arm.com, dyoung@redhat.com, james.morse@arm.com, k-hagio@ab.jp.nec.com, kernelfans@gmail.com, mark.rutland@arm.com, mingo@kernel.org, mm-commits@vger.kernel.org, mpe@ellerman.id.au, paulus@samba.org, stable@vger.kernel.org, tglx@linutronix.de, will@kernel.org Subject: [merged] crash_core-vmcoreinfo-append-section_size_bits-to-vmcoreinfo.patch removed from -mm tree Message-ID: <20210627215252.wPZH5_Bbv%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch titled Subject: crash_core, vmcoreinfo: append 'SECTION_SIZE_BITS' to vmcoreinfo has been removed from the -mm tree. Its filename was crash_core-vmcoreinfo-append-section_size_bits-to-vmcoreinfo.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Pingfan Liu Subject: crash_core, vmcoreinfo: append 'SECTION_SIZE_BITS' to vmcoreinfo 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. Link: https://lkml.kernel.org/r/20210608103359.84907-1-kernelfans@gmail.com Link: http://lists.infradead.org/pipermail/kexec/2021-June/022676.html Signed-off-by: Pingfan Liu Acked-by: Baoquan He Cc: Bhupesh Sharma Cc: Kazuhito Hagio Cc: Dave Young Cc: Boris Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Dave Anderson Cc: Signed-off-by: Andrew Morton --- kernel/crash_core.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/crash_core.c~crash_core-vmcoreinfo-append-section_size_bits-to-vmcoreinfo +++ a/kernel/crash_core.c @@ -464,6 +464,7 @@ static int __init crash_save_vmcoreinfo_ VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS); VMCOREINFO_STRUCT_SIZE(mem_section); VMCOREINFO_OFFSET(mem_section, section_mem_map); + VMCOREINFO_NUMBER(SECTION_SIZE_BITS); VMCOREINFO_NUMBER(MAX_PHYSMEM_BITS); #endif VMCOREINFO_STRUCT_SIZE(page);