android_kernel_google_msm/include/xen/interface/io
David Vrabel ffac746691 xen: Add RING_COPY_REQUEST()
commit 454d5d882c7e412b840e3c99010fe81a9862f6fb 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: Zefan Li <lizefan@huawei.com>
2016-10-26 23:15:39 +08:00
..
blkif.h xen/blkback: correctly respond to unknown, non-native requests 2013-04-05 10:04:18 -07:00
console.h
fbif.h
kbdif.h
netif.h xen-netfront: reduce gso_max_size to account for max TCP header 2014-06-07 16:02:15 -07:00
pciif.h xen-pcifront: Xen PCI frontend driver. 2010-10-18 10:49:37 -04:00
protocols.h
ring.h xen: Add RING_COPY_REQUEST() 2016-10-26 23:15:39 +08:00
xenbus.h xenbus: Xen paravirtualised PCI hotplug support. 2010-10-18 10:49:35 -04:00
xs_wire.h Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2012-01-10 10:09:59 -08:00