From: Michael Tokarev <mjt@tls.msk.ru>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends
Date: Tue, 13 Mar 2012 23:35:20 +0400 [thread overview]
Message-ID: <4F5FA178.9060206@msgid.tls.msk.ru> (raw)
In-Reply-To: <4F5F8B8D.9010202@redhat.com>
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
next prev parent reply other threads:[~2012-03-13 19:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 19:14 [Qemu-devel] [PATCHv3 0/9] cleanup/consolidate some iovec functions Michael Tokarev
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 1/9] refresh iov_* functions Michael Tokarev
2012-03-13 17:44 ` Paolo Bonzini
2012-03-13 18:28 ` Michael Tokarev
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 2/9] consolidate qemu_iovec_memset{, _skip}() into single function and use existing iov_memset() Michael Tokarev
2012-03-13 17:46 ` Paolo Bonzini
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 3/9] allow qemu_iovec_from_buffer() to specify offset from which to start copying Michael Tokarev
2012-03-13 11:10 ` Kevin Wolf
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 4/9] consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent Michael Tokarev
2012-03-13 18:02 ` Paolo Bonzini
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 5/9] change qemu_iovec_to_buf() to match other to, from_buf functions Michael Tokarev
2012-03-13 18:02 ` Paolo Bonzini
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 6/9] change prototypes of qemu_sendv() and qemu_recvv() Michael Tokarev
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 7/9] export qemu_sendv_recvv() and use it in " Michael Tokarev
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends Michael Tokarev
2012-03-13 17:52 ` Paolo Bonzini
2012-03-13 18:01 ` Paolo Bonzini
2012-03-13 19:35 ` Michael Tokarev [this message]
2012-03-12 19:14 ` [Qemu-devel] [PATCHv3 9/9] rewrite and comment qemu_sendv_recvv() Michael Tokarev
2012-03-13 16:09 ` [Qemu-devel] [PATCHv3 0/9] cleanup/consolidate some iovec functions Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5FA178.9060206@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.