xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Spencer Michaels <sxmichaels@gmail.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: Reading guest page flags
Date: Fri, 14 Sep 2018 01:01:33 -0700	[thread overview]
Message-ID: <CAMf-k8F6NFiPsm_ezQObZFQoVovW1Ot4_Q+G=ugoxz4zPYESSQ@mail.gmail.com> (raw)
In-Reply-To: <daf65b86-e750-5544-9c5b-fd7ecb977738@bitdefender.com>


[-- Attachment #1.1: Type: text/plain, Size: 1094 bytes --]

Thanks! Sorry, I should have been more specific - I do indeed mean the
regular guest PTEs (and I'm using PV guests which as I understand don't use
EPT anyway). So, it seems I'll have to write my own code for this. I'll
take a look at libvmi's implementation; if anyone knows any other libraries
/ programs that read guest PTEs, that would be helpful to know as well.

On Thu, Sep 13, 2018, 10:47 AM Razvan Cojocaru <rcojocaru@bitdefender.com>
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.
>

[-- Attachment #1.2: Type: text/html, Size: 1482 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

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

      parent reply	other threads:[~2018-09-14  8:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 17:29 Reading guest page flags Spencer Michaels
2018-09-13 17:47 ` Razvan Cojocaru
2018-09-13 18:45   ` Tamas K Lengyel
2018-09-14  8:01   ` Spencer Michaels [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMf-k8F6NFiPsm_ezQObZFQoVovW1Ot4_Q+G=ugoxz4zPYESSQ@mail.gmail.com' \
    --to=sxmichaels@gmail.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).