qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 035551: net/slirp: Use newer slirp_*_hostxfwd


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 035551: net/slirp: Use newer slirp_*_hostxfwd API
Date: Mon, 29 Apr 2024 05:15:36 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 03555199b63aa1fbce24d16287e141c33f572a24
      
https://github.com/qemu/qemu/commit/03555199b63aa1fbce24d16287e141c33f572a24
  Author: Nicholas Ngai <nicholas@ngai.me>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M net/slirp.c

  Log Message:
  -----------
  net/slirp: Use newer slirp_*_hostxfwd API

libslirp provides a newer slirp_*_hostxfwd API meant for
address-agnostic forwarding instead of the is_udp parameter which is
limited to just TCP/UDP.

This paves the way for IPv6 and Unix socket support.

Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Breno Leitao <leitao@debian.org>
Message-Id: <20210925214820.18078-1-nicholas@ngai.me>


  Commit: f2c8aeb1afefcda92054c448b21fc59cdd99db30
      
https://github.com/qemu/qemu/commit/f2c8aeb1afefcda92054c448b21fc59cdd99db30
  Author: Jeuk Kim <jeuk20.kim@samsung.com>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M hw/ufs/ufs.c

  Log Message:
  -----------
  hw/ufs: Fix buffer overflow bug

It fixes the buffer overflow vulnerability in the ufs device.
The bug was detected by sanitizers.

You can reproduce it by:

cat << EOF |\
qemu-system-x86_64 \
-display none -machine accel=qtest -m 512M -M q35 -nodefaults -drive \
file=null-co://,if=none,id=disk0 -device ufs,id=ufs_bus -device \
ufs-lu,drive=disk0,bus=ufs_bus -qtest stdio
outl 0xcf8 0x80000810
outl 0xcfc 0xe0000000
outl 0xcf8 0x80000804
outw 0xcfc 0x06
write 0xe0000058 0x1 0xa7
write 0xa 0x1 0x50
EOF

Resolves: #2299
Fixes: 329f16624499 ("hw/ufs: Support for Query Transfer Requests")
Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>


  Commit: 89ef79063ab8a0066cd8856aa054cd44a9e29da7
      
https://github.com/qemu/qemu/commit/89ef79063ab8a0066cd8856aa054cd44a9e29da7
  Author: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  blockcommit: Reopen base image as RO after abort

If a blockcommit is aborted the base image remains in RW mode, that leads
to a fail of subsequent live migration.

How to reproduce:
  $ virsh snapshot-create-as vm snp1 --disk-only

  *** write something to the disk inside the guest ***

  $ virsh blockcommit vm vda --active --shallow && virsh blockjob vm vda --abort
  $ lsof /vzt/vm.qcow2
  COMMAND      PID USER   FD   TYPE DEVICE   SIZE/OFF NODE NAME
  qemu-syst 433203 root   45u   REG  253,0 1724776448  133 /vzt/vm.qcow2
  $ cat /proc/433203/fdinfo/45
  pos:    0
  flags:  02140002 <==== The last 2 means RW mode

If the base image is in RW mode at the end of blockcommit and was in RO
mode before blockcommit, reopen the base BDS in RO.

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20240404091136.129811-1-alexander.ivanov@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 2bc68cb02cfa70b1f9ad57112196d5d24ab9a726
      
https://github.com/qemu/qemu/commit/2bc68cb02cfa70b1f9ad57112196d5d24ab9a726
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M block/copy-before-write.c

  Log Message:
  -----------
  block/copy-before-write: fix permission

In case when source node does not have any parents, the condition still
works as required: backup job do create the parent by

  block_job_create -> block_job_add_bdrv -> bdrv_root_attach_child

Still, in this case checking @perm variable doesn't work, as backup job
creates the root blk with empty permissions (as it rely on CBW filter
to require correct permissions and don't want to create extra
conflicts).

So, we should not check @perm.

The hack may be dropped entirely when transactional insertion of
filter (when we don't try to recalculate permissions in intermediate
state, when filter does conflict with original parent of the source
node) merged (old big series
"[PATCH v5 00/45] Transactional block-graph modifying API"[1] and it's
current in-flight part is "[PATCH v8 0/7] blockdev-replace"[2])

[1] https://patchew.org/QEMU/20220330212902.590099-1-vsementsov@openvz.org/
[2] https://patchew.org/QEMU/20231017184444.932733-1-vsementsov@yandex-team.ru/

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-2-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 64c4db62a32fd6d98993601ea14ce18b3b64d06b
      
https://github.com/qemu/qemu/commit/64c4db62a32fd6d98993601ea14ce18b3b64d06b
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M block/copy-before-write.c

  Log Message:
  -----------
  block/copy-before-write: support unligned snapshot-discard

First thing that crashes on unligned access here is
bdrv_reset_dirty_bitmap(). Correct way is to align-down the
snapshot-discard request.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-3-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: c0aab14ecc40af40a9eff4ed02f7403cd1d3a15f
      
https://github.com/qemu/qemu/commit/c0aab14ecc40af40a9eff4ed02f7403cd1d3a15f
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M block/block-copy.c
    M block/copy-before-write.c
    M include/block/block-copy.h
    M tests/qemu-iotests/257.out

  Log Message:
  -----------
  block/copy-before-write: create block_copy bitmap in filter node

Currently block_copy creates copy_bitmap in source node. But that is in
bad relation with .independent_close=true of copy-before-write filter:
source node may be detached and removed before .bdrv_close() handler
called, which should call block_copy_state_free(), which in turn should
remove copy_bitmap.

That's all not ideal: it would be better if internal bitmap of
block-copy object is not attached to any node. But that is not possible
now.

The simplest solution is just create copy_bitmap in filter node, where
anyway two other bitmaps are created.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-4-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: e962cb898b33d5c7656ef433e7276c2afd449aea
      
https://github.com/qemu/qemu/commit/e962cb898b33d5c7656ef433e7276c2afd449aea
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M block/backup.c
    M block/block-copy.c
    M block/copy-before-write.c
    M block/copy-before-write.h
    M block/replication.c
    M blockdev.c
    M include/block/block-common.h
    M include/block/block-copy.h
    M include/block/block_int-global-state.h
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: blockdev-backup: add discard-source parameter

Add a parameter that enables discard-after-copy. That is mostly useful
in "push backup with fleecing" scheme, when source is snapshot-access
format driver node, based on copy-before-write filter snapshot-access
API:

[guest]      [snapshot-access] ~~ blockdev-backup ~~> [backup target]
   |            |
   | root       | file
   v            v
[copy-before-write]
   |             |
   | file        | target
   v             v
[active disk]   [temp.img]

In this case discard-after-copy does two things:

 - discard data in temp.img to save disk space
 - avoid further copy-before-write operation in discarded area

Note that we have to declare WRITE permission on source in
copy-before-write filter, for discard to work. Still we can't take it
unconditionally, as it will break normal backup from RO source. So, we
have to add a parameter and pass it thorough bdrv_open flags.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20240313152822.626493-5-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 2ca7608c6b8d57fd6347b11af12a0f035263efef
      
https://github.com/qemu/qemu/commit/2ca7608c6b8d57fd6347b11af12a0f035263efef
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    A tests/qemu-iotests/tests/backup-discard-source
    A tests/qemu-iotests/tests/backup-discard-source.out

  Log Message:
  -----------
  iotests: add backup-discard-source

Add test for a new backup option: discard-source.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-6-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 8cf345ca49c8826ad1c916040d086a3b6c8e9c42
      
https://github.com/qemu/qemu/commit/8cf345ca49c8826ad1c916040d086a3b6c8e9c42
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M net/slirp.c

  Log Message:
  -----------
  Merge tag 'samuel-thibault' of https://people.debian.org/~sthibault/qemu into 
staging

slirp: Use newer slirp_*_hostxfwd API

Nicholas Ngai (1):
  net/slirp: Use newer slirp_*_hostxfwd API

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEqpLrvfAUiqYaQ7iu5IlMrEVBS7AFAmYu5OgACgkQ5IlMrEVB
# S7DGOQ//cnW2fiXnj+ijmQ4+h8Yj2vCtGZ9+7D74Q6KSbY0AkYVhRm+qWJA1XJrR
# Y7JvetqKGCxhol24x0aopDvcybIDU/EqFrxhmZY+dJhZWxfsvYpLGJ5TfulRA1gy
# PSDYQi6LlwDJyQT08po2TLA0zSOmxycdrA8mTJuf8UHDiXnwcy9WjDFF1tCrGoN4
# LgvsUUpQ6y9fZQxbFyPFwtHkUeREvfhRPT0c5lNsF0Cot8uXt5YOyCc0XKjX1d0F
# ucuCwv65gsIdcaDHcHIYhyKZX3lfAXAAaDe9njvISYcyOlyXOZS9df3tuMTeEW8S
# wuN10WuQHI7mpLS/IomnmYxb16lyhhwLC9kmNVZt6jGfTYB/xHUeXb9gIsdkc05s
# Cxy+VdxgnzGji6dOwufI8/ufWSti1PRB1yhZsmJtLC7MDOv5EJkxrmRXhWkr6LYZ
# CU52uT7CsOTKdmmwdjTUqkfswB70Js68J33Rbm3VWJlnSBAQ/ioGt50r7tqFBwT8
# HQc4CqYBT58BPb7rKrUa6dCy1uAprYl2juU3vl/nHcp2zIxIar1yzQK3OG+3h6fZ
# Mrg/C5l4WiEKFgdl5sMj1xJK15aC42/UyzxUFM12usKaOtKjQAIkjx6U7HCjwfdR
# BZmxTx2u7jGm9a0R3qhVhZjmIIbfLoeEHepLMOAHN+TGAl0bcxc=
# =22cZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 28 Apr 2024 05:08:08 PM PDT
# gpg:                using RSA key AA92EBBDF0148AA61A43B8AEE4894CAC45414BB0
# gpg: Good signature from "Samuel Thibault <samuel.thibault@ens-lyon.org>" 
[undefined]
# gpg:                 aka "Samuel Thibault <sthibault@debian.org>" [undefined]
# gpg:                 aka "Samuel Thibault <samuel.thibault@gnu.org>" [unknown]
# gpg:                 aka "Samuel Thibault <samuel.thibault@inria.fr>" 
[undefined]
# gpg:                 aka "Samuel Thibault <samuel.thibault@labri.fr>" 
[undefined]
# gpg:                 aka "Samuel Thibault <samuel.thibault@aquilenet.fr>" 
[unknown]
# gpg:                 aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>" 
[unknown]
# gpg:                 aka "Samuel Thibault <sthibault@hypra.fr>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#      Subkey fingerprint: AA92 EBBD F014 8AA6 1A43  B8AE E489 4CAC 4541 4BB0

* tag 'samuel-thibault' of https://people.debian.org/~sthibault/qemu:
  net/slirp: Use newer slirp_*_hostxfwd API

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 96d1951ec03755d66f185f44898b5f45c942a3a8
      
https://github.com/qemu/qemu/commit/96d1951ec03755d66f185f44898b5f45c942a3a8
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M hw/ufs/ufs.c

  Log Message:
  -----------
  Merge tag 'pull-ufs-20240429' of https://gitlab.com/jeuk20.kim/qemu into 
staging

ufs queue

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEUBfYMVl8eKPZB+73EuIgTA5dtgIFAmYvEScACgkQEuIgTA5d
# tgL3Qg//R3IcISQqqDaJ/ySzKGmkyohJSc6ySLYvla4Aki7PV+um2Dx/XNS7uG2b
# d3Qz4m6QaOKsocLfldRTn2FxVK238Rp5HNny5vc0kGRdwpR514B7aU0FhpT7qObS
# wbbgRdDddIBIiCFLhtXtg5/TK2h32VxGrVI6llX4gmd2VzqM0e4xeG1Oj8rZseOY
# SAgvDv68s1YwlO1p1vPvst/H+mUKYkqtPN1mjfCIn5tM6ss8kCLUnKjqGAg1BnSN
# xwaGrqqOlzQK2+aV02eiItiow8evU/h+c9eiTnBo/EvBwjoBn6flNXABWXFENnmP
# JjVIFeiNzSFhBPDzO23GXviuEt96j5lrcGYR48HYMZfEbJNpblXzWvEGMZWnXNgx
# Q3cpcarZ4vSWIflR9OnCSQaGLA0Ny6YqLbmrM/oD+v67EITafKKc+flmiF7DBASB
# fUoEsdffdA37LDtygJb7hfUhvPQWWAujmGzZ1cDP8Oa0MhT7aiD0Z/WqhhjVQbM0
# iLiCDDD0cc0pmT3vw3EnEjKjnSkY3H62Q7pnYHiQgij4Ls/Rdd/P7OkSd0aI82t0
# TooWGZJnyf8rjAzY2cEB1Twrhmhuyt9NnGxip9W8JsQBZMLabD2CahOm83zsk7jZ
# 3fOONz6XrW2ttFkLZcRd4x4YjKONjEXsSX2ZrXTZ5t3USz/VNvY=
# =Vwyi
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 28 Apr 2024 08:16:55 PM PDT
# gpg:                using RSA key 5017D831597C78A3D907EEF712E2204C0E5DB602
# gpg: Good signature from "Jeuk Kim <jeuk20.kim@samsung.com>" [unknown]
# gpg:                 aka "Jeuk Kim <jeuk20.kim@gmail.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 5017 D831 597C 78A3 D907  EEF7 12E2 204C 0E5D B602

* tag 'pull-ufs-20240429' of https://gitlab.com/jeuk20.kim/qemu:
  hw/ufs: Fix buffer overflow bug

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: de83d2fdaad9351cb7944014696d1c03cae46a78
      
https://github.com/qemu/qemu/commit/de83d2fdaad9351cb7944014696d1c03cae46a78
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M block/backup.c
    M block/block-copy.c
    M block/copy-before-write.c
    M block/copy-before-write.h
    M block/mirror.c
    M block/replication.c
    M blockdev.c
    M include/block/block-common.h
    M include/block/block-copy.h
    M include/block/block_int-global-state.h
    M qapi/block-core.json
    M tests/qemu-iotests/257.out
    A tests/qemu-iotests/tests/backup-discard-source
    A tests/qemu-iotests/tests/backup-discard-source.out

  Log Message:
  -----------
  Merge tag 'pull-block-jobs-2024-04-29' of https://gitlab.com/vsementsov/qemu 
into staging

Block jobs patches for 2024-04-29

- backup: discard-source parameter
- blockcommit: Reopen base image as RO after abort

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEi5wmzbL9FHyIDoahVh8kwfGfefsFAmYvgvkACgkQVh8kwfGf
# efu7LhAAm6CU9XPHU+z1m4T4wcTB1IEz+/B/SoMB0C2BUiz+Q+7LhN15l8haeWZA
# 2JMCrnTjNSFzTksvJ0Va4IwpfbaOTAFsAndAziZVBBdqfz0yo9pOjt3aJUMvjZtt
# hgbIDyqaiDm8M7FcjSQ9BaiBT9QFDgkPqU8t94NO4oLq28kTNGZSUaV+H+ZQtxdC
# EAnHBKrmp05UVuIhlcdzsjo1XSzNubdhLmYNJY6wV+91drhu/lTRSg0IAc+UGUda
# KDM+e/kuul2NCiaawVk5uFVuoGZ4NJwg00j8YjCCdrkF0IOLodx3dsNiNsOMlX6m
# p9BPO1iHtPE8MjweuxDOGQw5idwJmHAAu3Qlhx9TuF7oS7kuMxq1rchh/ElxXbHk
# uD7Tp41evxGq74euGBwF0QOIEJgQLCeL1ztbkGsNpc3H6shh673VY0uE2Tp6mErw
# KFYZjepV0nsRmwq74scKb3VNyoD3Xlj9EmV4xpT9KM8bk8Ez2CnkNIrT7pj3brVL
# rF2kD/6Hd/ysb8awJolbUCEuKCNjVkB6ypd9nL5ycYOUg2rlDzhKJwM/tjy0ERBM
# ANK/5n5QSNnw+0BWJ7B2/jVfBerw+0DxMY33T991cv1UlMByiG10nZpLgMO9aq/n
# HnpZw10crlmUIC+wjVxDy7CLCXMSE5NZ0Aljy+ItOG3dMsWQpHI=
# =g1dq
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 29 Apr 2024 04:22:33 AM PDT
# gpg:                using RSA key 8B9C26CDB2FD147C880E86A1561F24C1F19F79FB
# gpg: Good signature from "Vladimir Sementsov-Ogievskiy 
<vsementsov@yandex-team.ru>" [unknown]
# gpg:                 aka "Vladimir Sementsov-Ogievskiy 
<vsementsov@virtuozzo.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8B9C 26CD B2FD 147C 880E  86A1 561F 24C1 F19F 79FB

* tag 'pull-block-jobs-2024-04-29' of https://gitlab.com/vsementsov/qemu:
  iotests: add backup-discard-source
  qapi: blockdev-backup: add discard-source parameter
  block/copy-before-write: create block_copy bitmap in filter node
  block/copy-before-write: support unligned snapshot-discard
  block/copy-before-write: fix permission
  blockcommit: Reopen base image as RO after abort

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/b93e2e34d531...de83d2fdaad9

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

[Prev in Thread] Current Thread [Next in Thread]