linux/include/xen/interface
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
..
hvm Feature: 2012-10-12 22:20:28 +09:00
io xen: Add RING_COPY_REQUEST() 2016-01-25 10:43:42 +00:00
callback.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
elfnote.h xen/pvh: Support ParaVirtualized Hardware extensions (v3). 2014-01-06 10:44:24 -05:00
event_channel.h xen/events: Add the hypervisor interface for the FIFO-based event channels 2014-01-06 10:07:52 -05:00
features.h xen/arm: get privilege status 2012-08-08 17:20:18 +00:00
grant_table.h xen: grant: use xen_pfn_t type for frame_list. 2012-10-19 15:17:55 -04:00
memory.h xen: implement updated XENMEM_add_to_physmap_range ABI 2013-02-19 22:01:55 -05:00
physdev.h xen: add support for MSI message groups 2014-03-18 14:40:09 +00:00
platform.h xen / ACPI: notify xen when reduced hardware sleep is available 2013-07-31 14:22:35 +02:00
sched.h x86/xen: Support kexec/kdump in HVM guests by doing a soft reset 2015-10-30 13:59:27 +00:00
vcpu.h xen: Support 64-bit PV guest receiving NMIs 2013-08-09 10:55:47 -04:00
version.h xen/acpi: Move the xen_running_on_version_or_later function. 2012-11-28 14:39:31 -05:00
xen-mca.h xen/mce: Add mcelog support for Xen platform 2012-07-19 15:51:36 -04:00
xen.h arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00