From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7XVI-0008H5-Lg for qemu-devel@nongnu.org; Tue, 13 Mar 2012 15:35:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7XVD-00029k-W1 for qemu-devel@nongnu.org; Tue, 13 Mar 2012 15:35:28 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:41937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7XVD-00029e-OK for qemu-devel@nongnu.org; Tue, 13 Mar 2012 15:35:23 -0400 Message-ID: <4F5FA178.9060206@msgid.tls.msk.ru> Date: Tue, 13 Mar 2012 23:35:20 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1331579663-29950-1-git-send-email-mjt@msgid.tls.msk.ru> <1331579663-29950-9-git-send-email-mjt@msgid.tls.msk.ru> <4F5F8B8D.9010202@redhat.com> In-Reply-To: <4F5F8B8D.9010202@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 13.03.2012 22:01, Paolo Bonzini wrote: >>> ssize_t qemu_sendv_recvv(int sockfd, struct iovec *iov, >>> size_t offset, size_t bytes, bool do_sendv); > Hmm, since you are at it however, perhaps you could add an argument to > these functions and qemu_sendv_recvv for the length of the iovec, so > that it can detect out-of-bounds access. Yes such an argument may be needed here, and this function looks differently from the usual iov_* family in this very place: lack of iov_cnt. > This would also "fix" the fact > that you changed the signature of the function in a compatible way, > while making the API incompatible. As you prefer, but we can call it a > deal for the #defines. ;) Heh for the #defines. Defines are fine when used properly, really. In this case, the #define just adds an argument and nothing more. For qemu_sendv and qemu_recvv, I'll just go for renaming these to be iov_send and iov_recv, and move them to iov.[ch]. And for qemu_co_sendv()&Co, which actually _are_ used, this wont help anyway. Or I can rename them to qemu_iovec_co_send(), to catch the change. But it becomes longer... :( What do you think? Thank you! /mjt