From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4Tvv-00047r-PJ for qemu-devel@nongnu.org; Wed, 09 Nov 2016 09:33:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4Tvq-00011V-6X for qemu-devel@nongnu.org; Wed, 09 Nov 2016 09:32:59 -0500 Received: from mx5-phx2.redhat.com ([209.132.183.37]:53633) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c4Tvp-00010G-Vf for qemu-devel@nongnu.org; Wed, 09 Nov 2016 09:32:54 -0500 Date: Wed, 9 Nov 2016 09:32:43 -0500 (EST) From: Dave Anderson Message-ID: <1785386604.14028839.1478701963130.JavaMail.zimbra@redhat.com> In-Reply-To: <20161109030146.GA3802@dhcp-128-65.nay.redhat.com> References: <20161109030146.GA3802@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dave Young Cc: wency@cn.fujitsu.com, qiaonuohan@cn.fujitsu.com, lersek@redhat.com, qemu-devel@nongnu.org, bhe@redhat.com ----- Original Message ----- > 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. > """ We also need the x86_64 phys_base value. As it is right now, virsh dump vmcores work by luck. It is presumed that the __START_KERNEL_map region is unmodified (i.e., what's in the vmlinux file), and the phys_base value is guessed by checking phys_base values from -16MB to +16MB in 1MB chunks. If the phys_base value is not one of those 32 possible values, the crash session will fail. Dave > > 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. > > 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 >