x86: check remote MMIO remap permissions
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Wed, 26 Sep 2012 09:56:07 +0000 (11:56 +0200)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Wed, 26 Sep 2012 09:56:07 +0000 (11:56 +0200)
commit8e804aec451a072022eece0980481ab545b5cd75
tree513cb4af4154c824c8cfed80b9e86605533b67bb
parent4047479dfa0ae519ecac19528e01c2816f0c34bc
x86: check remote MMIO remap permissions

When a domain is mapping pages from a different pg_owner domain, the
iomem_access checks are currently only applied to the pg_owner domain,
potentially allowing a domain with a more restrictive iomem_access
policy to have the pages mapped into its page tables. To catch this,
also check the owner of the page tables. The current domain does not
need to be checked because the ability to manipulate a domain's page
tables implies full access to the target domain, so checking that
domain's permission is sufficient.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c