qemu/contrib
Stefan Hajnoczi db68f4ff06 libvhost-user: add vmsg_set_reply_u64() helper
The VhostUserMsg request is reused as the reply by message processing
functions.  This is risky since request fields may corrupt the reply if
the vhost-user message handler function forgets to re-initialize them.

Changing this practice would be very invasive but we can introduce a
helper function to make u64 payload replies safe.  This also eliminates
code duplication in message processing functions.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190626074815.19994-2-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-07-04 17:00:32 -04:00
..
elf2dmp Clean up a few header guard symbols 2019-06-12 13:20:20 +02:00
gitdm contrib: gitdm: add a mapping for Janus Technologies 2019-03-12 19:31:29 +00:00
ivshmem-client Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
ivshmem-server Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
libvhost-user libvhost-user: add vmsg_set_reply_u64() helper 2019-07-04 17:00:32 -04:00
rdmacm-mux Use #include "..." for our own headers, <...> for others 2019-05-13 08:58:55 +02:00
systemd contrib: add systemd unit files 2017-12-20 22:29:26 +01:00
vhost-user-blk contrib/vhost-user-blk: enable inflight I/O tracking 2019-05-20 18:40:02 -04:00
vhost-user-gpu vhost-user-gpu: initialize msghdr & iov at declaration 2019-06-16 16:16:52 -04:00
vhost-user-input vhost-user-input: check ioctl(EVIOCGNAME) return value 2019-06-16 16:16:52 -04:00
vhost-user-scsi Clean up includes 2018-12-20 10:29:08 +01:00