[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0910DD04CBD6DE4193FCF86B9C00BE9701F35B81@BPXM01GP.gisp.nec.co.jp>
Date: Tue, 16 Jan 2018 08:36:41 +0000
From: Atsushi Kumagai <ats-kumagai@...jp.nec.com>
To: Omar Sandoval <osandov@...ndov.com>, Dave Young <dyoung@...hat.com>
CC: Baoquan He <bhe@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
Mike Galbraith <efault@....de>,
"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"Thomas Gleixner" <tglx@...utronix.de>,
Vivek Goyal <vgoyal@...hat.com>,
"Cyrill Gorcunov" <gorcunov@...nvz.org>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Andrew Morton <akpm@...ux-foundation.org>,
Borislav Petkov <bp@...e.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Keiichirou Suzuki <kei-suzuki@...jp.nec.com>
Subject: RE: [PATCH 4.14 023/159] mm/sparsemem: Allocate mem_section at
runtime for CONFIG_SPARSEMEM_EXTREME=y
>Hm, this fix means that the vmlinux symbol table and vmcoreinfo have
>different values for mem_section. That seems... odd. I had to patch
>makedumpfile to fix the case of an explicit vmlinux being passed on the
>command line (which I realized I don't need to do, but it should still
>work):
Looks good to me, I'll merge this into makedumpfile-1.6.4.
Thanks,
Atsushi Kumagai
>>From 542a11a8f28b0f0a989abc3adff89da22f44c719 Mon Sep 17 00:00:00 2001
>Message-Id: <542a11a8f28b0f0a989abc3adff89da22f44c719.1515995400.git.osandov@...com>
>From: Omar Sandoval <osandov@...com>
>Date: Sun, 14 Jan 2018 17:10:30 -0800
>Subject: [PATCH] Fix SPARSEMEM_EXTREME support on Linux v4.15 when passing
> vmlinux
>
>Since kernel commit 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at
>runtime for CONFIG_SPARSEMEM_EXTREME=y"), mem_section is a dynamically
>allocated array of pointers to mem_section instead of a static one
>(i.e., struct mem_section ** instead of struct mem_section * []). This
>adds an extra layer of indirection that breaks makedumpfile, which will
>end up with a bunch of bogus mem_maps.
>
>Since kernel commit a0b1280368d1 ("kdump: write correct address of
>mem_section into vmcoreinfo"), the mem_section symbol in vmcoreinfo
>contains the address of the actual struct mem_section * array instead of
>the address of the pointer in .bss, which gets rid of the extra
>indirection. However, makedumpfile still uses the debugging symbol from
>the vmlinux image. Fix this by allowing symbols from the vmcore to
>override symbols from the vmlinux image. As the comment in initial()
>says, "vmcoreinfo in /proc/vmcore is more reliable than -x/-i option".
>
>Signed-off-by: Omar Sandoval <osandov@...com>
>---
> makedumpfile.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/makedumpfile.h b/makedumpfile.h
>index 57cf4d9..d68c798 100644
>--- a/makedumpfile.h
>+++ b/makedumpfile.h
>@@ -274,8 +274,10 @@ do { \
> } while (0)
> #define READ_SYMBOL(str_symbol, symbol) \
> do { \
>- if (SYMBOL(symbol) == NOT_FOUND_SYMBOL) { \
>- SYMBOL(symbol) = read_vmcoreinfo_symbol(STR_SYMBOL(str_symbol)); \
>+ unsigned long _tmp_symbol; \
>+ _tmp_symbol = read_vmcoreinfo_symbol(STR_SYMBOL(str_symbol)); \
>+ if (_tmp_symbol != NOT_FOUND_SYMBOL) { \
>+ SYMBOL(symbol) = _tmp_symbol; \
> if (SYMBOL(symbol) == INVALID_SYMBOL_DATA) \
> return FALSE; \
> } \
>--
>2.9.5
>
>
>_______________________________________________
>kexec mailing list
>kexec@...ts.infradead.org
>http://lists.infradead.org/mailman/listinfo/kexec
Powered by blists - more mailing lists