[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFgQCTvM7NJSxXbOC7XoKzZwEsWcL2hRupvtsYA=Fi4um9rVCw@mail.gmail.com>
Date: Wed, 9 Jun 2021 08:16:46 +0800
From: Pingfan Liu <kernelfans@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Bhupesh Sharma <bhupesh.sharma@...aro.org>,
Dave Young <dyoung@...hat.com>, Baoquan He <bhe@...hat.com>,
Boris Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
James Morse <james.morse@....com>,
Mark Rutland <mark.rutland@....com>,
Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Michael Ellerman <mpe@...erman.id.au>,
Paul Mackerras <paulus@...ba.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Dave Anderson <anderson@...hat.com>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
LKML <linux-kernel@...r.kernel.org>,
Kexec Mailing List <kexec@...ts.infradead.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
k-hagio-ab@....com
Subject: Re: [PATCH] crash_core, vmcoreinfo: Append 'SECTION_SIZE_BITS' to vmcoreinfo
Correct mail address of Kazuhito
On Tue, Jun 8, 2021 at 6:34 PM Pingfan Liu <kernelfans@...il.com> 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.
>
> Signed-off-by: Pingfan Liu <kernelfans@...il.com>
> Cc: Bhupesh Sharma <bhupesh.sharma@...aro.org>
> Cc: Kazuhito Hagio <k-hagio@...jp.nec.com>
> Cc: Dave Young <dyoung@...hat.com>
> Cc: Baoquan He <bhe@...hat.com>
> Cc: Boris Petkov <bp@...en8.de>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: James Morse <james.morse@....com>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Cc: Dave Anderson <anderson@...hat.com>
> Cc: linuxppc-dev@...ts.ozlabs.org
> Cc: linux-kernel@...r.kernel.org
> Cc: kexec@...ts.infradead.org
> Cc: x86@...nel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> ---
> kernel/crash_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/crash_core.c b/kernel/crash_core.c
> index 825284baaf46..684a6061a13a 100644
> --- a/kernel/crash_core.c
> +++ b/kernel/crash_core.c
> @@ -464,6 +464,7 @@ static int __init crash_save_vmcoreinfo_init(void)
> 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);
> --
> 2.29.2
>
Powered by blists - more mailing lists