[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130525151324.637d6b70@holzheu>
Date: Sat, 25 May 2013 15:13:24 +0200
From: Michael Holzheu <holzheu@...ux.vnet.ibm.com>
To: Vivek Goyal <vgoyal@...hat.com>
Cc: HATAYAMA Daisuke <d.hatayama@...fujitsu.com>,
Jan Willeke <willeke@...ibm.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
linux-kernel@...r.kernel.org, kexec@...ts.infradead.org,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390
On Fri, 24 May 2013 13:05:07 -0400
Vivek Goyal <vgoyal@...hat.com> wrote:
> On Fri, May 24, 2013 at 06:46:53PM +0200, Michael Holzheu wrote:
> > On Fri, 24 May 2013 11:28:49 -0400
> > Vivek Goyal <vgoyal@...hat.com> wrote:
> >
> > > On Fri, May 24, 2013 at 05:06:26PM +0200, Michael Holzheu wrote:
> >
> > [snip]
> >
> > > As /proc/vmcore is the most used and useful interface, I prefer
> > > that we swap memory and put that info in elf headers.
> > > For /dev/oldme, I don't mind if we leave it as it is. If somebody
> > > really cares, then I guess we need to write a new command line
> > > option which /dev/mem can parse and which tells it about swaps so
> > > that /dev/oldmem can map things correctly. (This is better than
> > > hardcoding things).
> >
> > Besides of the potential /dev/oldmem issue, I still do not
> > understand the option of doing the swap in the elf header. Looks
> > like I missed here a fundamental design point of kdump :(
> >
> > Is that done by specifying different virtual and physical addresses
> > in the ELF header?
>
> Nope. We keep the virtual to physical address mapping same. We just
> modify the p_offset in PT_LOAD elf header to represent where actually
> the memory is present physically. And when /proc/vmcore reads the
> data, it reads it from p_offset.
>
> IOW, p_offset and p_paddr will be different for swapped memory but
> should be same for memory which has not been swapped.
Hello Vivek,
Ok, now I got it :)
It worked for me by specifying a PT_LOAD with:
phdr->p_offset = OLDMEM_BASE;
phdr->p_vaddr = phdr->p_paddr = 0;
phdr->p_filesz = phdr->p_memsz = OLDMEM_SIZE;
Best Regards,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists