[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Getting Machine Physical address from page-fault CR2...


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • Date: Wed, 29 Nov 2006 17:05:32 +0100
  • Delivery-date: Wed, 29 Nov 2006 08:05:48 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AccT0DHNfQAh2e1GS1KY0djL2qcpjQ==
  • Thread-topic: Getting Machine Physical address from page-fault CR2...

I'm trying to write a piece of code to check writes to MMIO-space (as
part of the Configuration Change Verifier, as discussed at the Security
Mini-summit at Summer Xen-Summit in San Jose some weeks back). 

This code needs to check if a physical address matches some list of
known physical addresses... My problem right now is that the method I
thought would work for translating the value in CR2 (after some other
initial checking - like that the page is actually present), doesn't
work... I tried something along the lines of:

traps.c: do_page_fault():
pa = shadow_gva_to_gpa(current, addr); /* addr = read_cr2() earlier in
the code */

It appeats that current->arch.shadow.mode is sometimes NULL, which isn't
what I expected... 

Is there some other (better?) way to achieve this? I mean aside from
walking the page-table?

--
Mats



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.