All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Christopher Benninger <chrisbenninger@gmail.com>
Cc: xen-devel@lists.xensource.com, Wei Liu <liuw@liuw.name>
Subject: Re: MULTI_mmu_update, HYPERVISOR_mmu_update and pte entry
Date: Thu, 19 May 2011 10:49:51 -0700	[thread overview]
Message-ID: <4DD5583F.5060506@goop.org> (raw)
In-Reply-To: <BANLkTikc6uumHUicraZp4TH51=Jz7_Ry2g@mail.gmail.com>

On 05/19/2011 10:37 AM, Christopher Benninger wrote:
> Interesting,
>
> Are you talking about when DomU calls setpte?

Within Linux, "current" always evaluates to the current task.  It would
be a bit dubious to use it from within an async interrupt context, but I
don't think usermode ptes can ever be meaningfully updated in that context.

Pagetable updates to the kernel part of the address space have a
different set of rules, so you'll need to either ignore them or cope
with them in some way.  And I'm sure there are some cases where there
could be cross-address space updates, though I can't think of them off
hand (ptrace, perhaps?).

BTW, most usermode updates are done with set_pte_at rather than bare
set_pte, so you get the vaddr along with it.

    J

>
> Chris Benninger
>
> University of Victoria, Computer Science
> cbenning@cs.uvic.ca <mailto:cbenning@cs.uvic.ca>
> http://benninger.ca <http://benninger.ca/>
>
>
>
> On Wed, May 18, 2011 at 1:09 AM, Jeremy Fitzhardinge <jeremy@goop.org
> <mailto:jeremy@goop.org>> wrote:
>
>     On Wed, 2011-05-18 at 13:47 +0800, Wei Liu wrote:
>     > On Wed, May 18, 2011 at 1:25 PM, Christopher Benninger
>     > <chrisbenninger@gmail.com <mailto:chrisbenninger@gmail.com>> wrote:
>     > > Hi Jeremy,
>     > > I am definitely doing something weird, but on purpose. I am
>     trying to
>     > > determine which process specifically owns the pte in question.
>     I have a domU
>     > > module which I can ask for information, I just dont know how
>     to get the ptr
>     > > provided, into a useful context I can send it.
>     >
>     > Most pte updates belong to current process. Maybe you can use CR3 to
>     > determine to which page table a specified pte belongs. But it may be
>     > hard to determine the actual task_struct IMHO.
>
>     If you can record it at the time of the setpte, its easy: "current" is
>     always the current task.
>
>            J
>
>
>

      reply	other threads:[~2011-05-19 17:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 22:41 MULTI_mmu_update, HYPERVISOR_mmu_update and pte entry chrisbenninger
2011-05-17 22:29 ` Jeremy Fitzhardinge
2011-05-18  5:25   ` Christopher Benninger
2011-05-18  5:47     ` Wei Liu
2011-05-18  8:09       ` Jeremy Fitzhardinge
2011-05-19 17:37         ` Christopher Benninger
2011-05-19 17:49           ` Jeremy Fitzhardinge [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=4DD5583F.5060506@goop.org \
    --to=jeremy@goop.org \
    --cc=chrisbenninger@gmail.com \
    --cc=liuw@liuw.name \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.