migration: SCM_RIGHTS for QEMUFile
authorSteve Sistare <steven.sistare@oracle.com>
Wed, 15 Jan 2025 19:00:39 +0000 (11:00 -0800)
committerFabiano Rosas <farosas@suse.de>
Wed, 29 Jan 2025 14:43:05 +0000 (11:43 -0300)
commitb5779dc7cfbb53583da362da5906733f6cba4c3f
tree425306228f4bb5a1c4b8423788ee4e74ed8b6375
parent2862b6b92467241e3ed378876cc8dbf2e6a8ea6a
migration: SCM_RIGHTS for QEMUFile

Define functions to put/get file descriptors to/from a QEMUFile, for qio
channels that support SCM_RIGHTS.  Maintain ordering such that
  put(A), put(fd), put(B)
followed by
  get(A), get(fd), get(B)
always succeeds.  Other get orderings may succeed but are not guaranteed.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/1736967650-129648-14-git-send-email-steven.sistare@oracle.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/qemu-file.c
migration/qemu-file.h
migration/trace-events