qemu-irix/hw/9pfs
Stefan Hajnoczi 45d6cdff48 hw/9pfs: replace iovec manipulation with QEMUIOVector
The v9fs_read() and v9fs_write() functions rely on iovec[] manipulation
code should be replaced with QEMUIOVector to avoid duplicating code.
In the future it may be possible to make the code even more concise by
using QEMUIOVector consistently across virtio and 9pfs.

The "v" format specifier for pdu_marshal() and pdu_unmarshal() is
dropped since it does not actually pack/unpack anything.  The specifier
was also not implemented to update the offset variable and could only be
used at the end of a format string, another sign that this shouldn't
really be a format specifier.  Instead, see the new
v9fs_init_qiov_from_pdu() function.

This change avoids a possible iovec[] buffer overflow when indirect
vrings are used since the number of vectors is now limited by the
underlying VirtQueueElement and cannot be out-of-bounds.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-10 09:29:11 -06:00
..
codir.c hw/9pfs: Abstract open state of fid to V9fsFidOpenState 2011-10-31 12:34:17 +05:30
cofile.c hw/9pfs: Use the correct file descriptor in Fsdriver Callback 2012-01-10 09:27:11 -06:00
cofs.c hw/9pfs: Use export_flag for indicating whether fs driver use path names. 2011-10-15 15:30:27 +05:30
coxattr.c hw/9pfs: Implement TFLUSH operation 2011-09-22 21:38:52 +05:30
virtio-9p-coth.c Don't use g_thread_get_initialized. 2011-09-09 12:58:16 -05:00
virtio-9p-coth.h hw/9pfs: Abstract open state of fid to V9fsFidOpenState 2011-10-31 12:34:17 +05:30
virtio-9p-device.c hw/9pfs: Add qdev.reset callback for virtio-9p-pci device 2012-01-10 09:27:00 -06:00
virtio-9p-handle.c hw/9pfs: Use the correct file descriptor in Fsdriver Callback 2012-01-10 09:27:11 -06:00
virtio-9p-local.c hw/9pfs: Use the correct file descriptor in Fsdriver Callback 2012-01-10 09:27:11 -06:00
virtio-9p-posix-acl.c configure: fix detection for xattr.h on modern distributions 2011-11-09 12:06:20 -06:00
virtio-9p-synth.c hw/9pfs: Use the correct file descriptor in Fsdriver Callback 2012-01-10 09:27:11 -06:00
virtio-9p-synth.h hw/9pfs: Add synthetic file system support using 9p 2011-10-31 12:34:18 +05:30
virtio-9p-xattr-user.c [virtio-9p] Make rpath thread safe 2011-06-01 10:25:17 -07:00
virtio-9p-xattr.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
virtio-9p-xattr.h configure: fix detection for xattr.h on modern distributions 2011-11-09 12:06:20 -06:00
virtio-9p.c hw/9pfs: replace iovec manipulation with QEMUIOVector 2012-01-10 09:29:11 -06:00
virtio-9p.h hw/9pfs: use migration blockers to prevent live migration when virtfs export path is mounted 2012-01-10 09:26:39 -06:00