From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1HAt-0006S9-6P for qemu-devel@nongnu.org; Tue, 14 Aug 2012 09:28:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1HAo-0007OO-FB for qemu-devel@nongnu.org; Tue, 14 Aug 2012 09:28:47 -0400 Received: from thoth.sbs.de ([192.35.17.2]:20853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1HAo-00068p-1C for qemu-devel@nongnu.org; Tue, 14 Aug 2012 09:28:42 -0400 Message-ID: <502A51B2.30509@siemens.com> Date: Tue, 14 Aug 2012 15:25:06 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <87629cvz5b.fsf@blackfin.pond.sub.org> <87ipd8s7zs.fsf@blackfin.pond.sub.org> <87y5m1be5q.fsf@blackfin.pond.sub.org> <87wr1921rd.fsf@blackfin.pond.sub.org> <502235FA.6050903@redhat.com> <87393qnc3t.fsf@blackfin.pond.sub.org> <87lihi50y5.fsf@codemonkey.ws> <87628l6exd.fsf@blackfin.pond.sub.org> <502A2672.9070801@redhat.com> <502A2C08.3060404@siemens.com> <502A2DC5.8000801@redhat.com> <502A3021.30206@siemens.com> <502A4FA8.7040508@redhat.com> In-Reply-To: <502A4FA8.7040508@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Funny -m arguments can crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , "peter.maydell@linaro.org" , Markus Armbruster , Anthony Liguori , "qemu-devel@nongnu.org" On 2012-08-14 15:16, Avi Kivity wrote: > On 08/14/2012 02:01 PM, Jan Kiszka wrote: > >>>> We can also easily automatically disable it when there is insufficient >>>> (<1MB) memory. Will post a patch. >>> >>> Would be nicer if it auto-disables itself, but don't know if the option >>> ROM has access to the memory size. >> >> There is that global ram_size, also used by vmport. Not really nice but >> no precedent. > > I meant do the detection in the guest. But don't respin the patch, it > doesn't really matter and host-side works just as well. We must not allow the guest to decide over this. Unless I'm misinterpreting something, a malicious guest could still trigger this patching (in non-existent RAM) and crash the host. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux