Message ID | 20250207142758.6936-1-farosas@suse.de (mailing list archive) |
---|---|
Headers | show |
Series | crypto,io,migration: Add support to gnutls_bye() | expand |
On 7.02.2025 15:27, Fabiano Rosas wrote: > v2: > > Added the premature_ok logic; > Added compat property for QEMU <9.1; > Refactored the existing handshake code; > > CI run: > https://gitlab.com/farosas/qemu/-/pipelines/1660800456 > > v1: > https://lore.kernel.org/r/20250206175824.22664-1-farosas@suse.de > > Hi, > > We've been discussing a way to stop multifd recv threads from getting > an error at the end of migration when the source threads close the > iochannel without ending the TLS session. > > The original issue was introduced by commit 1d457daf86 > ("migration/multifd: Further remove the SYNC on complete") which > altered the synchronization of the source and destination in a manner > that causes the destination to already be waiting at recv() when the > source closes the connection. > > One approach would be to issue gnutls_bye() at the source after all > the data has been sent. The destination would then gracefully exit > when it gets EOF. > > Aside from stopping the recv thread from seeing an error, this also > creates a contract that all connections should be closed only after > the TLS session is ended. This helps to avoid masking a legitimate > issue where the connection is closed prematurely. > I've rebased my patch set on top of this version and can confirm it works too (with respect to VFIO migration and QEMU tests). The updated series is available at its usual place. Thanks, Maciej