From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Armbruster Subject: Re: [Qemu-devel] Why I advise against using ivshmem Date: Mon, 30 Jun 2014 13:10:38 +0200 Message-ID: <874mz264b5.fsf@blackfin.pond.sub.org> References: <87vbs6qjhj.fsf_-_@blackfin.pond.sub.org> <5399CF09.8030803@6wind.com> <87ppidnqmy.fsf@blackfin.pond.sub.org> <539AC3E0.9090404@6wind.com> <539ACDE6.7020709@redhat.com> <539AFF7C.7090702@6wind.com> <539B064D.2050501@redhat.com> <53A00464.8090609@6wind.com> <53A00DEB.8030400@redhat.com> <20140618104849.GH14030@stefanha-thinkpad.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Paolo Bonzini , Henning Schild , Olivier MATZ , kvm , qemu-devel , David Marchand , Linux Virtualization , Vincent JARDIN , "thomas.monjalon\@6wind.com" To: Stefan Hajnoczi Return-path: Received: from oxygen.pond.sub.org ([144.76.244.19]:48020 "EHLO oxygen.pond.sub.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbaF3LKo (ORCPT ); Mon, 30 Jun 2014 07:10:44 -0400 In-Reply-To: <20140618104849.GH14030@stefanha-thinkpad.redhat.com> (Stefan Hajnoczi's message of "Wed, 18 Jun 2014 18:48:49 +0800") Sender: kvm-owner@vger.kernel.org List-ID: Stefan Hajnoczi writes: > On Tue, Jun 17, 2014 at 11:44:11AM +0200, Paolo Bonzini wrote: >> Il 17/06/2014 11:03, David Marchand ha scritto: >> >>Unless someone steps up and maintains ivshmem, I think it should be >> >>deprecated and dropped from QEMU. >> > >> >Then I can maintain ivshmem for QEMU. >> >If this is ok, I will send a patch for MAINTAINERS file. >> >> Typically, adding yourself to maintainers is done only after having proved >> your ability to be a maintainer. :) >> >> So, let's stop talking and go back to code! You can start doing what was >> suggested elsewhere in the thread: get the server and uio driver merged into >> the QEMU tree, document the protocol in docs/specs/ivshmem_device_spec.txt, >> and start fixing bugs such as the ones that Markus reported. > > One more thing to add to the list: > > static void ivshmem_read(void *opaque, const uint8_t * buf, int flags) > > The "flags" argument should be "size". Size should be checked before > accessing buf. > > Please also see the bug fixes in the following unapplied patch: > "[PATCH] ivshmem: fix potential OOB r/w access (#2)" by Sebastian Krahmer > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg03538.html Another one: most devices can be controlled via a dedicated CONFIG_, but not ivshmem: it uses CONFIG_KVM and CONFIG_PCI. Giving it its own CONFIG_IVSHMEM would be nice. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1ZU3-0000mO-5e for qemu-devel@nongnu.org; Mon, 30 Jun 2014 07:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1ZTw-0006UM-KO for qemu-devel@nongnu.org; Mon, 30 Jun 2014 07:10:51 -0400 Received: from oxygen.pond.sub.org ([144.76.244.19]:48984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1ZTw-0006Sp-EO for qemu-devel@nongnu.org; Mon, 30 Jun 2014 07:10:44 -0400 From: Markus Armbruster References: <87vbs6qjhj.fsf_-_@blackfin.pond.sub.org> <5399CF09.8030803@6wind.com> <87ppidnqmy.fsf@blackfin.pond.sub.org> <539AC3E0.9090404@6wind.com> <539ACDE6.7020709@redhat.com> <539AFF7C.7090702@6wind.com> <539B064D.2050501@redhat.com> <53A00464.8090609@6wind.com> <53A00DEB.8030400@redhat.com> <20140618104849.GH14030@stefanha-thinkpad.redhat.com> Date: Mon, 30 Jun 2014 13:10:38 +0200 In-Reply-To: <20140618104849.GH14030@stefanha-thinkpad.redhat.com> (Stefan Hajnoczi's message of "Wed, 18 Jun 2014 18:48:49 +0800") Message-ID: <874mz264b5.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] Why I advise against using ivshmem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Henning Schild , Olivier MATZ , kvm , qemu-devel , David Marchand , Paolo Bonzini , Linux Virtualization , Vincent JARDIN , "thomas.monjalon@6wind.com" Stefan Hajnoczi writes: > On Tue, Jun 17, 2014 at 11:44:11AM +0200, Paolo Bonzini wrote: >> Il 17/06/2014 11:03, David Marchand ha scritto: >> >>Unless someone steps up and maintains ivshmem, I think it should be >> >>deprecated and dropped from QEMU. >> > >> >Then I can maintain ivshmem for QEMU. >> >If this is ok, I will send a patch for MAINTAINERS file. >> >> Typically, adding yourself to maintainers is done only after having proved >> your ability to be a maintainer. :) >> >> So, let's stop talking and go back to code! You can start doing what was >> suggested elsewhere in the thread: get the server and uio driver merged into >> the QEMU tree, document the protocol in docs/specs/ivshmem_device_spec.txt, >> and start fixing bugs such as the ones that Markus reported. > > One more thing to add to the list: > > static void ivshmem_read(void *opaque, const uint8_t * buf, int flags) > > The "flags" argument should be "size". Size should be checked before > accessing buf. > > Please also see the bug fixes in the following unapplied patch: > "[PATCH] ivshmem: fix potential OOB r/w access (#2)" by Sebastian Krahmer > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg03538.html Another one: most devices can be controlled via a dedicated CONFIG_, but not ivshmem: it uses CONFIG_KVM and CONFIG_PCI. Giving it its own CONFIG_IVSHMEM would be nice.