]> xenbits.xensource.com Git - xen.git/commit
mem_access: Add helper API to setup ring and enable mem_access
authorAravindh Puthiyaparambil <aravindp@cisco.com>
Tue, 20 May 2014 23:35:44 +0000 (16:35 -0700)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Jun 2014 10:31:52 +0000 (11:31 +0100)
commit6ae2df93c277b4093b3e54c9606387d1ba6d10fe
tree9403d3dba18d5ec2dc3ac7e55dbf13a0759585fb
parentf7e46156a1c006a6eb5489e0227d39229eec316d
mem_access: Add helper API to setup ring and enable mem_access

tools/libxc: Add helper function to setup ring for mem events
This patch adds a helper function that maps the ring, enables mem_event
and removes the ring from the guest physmap while the domain is paused.
This can be used by all mem_events but is only enabled for mem_access at
the moment.

tests/xen-access: Use helper API to setup ring and enable mem_access
Prior to this patch, xen-access was setting up the ring page in a way
that would give a malicous guest a window to write in to the shared ring
page. This patch fixes this by using the helper API that does it safely
on behalf of xen-access.

This is XSA-99.

Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/libxc/xc_mem_access.c
tools/libxc/xc_mem_event.c
tools/libxc/xenctrl.h
tools/tests/xen-access/xen-access.c