qemu/migration
Peter Xu e74465399c migration/multifd: Replace assert() with error_setg() in recv paths
QPL and UADK multifd backends use assert() to validate wire-controlled
fields like per-page compressed lengths and packet size consistency.  These
asserts will stop working with -DNDEBUG builds, so may stop working.

Replace all assert() calls in the receive path with proper error_setg() so
validation failures are reported gracefully rather than crashing or
silently ignored.

While at it, touch up an assert() in qatzip recv path too.

Cc: qemu-stable <qemu-stable@nongnu.org>
Cc: Yuan Liu <yuan1.liu@intel.com>
Cc: Yichen Wang <yichen.wang@bytedance.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20260728210417.1925078-4-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
(cherry picked from commit cf45083edc)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-08-17 12:26:36 +03:00
..
block-active.c migration/block-active: Remove global active flag 2025-02-06 14:26:51 +01:00
block-dirty-bitmap.c migration: Rename save_live_complete_precopy to save_complete 2025-07-11 10:37:36 -03:00
channel-block.c migration: add FEATURE_SEEKABLE to QIOChannelBlock 2025-11-03 16:04:09 -05:00
channel-block.h migration: introduce a QIOChannel impl for BlockDriverState VMState 2022-06-22 19:33:43 +01:00
channel.c migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
channel.h migration: Move URI parsing to channel.c 2026-01-23 11:32:18 -03:00
colo-failover.c migration/colo: Improve an x-colo-lost-heartbeat error message 2023-02-23 14:10:17 +01:00
colo-stubs.c migration/colo: make colo_incoming_co() return void 2024-05-22 17:34:31 -03:00
colo.c colo: Reuse the return path from migration on primary and secondary side 2026-03-09 08:53:34 -03:00
cpr-exec.c migration: Rename MIG_EVENT_PRECOPY_* to MIG_EVENT_* 2026-02-17 09:43:09 -03:00
cpr-transfer.c migration: Move CPR HUP watch to cpr-transfer.c 2026-01-23 11:32:19 -03:00
cpr.c migration/cpr: Include vfio-cpr.h instead of vfio-device.h 2026-02-17 10:05:24 -03:00
cpu-throttle.c migration: Drop use of Stat64 2026-01-17 10:46:31 +11:00
dirtyrate.c migration/dirtyrate: Do not unlock cpu_list lock twice 2026-01-16 07:05:09 +01:00
dirtyrate.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
exec.c migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
exec.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
fd.c migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
fd.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
file.c migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
file.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
global_state.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
meson.build multifd: Add COLO support 2026-03-09 08:53:32 -03:00
migration-hmp-cmds.c migration: Drop deprecated QMP migrate argument @detach 2026-01-23 11:24:16 -03:00
migration-stats.c migration: Drop use of Stat64 2026-01-17 10:46:31 +11:00
migration-stats.h migration: Drop use of Stat64 2026-01-17 10:46:31 +11:00
migration.c migration: Fix low possibility downtime violation 2026-05-06 22:14:03 +03:00
migration.h migration: Move channel code to channel.c 2026-01-23 11:32:18 -03:00
multifd-colo.c multifd: Add COLO support 2026-03-09 08:53:32 -03:00
multifd-colo.h multifd: Add COLO support 2026-03-09 08:53:32 -03:00
multifd-device-state.c migration: Replace migrate_set_error() with migrate_error_propagate() 2025-12-23 09:24:34 -05:00
multifd-nocomp.c multifd: Add COLO support 2026-03-09 08:53:32 -03:00
multifd-qatzip.c migration/multifd: Replace assert() with error_setg() in recv paths 2026-08-17 12:26:36 +03:00
multifd-qpl.c migration/multifd: Replace assert() with error_setg() in recv paths 2026-08-17 12:26:36 +03:00
multifd-uadk.c migration/multifd: Replace assert() with error_setg() in recv paths 2026-08-17 12:26:36 +03:00
multifd-zero-page.c migration: Drop use of Stat64 2026-01-17 10:46:31 +11:00
multifd-zlib.c migration/multifd: Validate next_packet_size in zlib/zstd recv 2026-08-17 12:26:36 +03:00
multifd-zstd.c migration/multifd: Validate next_packet_size in zlib/zstd recv 2026-08-17 12:26:36 +03:00
multifd.c migration/multifd: Fix leaks of TLS error objects 2026-03-17 13:34:13 -03:00
multifd.h multifd: Add COLO support 2026-03-09 08:53:32 -03:00
options.c migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply 2026-05-06 22:13:20 +03:00
options.h * cleanup include/hw headers 2025-12-29 09:10:40 +11:00
page_cache.c migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE 2025-12-23 09:24:34 -05:00
page_cache.h migration: Clean up signed vs. unsigned XBZRLE cache-size 2021-02-08 11:19:51 +00:00
postcopy-ram.c migration: Cleanup TLS handshake hostname passing 2026-01-23 11:32:16 -03:00
postcopy-ram.h migration: Introduce postcopy incoming setup and cleanup functions 2025-11-03 16:04:10 -05:00
qemu-file.c qemu-file: qemu_file_get_fd(): improve interface 2026-01-23 11:24:18 -03:00
qemu-file.h migration: Remove unnecessary zlib include from qemu-file.h 2026-04-14 15:57:46 +01:00
ram.c ram: Remove colo special-casing 2026-03-09 08:53:31 -03:00
ram.h include: reorganize memory API headers 2025-12-27 10:11:09 +01:00
rdma.c migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
rdma.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
savevm.c migration/savevm.c: reorder usage and assertion of mis->from_src_file 2026-03-16 13:50:17 +03:00
savevm.h colo: Remove ENABLE_COLO savevm command and mark it as deprecated 2026-03-09 08:53:31 -03:00
socket.c migration: Rename instances of start 2026-01-23 11:32:18 -03:00
socket.h migration: Rename instances of start 2026-01-23 11:32:18 -03:00
tls.c migration/channel: Rename migration_channel_connect 2026-01-23 11:32:18 -03:00
tls.h migration: Handle error in the early async paths 2026-01-23 11:32:17 -03:00
trace-events colo: Remove ENABLE_COLO savevm command and mark it as deprecated 2026-03-09 08:53:31 -03:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vfio-stub.c migration/vfio: compile only once 2025-09-02 17:57:05 +02:00
vfio.c migration/vfio: compile only once 2025-09-02 17:57:05 +02:00
vmstate-types.c qemu-file: qemu_file_get_fd(): improve interface 2026-01-23 11:24:18 -03:00
vmstate.c migration: vmstate_save_state_v: fix double error_setg 2026-04-26 05:57:45 +03:00
xbzrle.c migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
xbzrle.h migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
yank_functions.c migration/yank: Use channel features 2024-01-29 11:02:12 +08:00
yank_functions.h migration: Move the yank unregister of channel_close out 2021-07-26 12:45:03 +01:00