From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1HNx-0002zZ-N6 for qemu-devel@nongnu.org; Tue, 14 Aug 2012 09:42:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1HNr-0003Vp-U7 for qemu-devel@nongnu.org; Tue, 14 Aug 2012 09:42:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1HNr-0003Vh-Ka for qemu-devel@nongnu.org; Tue, 14 Aug 2012 09:42:11 -0400 Message-ID: <502A55AA.5090700@redhat.com> Date: Tue, 14 Aug 2012 16:42:02 +0300 From: Avi Kivity 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> <502A51B2.30509@siemens.com> In-Reply-To: <502A51B2.30509@siemens.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: Jan Kiszka Cc: Blue Swirl , "peter.maydell@linaro.org" , Markus Armbruster , Anthony Liguori , "qemu-devel@nongnu.org" On 08/14/2012 04:25 PM, Jan Kiszka wrote: > 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. Right. -- error compiling committee.c: too many arguments to function