From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio. Date: Thu, 17 Jan 2013 21:05:49 +1030 Message-ID: <87d2x4xfju.fsf@rustcorp.com.au> References: <20121206102750.GF10837@redhat.com> <877goc0wac.fsf@rustcorp.com.au> <87pq1f2rj0.fsf@rustcorp.com.au> <87wqvl1g9s.fsf@rustcorp.com.au> <87pq1c1uj4.fsf@rustcorp.com.au> <877gnk1ayv.fsf@rustcorp.com.au> <20130114173914.GB19207@redhat.com> <874nihzuoz.fsf@rustcorp.com.au> <20130116081606.GB11465@redhat.com> <87k3rcy2y2.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87k3rcy2y2.fsf@rustcorp.com.au> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: "Michael S. Tsirkin" Cc: Linus Walleij , LKML , virtualization@lists.linux-foundation.org, Sjur =?utf-8?Q?Br=C3=A6ndeland?= List-Id: virtualization@lists.linuxfoundation.org Rusty Russell writes: > "Michael S. Tsirkin" writes: >> On Wed, Jan 16, 2013 at 01:43:32PM +1030, Rusty Russell wrote: >>> "Michael S. Tsirkin" writes: >>> >> +static int resize_iovec(struct vringh_iov *iov, gfp_t gfp) >>> >> +{ >>> >> + struct iovec *new; >>> >> + unsigned int new_num = iov->max * 2; >>> > >>> > We must limit this I think, this is coming >>> > from userspace. How about UIO_MAXIOV? >>> >>> We limit it to the ring size already; >> >> 1. do we limit it in case there's a loop in the descriptor ring? I didn't get a chance to do these revisions, as I spent today debugging the test framework. I won't get any more work on it until next week, so I've posted a rough series anyway for feedback (can also be found in my pending-rebases branch on kernel.org). Thanks! Rusty. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754466Ab3ASAZn (ORCPT ); Fri, 18 Jan 2013 19:25:43 -0500 Received: from ozlabs.org ([203.10.76.45]:52372 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752570Ab3ASAZl (ORCPT ); Fri, 18 Jan 2013 19:25:41 -0500 From: Rusty Russell To: "Michael S. Tsirkin" Cc: Sjur =?utf-8?Q?Br=C3=A6ndeland?= , Linus Walleij , virtualization@lists.linux-foundation.org, LKML , Sjur =?utf-8?Q?Br=C3=A6ndeland?= , Ohad Ben-Cohen Subject: Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio. In-Reply-To: <87k3rcy2y2.fsf@rustcorp.com.au> References: <20121206102750.GF10837@redhat.com> <877goc0wac.fsf@rustcorp.com.au> <87pq1f2rj0.fsf@rustcorp.com.au> <87wqvl1g9s.fsf@rustcorp.com.au> <87pq1c1uj4.fsf@rustcorp.com.au> <877gnk1ayv.fsf@rustcorp.com.au> <20130114173914.GB19207@redhat.com> <874nihzuoz.fsf@rustcorp.com.au> <20130116081606.GB11465@redhat.com> <87k3rcy2y2.fsf@rustcorp.com.au> User-Agent: Notmuch/0.14 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) Date: Thu, 17 Jan 2013 21:05:49 +1030 Message-ID: <87d2x4xfju.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rusty Russell writes: > "Michael S. Tsirkin" writes: >> On Wed, Jan 16, 2013 at 01:43:32PM +1030, Rusty Russell wrote: >>> "Michael S. Tsirkin" writes: >>> >> +static int resize_iovec(struct vringh_iov *iov, gfp_t gfp) >>> >> +{ >>> >> + struct iovec *new; >>> >> + unsigned int new_num = iov->max * 2; >>> > >>> > We must limit this I think, this is coming >>> > from userspace. How about UIO_MAXIOV? >>> >>> We limit it to the ring size already; >> >> 1. do we limit it in case there's a loop in the descriptor ring? I didn't get a chance to do these revisions, as I spent today debugging the test framework. I won't get any more work on it until next week, so I've posted a rough series anyway for feedback (can also be found in my pending-rebases branch on kernel.org). Thanks! Rusty.