Received: from eggs.gnu.org ([208.118.235.92]:47683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEK5Y-0005rK-4R for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:13:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEK5S-0000lh-I4 for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:13:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEK5S-0000jA-A5 for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:13:06 -0400 From: Markus Armbruster References: <20120917145622.5ba28e23@doriath.home> <5057D3F1.20005@cn.fujitsu.com> <50583D45.6080200@siemens.com> <878vc7cyek.fsf@blackfin.pond.sub.org> <50586C11.8070603@siemens.com> <87627btpu3.fsf@blackfin.pond.sub.org> <87obl36nlx.fsf@codemonkey.ws> <87pq5imq2m.fsf@blackfin.pond.sub.org> <87zk4mp61e.fsf@codemonkey.ws> Date: Wed, 19 Sep 2012 15:13:02 +0200 In-Reply-To: <87zk4mp61e.fsf@codemonkey.ws> (Anthony Liguori's message of "Wed, 19 Sep 2012 07:10:21 -0500") Message-ID: <87ehlyw3z5.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] qmp: dump-guest-memory: -p option has issues, fix it or drop it? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , Marcelo Tosatti , Eric Blake , qemu-devel , Luiz Capitulino Anthony Liguori writes: > Markus Armbruster writes: > >> Anthony Liguori writes: >> >>> Markus Armbruster writes: >>> >>>> Jan Kiszka writes: >>>> >>>>>>>>> * The issues discussed in this email plus the fact that the guest >>>>>>>>> memory may be corrupted, and the guest may be in real-mode even >>>>>>>>> when paging is enabled >>>>>>>>> >>>>>>>> >>>>>>>> Yes, there are some limitations with this option. Jan said that he >>>>>>>> always use gdb to deal with vmcore, so he needs such information. >>>>>>> >>>>>>> The point is to overcome the focus on Linux-only dump processing tools. >>>>>> >>>>>> While I don't care for supporting alternate dump processing tools >>>>>> myself, I certainly don't mind supporting them, as long as the code >>>>>> satisfies basic safety and reliability requirements. >>>>>> >>>>>> This code doesn't, as far as I can tell. >>>>> >>>>> It works, thought not under all circumstances. >>>> >>>> I don't doubt it works often enough to be useful to somebody. But basic >>>> safety and reliability requirements are a bit more than that. They >>>> include "don't explode in ways a reasonable user can't be expected to >>>> foresee". I don't think a reasonable user can be expected to see that >>>> -p is safe only for trusted guests. >>> >>> We shipped the API, we're not removing it. Our compatibility isn't >>> "whatever libvirt is currently using". >> >> Bah, don't be more catholic than the pope. It's been out for how many >> days? Have you looked at the code? >> >>> It's perfectly reasonable to ask to document the behavior of the >>> method. It's also a trivial patch to qapi-schema.json. >> >> I'm okay with leaving obscure security holes in upstream QEMU, >> indefinitely, as long as they're documented. I don't think it's a good >> idea, but it's something reasonable people can disagree about. > > It's *not* a security hole. Since we agree that documenting the existing crappy behavior is okay for stable, let's not argue what exactly to call it. > The "malicious guest" you mention is just a guest with fully populated > PTEs and PDEs, no? A "normal" guest uses a small fraction of its RAM for page tables. QEMU allocates 10x of that fraction for dump -p. Not so nice. A not-so-normal guest uses most of its RAM for page tables. QEMU allocates in the order of 10x of the guest RAM for -p. Oops. [...]