All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Young <dyoung@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: anderson@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org,
	bhe@redhat.com
Subject: Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support
Date: Wed, 9 Nov 2016 16:25:10 +0800	[thread overview]
Message-ID: <20161109082510.GA6197@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <f197ac51-7727-72a9-cd68-e02d16b6e413@cn.fujitsu.com>

On 11/09/16 at 03:42pm, Wen Congyang wrote:
> On 11/09/2016 01:02 PM, Dave Young wrote:
> > On 11/09/16 at 11:58am, Wen Congyang wrote:
> >> On 11/09/2016 11:17 AM, Dave Young wrote:
> >>> Drop qiaonuohan, seems the mail address is wrong..
> >>>
> >>> On 11/09/16 at 11:01am, Dave Young wrote:
> >>>> Hi,
> >>>>
> >>>> Latest linux kernel enabled kaslr to randomiz phys/virt memory
> >>>> addresses, we had some effort to support kexec/kdump so that crash
> >>>> utility can still works in case crashed kernel has kaslr enabled.
> >>>>
> >>>> But according to Dave Anderson virsh dump does not work, quoted messages
> >>>> from Dave below:
> >>>>
> >>>> """
> >>>> with virsh dump, there's no way of even knowing that KASLR
> >>>> has randomized the kernel __START_KERNEL_map region, because there is no
> >>>> virtual address information -- e.g., like "SYMBOL(_stext)" in the kdump
> >>>> vmcoreinfo data to compare against the vmlinux file symbol value.
> >>>> Unless virsh dump can export some basic virtual memory data, which
> >>>> they say it can't, I don't see how KASLR can ever be supported.
> >>>> """
> >>>>
> >>>> I assume virsh dump is using qemu guest memory dump facility so it
> >>>> should be first addressed in qemu. Thus post this query to qemu devel
> >>>> list. If this is not correct please let me know.
> >>
> >> IIRC, 'virsh dump --memory-only' uses dump-guest-memory, and 'virsh dump'
> >> uses migration to dump.
> > 
> > Do they need different fixes? Dave, I guess you mean --memory-only, but
> > could you clarify and confirm it?
> > 
> >>
> >> I think I should study kaslr first...
> > 
> > Thanks for taking care of it.
> 
> Can you give me the patch for kexec/kdump. I want to know what I need to do
> for dump-guest-memory.

AFAIK, there are below patches for kexec/kdump userspace:
kexec-tools, git commit:
commit 9f62cbddddfc93d78d9aafbddf3e1208cb242f7b
Author: Thomas Garnier <thgarnie@google.com>
Date:   Tue Sep 13 15:10:05 2016 +0800

    kexec/arch/i386: Add support for KASLR memory randomization

Originally Baoquan He posted below patches to export vmcoreinfo for some
kernel fields:
http://lists.infradead.org/pipermail/kexec/2016-September/017191.html
But later it was dropped, we finally do it in userspace with several
makedumpfile patches:
http://lists.infradead.org/pipermail/kexec/2016-October/017540.html
http://lists.infradead.org/pipermail/kexec/2016-October/017539.html
http://lists.infradead.org/pipermail/kexec/2016-October/017541.html

For virsh dumped vmcore it should manage to export some infomation so that
crash utility can use. I would leave Dave to provide more information
what he needs because the goal is userspace utility like crash can
correctly analysis the vmcore. 

> 
> Thanks
> Wen Congyang
> 
> > 
> >>
> >> Thanks
> >> Wen Congyang
> >>
> >>>>
> >>>> Could you qemu dump people make it work? Or we can not support virt dump
> >>>> as long as KASLR being enabled. Latest Fedora kernel has enabled it in x86_64.
> >>>>
> >>>> Thanks
> >>>> Dave
> >>>
> >>>
> >>>
> >>
> >>
> >>
> > 
> > 
> > .
> > 
> 
> 
> 

  reply	other threads:[~2016-11-09  8:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09  3:01 [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support Dave Young
2016-11-09  3:17 ` Dave Young
2016-11-09  3:58   ` Wen Congyang
2016-11-09  5:02     ` Dave Young
2016-11-09  7:42       ` Wen Congyang
2016-11-09  8:25         ` Dave Young [this message]
2016-11-09 14:36       ` Dave Anderson
2016-11-09 14:42         ` Daniel P. Berrange
2016-11-09 10:40 ` Andrew Jones
2016-11-09 11:26   ` Laszlo Ersek
2016-11-09 11:37     ` Daniel P. Berrange
2016-11-09 11:48       ` Andrew Jones
2016-11-09 11:58         ` Daniel P. Berrange
2016-11-09 12:20           ` Andrew Jones
2016-11-09 14:47             ` Daniel P. Berrange
2016-11-09 15:38               ` Laszlo Ersek
2016-11-09 16:01                 ` Daniel P. Berrange
2016-11-14 10:27                   ` Paolo Bonzini
2016-11-14  5:32                 ` Dave Young
2016-11-14  9:47                   ` Andrew Jones
2016-11-16  2:48                     ` Dave Young
2016-11-14 10:10                   ` Daniel P. Berrange
2016-11-14 10:28                     ` Paolo Bonzini
2016-11-14 10:33                       ` Daniel P. Berrange
2016-11-14 11:08                         ` Laszlo Ersek
2016-11-14 11:55                         ` Paolo Bonzini
2016-11-09 15:28   ` Dave Anderson
2016-11-14 10:41     ` Paolo Bonzini
2016-11-15 14:41       ` Dave Anderson
2016-11-09 14:32 ` Dave Anderson

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=20161109082510.GA6197@dhcp-128-65.nay.redhat.com \
    --to=dyoung@redhat.com \
    --cc=anderson@redhat.com \
    --cc=bhe@redhat.com \
    --cc=lersek@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wency@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.