linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
To: Omar Sandoval <osandov@osandov.com>, Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mike Galbraith <efault@gmx.de>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Andy Lutomirski <luto@amacapital.net>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vivek Goyal <vgoyal@redhat.com>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	Andrew Morton <akpm@linux-foundation.org>,
	Borislav Petkov <bp@suse.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Keiichirou Suzuki <kei-suzuki@xr.jp.nec.com>
Subject: RE: [PATCH 4.14 023/159] mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y
Date: Tue, 16 Jan 2018 08:36:41 +0000	[thread overview]
Message-ID: <0910DD04CBD6DE4193FCF86B9C00BE9701F35B81@BPXM01GP.gisp.nec.co.jp> (raw)
In-Reply-To: <20180115055701.GA9071@vader>

>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@fb.com>
>From: Omar Sandoval <osandov@fb.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@fb.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@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/kexec

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2018-01-16  8:38 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171222084623.668990192@linuxfoundation.org>
2017-12-22  8:45 ` [PATCH 4.14 023/159] mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y Greg Kroah-Hartman
2017-12-22 14:18   ` Dan Rue
2017-12-22 14:52     ` Naresh Kamboju
2017-12-22 15:12       ` Greg Kroah-Hartman
2017-12-22 15:03     ` Greg Kroah-Hartman
2018-01-07  5:14   ` Mike Galbraith
2018-01-07  9:11     ` Greg Kroah-Hartman
2018-01-07  9:21       ` Mike Galbraith
2018-01-07 10:18       ` Michal Hocko
2018-01-07 10:42         ` Greg Kroah-Hartman
2018-01-07 12:44         ` Mike Galbraith
2018-01-07 13:23           ` Michal Hocko
2018-01-08  7:53             ` Greg Kroah-Hartman
2018-01-08  8:15               ` Mike Galbraith
2018-01-08  8:33                 ` Greg Kroah-Hartman
2018-01-08  9:45                   ` Mike Galbraith
2018-01-08  8:47               ` Michal Hocko
2018-01-08  9:10                 ` Greg Kroah-Hartman
2018-01-08  9:27                   ` Greg Kroah-Hartman
2018-01-08 16:04     ` Ingo Molnar
2018-01-08 17:46       ` Kirill A. Shutemov
2018-01-09  0:13         ` Kirill A. Shutemov
2018-01-09  1:09           ` Dave Young
2018-01-09  5:41             ` Baoquan He
2018-01-09  7:24               ` Dave Young
2018-01-09  9:05                 ` Kirill A. Shutemov
2018-01-10  3:08                   ` Dave Young
2018-01-10 11:16                     ` Kirill A. Shutemov
2018-01-11  1:06                       ` Baoquan He
2018-01-12  0:55                       ` Dave Young
2018-01-15  5:57                         ` Omar Sandoval
2018-01-16  8:36                           ` Atsushi Kumagai [this message]
2018-01-09  3:44           ` Mike Galbraith
2018-02-07  9:25             ` Dou Liyang
2018-02-07 10:41               ` Kirill A. Shutemov
2018-02-07 10:45                 ` Mike Galbraith
2018-02-07 12:00                   ` Dou Liyang
2018-02-07 12:08                     ` Baoquan He
2018-02-07 12:17                       ` Dou Liyang
2018-02-07 12:27                         ` Baoquan He
2018-02-07 12:34                           ` Dou Liyang
2018-02-07 12:45                             ` Baoquan He
2018-02-08  1:14                               ` Dou Liyang
2018-02-08  1:23                                 ` Baoquan He
2018-02-08  1:44                                   ` Dou Liyang
2018-02-07 11:28               ` Baoquan He
2018-01-17  5:24           ` Baoquan He
2018-01-25 15:50             ` Kirill A. Shutemov
2018-01-26  2:48               ` Baoquan He
2017-12-22  8:45 ` [PATCH 4.14 024/159] x86/kasan: Use the same shadow offset for 4- and 5-level paging Greg Kroah-Hartman
2017-12-22  8:45 ` [PATCH 4.14 025/159] x86/xen: Provide pre-built page tables only for CONFIG_XEN_PV=y and CONFIG_XEN_PVH=y Greg Kroah-Hartman
2017-12-22  8:45 ` [PATCH 4.14 026/159] x86/xen: Drop 5-level paging support code from the XEN_PV code Greg Kroah-Hartman
2017-12-22  8:45 ` [PATCH 4.14 033/159] x86/boot: Relocate definition of the initial state of CR0 Greg Kroah-Hartman
2017-12-22  8:46 ` [PATCH 4.14 097/159] x86/paravirt: Dont patch flush_tlb_single Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0910DD04CBD6DE4193FCF86B9C00BE9701F35B81@BPXM01GP.gisp.nec.co.jp \
    --to=ats-kumagai@wm.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=bp@suse.de \
    --cc=dyoung@redhat.com \
    --cc=efault@gmx.de \
    --cc=gorcunov@openvz.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kei-suzuki@xr.jp.nec.com \
    --cc=kexec@lists.infradead.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=osandov@osandov.com \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).