All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Leonardo Bras <leobras@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	徐闯 <xuchuangxclwt@bytedance.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v4 2/4] QIOChannelSocket: Fix zero-copy send so socket flush works
Date: Mon, 20 Jun 2022 11:27:47 -0400	[thread overview]
Message-ID: <YrCR89nDyzDitcv8@xz-m1.local> (raw)
In-Reply-To: <20220620053944.257547-3-leobras@redhat.com>

On Mon, Jun 20, 2022 at 02:39:43AM -0300, Leonardo Bras wrote:
> Somewhere between v6 and v7 the of the zero-copy-send patchset a crucial
> part of the flushing mechanism got missing: incrementing zero_copy_queued.
> 
> Without that, the flushing interface becomes a no-op, and there is no
> guarantee the buffer is really sent.
> 
> This can go as bad as causing a corruption in RAM during migration.
> 
> Fixes: 2bc58ffc2926 ("QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX")
> Reported-by: 徐闯 <xuchuangxclwt@bytedance.com>
> Signed-off-by: Leonardo Bras <leobras@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu



  parent reply	other threads:[~2022-06-20 15:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20  5:39 [PATCH v4 0/4] MSG_ZEROCOPY fixes & improvements Leonardo Bras
2022-06-20  5:39 ` [PATCH v4 1/4] QIOChannelSocket: Introduce assert and reduce ifdefs to improve readability Leonardo Bras
2022-06-20  8:47   ` Juan Quintela
2022-06-20 15:27   ` Peter Xu
2022-06-20  5:39 ` [PATCH v4 2/4] QIOChannelSocket: Fix zero-copy send so socket flush works Leonardo Bras
2022-06-20  8:48   ` Juan Quintela
2022-06-20 15:27   ` Peter Xu [this message]
2022-06-20  5:39 ` [PATCH v4 3/4] migration: zero-copy flush only at the end of bitmap scanning Leonardo Bras
2022-06-20  9:23   ` Juan Quintela
2022-06-20 15:44     ` Peter Xu
2022-06-21  3:35       ` Leonardo Brás
2022-06-21 14:51         ` Juan Quintela
2022-06-21 15:09           ` Peter Xu
2022-06-21 15:04         ` Peter Xu
2022-06-21  3:26     ` Leonardo Brás
2022-06-20  5:39 ` [PATCH v4 4/4] migration: Change zero_copy_send from migration parameter to migration capability Leonardo Bras
2022-06-20  5:46   ` Leonardo Bras Soares Passos
2022-06-20  9:34   ` Juan Quintela
2022-06-20 15:31   ` Peter Xu
2022-06-20 15:51     ` Juan Quintela
2022-06-21 12:34   ` Markus Armbruster

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=YrCR89nDyzDitcv8@xz-m1.local \
    --to=peterx@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=leobras@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=xuchuangxclwt@bytedance.com \
    /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.