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

Re: [Xen-devel] Reading guest page flags



On Thu, Sep 13, 2018 at 11:48 AM Razvan Cojocaru
<rcojocaru@xxxxxxxxxxxxxxx> wrote:
>
> On 9/13/18 8:29 PM, Spencer Michaels wrote:
> > I'm writing an application that can read/write guest memory, and as part
> > of that I need to check whether the page being manipulated is
> > readable/writable by the guest itself. Does Xen have an API that would
> > allow me to read the flags of an arbitrary page on a guest, given either
> > its address or its PFN? I've only been able to find functions that
> > update the existing memory mappings, but none to read them.
>
> If you mean EPT, yes: look at xc_get_mem_access() in xenctrl.h / libxc.
> If you mean "regular" PTEs, no - you'd have to write your own code to
> retrieve that.

LibVMI does that for guest PTEs:
https://github.com/libvmi/libvmi/blob/master/libvmi/libvmi.h#L936

Tamas

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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