linux-imx/include/xen/interface/io
David Vrabel a489a13bfc xen: Add RING_COPY_REQUEST()
commit 454d5d882c upstream.

Using RING_GET_REQUEST() on a shared ring is easy to use incorrectly
(i.e., by not considering that the other end may alter the data in the
shared ring while it is being inspected).  Safe usage of a request
generally requires taking a local copy.

Provide a RING_COPY_REQUEST() macro to use instead of
RING_GET_REQUEST() and an open-coded memcpy().  This takes care of
ensuring that the copy is done correctly regardless of any possible
compiler optimizations.

Use a volatile source to prevent the compiler from reordering or
omitting the copy.

This is part of XSA155.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2016-01-22 21:40:06 +00:00
..
blkif.h xen-blkfront: add BLKIF_OP_DISCARD and discard request struct 2011-10-13 09:48:29 -04:00
console.h
fbif.h xen pvfb: Dynamic mode support (screen resizing) 2008-05-27 10:11:36 +02:00
kbdif.h xen pvfb: Pointer z-axis (mouse wheel) support 2008-05-27 10:11:36 +02:00
netif.h xen-netfront: reduce gso_max_size to account for max TCP header 2013-06-19 02:16:45 +01:00
pciif.h xen-pcifront: Xen PCI frontend driver. 2010-10-18 10:49:37 -04:00
protocols.h xen: Make xen-blkfront write its protocol ABI to xenstore 2008-04-24 23:57:32 +02:00
ring.h xen: Add RING_COPY_REQUEST() 2016-01-22 21:40:06 +00:00
xenbus.h xenbus: Xen paravirtualised PCI hotplug support. 2010-10-18 10:49:35 -04:00
xs_wire.h xen/xenbus: Reject replies with payload > XENSTORE_PAYLOAD_MAX. 2012-01-25 16:13:19 -08:00