linux/include/xen/interface/io
David Vrabel f75855ceef 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: Luis Henriques <luis.henriques@canonical.com>
History 2016-01-25 10:43:42 +00:00
..
blkif.h xen blkif.h: fix comment typo in discard-alignment 2014-05-28 14:17:30 -04:00
console.h xen: Add Xen interface header files 2007-07-18 08:47:42 -07:00
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-net{back, front}: Document multi-queue feature in netif.h 2014-06-04 14:48:17 -07:00
pciif.h xen-pcifront: Xen PCI frontend driver. 2010-10-18 10:49:37 -04:00
protocols.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
ring.h xen: Add RING_COPY_REQUEST() 2016-01-25 10:43:42 +00:00
tpmif.h drivers/tpm: add xen tpmfront interface 2013-08-09 10:57:06 -04:00
xenbus.h xenbus: Xen paravirtualised PCI hotplug support. 2010-10-18 10:49:35 -04:00
xs_wire.h xen/pv-on-hvm kexec: shutdown watches from old kernel 2012-07-19 15:52:02 -04:00