aboutsummaryrefslogtreecommitdiffstats
path: root/xen/xsm/dummy.c
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2011-04-12 14:55:25 +0100
committerStephen Smalley <sds@tycho.nsa.gov>2011-04-12 14:55:25 +0100
commitad17ef1932d8c2be57ba3af4f6dc95607c6a629a (patch)
treefaac7a078edbd4d3851e3ea2e889d320d311e42a /xen/xsm/dummy.c
parent1e7545fd7cf40876121ab3ce185c90e555a81dc2 (diff)
downloadxen-ad17ef1932d8c2be57ba3af4f6dc95607c6a629a.tar.gz
xen-ad17ef1932d8c2be57ba3af4f6dc95607c6a629a.tar.bz2
xen-ad17ef1932d8c2be57ba3af4f6dc95607c6a629a.zip
xsm: Fix xsm_mmu_* and xsm_update_va_mapping hooks
This is an attempt to properly fix the hypervisor crash previously described in http://marc.info/?l=xen-devel&m=128396289707362&w=2 In looking into this issue, I think the proper fix is to move the xsm_mmu_* and xsm_update_va_mapping hook calls later in the callers, after more validation has been performed and the page_info struct is readily available, and pass the page_info to the hooks. This patch moves the xsm_mmu_normal_update, xsm_mmu_machphys_update and xsm_update_va_mapping hook calls accordingly, and updates their interfaces and hook function implementations. This appears to resolve the crashes for me. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Diffstat (limited to 'xen/xsm/dummy.c')
-rw-r--r--xen/xsm/dummy.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 9716f941cf..bf07540ca5 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -405,19 +405,20 @@ static int dummy_domain_memory_map (struct domain *d)
return 0;
}
-static int dummy_mmu_normal_update (struct domain *d, struct domain *f,
- intpte_t fpte)
+static int dummy_mmu_normal_update (struct domain *d,
+ intpte_t fpte, struct page_info *page)
{
return 0;
}
-static int dummy_mmu_machphys_update (struct domain *d, unsigned long mfn)
+static int dummy_mmu_machphys_update (struct domain *d, struct page_info *page)
{
return 0;
}
-static int dummy_update_va_mapping (struct domain *d, struct domain *f,
- l1_pgentry_t pte)
+static int dummy_update_va_mapping (struct domain *d,
+ l1_pgentry_t pte,
+ struct page_info *page)
{
return 0;
}