linux/include/xen
David Vrabel 454d5d882c xen: Add RING_COPY_REQUEST()
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.

CC: stable@vger.kernel.org
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2015-12-18 10:00:17 -05:00
..
interface xen: Add RING_COPY_REQUEST() 2015-12-18 10:00:17 -05:00
acpi.h xen / ACPI: notify xen when reduced hardware sleep is available 2013-07-31 14:22:35 +02:00
balloon.h xen/balloon: use hotplugged pages for foreign mappings etc. 2015-10-23 14:20:05 +01:00
events.h xen/events: Support event channel rebind on ARM 2015-08-20 12:24:15 +01:00
features.h
grant_table.h xen/grant-table: Add an helper to iterate over a specific number of grants 2015-10-23 14:20:46 +01:00
hvc-console.h treewide: use __printf not __attribute__((format(printf,...))) 2011-10-31 17:30:54 -07:00
hvm.h xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
page.h xen: Add Xen specific page definition 2015-10-23 14:20:33 +01:00
platform_pci.h xen/pvhvm: Remove the xen_platform_pci int. 2014-01-03 14:54:53 -05:00
swiotlb-xen.h Merge remote-tracking branch 'stefano/swiotlb-xen-9.1' into stable/for-linus-3.13 2013-11-08 16:10:48 -05:00
tmem.h xen: tmem: enable Xen tmem shim to be built/loaded as a module 2013-04-30 17:04:01 -07:00
xen-ops.h xen/privcmd: Further s/MFN/GFN/ clean-up 2015-09-08 18:03:54 +01:00
xen.h xen/pvh/x86: Define what an PVH guest is (v3). 2014-01-06 10:43:58 -05:00
xenbus_dev.h xenbus: Add support for xenbus backend in stub domain 2012-05-21 09:53:18 -04:00
xenbus.h xen/xenbus: Rename *RING_PAGE* to *RING_GRANT* 2015-10-23 14:20:46 +01:00