|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Bug fix for shadow_get_page_from_l1e(). Don't try to loo
ChangeSet 1.1236.33.3, 2005/03/15 12:30:46+00:00, mafetter@xxxxxxxxxxxxxxxx
Bug fix for shadow_get_page_from_l1e(). Don't try to look for the
owner of an invalid mfn.
Signed-off-by: michael.fetterman@xxxxxxxxxxxx
arch/x86/shadow.c | 3 ++-
include/asm-x86/shadow.h | 6 ++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff -Nru a/xen/arch/x86/shadow.c b/xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c 2005-04-05 12:08:25 -04:00
+++ b/xen/arch/x86/shadow.c 2005-04-05 12:08:25 -04:00
@@ -1724,7 +1724,8 @@
unsigned long opte = *ppte;
unsigned long npte = opte & ~_PAGE_RW;
- shadow_get_page_from_l1e(mk_l1_pgentry(npte), d);
+ if ( npte & _PAGE_PRESENT)
+ shadow_get_page_from_l1e(mk_l1_pgentry(npte), d);
*ppte = npte;
put_page_from_l1e(mk_l1_pgentry(opte), d);
diff -Nru a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h
--- a/xen/include/asm-x86/shadow.h 2005-04-05 12:08:24 -04:00
+++ b/xen/include/asm-x86/shadow.h 2005-04-05 12:08:25 -04:00
@@ -246,9 +246,15 @@
shadow_get_page_from_l1e(l1_pgentry_t l1e, struct domain *d)
{
int res = get_page_from_l1e(l1e, d);
+ unsigned long mfn;
struct domain *owner;
+ ASSERT( l1_pgentry_val(l1e) & _PAGE_PRESENT );
+
if ( unlikely(!res) && IS_PRIV(d) && !shadow_mode_translate(d) &&
+ !(l1_pgentry_val(l1e) & L1_DISALLOW_MASK) &&
+ (mfn = l1_pgentry_to_pfn(l1e)) &&
+ pfn_is_ram(mfn) &&
(owner = page_get_owner(pfn_to_page(l1_pgentry_to_pfn(l1e)))) &&
(d != owner) )
{
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Bug fix for shadow_get_page_from_l1e(). Don't try to look for the,
BitKeeper Bot <=
|
|
|
|
|