[PULL 00/16] Treewide I/O handle cleanup

Daniel P. Berrangé posted 16 patches 1 week, 2 days ago
Failed in applying to current master (apply log)
Maintainers: Eric Blake <eblake@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Gustavo Romero <gustavo.romero@linaro.org>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Jagannathan Raman <jag.raman@oracle.com>, John Levon <john.levon@nutanix.com>, Thanos Makatos <thanos.makatos@nutanix.com>, "Cédric Le Goater" <clg@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Hailiang Zhang <zhanghailiang@xfusion.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Jason Wang <jasowang@redhat.com>, Michael Roth <michael.roth@amd.com>, Kostiantyn Kostiuk <kkostiuk@redhat.com>, Fam Zheng <fam@euphon.net>, Alexander Bulekov <alxndr@bu.edu>, Bandan Das <bsd@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Darren Kenny <darren.kenny@oracle.com>, Qiuhao Li <Qiuhao.Li@outlook.com>, Laurent Vivier <lvivier@redhat.com>, Zhao Liu <zhao1.liu@intel.com>, Stefan Weil <sw@weilnetz.de>, Coiby Xu <Coiby.Xu@gmail.com>
MAINTAINERS                             |  2 +-
block/nbd.c                             |  4 +-
chardev/char-fd.c                       | 14 ++++--
chardev/char-file.c                     |  6 ++-
chardev/char-pipe.c                     |  9 +++-
chardev/char-pty.c                      |  4 +-
chardev/char-serial.c                   |  9 ++--
chardev/char-socket.c                   | 41 ++++++++--------
chardev/char-stdio.c                    | 10 ++--
contrib/ivshmem-server/ivshmem-server.c |  9 +++-
hw/hyperv/syndbg.c                      |  4 +-
hw/input/virtio-input-host.c            |  3 +-
hw/misc/ivshmem-flat.c                  |  3 +-
hw/misc/ivshmem-pci.c                   |  7 ++-
hw/remote/proxy.c                       |  6 ++-
hw/remote/remote-obj.c                  |  6 ++-
hw/vfio-user/proxy.c                    | 11 +++--
hw/virtio/vhost-user.c                  |  5 +-
hw/virtio/vhost-vsock.c                 |  8 +--
include/chardev/char-fd.h               |  2 +-
include/io/channel.h                    | 24 +++++++--
include/qemu/osdep.h                    |  1 +
include/qemu/sockets.h                  |  3 --
io/channel-command.c                    |  9 ++--
io/channel-file.c                       |  3 +-
io/channel-socket.c                     | 65 ++++++++++++++++++++-----
io/channel-tls.c                        |  2 +-
io/channel-websock.c                    |  3 +-
io/channel.c                            |  4 +-
migration/colo.c                        |  5 +-
migration/migration.c                   |  8 +--
migration/postcopy-ram.c                |  2 +-
migration/qemu-file.c                   |  7 +--
migration/qemu-file.h                   |  2 +-
migration/savevm.c                      |  4 +-
nbd/server.c                            |  4 +-
net/dgram.c                             | 28 ++++++-----
net/l2tpv3.c                            |  5 +-
net/socket.c                            | 27 ++++++----
net/stream.c                            |  9 ++--
net/stream_data.c                       | 10 ++--
net/tap-bsd.c                           | 12 ++++-
net/tap-linux.c                         |  7 ++-
net/tap-solaris.c                       |  7 ++-
net/tap.c                               | 21 +++-----
qga/channel-posix.c                     |  7 ++-
qga/commands-posix.c                    |  3 +-
scsi/qemu-pr-helper.c                   |  9 ++--
tests/qtest/fuzz/virtio_net_fuzz.c      |  2 +-
tests/qtest/vhost-user-test.c           |  4 +-
tests/unit/io-channel-helpers.c         |  5 +-
tests/unit/socket-helpers.c             |  4 +-
tests/unit/test-crypto-tlssession.c     |  8 +--
tests/unit/test-io-channel-tls.c        |  4 +-
tests/unit/test-iov.c                   |  5 +-
tools/i386/qemu-vmsr-helper.c           |  6 ++-
ui/input-linux.c                        |  3 +-
ui/vnc.c                                |  2 +-
util/event_notifier-posix.c             |  7 ++-
util/main-loop.c                        |  5 +-
util/oslib-posix.c                      | 22 ++++-----
util/oslib-win32.c                      | 25 +++++-----
util/vhost-user-server.c                | 26 +++++++---
63 files changed, 369 insertions(+), 213 deletions(-)
[PULL 00/16] Treewide I/O handle cleanup
Posted by Daniel P. Berrangé 1 week, 2 days ago
The following changes since commit e7c1e8043a69c5a8efa39d4f9d111f7c72c076e6:

  Merge tag 'pull-loongarch-20250918' of https://github.com/gaosong715/qemu into staging (2025-09-18 07:08:08 -0700)

are available in the Git repository at:

  https://gitlab.com/berrange/qemu tags/misc-fixes-pull-request

for you to fetch changes up to 34523df31962401871ff091a9d0993ac87a9848a:

  util/vhost-user-server: vu_message_read(): improve error handling (2025-09-19 12:46:07 +0100)

----------------------------------------------------------------
 * Update security triage contact address
 * Switch to common helper for changing blocking flag
   across socket and non-socket FDs
 * Check and honour failures to the blocking flag on FDs
 * Don't touch blocking flags on FDs received during migration
 * Remove redundant O_NONBLOCK/O_CLOEXEC handling in chardev

----------------------------------------------------------------

Daniel P. Berrangé (1):
  MAINTAINERS: list qemu-security@nongnu.org as security contact

Vladimir Sementsov-Ogievskiy (15):
  migration/qemu-file: don't make incoming fds blocking again
  io/channel: document how qio_channel_readv_full() handles fds
  char-socket: tcp_chr_recv(): drop extra _set_(block,cloexec)
  char-socket: tcp_chr_recv(): add comment
  util: add qemu_set_blocking() function
  treewide: handle result of qio_channel_set_blocking()
  migration: qemu_file_set_blocking(): add errp parameter
  util: drop qemu_socket_set_nonblock()
  util: drop qemu_socket_try_set_nonblock()
  io/channel-socket: rework qio_channel_socket_copy_fds()
  util: drop qemu_socket_set_block()
  treewide: use qemu_set_blocking instead of g_unix_set_fd_nonblocking
  chardev: qemu_chr_open_fd(): add errp
  chardev: close an fd on failure path
  util/vhost-user-server: vu_message_read(): improve error handling

 MAINTAINERS                             |  2 +-
 block/nbd.c                             |  4 +-
 chardev/char-fd.c                       | 14 ++++--
 chardev/char-file.c                     |  6 ++-
 chardev/char-pipe.c                     |  9 +++-
 chardev/char-pty.c                      |  4 +-
 chardev/char-serial.c                   |  9 ++--
 chardev/char-socket.c                   | 41 ++++++++--------
 chardev/char-stdio.c                    | 10 ++--
 contrib/ivshmem-server/ivshmem-server.c |  9 +++-
 hw/hyperv/syndbg.c                      |  4 +-
 hw/input/virtio-input-host.c            |  3 +-
 hw/misc/ivshmem-flat.c                  |  3 +-
 hw/misc/ivshmem-pci.c                   |  7 ++-
 hw/remote/proxy.c                       |  6 ++-
 hw/remote/remote-obj.c                  |  6 ++-
 hw/vfio-user/proxy.c                    | 11 +++--
 hw/virtio/vhost-user.c                  |  5 +-
 hw/virtio/vhost-vsock.c                 |  8 +--
 include/chardev/char-fd.h               |  2 +-
 include/io/channel.h                    | 24 +++++++--
 include/qemu/osdep.h                    |  1 +
 include/qemu/sockets.h                  |  3 --
 io/channel-command.c                    |  9 ++--
 io/channel-file.c                       |  3 +-
 io/channel-socket.c                     | 65 ++++++++++++++++++++-----
 io/channel-tls.c                        |  2 +-
 io/channel-websock.c                    |  3 +-
 io/channel.c                            |  4 +-
 migration/colo.c                        |  5 +-
 migration/migration.c                   |  8 +--
 migration/postcopy-ram.c                |  2 +-
 migration/qemu-file.c                   |  7 +--
 migration/qemu-file.h                   |  2 +-
 migration/savevm.c                      |  4 +-
 nbd/server.c                            |  4 +-
 net/dgram.c                             | 28 ++++++-----
 net/l2tpv3.c                            |  5 +-
 net/socket.c                            | 27 ++++++----
 net/stream.c                            |  9 ++--
 net/stream_data.c                       | 10 ++--
 net/tap-bsd.c                           | 12 ++++-
 net/tap-linux.c                         |  7 ++-
 net/tap-solaris.c                       |  7 ++-
 net/tap.c                               | 21 +++-----
 qga/channel-posix.c                     |  7 ++-
 qga/commands-posix.c                    |  3 +-
 scsi/qemu-pr-helper.c                   |  9 ++--
 tests/qtest/fuzz/virtio_net_fuzz.c      |  2 +-
 tests/qtest/vhost-user-test.c           |  4 +-
 tests/unit/io-channel-helpers.c         |  5 +-
 tests/unit/socket-helpers.c             |  4 +-
 tests/unit/test-crypto-tlssession.c     |  8 +--
 tests/unit/test-io-channel-tls.c        |  4 +-
 tests/unit/test-iov.c                   |  5 +-
 tools/i386/qemu-vmsr-helper.c           |  6 ++-
 ui/input-linux.c                        |  3 +-
 ui/vnc.c                                |  2 +-
 util/event_notifier-posix.c             |  7 ++-
 util/main-loop.c                        |  5 +-
 util/oslib-posix.c                      | 22 ++++-----
 util/oslib-win32.c                      | 25 +++++-----
 util/vhost-user-server.c                | 26 +++++++---
 63 files changed, 369 insertions(+), 213 deletions(-)

-- 
2.50.1


Re: [PULL 00/16] Treewide I/O handle cleanup
Posted by Richard Henderson 1 week, 1 day ago
On 9/19/25 04:50, Daniel P. Berrangé wrote:
> The following changes since commit e7c1e8043a69c5a8efa39d4f9d111f7c72c076e6:
> 
>    Merge tag 'pull-loongarch-20250918' ofhttps://github.com/gaosong715/qemu into staging (2025-09-18 07:08:08 -0700)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/berrange/qemu tags/misc-fixes-pull-request
> 
> for you to fetch changes up to 34523df31962401871ff091a9d0993ac87a9848a:
> 
>    util/vhost-user-server: vu_message_read(): improve error handling (2025-09-19 12:46:07 +0100)
> 
> ----------------------------------------------------------------
>   * Update security triage contact address
>   * Switch to common helper for changing blocking flag
>     across socket and non-socket FDs
>   * Check and honour failures to the blocking flag on FDs
>   * Don't touch blocking flags on FDs received during migration
>   * Remove redundant O_NONBLOCK/O_CLOEXEC handling in chardev


Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/10.2 as appropriate.

r~